From 89bdf32915be4e12ed810b01b9d1787efcc1514f Mon Sep 17 00:00:00 2001 From: Daan Steenbergen Date: Fri, 15 Mar 2024 22:37:35 +0100 Subject: [PATCH] fix(seeder-example): make sure the speed updates are not preemptively filtered out This fixes a bug where the speed doesn't get updated when re-entering the main screen and speed isn't changing --- examples/seeder_example/vt_application.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/examples/seeder_example/vt_application.cpp b/examples/seeder_example/vt_application.cpp index 8eed1a20..946763fc 100644 --- a/examples/seeder_example/vt_application.cpp +++ b/examples/seeder_example/vt_application.cpp @@ -278,28 +278,19 @@ void SeederVtApplication::handle_numeric_value_events(const isobus::VirtualTermi } } -void SeederVtApplication::handle_machine_selected_speed(const std::shared_ptr mssData, bool changed) +void SeederVtApplication::handle_machine_selected_speed(const std::shared_ptr mssData, bool) { - if (changed) - { - process_new_speed(SpeedSources::MachineSelected, mssData->get_machine_speed()); - } + process_new_speed(SpeedSources::MachineSelected, mssData->get_machine_speed()); } -void SeederVtApplication::handle_ground_based_speed(const std::shared_ptr gbsData, bool changed) +void SeederVtApplication::handle_ground_based_speed(const std::shared_ptr gbsData, bool) { - if (changed) - { - process_new_speed(SpeedSources::GroundBased, gbsData->get_machine_speed()); - } + process_new_speed(SpeedSources::GroundBased, gbsData->get_machine_speed()); } -void SeederVtApplication::handle_wheel_based_speed(const std::shared_ptr wbsData, bool changed) +void SeederVtApplication::handle_wheel_based_speed(const std::shared_ptr wbsData, bool) { - if (changed) - { - process_new_speed(SpeedSources::WheelBased, wbsData->get_machine_speed()); - } + process_new_speed(SpeedSources::WheelBased, wbsData->get_machine_speed()); } void SeederVtApplication::process_new_speed(SpeedSources source, std::uint32_t speed)