Simplify Battery-related Enum Naming (#24265)

* Simplify battery-related enum naming

* Fix mistakenly removed string in enum names

* Fix missing renamings

* Update outdated file

* msg: Increase battery_status version since the enum naming was changed

* Revert message version increase

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
Sebastian Domoszlai
2025-02-28 11:42:40 -09:00
committed by GitHub
co-authored by Matthias Grob
parent 336d055923
commit b5f37c9fa6
25 changed files with 101 additions and 101 deletions
+5 -5
View File
@@ -199,19 +199,19 @@ void Batmon::RunImpl()
// TODO: This critical setting should be set with BMS info or through a paramter
// Setting a hard coded BATT_CELL_VOLTAGE_THRESHOLD_FAILED may not be appropriate
//if (_lifetime_max_delta_cell_voltage > BATT_CELL_VOLTAGE_THRESHOLD_FAILED) {
// new_report.warning = battery_status_s::BATTERY_WARNING_CRITICAL;
// new_report.warning = battery_status_s::WARNING_CRITICAL;
if (new_report.remaining > _low_thr) {
new_report.warning = battery_status_s::BATTERY_WARNING_NONE;
new_report.warning = battery_status_s::WARNING_NONE;
} else if (new_report.remaining > _crit_thr) {
new_report.warning = battery_status_s::BATTERY_WARNING_LOW;
new_report.warning = battery_status_s::WARNING_LOW;
} else if (new_report.remaining > _emergency_thr) {
new_report.warning = battery_status_s::BATTERY_WARNING_CRITICAL;
new_report.warning = battery_status_s::WARNING_CRITICAL;
} else {
new_report.warning = battery_status_s::BATTERY_WARNING_EMERGENCY;
new_report.warning = battery_status_s::WARNING_EMERGENCY;
}
new_report.interface_error = perf_event_count(_interface->_interface_errors);