Skip to content

Commit

Permalink
Blimp: Do not set the same value
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura committed Apr 17, 2024
1 parent 049d278 commit 3492819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Blimp/radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void Blimp::set_throttle_and_failsafe(uint16_t throttle_pwm)
} else {
// we have a good throttle so reduce failsafe counter
failsafe.radio_counter--;
if ( failsafe.radio_counter <= 0 ) {
if ( failsafe.radio_counter < 0 ) {
failsafe.radio_counter = 0; // check to ensure we don't underflow the counter

// disengage failsafe after three (nearly) consecutive valid throttle values
Expand Down

0 comments on commit 3492819

Please sign in to comment.