1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

ONLY 1 Call to WifiInboundHandler::setup!

Or it wastes 1.5kb each time!
This commit is contained in:
Asbelos 2020-10-27 12:50:01 +00:00
parent a65ca0b704
commit 96fba12d59

View File

@ -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;