AP_HAL_ChibiOS: Change the magic number to a defined value

This commit is contained in:
muramura 2024-05-02 04:50:45 +09:00 committed by Peter Barker
parent e5f4f87b9e
commit 70046e0d58
1 changed files with 1 additions and 1 deletions

View File

@ -2300,7 +2300,7 @@ void RCOutput::safety_update(void)
bool safety_pressed = palReadLine(HAL_GPIO_PIN_SAFETY_IN);
if (safety_pressed) {
AP_BoardConfig *brdconfig = AP_BoardConfig::get_singleton();
if (safety_press_count < 255) {
if (safety_press_count < UINT8_MAX) {
safety_press_count++;
}
if (brdconfig && brdconfig->safety_button_handle_pressed(safety_press_count)) {