mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 02:21:36 +08:00
Use binary operator~ instead of logical operator!
This commit is contained in:
committed by
Lorenz Meier
parent
c323b64742
commit
d0b4f1e225
+2
-2
@@ -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]);
|
_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) {
|
if (_mag_test_ratio[index] > 1.0f) {
|
||||||
healthy = false;
|
healthy = false;
|
||||||
_innov_check_fail_status.value |= ((1 << (index + 3)) != 0);
|
_innov_check_fail_status.value |= (1 << (index + 3));
|
||||||
} else {
|
} else {
|
||||||
_innov_check_fail_status.value &= !((1 << (index + 3)) != 0);
|
_innov_check_fail_status.value &= ~(1 << (index + 3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user