Skip to content

Commit

Permalink
fixed. no need to manually divide again if using fromS
Browse files Browse the repository at this point in the history
  • Loading branch information
CL16gtgh committed May 30, 2024
1 parent 494f6ef commit 30a5878
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/interfaces/src/AMSInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ float AMSInterface::get_filtered_max_cell_temp() {
}

float AMSInterface::get_filtered_min_cell_voltage() {
bms_low_voltage = HYTECH_low_voltage_ro_fromS(bms_voltages_.low_voltage_ro) / 10000.0;
bms_low_voltage = HYTECH_low_voltage_ro_fromS(bms_voltages_.low_voltage_ro);
filtered_min_cell_voltage = filtered_min_cell_voltage * cell_temp_alpha + (1.0 - cell_voltage_alpha) * bms_low_voltage;
return filtered_min_cell_voltage;
}
Expand Down
7 changes: 7 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@ void loop()
Serial.print("Brake percent: ");
Serial.println(pedals_system.getPedalsSystemDataCopy().brakePercent);
Serial.println();
Serial.print("Derating factor: ");
Serial.println(ams_interface.get_acc_derate_factor());
Serial.print("Filtered min cell voltage: ");
Serial.println(ams_interface.get_filtered_min_cell_voltage());
Serial.print("Filtered max cell temp: ");
Serial.println(ams_interface.get_filtered_max_cell_temp());
Serial.println();

Serial.println();
}
Expand Down

0 comments on commit 30a5878

Please sign in to comment.