mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 18:29:48 +02:00
Invert min-max
This commit is contained in:
parent
dc84b15e2f
commit
aecf2bbcbb
1 changed files with 10 additions and 10 deletions
|
@ -202,17 +202,17 @@ void update_values_can_pylon() { //This function maps all the values fetched fr
|
||||||
PYLON_4211.data.u8[7] = (StateOfHealth * 0.01);
|
PYLON_4211.data.u8[7] = (StateOfHealth * 0.01);
|
||||||
|
|
||||||
#ifdef INVERT_VOLTAGE //Useful for Sofar inverters
|
#ifdef INVERT_VOLTAGE //Useful for Sofar inverters
|
||||||
//Minvoltage (eg 300.0V = 3000 , 16bits long) Charge Cutoff Voltage
|
|
||||||
PYLON_4220.data.u8[0] = (min_voltage & 0x00FF);
|
|
||||||
PYLON_4220.data.u8[1] = (min_voltage >> 8);
|
|
||||||
PYLON_4221.data.u8[0] = (min_voltage & 0x00FF);
|
|
||||||
PYLON_4221.data.u8[1] = (min_voltage >> 8);
|
|
||||||
|
|
||||||
//Maxvoltage (eg 400.0V = 4000 , 16bits long) Discharge Cutoff Voltage
|
//Maxvoltage (eg 400.0V = 4000 , 16bits long) Discharge Cutoff Voltage
|
||||||
PYLON_4220.data.u8[2] = (max_voltage & 0x00FF);
|
PYLON_4220.data.u8[0] = (max_voltage & 0x00FF);
|
||||||
PYLON_4220.data.u8[3] = (max_voltage >> 8);
|
PYLON_4220.data.u8[1] = (max_voltage >> 8);
|
||||||
PYLON_4221.data.u8[2] = (max_voltage & 0x00FF);
|
PYLON_4221.data.u8[0] = (max_voltage & 0x00FF);
|
||||||
PYLON_4221.data.u8[3] = (max_voltage >> 8);
|
PYLON_4221.data.u8[1] = (max_voltage >> 8);
|
||||||
|
|
||||||
|
//Minvoltage (eg 300.0V = 3000 , 16bits long) Charge Cutoff Voltage
|
||||||
|
PYLON_4220.data.u8[2] = (min_voltage & 0x00FF);
|
||||||
|
PYLON_4220.data.u8[3] = (min_voltage >> 8);
|
||||||
|
PYLON_4221.data.u8[2] = (min_voltage & 0x00FF);
|
||||||
|
PYLON_4221.data.u8[3] = (min_voltage >> 8);
|
||||||
#else
|
#else
|
||||||
//Minvoltage (eg 300.0V = 3000 , 16bits long) Charge Cutoff Voltage
|
//Minvoltage (eg 300.0V = 3000 , 16bits long) Charge Cutoff Voltage
|
||||||
PYLON_4220.data.u8[0] = (min_voltage >> 8);
|
PYLON_4220.data.u8[0] = (min_voltage >> 8);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue