25-06-2018, 17:16
(14-06-2018, 01:22)t3gathome Wrote: I found another bug in the beta version.
There is the routine, that checks and counts sensors, without an IP with a leading zero.
And this amount is the limit of the for loop.
So if one WD is not connected and sits between two other ones (e.g. 3 Sensors: "WD1","0.0.0.0",WD2","WD3"), than the WDs do not match the IP lookup table --> Sensor 1: WD1; Sensor 2:0.0.0.0; Sensor 3: WD2.
A mask would be better. I try to make a suggestion.
Well that routine is a quick solution which surely can be improved without wasting to much sram.
Code:
So if one WD is not connected and sits between two other ones (e.g. 3 Sensors: "WD1","0.0.0.0",WD2","WD3"), than the WDs do not match the IP lookup table --> Sensor 1: WD1; Sensor 2:0.0.0.0; Sensor 3: WD2This is why I had put the comment: "Don't leave holes"
Quote: // Sequencial list of WiFi sensors IP Addresses. Don't leave holes
const char* WIFIunit_address [][4]= { "192.168.1.154" // IP address of first WiFi sensor
, "192.168.1.153" // IP address of second WiFi sensor
, "192.168.1.152" // IP address of third WiFi sensor
, "0" // IP address of fourth WiFi sensor
};

