[examples] Fix PinScan telnet functionality

This commit is contained in:
Kuba Szczodrzyński
2022-08-01 11:28:56 +02:00
parent e9511c507a
commit 1b5d6472f7
3 changed files with 22 additions and 10 deletions

View File

@@ -11,10 +11,10 @@ static WiFiServer server(23);
static WiFiClient client;
#endif
Stream *stream = NULL;
uint8_t mode[] = {'q', '\0', '\0', '\0'};
pin_size_t pinSkip[2];
int output = -1;
Stream *stream = NULL;
uint8_t mode[] = {'?', '\0', '\0', '\0'};
pin_size_t pinSkip[2] = {255, 255};
int output = -1;
static void parseMode();
@@ -54,7 +54,6 @@ void loop() {
}
if (!stream) {
client = server.accept();
delay(500);
if (client) {
stream = &client;
printHelp();
@@ -105,7 +104,8 @@ void loop() {
}
}
parseMode();
if (stream)
parseMode();
}
static void parseMode() {