make sta udp receiver working
This commit is contained in:
parent
82f5e17987
commit
4bded7bbb4
|
@ -120,7 +120,7 @@ void GwUdpReader::loop(bool handleRead, bool handleWrite)
|
||||||
//only change anything if we considered the station IP
|
//only change anything if we considered the station IP
|
||||||
String nextStationIp;
|
String nextStationIp;
|
||||||
if (WiFi.isConnected()){
|
if (WiFi.isConnected()){
|
||||||
String nextStationIp=WiFi.localIP().toString();
|
nextStationIp=WiFi.localIP().toString();
|
||||||
}
|
}
|
||||||
if (setStationAdd(nextStationIp)){
|
if (setStationAdd(nextStationIp)){
|
||||||
LOG_INFO("UDPR: wifi client IP changed, restart");
|
LOG_INFO("UDPR: wifi client IP changed, restart");
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
if (!v.match(/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/))
|
if (!v.match(/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/))
|
||||||
return "must be in the form 224.0.0.1";
|
return "must be in the form 224.0.0.1";
|
||||||
let parts=v.split(".");
|
let parts=v.split(".");
|
||||||
let o1=parseInt(v[0]);
|
let o1=parseInt(parts[0]);
|
||||||
if (o1 < 224 || o1 > 239) return "mulicast address must be in the range 224.0.0.0 to 239.255.255.255"
|
if (o1 < 224 || o1 > 239) return "mulicast address must be in the range 224.0.0.0 to 239.255.255.255"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue