Skip to content

Commit

Permalink
Updated binary, removed firmware version in EEPROM
Browse files Browse the repository at this point in the history
  • Loading branch information
MiLeG committed Sep 29, 2019
1 parent 89bbcd1 commit 8f38ff2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Binary file modified firmware.bin
Binary file not shown.
23 changes: 15 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1917,6 +1917,8 @@ bool startupWizard()
}
while(!mp.update());
timeMenu();
EEPROM.writeBool(33, 0);
EEPROM.commit();
// Wifi testing
// if(!mp.wifi)
// {
Expand All @@ -1936,8 +1938,7 @@ bool startupWizard()
while(!mp.update());
wifiConnect();
mp.shutdownPopupEnable(1);
EEPROM.writeBool(33, 0);
EEPROM.commit();

mp.display.setTextColor(TFT_BLACK);
mp.display.setTextSize(1);
mp.display.setTextFont(2);
Expand Down Expand Up @@ -2140,7 +2141,7 @@ void controlTry() //for debug purposes
void setup()
{
Serial.begin(115200);
EEPROM.begin(256);
EEPROM.begin(300);
mp.homePopupEnable(0);
mp.shutdownPopupEnable(0);

Expand All @@ -2157,11 +2158,16 @@ void setup()
mp.tft.setTextFont(2);
Serial.println(EEPROM.readString(35).c_str());
Serial.println(EEPROM.readString(100).c_str());
delay(1000);
WiFi.begin(EEPROM.readString(35).c_str(), EEPROM.readString(100).c_str());
delay(1000);
uint8_t counter = 0;
while(WiFi.status() != WL_CONNECTED && counter < 5)
{
delay(3000);
WiFi.begin(EEPROM.readString(35).c_str(), EEPROM.readString(100).c_str());
delay(3000);
counter++;
}
Serial.print("Connected: ");
Serial.println(WiFi.status() == WL_CONNECTED);
Serial.println();
Serial.println("FREE HEAP:");
Serial.println(ESP.getFreeHeap());
delay(5);
Expand All @@ -2172,6 +2178,7 @@ void setup()
mp.tft.print("Error while downloading");
mp.tft.setCursor(22,mp.tft.height()/2 - 5);
mp.tft.print("Reverting firmware!");
delay(2000);
ESP.restart();
}
mp.tft.fillRect(0,0,160,128,TFT_BLACK);
Expand All @@ -2198,7 +2205,7 @@ void setup()
// pinMode(39, INPUT_PULLUP);
// mp.buttons.activateInterrupt();
}
void loop()
void loop()
{
// mp.dataRefreshFlag = 1;
// mp.display.fillScreen(TFT_WHITE);
Expand Down
2 changes: 0 additions & 2 deletions src/settingsApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3324,8 +3324,6 @@ int8_t checkForUpdate()
}
mp.update();
}
EEPROM.write(FIRMWARE_VERSION_ADDRESS, version);
EEPROM.commit();
return 1;
}
return 0;
Expand Down

0 comments on commit 8f38ff2

Please sign in to comment.