Skip to content

Commit

Permalink
Revert "Remove percentage sign from logging"
Browse files Browse the repository at this point in the history
This reverts commit af05f28.
The original commit only fixed the symptoms, the cause has been fixed,
now we ran revert these.
  • Loading branch information
mvgalen committed Jan 2, 2025
1 parent 7f62d70 commit 4b19db2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Software/src/battery/JAGUAR-IPACE-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ void update_values_battery() {
/*Finally print out values to serial if configured to do so*/
#ifdef DEBUG_LOG
logging.println("Values going to inverter");
print_units("SOH: ", (datalayer.battery.status.soh_pptt * 0.01), "pct ");
print_units(", SOC: ", (datalayer.battery.status.reported_soc * 0.01), "pct ");
print_units("SOH%: ", (datalayer.battery.status.soh_pptt * 0.01), "% ");
print_units(", SOC%: ", (datalayer.battery.status.reported_soc * 0.01), "% ");
print_units(", Voltage: ", (datalayer.battery.status.voltage_dV * 0.1), "V ");
print_units(", Max discharge power: ", datalayer.battery.status.max_discharge_power_W, "W ");
print_units(", Max charge power: ", datalayer.battery.status.max_charge_power_W, "W ");
Expand Down
6 changes: 3 additions & 3 deletions Software/src/battery/KIA-E-GMP-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,11 @@ void update_values_battery() { //This function maps all the values fetched via
logging.println("Values from battery: ");
logging.print("SOC BMS: ");
logging.print((uint16_t)SOC_BMS / 10.0, 1);
logging.print("pct | SOC Display: ");
logging.print("% | SOC Display: ");
logging.print((uint16_t)SOC_Display / 10.0, 1);
logging.print("pct | SOH ");
logging.print("% | SOH ");
logging.print((uint16_t)batterySOH / 10.0, 1);
logging.println("pct");
logging.println("%");
logging.print((int16_t)batteryAmps / 10.0, 1);
logging.print(" Amps | ");
logging.print((uint16_t)batteryVoltage / 10.0, 1);
Expand Down
6 changes: 3 additions & 3 deletions Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ void update_values_battery() { //This function maps all the values fetched via
logging.println("Values from battery: ");
logging.print("SOC BMS: ");
logging.print((uint16_t)SOC_BMS / 10.0, 1);
logging.print("pct | SOC Display: ");
logging.print("% | SOC Display: ");
logging.print((uint16_t)SOC_Display / 10.0, 1);
logging.print("pct | SOH ");
logging.print("% | SOH ");
logging.print((uint16_t)batterySOH / 10.0, 1);
logging.println("pct");
logging.println("%");
logging.print((int16_t)batteryAmps / 10.0, 1);
logging.print(" Amps | ");
logging.print((uint16_t)batteryVoltage / 10.0, 1);
Expand Down
4 changes: 2 additions & 2 deletions Software/src/battery/RENAULT-KANGOO-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ void update_values_battery() { //This function maps all the values fetched via

#ifdef DEBUG_LOG
logging.println("Values going to inverter:");
logging.print("SOH: ");
logging.print("SOH%: ");
logging.print(datalayer.battery.status.soh_pptt);
logging.print(", SOC scaled: ");
logging.print(", SOC% scaled: ");
logging.print(datalayer.battery.status.reported_soc);
logging.print(", Voltage: ");
logging.print(datalayer.battery.status.voltage_dV);
Expand Down
8 changes: 4 additions & 4 deletions Software/src/battery/TEST-FAKE-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ void update_values_battery() { /* This function puts fake values onto the parame
/*Finally print out values to serial if configured to do so*/
#ifdef DEBUG_LOG
logging.println("FAKE Values going to inverter");
print_units("SOH: ", (datalayer.battery.status.soh_pptt * 0.01), "pct ");
print_units(", SOC: ", (datalayer.battery.status.reported_soc * 0.01), "pct ");
print_units("SOH%: ", (datalayer.battery.status.soh_pptt * 0.01), "% ");
print_units(", SOC%: ", (datalayer.battery.status.reported_soc * 0.01), "% ");
print_units(", Voltage: ", (datalayer.battery.status.voltage_dV * 0.1), "V ");
print_units(", Max discharge power: ", datalayer.battery.status.max_discharge_power_W, "W ");
print_units(", Max charge power: ", datalayer.battery.status.max_charge_power_W, "W ");
Expand Down Expand Up @@ -109,8 +109,8 @@ void update_values_battery2() { // Handle the values coming in from battery #2
/*Finally print out values to serial if configured to do so*/
#ifdef DEBUG_LOG
logging.println("FAKE Values battery 2 going to inverter");
print_units("SOH 2: ", (datalayer.battery2.status.soh_pptt * 0.01), "pct ");
print_units(", SOC 2: ", (datalayer.battery2.status.reported_soc * 0.01), "pct ");
print_units("SOH 2 %: ", (datalayer.battery2.status.soh_pptt * 0.01), "% ");
print_units(", SOC 2 %: ", (datalayer.battery2.status.reported_soc * 0.01), "% ");
print_units(", Voltage 2: ", (datalayer.battery2.status.voltage_dV * 0.1), "V ");
print_units(", Max discharge power 2: ", datalayer.battery2.status.max_discharge_power_W, "W ");
print_units(", Max charge power 2: ", datalayer.battery2.status.max_charge_power_W, "W ");
Expand Down
6 changes: 3 additions & 3 deletions Software/src/battery/VOLVO-SPA-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ void update_values_battery() { //This function maps all the values fetched via
}

#ifdef DEBUG_LOG
logging.print("BMS reported SOC: ");
logging.print("BMS reported SOC%: ");
logging.println(SOC_BMS);
logging.print("Calculated SOC: ");
logging.print("Calculated SOC%: ");
logging.println(SOC_CALC);
logging.print("Rescaled SOC: ");
logging.print("Rescaled SOC%: ");
logging.println(datalayer.battery.status.reported_soc / 100);
logging.print("Battery current: ");
logging.println(BATT_I);
Expand Down
3 changes: 3 additions & 0 deletions Software/src/charger/CHEVY-VOLT-CHARGER.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ void map_can_frame_to_variable_charger(CAN_frame rx_frame) {
case 0x308:
break;
default:
#ifdef DEBUG_LOG
logging.printf("CAN Rcv unknown frame MsgID=%x\n", rx_frame.MsgID);
#endif
break;
}
}
Expand Down

0 comments on commit 4b19db2

Please sign in to comment.