From c9f64aeea8aa549a1031785c8ec0134057c8ac05 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Sat, 2 Nov 2024 09:39:44 -0800 Subject: [PATCH] cannode: safety_button: fix compatibility with Ardupilot (#23876) --- src/drivers/uavcannode/Publishers/SafetyButton.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/uavcannode/Publishers/SafetyButton.hpp b/src/drivers/uavcannode/Publishers/SafetyButton.hpp index 136cd27c45f7..4634acc887fd 100644 --- a/src/drivers/uavcannode/Publishers/SafetyButton.hpp +++ b/src/drivers/uavcannode/Publishers/SafetyButton.hpp @@ -75,7 +75,8 @@ class SafetyButton : if (safety_button.triggered) { ardupilot::indication::Button Button{}; Button.button = ardupilot::indication::Button::BUTTON_SAFETY; - Button.press_time = UINT8_MAX; + // NOTE: Ardupilot checks that the press time is exactly 10, PX4 checks >= 10 + Button.press_time = 10; uavcan::Publisher::broadcast(Button); } }