Rover: Simplify boolean expression

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2021-02-03 11:04:38 -03:00 committed by Randy Mackay
parent ffe356d597
commit 030b6f2a49
2 changed files with 2 additions and 6 deletions

View File

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

View File

@ -49,7 +49,7 @@ void ModeAcro::update()
bool ModeAcro::requires_velocity() const 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 // sailboats in acro mode support user manually initiating tacking from transmitter