Basic HTTP OTA updater implemented

pull/46/head
cschwinne 2016-09-21 23:23:18 +02:00
rodzic ed2381ec70
commit 6f8ff7b02e
2 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -4,12 +4,14 @@ additional color picker field
change slider height to relative values
improve firefox UI appearance
implement all settings setters
implement OTA
implement OTA lock
implement OTA lock / security
implement button
implement HSB slider option
change color submit from get to post, rewrite with args, requires no buffer
change color submit from rgb to hex
svg icons in html
(get rid of spiffs, use progmem for html??)
BUGS
static ip disables mdns
XXX authentification for security relevant areas (/edit, /update (!!!), /list, /down, [/settings, /reset, /cleareeprom])

Wyświetl plik

@ -1,6 +1,7 @@
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
#include <ESP8266mDNS.h>
#include <EEPROM.h>
#include <Hash.h>
@ -38,6 +39,8 @@ int nopwrled = 1;
char HTTP_req[150];
ESP8266WebServer server(80);
ESP8266HTTPUpdateServer httpUpdater;
File fsUploadFile;
void down()
@ -703,6 +706,8 @@ void setup() {
server.on("/down", HTTP_GET, down);
//clear eeprom
server.on("/cleareeprom", HTTP_GET, clearEEPROM);
//init ota page
httpUpdater.setup(&server);
}
//called when the url is not defined here, ajax-in; get-settings
server.onNotFound([](){