From 96fba12d59ccdebf531a8ff602e668e2b17d637f Mon Sep 17 00:00:00 2001 From: Asbelos Date: Tue, 27 Oct 2020 12:50:01 +0000 Subject: [PATCH] ONLY 1 Call to WifiInboundHandler::setup! Or it wastes 1.5kb each time! --- WifiInterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WifiInterface.cpp b/WifiInterface.cpp index 74018b9..9e7e6ed 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -90,6 +90,11 @@ bool WifiInterface::setup(long serial_link_speed, } #endif +DCCEXParser::setAtCommandCallback(ATCommand); + +// CAUTION... ONLY CALL THIS ONCE +WifiInboundHandler::setup(wifiStream); + return wifiUp; } @@ -109,8 +114,6 @@ bool WifiInterface::setup(Stream & setupStream, const __FlashStringHelper* SSid checkForOK(200, OK_SEARCH, true); } - DCCEXParser::setAtCommandCallback(ATCommand); - WifiInboundHandler::setup(wifiStream); DIAG(F("\n++ Wifi Setup %S ++\n"), connected ? F("OK") : F("FAILED")); return connected;