AP_HAL_ESP32: Change the magic number to a defined value

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

View File

@ -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)) {