Fix PIDs again

This commit is contained in:
Carsten Schmiemann 2022-04-16 22:28:00 +02:00
parent c6d61ebaa8
commit c1dc4a5c9b
2 changed files with 10 additions and 9 deletions

View file

@ -43,8 +43,8 @@ void OvmsVehicleRenaultZoePh2::IncomingEVC(uint16_t type, uint16_t pid, const ch
break; break;
} }
case 0x21D0: { //12V Battery Charger/DCDC Temp case 0x21D0: { //12V Battery Charger/DCDC Temp
StandardMetrics.ms_v_charge_12v_temp->SetValue((float) (CAN_UINT(0) - 40), Celcius); StandardMetrics.ms_v_charge_12v_temp->SetValue((float) (CAN_UINT(0) - 40) * 0.001), Celcius);
ESP_LOGD(TAG, "21D0 EVC ms_v_charge_12v_temp: %d", CAN_UINT(0) - 40); ESP_LOGD(TAG, "21D0 EVC ms_v_charge_12v_temp: %f", (CAN_UINT(0) - 40) * 0.001);
break; break;
} }
case 0x21CF: { //Inverter status case 0x21CF: { //Inverter status

View file

@ -28,19 +28,20 @@
void OvmsVehicleRenaultZoePh2::IncomingINV(uint16_t type, uint16_t pid, const char* data, uint16_t len) { void OvmsVehicleRenaultZoePh2::IncomingINV(uint16_t type, uint16_t pid, const char* data, uint16_t len) {
switch (pid) { switch (pid) {
case 0x700C: { // Inverter temperature case 0x700C: { // Inverter temperature
StandardMetrics.ms_v_inv_temp->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); StandardMetrics.ms_v_inv_temp->SetValue(float((CAN_UINT24(0) * 0.001953125) - 40), Celcius);
ESP_LOGD(TAG, "700C INV ms_v_inv_temp: %f", float((CAN_UINT24(0) * 0.1953125) - 40)); ESP_LOGD(TAG, "700C INV ms_v_inv_temp RAW: %f", float((CAN_UINT24(0)));
ESP_LOGD(TAG, "700C INV ms_v_inv_temp: %f", float((CAN_UINT24(0) * 0.001953125) - 40));
break; break;
} }
case 0x700F: { // Motor, Stator1 temperature case 0x700F: { // Motor, Stator1 temperature
StandardMetrics.ms_v_mot_temp->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); StandardMetrics.ms_v_mot_temp->SetValue(float((CAN_UINT24(0) * 0.001953125) - 40), Celcius);
mt_mot_temp_stator1->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); mt_mot_temp_stator1->SetValue(float((CAN_UINT24(0) * 0.001953125) - 40), Celcius);
ESP_LOGD(TAG, "700F INV ms_v_mot_temp: %f", float((CAN_UINT24(0) * 0.1953125) - 40)); ESP_LOGD(TAG, "700F INV ms_v_mot_temp: %f", float((CAN_UINT24(0) * 0.001953125) - 40));
break; break;
} }
case 0x7010: { // Stator 2 temperature case 0x7010: { // Stator 2 temperature
mt_mot_temp_stator2->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); mt_mot_temp_stator2->SetValue(float((CAN_UINT24(0) * 0.001953125) - 40), Celcius);
ESP_LOGD(TAG, "7010 INV mt_mot_temp_stator2: %f", float((CAN_UINT24(0) * 0.1953125) - 40)); ESP_LOGD(TAG, "7010 INV mt_mot_temp_stator2: %f", float((CAN_UINT24(0) * 0.001953125) - 40));
break; break;
} }
case 0x2001: { // Motor rpm case 0x2001: { // Motor rpm