Browse Source

Rover: Simplify boolean expression

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
zr-v5.1
Patrick José Pereira 4 years ago committed by Randy Mackay
parent
commit
030b6f2a49
  1. 6
      Rover/ekf_check.cpp
  2. 2
      Rover/mode_acro.cpp

6
Rover/ekf_check.cpp

@ -112,11 +112,7 @@ bool Rover::ekf_over_threshold() @@ -112,11 +112,7 @@ bool Rover::ekf_over_threshold()
return true;
}
if (ekf_position_ok()) {
return false;
}
return true;
return !ekf_position_ok();
}
// ekf_position_ok - returns true if the ekf claims it's horizontal absolute position estimate is ok and home position is set

2
Rover/mode_acro.cpp

@ -49,7 +49,7 @@ void ModeAcro::update() @@ -49,7 +49,7 @@ void ModeAcro::update()
bool ModeAcro::requires_velocity() const
{
return g2.motors.have_skid_steering()? false: true;
return !g2.motors.have_skid_steering();
}
// sailboats in acro mode support user manually initiating tacking from transmitter

Loading…
Cancel
Save