From f58ed6bcb9a96bec30fc210bff8592bcee806512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 5 Feb 2018 23:47:02 +0100 Subject: [PATCH] Disable OTA from terminal for the moment --- code/espurna/config/general.h | 1 + code/espurna/ota.ino | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) 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