Skip to content

Commit

Permalink
Add debug output for Inverter lilygo
Browse files Browse the repository at this point in the history
  • Loading branch information
dalathegreat committed Nov 27, 2023
1 parent 956aa8a commit bf1e10c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Software/Software.ino
Original file line number Diff line number Diff line change
Expand Up @@ -638,4 +638,7 @@ void update_values() {
#ifdef SOLAX_CAN
update_values_can_solax();
#endif
#ifdef SERIAL_LINK_RECEIVER
update_values_serial_link();
#endif
}
21 changes: 20 additions & 1 deletion Software/src/battery/SERIAL-LINK-RECEIVER-FROM-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ void manageSerialLinkReceiver() {
}

unsigned long minutesLost = (currentTime - lastGood) / 60000UL;
;
if (minutesLost > 0 && lastGood > 0) {
// lose 25% each minute of data loss
if (minutesLost < 4) {
Expand Down Expand Up @@ -124,3 +123,23 @@ void manageSerialLinkReceiver() {
}
#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);
}
1 change: 1 addition & 0 deletions Software/src/battery/SERIAL-LINK-RECEIVER-FROM-BATTERY.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern bool inverterAllowsContactorClosing; //Bool, 1=true, 0=false

void manageSerialLinkReceiver();
void update_values_serial_link();

#endif

0 comments on commit bf1e10c

Please sign in to comment.