29 lines
523 B
C
29 lines
523 B
C
#ifndef simpleota_h
|
|
#define simpleota_h
|
|
|
|
#include <Arduino.h>
|
|
#include <WiFi.h>
|
|
#include <ArduinoOTA.h>
|
|
|
|
|
|
#define OTA_WIFI_SSID "Chaos-West temp alternative"
|
|
#define OTA_WIFI_PASSWORD ""
|
|
#define OTA_WAIT_TIMEOUT 20 // in 0.1s increments -> 10s
|
|
#define OTA_PASSWORD "MCH2022OTA" //password needed for ota flashing
|
|
|
|
void checkOTA();
|
|
bool initOTA();
|
|
bool loopOTA();
|
|
|
|
enum OTA_MODE {
|
|
NONE,
|
|
SEARCHING,
|
|
WAITING,
|
|
UPDATING
|
|
};
|
|
|
|
extern OTA_MODE otaMode;
|
|
|
|
extern uint16_t otaWaitCounter;
|
|
|
|
#endif |