Fix temperature readings, misinterpreted DDT2000 XML

This commit is contained in:
Carsten Schmiemann 2022-04-13 22:31:01 +02:00
parent b0f76d800b
commit 0387bf2d6f

View file

@ -230,14 +230,14 @@ void OvmsVehicleRenaultZoePh2::IncomingPollReply(canbus* bus, uint16_t type, uin
void OvmsVehicleRenaultZoePh2::IncomingINV(uint16_t type, uint16_t pid, const char* data, uint16_t len) {
switch (pid) {
case 0x700F: { // Motor temperature
StandardMetrics.ms_v_mot_temp->SetValue(float((CAN_UINT(0) - 40) * 0.001953125), Celcius);
mt_mot_temp_stator1->SetValue(float((CAN_UINT(0) - 40) * 0.001953125), Celcius);
ESP_LOGD(TAG, "700F INV ms_v_mot_temp: %f", float((CAN_UINT(0) - 40) * 0.001953125));
StandardMetrics.ms_v_mot_temp->SetValue(float((CAN_UINT(0) - 40)), Celcius);
mt_mot_temp_stator1->SetValue(float((CAN_UINT(0) - 40)), Celcius);
ESP_LOGD(TAG, "700F INV ms_v_mot_temp: %f", float((CAN_UINT(0) - 40)));
break;
}
case 0x7010: {
mt_mot_temp_stator2->SetValue(float((CAN_UINT(0) - 40) * 0.001953125), Celcius);
ESP_LOGD(TAG, "7010 INV mt_mot_temp_stator2: %f", float((CAN_UINT(0) - 40) * 0.001953125));
mt_mot_temp_stator2->SetValue(float((CAN_UINT(0) - 40)), Celcius);
ESP_LOGD(TAG, "7010 INV mt_mot_temp_stator2: %f", float((CAN_UINT(0) - 40)));
break;
}
}
@ -298,9 +298,9 @@ void OvmsVehicleRenaultZoePh2::IncomingEVC(uint16_t type, uint16_t pid, const ch
ESP_LOGD(TAG, "7ec inv temp: %d", CAN_BYTE(0) - 40);
break;
}
case 0xF446: {
StandardMetrics.ms_v_env_temp->SetValue((float) (CAN_UINT(0) - 40));
ESP_LOGD(TAG, "F446 EVC ms_v_env_temp: %d", CAN_UINT(0));
case 0xF446: { //Ambient temperature
StandardMetrics.ms_v_env_temp->SetValue((float) (CAN_UINT(0) - 40) * 0.01);
ESP_LOGD(TAG, "F446 EVC ms_v_env_temp: %f", (CAN_UINT(0) - 40) * 0.01);
break;
}
}