adafruit / Light-and-Temp-logger

Example code for Adafruit data logging shield

Home Page:www.ladyada.net/make/logshield

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SYNC_INTERVAL greater than 32768 milliseconds fails

mstember opened this issue · comments

Set LOG_INTERVAL to 30000 (30 seconds).
Set SYNC_INTERVAL to 6*LOG_INTERVAL (3 minutes).
The log will never be flushed.

This can be fixed by changing
"#define LOG_INTERVAL 30000" to "uint32_t LOG_INTERVAL = 30000"
and
"#define SYNC_INTERVAL 6*LOG_INTERVAL" to "uint32_t SYNC_INTERVAL = 6 * LOG_INTERVAL".

Logging can be deferred up to 44 days which is ridiculously long so shouldn't cause a problem.