AP_HAL_ChibiOS: log accumulated power status flags; all flags ever set
This commit is contained in:
parent
4b047625fc
commit
b5d0480bed
@ -473,6 +473,7 @@ void AnalogIn::update_power_flags(void)
|
||||
// the power status has changed while armed
|
||||
flags |= MAV_POWER_STATUS_CHANGED;
|
||||
}
|
||||
_accumulated_power_flags |= flags;
|
||||
_power_flags = flags;
|
||||
}
|
||||
#endif // HAL_USE_ADC
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
float board_voltage(void) override { return _board_voltage; }
|
||||
float servorail_voltage(void) override { return _servorail_voltage; }
|
||||
uint16_t power_status_flags(void) override { return _power_flags; }
|
||||
uint16_t accumulated_power_status_flags(void) const override { return _accumulated_power_flags; }
|
||||
static void adccallback(ADCDriver *adcp);
|
||||
|
||||
private:
|
||||
@ -74,6 +75,8 @@ private:
|
||||
float _servorail_voltage;
|
||||
float _rssi_voltage;
|
||||
uint16_t _power_flags;
|
||||
uint16_t _accumulated_power_flags; // bitmask of all _power_flags ever set
|
||||
|
||||
ADCConversionGroup adcgrpcfg;
|
||||
|
||||
struct pin_info {
|
||||
|
Loading…
Reference in New Issue
Block a user