mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
fix(safety_button): blink the 16 bits of each safety LED pattern
The driver runs at 30 Hz and shows each bit of the 16-bit LED pattern for 3 runs, as the PX4IO firmware shows one per run at 10 Hz, but it restarted the pattern after 46 runs instead of 48: the last bit lasted one run instead of three, and each pattern 1.52 s instead of 1.58 s. Assisted-by: Claude:opus-5.5 Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
1 parent
fe434f93e6
commit
1064bf28f7
1 file changed
+1
-1
@@ -146,7 +146,7 @@ SafetyButton::FlashButton()
|
||||
// Turn the LED on if we have a 1 at the current bit position
|
||||
px4_arch_gpiowrite(GPIO_LED_SAFETY, !((uint16_t)pattern & (1 << (_blink_counter++ / 3))));
|
||||
|
||||
if (_blink_counter > 45) {
|
||||
if (_blink_counter >= 48) {
|
||||
_blink_counter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user