IP fxns for ESP8266
- fixed int/uint warning - added functions to get local IP address with esp8266 - fixed local ip fxn for xbee - removed extra test builds - set travis to build all modems in tests
This commit is contained in:
@@ -411,16 +411,16 @@ public:
|
||||
String strIP = getLocalIP();
|
||||
int Parts[4] = {0,0,0,0};
|
||||
int Part = 0;
|
||||
for ( int i=0; i<strIP.length(); i++ ) {
|
||||
for (uint8_t i=0; i<strIP.length(); i++) {
|
||||
char c = strIP[i];
|
||||
if ( c == '.' ) {
|
||||
if (c == '.') {
|
||||
Part++;
|
||||
continue;
|
||||
}
|
||||
Parts[Part] *= 10;
|
||||
Parts[Part] += c - '0';
|
||||
}
|
||||
IPAddress res( Parts[0], Parts[1], Parts[2], Parts[3] );
|
||||
IPAddress res(Parts[0], Parts[1], Parts[2], Parts[3]);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user