battery_status: remove custom_faults

This commit is contained in:
Matthias Grob 2024-07-19 15:29:08 +02:00 committed by Silvan Fuhrer
parent 72ed160aa9
commit a18c18e163
2 changed files with 2 additions and 4 deletions

View File

@ -54,7 +54,6 @@ uint8 BATTERY_FAULT_FAILED_TO_ARM = 10 # Battery had a problem while arming
uint8 BATTERY_FAULT_COUNT = 11 # Counter - keep it as last element!
uint16 faults # Smart battery supply status/fault flags (bitmask) for health indication.
uint32 custom_faults # Bitmask indicating smart battery internal manufacturer faults, those are not user actionable.
uint8 warning # Current battery warning
uint8 mode # Battery mode. Note, the normal operation mode

View File

@ -190,11 +190,10 @@ void BatteryChecks::checkAndReport(const Context &context, Report &reporter)
/* EVENT
* @description
* The battery reported a failure which might be dangerous to fly with.
* Manufacturer error code: {4}
*/
reporter.healthFailure<uint8_t, battery_fault_reason_t, events::px4::enums::suggested_action_t, uint32_t>
reporter.healthFailure<uint8_t, battery_fault_reason_t, events::px4::enums::suggested_action_t>
(NavModes::All, health_component_t::battery, events::ID("check_battery_fault"), {events::Log::Emergency, events::LogInternal::Warning},
"Battery {1}: {2}. {3}", index + 1, static_cast<battery_fault_reason_t>(fault_index), action, battery.custom_faults);
"Battery {1}: {2}. {3}", index + 1, static_cast<battery_fault_reason_t>(fault_index), action);
if (reporter.mavlink_log_pub()) {
mavlink_log_emergency(reporter.mavlink_log_pub(), "Battery %d: %s. %s \t", index + 1,