Skip to content

Commit

Permalink
Feed watchdog as last
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdewid committed Feb 16, 2024
1 parent 5bffcd8 commit 7c04e66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hcu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,6 @@ mod app {
.led
.set_color(&state.as_led(), &vecraft::led::LedState::On);

ctx.local.watchdog.feed();

let id = IdBuilder::from_pgn(PGN::Other(65_288))
.sa(crate::J1939_ADDRESS)
.build();
Expand All @@ -340,6 +338,8 @@ mod app {

ctx.shared.canbus1.lock(|canbus1| canbus1.send(frame));

ctx.local.watchdog.feed();

firmware_state::spawn_after(50.millis().into()).ok();
}

Expand Down
4 changes: 2 additions & 2 deletions m-ecu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ mod app {
.led
.set_color(&state.as_led(), &vecraft::led::LedState::On);

ctx.local.watchdog.feed();

let id = IdBuilder::from_pgn(PGN::Other(65_288))
.sa(crate::J1939_ADDRESS)
.build();
Expand All @@ -254,6 +252,8 @@ mod app {

ctx.shared.canbus1.lock(|canbus1| canbus1.send(frame));

ctx.local.watchdog.feed();

firmware_state::spawn_after(50.millis().into()).unwrap();
}

Expand Down

0 comments on commit 7c04e66

Please sign in to comment.