Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Jul 30, 2024
1 parent ae6e957 commit d0ab406
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/core1_sub_tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub fn maybe_offload_events(
event_logger: &mut EventLogger,
flash_storage: &mut OnboardFlash,
clock_freq: u32,
time: &SyncedDateTime,

mut watchdog: Option<&mut bsp::hal::Watchdog>,
) {
if event_logger.has_events_to_offload() {
Expand Down Expand Up @@ -64,7 +66,13 @@ pub fn maybe_offload_events(
if attempts > 100 {
warn!("Failed sending logger event to raspberry pi");
success = false;

event_logger.log_event(
LoggerEvent::new(
LoggerEventKind::LostSync,
time.get_timestamp_micros(&timer),
),
flash_storage,
);
break 'transfer_event;
}
//takes tc2-agent about this long to poll again will always fail otherwise
Expand Down Expand Up @@ -140,6 +148,7 @@ pub fn offload_flash_storage_and_events(
event_logger,
flash_storage,
clock_freq,
time,
if watchdog.is_some() {
Some(watchdog.as_mut().unwrap())
} else {
Expand Down
1 change: 1 addition & 0 deletions src/core1_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ pub fn core_1_task(
&mut event_logger,
&mut flash_storage,
clock_freq,
&synced_date_time,
None,
);
}
Expand Down

0 comments on commit d0ab406

Please sign in to comment.