-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
loggingInterval not working, logging faster than designated #142
Comments
I think I've found the problem. For the first 10 readings the logger is designed to go every 2 minutes (so for 20 minutes). (#95) BUT... on top of that I'd assigned the logging interval in seconds to be an 8-bit integer, which has a max value of 255. So any logging interval over ~4.5 minutes would have given unexpected results. Since I very rarely run things on my desk for more than the first 20 minutes, I didn't ever notice the problem. I changed that to a 16-bit integer, so hopefully it should now keep proper logging intervals above 5 minutes. I'll leave one on my desk overnight and try to remember to actually look at the SD card in the morning to see if it worked. |
Thank you so much for the detailed report! |
Thank you! I look forward to hearing your results. Is there a simple way that we can make the first 10 readings for 2 minutes a user-defined option? Either to turn on/off that feature (which is a good feature when a deployment is working) or select the number of readings to do every 2 minutes? |
@fisherba, thanks for detailing those issues. I'm going to need to update all of my deployed code! |
@SRGDamia1, how did your test go last night? Any progress on implementing this fix? |
It seemed to run correctly at half-hour intervals for me last night. I'll run it again tonight on a different board just to check. It looks like it's probably been a problem since February 15 (9dc18af) |
I think this is fixed now. Please let me know if it seems to come up again. |
@SRGDamia1, thanks for fixing and testing this. We'll let you know if that solves our problems. |
My initial deployment of the following stations had the logging interval in the sketch set at
const uint8_t loggingInterval = 30
, but the stations logged every 2 minutes. Below I list each station with its sketch and libdeps for that deployment:CMP01 logged at 2 minute intervals regardless of which version of Modular I used, and is still an issue (the SIM card for this station is currently paused).
http://data.envirodiy.org/sites/CMP01/
https://github.com/LimnoTech/EnviroDIY_deployments/tree/master/deploy-BAF/CMP01
First deployment of CMP01 used ModularSensors 5TMspottiness branch as of May 2, 2018, but I didn't end up deploying a 5TM at this site (always saturated). When I tried this libdep with 15 minute intervals, it still logged every two minutes, so I tried three other branches, listed below.
I also tried the following versions of Modular and still had the result of 2 minute logging with this sketch:
NLP01 logged at 2 minute intervals during the first deployment when set at 30 minute interval. Now that it's set at 15 minutes, the station logs every 11 minutes.
http://data.envirodiy.org/sites/NLP01/
https://github.com/LimnoTech/EnviroDIY_deployments/tree/master/deploy-BAF/NLP01
This deployment used the following libdeps for both deployment attempts:
NLP02 and CMP02 are the redox loggers at each site. Both logged at 2 minute intervals during the first deployment when set at 30 minute interval. Now that it's set at 15 minutes, the stations log every 11 minutes. Libdeps didn't change between deployments.
http://data.envirodiy.org/sites/NLP02/
https://github.com/LimnoTech/EnviroDIY_deployments/tree/master/deploy-BAF/NLP02
and
http://data.envirodiy.org/sites/CMP02/
https://github.com/LimnoTech/EnviroDIY_deployments/tree/master/deploy-BAF/CMP02
The text was updated successfully, but these errors were encountered: