Zwer2k / WeatherStationDataRx

Arduino library for read weather data from Venus W174/W132 (tested), Auriol H13726, Hama EWS 1500, Meteoscan W155/W160
MIT License
22 stars 8 forks source link

Static pairing crashes on esp8266 #13

Closed rforro closed 3 years ago

rforro commented 3 years ago

I've discovered an bug when setting paired devices manually.

wsdr.begin();
byte myDeviceIDs[] = {7, 63};
wsdr.pair(myDeviceIDs, sizeof(myDeviceIDs));

The line 128 caused crash, because wrong variable was referenced. Generally I don't think it's good idea to use the same variable name in function parameter as global variable.

After I fixed that one a second bug presented itself. The number of paired devices this->pairedDevicesCount is never updated with the new value, which causes constant stream of NDError.