Skip to content

Conversation

@jmcrawford
Copy link
Contributor

No description provided.

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 && \
Copy link
Contributor

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.

Copy link
Contributor Author

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...

https://xkcd.com/1513/

Copy link
Contributor

@scottleibrand scottleibrand left a 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 && \
Copy link
Contributor

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

@scottleibrand
Copy link
Contributor

Yes, it should.

@jmcrawford
Copy link
Contributor Author

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.

@scottleibrand
Copy link
Contributor

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.

@scottleibrand scottleibrand merged commit 800bcfe into openaps:dev Nov 18, 2018
ivalkou pushed a commit to ivalkou/oref0 that referenced this pull request Nov 27, 2018
* Update oref0-pump-loop.sh

* Update oref0-pump-loop.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants