Browse Source

Disable OTA from terminal for the moment

softuart
Xose Pérez 6 years ago
parent
commit
f58ed6bcb9
2 changed files with 6 additions and 4 deletions
  1. +1
    -0
      code/espurna/config/general.h
  2. +5
    -4
      code/espurna/ota.ino

+ 1
- 0
code/espurna/config/general.h View File

@ -446,6 +446,7 @@ PROGMEM const char* const custom_reset_string[] = {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#define OTA_PORT 8266 // OTA port #define OTA_PORT 8266 // OTA port
#define OTA_TERMINAL 0 // Enable OTA from terminal
#define OTA_GITHUB_FP "D79F076110B39293E349AC89845B0380C19E2F8B" #define OTA_GITHUB_FP "D79F076110B39293E349AC89845B0380C19E2F8B"
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 5
- 4
code/espurna/ota.ino View File

@ -7,7 +7,6 @@ Copyright (C) 2016-2018 by Xose Pérez <xose dot perez at gmail dot com>
*/ */
#include "ArduinoOTA.h" #include "ArduinoOTA.h"
#include <ESP8266httpUpdate.h>
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// OTA // OTA
@ -21,7 +20,9 @@ void _otaConfigure() {
#endif #endif
} }
#if TERMINAL_SUPPORT
#if TERMINAL_SUPPORT && OTA_TERMINAL
#include <ESP8266httpUpdate.h>
void _otaFrom(const char * url) { void _otaFrom(const char * url) {
@ -80,7 +81,7 @@ void _otaInitCommands() {
} }
#endif // TERMINAL_SUPPORT
#endif // TERMINAL_SUPPORT && OTA_TERMINAL
void _otaLoop() { void _otaLoop() {
ArduinoOTA.handle(); ArduinoOTA.handle();
@ -96,7 +97,7 @@ void otaSetup() {
wsOnAfterParseRegister(_otaConfigure); wsOnAfterParseRegister(_otaConfigure);
#endif #endif
#if TERMINAL_SUPPORT
#if TERMINAL_SUPPORT && OTA_TERMINAL
_otaInitCommands(); _otaInitCommands();
#endif #endif


Loading…
Cancel
Save