From c1dc4a5c9b7f6d49c39fd703e2b81c05014f0398 Mon Sep 17 00:00:00 2001 From: Carsten Schmiemann Date: Sat, 16 Apr 2022 22:28:00 +0200 Subject: [PATCH] Fix PIDs again --- .../vehicle_renaultzoe_ph2/src/EVC_pids.cpp | 4 ++-- .../vehicle_renaultzoe_ph2/src/INV_pids.cpp | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/OVMS.V3/components/vehicle_renaultzoe_ph2/src/EVC_pids.cpp b/OVMS.V3/components/vehicle_renaultzoe_ph2/src/EVC_pids.cpp index b514c83..4aea588 100644 --- a/OVMS.V3/components/vehicle_renaultzoe_ph2/src/EVC_pids.cpp +++ b/OVMS.V3/components/vehicle_renaultzoe_ph2/src/EVC_pids.cpp @@ -43,8 +43,8 @@ void OvmsVehicleRenaultZoePh2::IncomingEVC(uint16_t type, uint16_t pid, const ch break; } case 0x21D0: { //12V Battery Charger/DCDC Temp - StandardMetrics.ms_v_charge_12v_temp->SetValue((float) (CAN_UINT(0) - 40), Celcius); - ESP_LOGD(TAG, "21D0 EVC ms_v_charge_12v_temp: %d", CAN_UINT(0) - 40); + 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: %f", (CAN_UINT(0) - 40) * 0.001); break; } case 0x21CF: { //Inverter status diff --git a/OVMS.V3/components/vehicle_renaultzoe_ph2/src/INV_pids.cpp b/OVMS.V3/components/vehicle_renaultzoe_ph2/src/INV_pids.cpp index c51ccb4..b743eb4 100644 --- a/OVMS.V3/components/vehicle_renaultzoe_ph2/src/INV_pids.cpp +++ b/OVMS.V3/components/vehicle_renaultzoe_ph2/src/INV_pids.cpp @@ -28,19 +28,20 @@ void OvmsVehicleRenaultZoePh2::IncomingINV(uint16_t type, uint16_t pid, const char* data, uint16_t len) { switch (pid) { case 0x700C: { // Inverter temperature - StandardMetrics.ms_v_inv_temp->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); - ESP_LOGD(TAG, "700C INV ms_v_inv_temp: %f", float((CAN_UINT24(0) * 0.1953125) - 40)); + StandardMetrics.ms_v_inv_temp->SetValue(float((CAN_UINT24(0) * 0.001953125) - 40), Celcius); + 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; } case 0x700F: { // Motor, Stator1 temperature - StandardMetrics.ms_v_mot_temp->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); - mt_mot_temp_stator1->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); - ESP_LOGD(TAG, "700F INV ms_v_mot_temp: %f", float((CAN_UINT24(0) * 0.1953125) - 40)); + StandardMetrics.ms_v_mot_temp->SetValue(float((CAN_UINT24(0) * 0.001953125) - 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.001953125) - 40)); break; } case 0x7010: { // Stator 2 temperature - mt_mot_temp_stator2->SetValue(float((CAN_UINT24(0) * 0.1953125) - 40), Celcius); - ESP_LOGD(TAG, "7010 INV mt_mot_temp_stator2: %f", float((CAN_UINT24(0) * 0.1953125) - 40)); + 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.001953125) - 40)); break; } case 0x2001: { // Motor rpm