fix to older arduino core until webui fixed

This commit is contained in:
Paul
2019-11-27 21:51:43 +01:00
parent 439e0f2400
commit 5c8377f429
3 changed files with 2 additions and 23 deletions

View File

@@ -37,7 +37,7 @@ build_flags = ${common.general_flags} ${common.build_flags_4m1m}
[env] [env]
framework = arduino framework = arduino
platform = espressif8266 platform = espressif8266@2.2.3
;platform = https://github.com/platformio/platform-espressif8266#develop ;platform = https://github.com/platformio/platform-espressif8266#develop
;platform = https://github.com/platformio/platform-espressif8266#feature/stage ;platform = https://github.com/platformio/platform-espressif8266#feature/stage
lib_deps = lib_deps =

View File

@@ -24,16 +24,6 @@ extern "C" {
static TelnetSpy * actualObject = NULL; static TelnetSpy * actualObject = NULL;
static void TelnetSpy_putc(char c) {
if (actualObject) {
actualObject->write(c);
}
}
static void TelnetSpy_ignore_putc(char c) {
;
}
TelnetSpy::TelnetSpy() { TelnetSpy::TelnetSpy() {
port = TELNETSPY_PORT; port = TELNETSPY_PORT;
telnetServer = NULL; telnetServer = NULL;
@@ -437,19 +427,8 @@ void TelnetSpy::setDebugOutput(bool en) {
if (debugOutput) { if (debugOutput) {
actualObject = this; actualObject = this;
#ifdef ESP8266
os_install_putc1((void *)TelnetSpy_putc); // Set system printing (os_printf) to TelnetSpy
system_set_os_print(true);
#endif
} else { } else {
if (actualObject == this) { if (actualObject == this) {
#ifdef ESP8266
system_set_os_print(false);
os_install_putc1((void *)TelnetSpy_ignore_putc); // Ignore system printing
#endif
actualObject = NULL; actualObject = NULL;
} }
} }

View File

@@ -157,7 +157,7 @@
#define TELNETSPY_MAX_BLOCK_SIZE 512 #define TELNETSPY_MAX_BLOCK_SIZE 512
#define TELNETSPY_PING_TIME 1500 #define TELNETSPY_PING_TIME 1500
#define TELNETSPY_PORT 23 #define TELNETSPY_PORT 23
#define TELNETSPY_CAPTURE_OS_PRINT true #define TELNETSPY_CAPTURE_OS_PRINT false
#define TELNETSPY_WELCOME_MSG "Connection established via Telnet.\n" #define TELNETSPY_WELCOME_MSG "Connection established via Telnet.\n"
#define TELNETSPY_REJECT_MSG "Telnet: Only one connection possible.\n" #define TELNETSPY_REJECT_MSG "Telnet: Only one connection possible.\n"