Skip to content

Commit

Permalink
fix formatting (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeechey committed Jun 10, 2024
1 parent eaf8eff commit 4f8e82f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sensors/inverter_current.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ std::optional<core::Float> InverterCurrent::readCurrent()
const int inverter_current_voltage
= *inverter_current * (MAX_VOLTAGE - virtual_ground) + virtual_ground;
const core::Float current
= inverter_current_voltage * ((MAX_CURRENT - MIN_CURRENT) / (MAX_VOLTAGE - MIN_VOLTAGE)) + MIN_CURRENT;
= inverter_current_voltage * ((MAX_CURRENT - MIN_CURRENT) / (MAX_VOLTAGE - MIN_VOLTAGE))
+ MIN_CURRENT;
const core::Float reference_voltage_biased = reference_voltage + virtual_ground;
const core::Float current_difference = current - reference_voltage_biased;
return current_difference;
Expand Down

0 comments on commit 4f8e82f

Please sign in to comment.