matthias-bs / ATC_MiThermometer

Arduino BLE Client library for receiving ATC_MiThermometer Data (as Advertising Data)
MIT License
9 stars 4 forks source link

miThermometer.clearScanResults(); Don't seem to clear anything #6

Closed johnostr closed 1 year ago

johnostr commented 1 year ago

I was thinking that after miThermometer.clearScanResults(); or miThermometer.resetData(); ran the BLE data would clear. In my case when I run the serial.printf code again (a second time) after the miThermometer.clearScanResults(), just like in the client example, the data is still displaying. Same data shows again.

What is the miThermometer.clearScanResults() and miThermometer.resetData() suppose to do?

Other than that the code works great !!

matthias-bs commented 1 year ago

miThermometer.resetData() sets the valid flag to false. miThermometer.clearScanResults() clears the BLE scan data to free allocated memory, but leaves the acquired sensor data untouched.

johnostr commented 1 year ago

Many thanks, great to know what they do.