diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index f032e5f7..e3dbf8c9 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -446,6 +446,7 @@ PROGMEM const char* const custom_reset_string[] = { // ----------------------------------------------------------------------------- #define OTA_PORT 8266 // OTA port +#define OTA_TERMINAL 0 // Enable OTA from terminal #define OTA_GITHUB_FP "D79F076110B39293E349AC89845B0380C19E2F8B" // ----------------------------------------------------------------------------- diff --git a/code/espurna/ota.ino b/code/espurna/ota.ino index 9164fe69..89b7320b 100644 --- a/code/espurna/ota.ino +++ b/code/espurna/ota.ino @@ -7,7 +7,6 @@ Copyright (C) 2016-2018 by Xose PĂ©rez */ #include "ArduinoOTA.h" -#include // ----------------------------------------------------------------------------- // OTA @@ -21,7 +20,9 @@ void _otaConfigure() { #endif } -#if TERMINAL_SUPPORT +#if TERMINAL_SUPPORT && OTA_TERMINAL + +#include void _otaFrom(const char * url) { @@ -80,7 +81,7 @@ void _otaInitCommands() { } -#endif // TERMINAL_SUPPORT +#endif // TERMINAL_SUPPORT && OTA_TERMINAL void _otaLoop() { ArduinoOTA.handle(); @@ -96,7 +97,7 @@ void otaSetup() { wsOnAfterParseRegister(_otaConfigure); #endif - #if TERMINAL_SUPPORT + #if TERMINAL_SUPPORT && OTA_TERMINAL _otaInitCommands(); #endif