Skip to content

Commit

Permalink
fix: power conversion in kW
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonidotpy committed Nov 19, 2023
1 parent 80073e9 commit 5e10075
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mainboard/Src/peripherals/can_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ HAL_StatusTypeDef can_car_send(uint16_t id) {
primary_hv_current_converted_t conv_curr = { 0 };

conv_curr.current = current_get_current();
conv_curr.power = conv_curr.current * CONVERT_VALUE_TO_INTERNAL_VOLTAGE(internal_voltage_get_tsp());
conv_curr.power = (conv_curr.current * CONVERT_VALUE_TO_INTERNAL_VOLTAGE(internal_voltage_get_tsp())) / 1000.f;
conv_curr.energy = 0;
conv_curr.soc = 0;

Expand Down

0 comments on commit 5e10075

Please sign in to comment.