mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Use binary operator~ instead of logical operator!
This commit is contained in:
parent
c323b64742
commit
d0b4f1e225
@ -149,9 +149,9 @@ void Ekf::fuseMag()
|
||||
_mag_test_ratio[index] = sq(_mag_innov[index]) / (sq(math::max(_params.mag_innov_gate, 1.0f)) * _mag_innov_var[index]);
|
||||
if (_mag_test_ratio[index] > 1.0f) {
|
||||
healthy = false;
|
||||
_innov_check_fail_status.value |= ((1 << (index + 3)) != 0);
|
||||
_innov_check_fail_status.value |= (1 << (index + 3));
|
||||
} else {
|
||||
_innov_check_fail_status.value &= !((1 << (index + 3)) != 0);
|
||||
_innov_check_fail_status.value &= ~(1 << (index + 3));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user