Skip to content

Commit

Permalink
AP_HAL_ESP32: Change the magic number to a defined value
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura authored and peterbarker committed Sep 11, 2024
1 parent c6e30c4 commit 6495936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ESP32/RCOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6495936

Please sign in to comment.