-
Notifications
You must be signed in to change notification settings - Fork 396
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
Delete Future Data for better recovery of Time on System during No network power on for edison #413
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add oref0-delete-future-entries
add oref0-delete-future-entries to a reboot in the cron
# This will delete all the data in the | ||
# monitor directory. Allowing oref0 to gather all of the data again in pump-loop | ||
|
||
NEWTIME=$(date -d `(jq .[1].display_time monitor/glucose.json; echo ) | sed 's/"//g'` +%s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need to install jq by default before this will work for everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go make that PR in docs
scottleibrand
approved these changes
Mar 9, 2017
scottleibrand
pushed a commit
that referenced
this pull request
Mar 9, 2017
* Update oref0-setup.sh added all log files shortcuts to .bash_profile * Update oref0-setup.sh fix errors * Update oref0-setup.sh to avoid having wrong command run added log to end of alias * Sort treatments before calculating COB (#404) * sort treatments * sort treatments by actual datestamp * Create oref0-log-shortcuts.sh bash Script to add shortcuts to the OpenAPS logs * Update oref0-setup.sh Change log shortcuts to run during install from a Bash script. * Update package.json add oref0-log-shortcuts * Update oref0-setup.sh * Automatically copy pumpprofile.json & autotune.json from profile.json (#392) * auto copy pumpprofile.json & autotune.json from profile.json * allow manual users to run autotune by simply creating a settings/pumpprofile.json file, #392 * simple -> simply * Autotune: Porting to Python - oref0-autotune.py (#403) * bin/oref0-autotune.py initial * add notes, make autotune_core call easier to read * add nightscout log messages * remove nightscout url validation for now * ensure uniform date format for filenames * more date fixes * missing ( * more missing )s * add expand-user for DIRs with ~ or ~user * remove character with different encoding * fix missing bluetooth command line options in oref0-runagain.sh (#405) * Install missing jq dependency when --btpeb is set. (#408) * spidev5.1 already in use reboot (#411) * oref0-radio-reboot * oref0-radio-reboot * oref0-radio-reboot * wait 5m to reboot; cancel if it recovers by then * run oref0-radio-reboot in cron two more times before actually rebooting * /run/nologin only exists for 5m; run every minute * print extra newlines to clear old spidev5.1 errors faster * don't extend reboot time every minute * write cancelation to logfile * Changes to oref0-online (#396) Replace how we get the SSID, use iwgetid instead. Replace how we the IP of the wlan and beep interfaces to us the ip command. * Update oref0-setup.sh * simplify last remaining iwconfig * cp without -up on Mac (#416) * Delete Future Data for better recovery of Time on System during No network power on for edison (#413) * Create oref0-delete-future-entries.sh * Update package.json add oref0-delete-future-entries * Update oref0-setup.sh add oref0-delete-future-entries to a reboot in the cron * Update oref0-setup.sh * Alphabetize * remove extra whitespace
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This runs a bash Script when the system reboots that checks the Date on the last CGM entry in monitor/glucose to see if that is in the future of the current time.
This is only an issue with the network was not available and the clock was not automatically set.
If the date of the rig is still in 1999 and it sees that the time is in the future.
all the other checks in the Loop only look to see if the time is older than current system time.
so if you have a monitor/clock-zoned.json that time will not always be current when the oref0-set-system-clock is run, it will either not set the clock correctly, or the time that is there is from when the rig was last ran.
so if the time is in the future of the rig, it will delete the contents of the monitor folder, allowing the rig to fully grab all data from the pump fresh.
I found that I had a ~correct time set within two loops of the pump-loop and I was setting Temp basals within 3 loops.