-
Notifications
You must be signed in to change notification settings - Fork 400
#1022 - check status_ESC prior to set_clock #1140
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
Conversation
bin/oref0-pump-loop.sh
Outdated
| if (( $(bc <<< "$(to_epochtime $(cat monitor/clock-zoned.json)) - $(epochtime_now)") < -55 )) || (( $(bc <<< "$(to_epochtime $(cat monitor/clock-zoned.json)) - $(epochtime_now)") > 55 )); then | ||
| echo Pump clock is more than 55s off: attempting to reset it and reload pumphistory | ||
| # Check for bolus in progress | ||
| smb_verify_status && \ |
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.
Probably should use a couple of if clauses here: I don't know what the command1 && # comment \n command2 behavior is. Also, looks like your indentation doesn't match the surrounding code.
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.
Consolidated comments, and fixed indentation...
scottleibrand
left a comment
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.
Code LGTM. Would you like to take first stab at testing that it fixes the issue?
| echo Pump clock is more than 55s off: attempting to reset it and reload pumphistory | ||
| # Check for bolus in progress and issue 3xESC to back out of pump bolus menu | ||
| smb_verify_status && \ | ||
| try_return timerun openaps use pump press_keys esc esc esc | jq .completed | grep true && \ |
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.
since this is targetting the dev branch, shouldn't this use the mdt button go command rather than openaps use pump
|
Yes, it should. |
|
I've tested as far as ensuring that time is still reset when needed, and that it successfully backs out of any pump menus to do so. |
|
Cool. The other test I’d like to see (preferably on a test pump) is that it refuses to set time during a long bolus. |
* Update oref0-pump-loop.sh * Update oref0-pump-loop.sh
No description provided.