From 2a3bb2549777cca980bf046fed739f8fef58e95d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 14 Nov 2024 17:52:40 +1100 Subject: [PATCH] AP_HAL_ChibiOS: correct logging of MAV_POWER_STATUS_CHANGED need to exclude the changed flag from the comparison! --- libraries/AP_HAL_ChibiOS/AnalogIn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp index 13a06048b129c..b388e5cf77eff 100644 --- a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp +++ b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp @@ -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;