mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
changes
This commit is contained in:
@@ -83,47 +83,4 @@ void restartEsp() {
|
||||
Serial.println("Restart ESP....");
|
||||
delay(1000);
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
//void upgrade_firmware() {
|
||||
// String scanerioBackup, configBackup, setupBackup;
|
||||
//
|
||||
// scanerioBackup = readFile(String(DEVICE_SCENARIO_FILE), 4096);
|
||||
// configBackup = readFile(String(DEVICE_CONFIG_FILE), 4096);
|
||||
// setupBackup = configSetupJson;
|
||||
//
|
||||
// SerialPrint("I","module","update data");
|
||||
// WiFiClient wifiClient;
|
||||
//#ifdef ESP8266
|
||||
// ESPhttpUpdate.rebootOnUpdate(false);
|
||||
// t_httpUpdate_return ret = ESPhttpUpdate.updateSpiffs(wifiClient, F("http://91.204.228.124:1100/update/esp8266/esp32-esp8266_iot-manager_modules_firmware.spiffs.bin"));
|
||||
//#else
|
||||
// httpUpdate.rebootOnUpdate(false);
|
||||
// t_httpUpdate_return ret = httpUpdate.updateSpiffs(client_for_upgrade, F("http://91.204.228.124:1100/update/esp32/esp32-esp8266_iot-manager_modules_firmware.spiffs.bin"));
|
||||
//#endif
|
||||
// if (ret == HTTP_UPDATE_OK) {
|
||||
// writeFile(String(DEVICE_SCENARIO_FILE), scanerioBackup);
|
||||
// writeFile(String(DEVICE_CONFIG_FILE), configBackup);
|
||||
// writeFile("config.json", setupBackup);
|
||||
//
|
||||
// saveConfig();
|
||||
//
|
||||
// SerialPrint("I","module","done!");
|
||||
// } else {
|
||||
// SerialPrint("[E]","module","on data");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// //Serial.println("update firmware");
|
||||
//#ifdef ESP8266
|
||||
// ret = ESPhttpUpdate.update(wifiClient, F("http://91.204.228.124:1100/update/esp8266/esp32-esp8266_iot-manager_modules_firmware.ino.bin"));
|
||||
//#else
|
||||
// ret = httpUpdate.update(client_for_upgrade, "http://91.204.228.124:1100/update/esp32/esp32-esp8266_iot-manager_modules_firmware.ino.bin");
|
||||
//#endif
|
||||
// if (ret == HTTP_UPDATE_OK) {
|
||||
// SerialPrint("I","module","done! restart...");
|
||||
// ESP.restart();
|
||||
// } else {
|
||||
// SerialPrint("[E]","module","on firmware");
|
||||
// }
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user