-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Esp8266 automatic reset after about 5 darksky reads #24
Comments
Hi, some extra info: |
Thanks for reporting this. There was a bug where the space reserved for minutely data was not released. Added line here. If you are not collecting the hourly and daily data you do not need to reserve the space for the results, so you can delete the unused reservations and deletions. |
Thanks to have a look, but I still have the same problem. This is what I changed => // Create the structures that hold the retrieved weather DSW_current *current = new DSW_current; |
The structures cannot be deleted if you set them to nullptr! Just put nullptr in the call: |
This is the main function from my adapted test sketch:
|
Hello, I have the exact same problem where my ESP32 crashes after reading nn readings. This is my (partly) code. Anything else I should do ? void weather_Today() { // Create the structures that hold the retrieved weather time_t time; draw_Grid(); dsw.getForecast(current, nullptr, nullptr, nullptr, api_key, latitude, longitude, units, language); Thanks for your help !!! Tony |
You are calling new DSW-current. Are you calling delete as well somewhere? You may just be running out of memory. |
Yes, got it working for current right now. When I add "daily" the crashes occur again. It has to do with hom many times and how you get the weather info .. Still trying to find out ... |
Problem solved. Best seems to read all values in one go (current, daily, hourly ...) And not read in any data in parts. Delete current, daily .. etc after you are done with their values. |
Hi,
I' am using the My_DarkSkyWeather_Test.ino sketch and after about 5 times reading the weatherdata, I get a connection fail and with the next read I get a dump and a reset of the esp8266. I added a => Serial.println(String(ESP.getFreeHeap())); and after each weatherread the freeheap is less. When it comes to about 29000 I get the error.
Do you have any idee how to solve that problem?
Many thanks
Peter
The text was updated successfully, but these errors were encountered: