Skip to content

Commit

Permalink
Merge pull request #125 from dalathegreat/bugfix/ota
Browse files Browse the repository at this point in the history
Bugfix: OTA not communicated to inverter/user
  • Loading branch information
dalathegreat authored Jan 7, 2024
2 parents beb931c + a7a9284 commit da47e84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Software/src/devboard/webserver/webserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,13 @@ String processor(const String& var) {
void onOTAStart() {
// Log when OTA has started
Serial.println("OTA update started!");
// <Add your own code here>
bms_status = 5; //Inform inverter that we are updating
LEDcolor = BLUE;
}

void onOTAProgress(size_t current, size_t final) {
bms_status = 5; //Inform inverter that we are updating
LEDcolor = BLUE;
// Log every 1 second
if (millis() - ota_progress_millis > 1000) {
ota_progress_millis = millis();
Expand All @@ -334,5 +337,6 @@ void onOTAEnd(bool success) {
} else {
Serial.println("There was an error during OTA update!");
}
// <Add your own code here>
bms_status = 5; //Inform inverter that we are updating
LEDcolor = BLUE;
}

0 comments on commit da47e84

Please sign in to comment.