mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
Invert sign on current reading
This commit is contained in:
parent
8881b06e36
commit
3368bea471
1 changed files with 2 additions and 3 deletions
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
This integration is still ongoing. Here is what still needs to be done in order to use this battery type
|
This integration is still ongoing. Here is what still needs to be done in order to use this battery type
|
||||||
- Disable the isolation resistance requirement that opens contactors after 30s
|
- Disable the isolation resistance requirement that opens contactors after 30s under load. Factory mode?
|
||||||
- Battery says it might need 37E and 485, but no logs of this?
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Do not change code below unless you are sure what you are doing */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
@ -21,7 +20,7 @@ void EcmpBattery::update_values() {
|
||||||
|
|
||||||
datalayer.battery.status.voltage_dV = battery_voltage * 10;
|
datalayer.battery.status.voltage_dV = battery_voltage * 10;
|
||||||
|
|
||||||
datalayer.battery.status.current_dA = battery_current * 10;
|
datalayer.battery.status.current_dA = -(battery_current * 10);
|
||||||
|
|
||||||
datalayer.battery.status.active_power_W = //Power in watts, Negative = charging batt
|
datalayer.battery.status.active_power_W = //Power in watts, Negative = charging batt
|
||||||
((datalayer.battery.status.voltage_dV * datalayer.battery.status.current_dA) / 100);
|
((datalayer.battery.status.voltage_dV * datalayer.battery.status.current_dA) / 100);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue