clang-tidy readability-simplify-boolean-expr (#235)

This commit is contained in:
Daniel Agar
2017-02-02 00:17:43 -05:00
committed by GitHub
parent 47b8ef258b
commit 7883085e4a
3 changed files with 4 additions and 23 deletions
+1 -6
View File
@@ -138,12 +138,7 @@ bool Ekf::get_terrain_vert_pos(float *ret)
// The height is useful if the uncertainty in terrain height is significantly smaller than than the estimated height above terrain
bool accuracy_useful = (sqrtf(_terrain_var) < 0.2f * fmaxf((_terrain_vpos - _state.pos(2)), _params.rng_gnd_clearance));
if (_time_last_imu - _time_last_hagl_fuse < 1e6 || accuracy_useful) {
return true;
} else {
return false;
}
return (_time_last_imu - _time_last_hagl_fuse < 1e6) || accuracy_useful;
}
void Ekf::get_hagl_innov(float *hagl_innov)