I have a sketch based mostly off the httpclient running on Fio that sends data from 2 sensors via a HTTP GET every 2.5 minutes. it would lock up after a few minutes, and after many changes that seemed needed and only getting it to a few hours I got a Leonardo and enabled full debug. this allowed me to make more changes and actually fix it, it ran all weekend.
in short, issue is fixed, but I've made way more changes than are actually required to fix it. main changes include:
normalized formatting (indents were 4 spaces, 3 spaces, tabs, and none at all)
fixed some "\n\r" line endings to "\r\n"
updated to support Arduino 1.5+ (namely, change the PSTR stuff and const datatypes for the newer avrgcc)
changed the code that handles a wifly lockup+reboot to return false and let the sketch decide what to do
changed close() to look for "CLOS*" before flushing, this cleanly handles cases where the server closes the connection, as HTTP 1.0 does
I have a sketch based mostly off the httpclient running on Fio that sends data from 2 sensors via a HTTP GET every 2.5 minutes. it would lock up after a few minutes, and after many changes that seemed needed and only getting it to a few hours I got a Leonardo and enabled full debug. this allowed me to make more changes and actually fix it, it ran all weekend.
in short, issue is fixed, but I've made way more changes than are actually required to fix it. main changes include:
My branch is https://github.com/chrwei/WiFlyHQ/tree/massive. should I do pull request for the whole thing, or would you rather I break this up?