Improvement: ECMP contactor closing (#1177)

* Add contactor closing and diagnostic commands
This commit is contained in:
Daniel Öster 2025-06-12 12:55:31 +03:00 committed by GitHub
parent 27ca07c6bb
commit f44091997f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 2051 additions and 43 deletions

View file

@ -28,6 +28,11 @@ std::vector<BatteryCommand> battery_commands = {
[](Battery* b) {
b->reset_NVROL();
}},
{"resetContactor", "Perform contactor reset", "reset contactors?",
[](Battery* b) { return b && b->supports_contactor_reset(); },
[](Battery* b) {
b->reset_contactor();
}},
{"resetDTC", "Erase DTC", "erase DTCs?", [](Battery* b) { return b && b->supports_reset_DTC(); },
[](Battery* b) {
b->reset_DTC();
@ -56,6 +61,11 @@ std::vector<BatteryCommand> battery_commands = {
[](Battery* b) {
b->reset_SOH();
}},
{"setFactoryMode", "Set Factory Mode", "set factory mode and disable isolation measurement?",
[](Battery* b) { return b && b->supports_factory_mode_method(); },
[](Battery* b) {
b->set_factory_mode();
}},
{"toggleSOC", "Toggle SOC method",
"toggle SOC method? This will toggle between ESTIMATED and MEASURED SOC methods.",
[](Battery* b) { return b && b->supports_toggle_SOC_method(); },