rewrite for ElegantOTA, implement battery for master
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include <ESPmDNS.h> // <-- mDNS hinzufügen
|
||||
#include <PrettyOTA.h>
|
||||
#include <WiFi.h>
|
||||
#include <esp_now.h>
|
||||
#include <esp_wifi.h>
|
||||
#include <ElegantOTA.h> // OTA Updates
|
||||
|
||||
#include "licenceing.h"
|
||||
#include "master.h"
|
||||
@@ -12,10 +12,11 @@
|
||||
|
||||
String uniqueSSID;
|
||||
|
||||
PrettyOTA OTAUpdates;
|
||||
|
||||
String getUniqueSSID();
|
||||
bool isInternetAvailable();
|
||||
void loopOTA();
|
||||
void setupOTA();
|
||||
|
||||
// Initialisiert das WLAN als Access Point oder Station und startet mDNS/OTA.
|
||||
void setupWifi() {
|
||||
@@ -76,16 +77,25 @@ void setupWifi() {
|
||||
// Initialisiert das OTA-Update-System (PrettyOTA) für Firmware-Updates.
|
||||
void setupOTA(AsyncWebServer *server) {
|
||||
// Initialize PrettyOTA
|
||||
OTAUpdates.Begin(server);
|
||||
|
||||
ElegantOTA.begin(server);
|
||||
|
||||
//OTAUpdates.Begin(server);
|
||||
|
||||
// Set unique Hardware-ID for your hardware/board
|
||||
OTAUpdates.SetHardwareID("AquaCross-Master");
|
||||
//OTAUpdates.SetHardwareID("AquaCross-Master");
|
||||
|
||||
// Set firmware version to 1.0.0
|
||||
OTAUpdates.SetAppVersion(firmwareversion);
|
||||
//OTAUpdates.SetAppVersion(firmwareversion);
|
||||
|
||||
// Set current build time and date
|
||||
PRETTY_OTA_SET_CURRENT_BUILD_TIME_AND_DATE();
|
||||
//PRETTY_OTA_SET_CURRENT_BUILD_TIME_AND_DATE();
|
||||
}
|
||||
|
||||
void loopOTA(){
|
||||
|
||||
ElegantOTA.loop();
|
||||
|
||||
}
|
||||
|
||||
// Generiert eine eindeutige SSID auf Basis der MAC-Adresse.
|
||||
|
||||
Reference in New Issue
Block a user