Skip to content

Commit

Permalink
[Examples]: Return object pool to a known state if VT gets disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
ad3154 authored and GwnDaan committed Feb 10, 2024
1 parent 883755a commit 8c47cfb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/seeder_example/vt_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ void SeederVtApplication::update()

update_alarms();

if (!VTClientInterface.get_is_connected())
{
for (std::uint32_t i = 0; i < static_cast<std::uint32_t>(UpdateVTStateFlags::NumberOfFlags); i++)
{
txFlags.set_flag(i); // Set all flags to bring the pool up with a known state
}
}

slowUpdateTimestamp_ms = isobus::SystemTiming::get_timestamp_ms();
}
speedMessages.update();
Expand Down

0 comments on commit 8c47cfb

Please sign in to comment.