Skip to content

Commit

Permalink
AP_HAL_ChibiOS: correct logging of MAV_POWER_STATUS_CHANGED
Browse files Browse the repository at this point in the history
need to exclude the changed flag from the comparison!
  • Loading branch information
peterbarker committed Nov 14, 2024
1 parent 86f2167 commit 2a3bb25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/AnalogIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ void AnalogIn::update_power_flags(void)
#endif

if (_power_flags != 0 &&
_power_flags != flags &&
(_power_flags&~MAV_POWER_STATUS_CHANGED) != (flags&~MAV_POWER_STATUS_CHANGED) &&
hal.util->get_soft_armed()) {
// the power status has changed while armed
flags |= MAV_POWER_STATUS_CHANGED;
Expand Down

0 comments on commit 2a3bb25

Please sign in to comment.