mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Add debug output for Inverter lilygo
This commit is contained in:
parent
956aa8a712
commit
bf1e10c32b
3 changed files with 24 additions and 1 deletions
|
@ -638,4 +638,7 @@ void update_values() {
|
||||||
#ifdef SOLAX_CAN
|
#ifdef SOLAX_CAN
|
||||||
update_values_can_solax();
|
update_values_can_solax();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SERIAL_LINK_RECEIVER
|
||||||
|
update_values_serial_link();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,6 @@ void manageSerialLinkReceiver() {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long minutesLost = (currentTime - lastGood) / 60000UL;
|
unsigned long minutesLost = (currentTime - lastGood) / 60000UL;
|
||||||
;
|
|
||||||
if (minutesLost > 0 && lastGood > 0) {
|
if (minutesLost > 0 && lastGood > 0) {
|
||||||
// lose 25% each minute of data loss
|
// lose 25% each minute of data loss
|
||||||
if (minutesLost < 4) {
|
if (minutesLost < 4) {
|
||||||
|
@ -124,3 +123,23 @@ void manageSerialLinkReceiver() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void update_values_serial_link() {
|
||||||
|
Serial.println(SOC);
|
||||||
|
Serial.println(StateOfHealth);
|
||||||
|
Serial.println(battery_voltage);
|
||||||
|
Serial.println(battery_current);
|
||||||
|
Serial.println(capacity_Wh);
|
||||||
|
Serial.println(remaining_capacity_Wh);
|
||||||
|
Serial.println(max_target_discharge_power);
|
||||||
|
Serial.println(max_target_charge_power);
|
||||||
|
Serial.println(bms_status);
|
||||||
|
Serial.println(bms_char_dis_status);
|
||||||
|
Serial.println(stat_batt_power);
|
||||||
|
Serial.println(temperature_min);
|
||||||
|
Serial.println(temperature_max);
|
||||||
|
Serial.println(cell_max_voltage);
|
||||||
|
Serial.println(cell_min_voltage);
|
||||||
|
Serial.println(batteryAllowsContactorClosing);
|
||||||
|
Serial.println(inverterAllowsContactorClosing);
|
||||||
|
}
|
||||||
|
|
|
@ -35,5 +35,6 @@ extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false
|
||||||
extern bool inverterAllowsContactorClosing; //Bool, 1=true, 0=false
|
extern bool inverterAllowsContactorClosing; //Bool, 1=true, 0=false
|
||||||
|
|
||||||
void manageSerialLinkReceiver();
|
void manageSerialLinkReceiver();
|
||||||
|
void update_values_serial_link();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue