From 6495936c7c8be00fec256c2b9cbf1d1db2a16085 Mon Sep 17 00:00:00 2001 From: muramura Date: Thu, 2 May 2024 04:51:19 +0900 Subject: [PATCH] AP_HAL_ESP32: Change the magic number to a defined value --- libraries/AP_HAL_ESP32/RCOutput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ESP32/RCOutput.cpp b/libraries/AP_HAL_ESP32/RCOutput.cpp index 016ccd5b3cace..c456b3d8edad4 100644 --- a/libraries/AP_HAL_ESP32/RCOutput.cpp +++ b/libraries/AP_HAL_ESP32/RCOutput.cpp @@ -317,7 +317,7 @@ void RCOutput::safety_update(void) bool safety_pressed = gpio_get_level((gpio_num_t)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)) {