Skip to content

Commit

Permalink
cannode: safety_button: fix compatibility with Ardupilot (PX4#23876)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakejahl authored Nov 2, 2024
1 parent 9d33f8f commit c9f64ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/drivers/uavcannode/Publishers/SafetyButton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ardupilot::indication::Button>::broadcast(Button);
}
}
Expand Down

0 comments on commit c9f64ae

Please sign in to comment.