@@ -97,7 +97,7 @@ void _w5100_spi_en(bool enable)
9797#define _w5100_spi_en (x )
9898#endif
9999
100- bool gatewayTransportInit ()
100+ bool gatewayTransportInit (void )
101101{
102102 _w5100_spi_en (true );
103103#if defined(MY_GATEWAY_ESP8266)
@@ -147,7 +147,7 @@ bool gatewayTransportInit()
147147#endif
148148 debug (PSTR (" Eth: connect\n " ));
149149 _w5100_spi_en (false );
150- gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (" Gateway startup complete. " ));
150+ gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (MSG_GW_STARTUP_COMPLETE ));
151151 _w5100_spi_en (true );
152152 presentNode ();
153153 } else {
@@ -194,7 +194,7 @@ bool gatewayTransportSend(MyMessage &message)
194194#endif
195195 debug (PSTR (" Eth: connect\n " ));
196196 _w5100_spi_en (false );
197- gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (" Gateway startup complete. " ));
197+ gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (MSG_GW_STARTUP_COMPLETE ));
198198 _w5100_spi_en (true );
199199 presentNode ();
200200 } else {
@@ -226,7 +226,7 @@ bool gatewayTransportSend(MyMessage &message)
226226bool _readFromClient (uint8_t i)
227227{
228228 while (clients[i].connected () && clients[i].available ()) {
229- char inChar = clients[i].read ();
229+ const char inChar = clients[i].read ();
230230 if (inputString[i].idx < MY_GATEWAY_MAX_RECEIVE_LENGTH - 1 ) {
231231 // if newline then command is complete
232232 if (inChar == ' \n ' || inChar == ' \r ' ) {
@@ -253,10 +253,10 @@ bool _readFromClient(uint8_t i)
253253 return false ;
254254}
255255#else
256- bool _readFromClient ()
256+ bool _readFromClient (void )
257257{
258258 while (client.connected () && client.available ()) {
259- char inChar = client.read ();
259+ const char inChar = client.read ();
260260 if (inputString.idx < MY_GATEWAY_MAX_RECEIVE_LENGTH - 1 ) {
261261 // if newline then command is complete
262262 if (inChar == ' \n ' || inChar == ' \r ' ) {
@@ -285,7 +285,7 @@ bool _readFromClient()
285285#endif
286286
287287
288- bool gatewayTransportAvailable ()
288+ bool gatewayTransportAvailable (void )
289289{
290290 _w5100_spi_en (true );
291291#if !defined(MY_IP_ADDRESS) && defined(MY_GATEWAY_W5100)
@@ -325,7 +325,7 @@ bool gatewayTransportAvailable()
325325#endif
326326 debug (PSTR (" Eth: connect\n " ));
327327 _w5100_spi_en (false );
328- gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (" Gateway startup complete. " ));
328+ gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (MSG_GW_STARTUP_COMPLETE ));
329329 _w5100_spi_en (true );
330330 presentNode ();
331331 } else {
@@ -355,7 +355,7 @@ bool gatewayTransportAvailable()
355355 clients[i] = _ethernetServer.available ();
356356 inputString[i].idx = 0 ;
357357 debug (PSTR (" Client %d connected\n " ), i);
358- gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (" Gateway startup complete. " ));
358+ gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (MSG_GW_STARTUP_COMPLETE ));
359359 // Send presentation of locally attached sensors (and node if applicable)
360360 presentNode ();
361361 }
@@ -388,7 +388,7 @@ bool gatewayTransportAvailable()
388388 client = newclient;
389389 debug (PSTR (" Eth: connect\n " ));
390390 _w5100_spi_en (false );
391- gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (" Gateway startup complete. " ));
391+ gatewayTransportSend (buildGw (_msgTmp, I_GATEWAY_READY).set (MSG_GW_STARTUP_COMPLETE ));
392392 _w5100_spi_en (true );
393393 presentNode ();
394394 }
@@ -411,14 +411,14 @@ bool gatewayTransportAvailable()
411411 return false ;
412412}
413413
414- MyMessage& gatewayTransportReceive ()
414+ MyMessage& gatewayTransportReceive (void )
415415{
416416 // Return the last parsed message
417417 return _ethernetMsg;
418418}
419419
420420#if !defined(MY_IP_ADDRESS) && !defined(MY_GATEWAY_ESP8266) && !defined(MY_GATEWAY_LINUX)
421- void gatewayTransportRenewIP ()
421+ void gatewayTransportRenewIP (void )
422422{
423423 /* renew/rebind IP address
424424 0 - nothing happened
0 commit comments