Optimize flap detection
This commit is contained in:
parent
8696f7f0ce
commit
e96741f60e
|
@ -47,18 +47,24 @@ void OvmsVehicleRenaultZoePh2::IncomingEVC(uint16_t type, uint16_t pid, const ch
|
|||
if (CAN_NIBL(0) == 1) {
|
||||
mt_inv_status->SetValue("Inverter off");
|
||||
StandardMetrics.ms_v_env_on->SetValue(false);
|
||||
StandardMetrics.ms_v_env_awake->SetValue(false);
|
||||
} else if (CAN_NIBL(0) == 2) {
|
||||
mt_inv_status->SetValue("Inverter on");
|
||||
StandardMetrics.ms_v_env_on->SetValue(true);
|
||||
StandardMetrics.ms_v_env_awake->SetValue(true);
|
||||
StandardMetrics.ms_v_door_chargeport->SetValue(false);
|
||||
} else if (CAN_NIBL(0) == 3) {
|
||||
mt_inv_status->SetValue("Inverter decharging");
|
||||
StandardMetrics.ms_v_env_on->SetValue(false);
|
||||
StandardMetrics.ms_v_env_awake->SetValue(false);
|
||||
} else if (CAN_NIBL(0) == 4) {
|
||||
mt_inv_status->SetValue("Inverter alternator mode");
|
||||
StandardMetrics.ms_v_env_on->SetValue(false);
|
||||
StandardMetrics.ms_v_env_awake->SetValue(false);
|
||||
} else if (CAN_NIBL(0) == 5) {
|
||||
mt_inv_status->SetValue("Inverter ready to sleep");
|
||||
StandardMetrics.ms_v_env_on->SetValue(false);
|
||||
StandardMetrics.ms_v_env_awake->SetValue(false);
|
||||
} else {
|
||||
mt_inv_status->SetValue("Inverter state unknown");
|
||||
}
|
||||
|
|
|
@ -128,7 +128,6 @@ void OvmsVehicleRenaultZoePh2::ConfigChanged(OvmsConfigParam* param) {
|
|||
void OvmsVehicleRenaultZoePh2::ZoeWakeUp() {
|
||||
ESP_LOGI(TAG,"Zoe woke up (CAN Bus activity detected)");
|
||||
mt_bus_awake->SetValue(true);;
|
||||
StandardMetrics.ms_v_env_awake->SetValue(true);
|
||||
StandardMetrics.ms_v_env_charging12v->SetValue(true);
|
||||
POLLSTATE_ON;
|
||||
ESP_LOGI(TAG, "Pollstate switched to ON");
|
||||
|
|
Loading…
Reference in a new issue