diff --git a/Software/src/inverter/PYLON-CAN.cpp b/Software/src/inverter/PYLON-CAN.cpp index 7dc060ff..6482a924 100644 --- a/Software/src/inverter/PYLON-CAN.cpp +++ b/Software/src/inverter/PYLON-CAN.cpp @@ -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); #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 + PYLON_4220.data.u8[0] = (max_voltage & 0x00FF); + PYLON_4220.data.u8[1] = (max_voltage >> 8); + PYLON_4221.data.u8[0] = (max_voltage & 0x00FF); + PYLON_4221.data.u8[1] = (max_voltage >> 8); - //Maxvoltage (eg 400.0V = 4000 , 16bits long) Discharge Cutoff Voltage - PYLON_4220.data.u8[2] = (max_voltage & 0x00FF); - PYLON_4220.data.u8[3] = (max_voltage >> 8); - PYLON_4221.data.u8[2] = (max_voltage & 0x00FF); - PYLON_4221.data.u8[3] = (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 //Minvoltage (eg 300.0V = 3000 , 16bits long) Charge Cutoff Voltage PYLON_4220.data.u8[0] = (min_voltage >> 8);