gmag11 / WifiLocation

Google GeoLocation API wrapper for Arduino MKR1000, ESP8266 and ESP32
MIT License
212 stars 48 forks source link

Adding the possibility to configure the max scanned wifis #9

Closed arthurkomatsu closed 6 years ago

arthurkomatsu commented 6 years ago

This pull request adds a macro to limit the number of scanned Wifis to send to Google's API.

I was using the ESP8266 to get location from my surrounds Wifis and it worked like a charm in my house, but it didn't work at my friend's apartment (ESP keeps crashing or returned lat=0.0000000, lon=0.0000000). It turns out that if there is a lot of Wifis in the region, the ESP can't handle the big message due to memory issues. So I changed the maximum scanned Wifis to 8 and it worked flawlessly at my friend's apartment.

gmag11 commented 6 years ago

Thanks