Merge pull request #387 from mysensors/fix-udp-compile-problems
Fix compile problems when enabling UDP
This commit is contained in:
@@ -264,10 +264,16 @@ bool gatewayTransportAvailable()
|
|||||||
|
|
||||||
if (packet_size) {
|
if (packet_size) {
|
||||||
//debug(PSTR("UDP packet available. Size:%d\n"), packet_size);
|
//debug(PSTR("UDP packet available. Size:%d\n"), packet_size);
|
||||||
|
#if defined(MY_GATEWAY_ESP8266)
|
||||||
_ethernetServer.read(inputString[0].string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
|
_ethernetServer.read(inputString[0].string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
|
||||||
_w5100_spi_en(false);
|
|
||||||
debug(PSTR("UDP packet received: %s\n"), inputString[0].string);
|
debug(PSTR("UDP packet received: %s\n"), inputString[0].string);
|
||||||
return protocolParse(_ethernetMsg, inputString[0].string);
|
return protocolParse(_ethernetMsg, inputString[0].string);
|
||||||
|
#else
|
||||||
|
_ethernetServer.read(inputString.string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
|
||||||
|
_w5100_spi_en(false);
|
||||||
|
debug(PSTR("UDP packet received: %s\n"), inputString.string);
|
||||||
|
return protocolParse(_ethernetMsg, inputString.string);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#if defined(MY_GATEWAY_ESP8266)
|
#if defined(MY_GATEWAY_ESP8266)
|
||||||
|
|||||||
Reference in New Issue
Block a user