remove esp8266

This commit is contained in:
proddy
2021-02-27 14:44:53 +01:00
parent 4d1ebf03d0
commit d1b0bd729d

View File

@@ -19,12 +19,7 @@
#include "uuid/telnet.h" #include "uuid/telnet.h"
#include <Arduino.h> #include <Arduino.h>
#if defined(ESP8266)
#include <ESP8266WiFi.h>
#elif defined(ESP32)
#include <WiFi.h> #include <WiFi.h>
#endif
#include <WiFiUdp.h> #include <WiFiUdp.h>
#include <algorithm> #include <algorithm>
@@ -72,9 +67,9 @@ TelnetService::TelnetService(std::shared_ptr<uuid::console::Commands> commands,
} }
TelnetService::TelnetService(uint16_t port, std::shared_ptr<uuid::console::Commands> commands, unsigned int context, unsigned int flags) TelnetService::TelnetService(uint16_t port, std::shared_ptr<uuid::console::Commands> commands, unsigned int context, unsigned int flags)
: TelnetService(port, : TelnetService(port, [commands, context, flags](Stream & stream, const IPAddress & addr __attribute__((unused)), uint16_t port __attribute__((unused))) -> std::shared_ptr<uuid::console::Shell> {
[commands, context, flags](Stream & stream, const IPAddress & addr __attribute__((unused)), uint16_t port __attribute__((unused))) return std::make_shared<uuid::console::StreamConsole>(commands, stream, context, flags);
-> std::shared_ptr<uuid::console::Shell> { return std::make_shared<uuid::console::StreamConsole>(commands, stream, context, flags); }) { }) {
} }
TelnetService::TelnetService(shell_factory_function shell_factory) TelnetService::TelnetService(shell_factory_function shell_factory)
@@ -150,9 +145,7 @@ void TelnetService::loop() {
if (client) { if (client) {
if (connections_.size() >= maximum_connections_) { if (connections_.size() >= maximum_connections_) {
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE #if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"), logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"), uuid::printable_to_string(client.remoteIP()).c_str(), client.remotePort());
uuid::printable_to_string(client.remoteIP()).c_str(),
client.remotePort());
#else #else
logger_.info(F("New connection rejected (connection limit reached)")); logger_.info(F("New connection rejected (connection limit reached)"));
#endif #endif