-
Notifications
You must be signed in to change notification settings - Fork 71.9k
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
Update openaps.js to recognize the correct spelling of "received" #2785
Conversation
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 found one typo in while you were fixing a typo 😄
Please also try to add a test case for the received
version in https://github.com/nightscout/cgm-remote-monitor/blob/master/tests/openaps.test.js
lib/plugins/openaps.js
Outdated
, enacted: status.openaps.enacted && status.openaps.enacted.timestamp && status.openaps.enacted.recieved && moment(status.openaps.enacted.timestamp) | ||
, notEnacted: status.openaps.enacted && status.openaps.enacted.timestamp && !status.openaps.enacted.recieved && moment(status.openaps.enacted.timestamp) | ||
, enacted: status.openaps.enacted && status.openaps.enacted.timestamp && (status.openaps.enacted.recieved || status.openaps.enacted.received) && moment(status.openaps.enacted.timestamp) | ||
, notEnacted: status.openaps.enacted && status.openaps.enacted.timestamp && !(status.openaps.enacted.recieved || status.openaps.enacted.recieved) && moment(status.openaps.enacted.timestamp) |
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.
You misspelled recieved
in the notEnacted
case. Please correct
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.
thanks for fixing
Test for devicestatus-entries containing the correct spelling of the word "received" instead of "recieved" in OpenAPS versions 0.6.0 and later
Hehe, I think I finally got it right :) |
@drnoname82 : tested and works. This is required for oref0 0.6.0 because that uses the @jasoncalabrese @sulkaharo can you review and if ok, merge to dev? |
lib/plugins/openaps.js
Outdated
, enacted: status.openaps.enacted && status.openaps.enacted.timestamp && status.openaps.enacted.recieved && moment(status.openaps.enacted.timestamp) | ||
, notEnacted: status.openaps.enacted && status.openaps.enacted.timestamp && !status.openaps.enacted.recieved && moment(status.openaps.enacted.timestamp) | ||
, enacted: status.openaps.enacted && status.openaps.enacted.timestamp && (status.openaps.enacted.recieved || status.openaps.enacted.received) && moment(status.openaps.enacted.timestamp) | ||
, notEnacted: status.openaps.enacted && status.openaps.enacted.timestamp && !(status.openaps.enacted.recieved || status.openaps.enacted.recieved) && moment(status.openaps.enacted.timestamp) |
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.
thanks for fixing
LGTM |
In OpenAPS the spelling of the word "received" in enacted.json was changed to its correct form from the wrong form "recieved" used in the versions before. This leads to a problem showing OpenAPS as "not enacted" in Nightscout although the OpenAPS rig is working fine (oref0 issue #637)
I made a change to the Nightscout openaps plugin to recognize "recieved" used in the current version of OpenAPS as well as "recieved" used in future versions. Could someone knowledgable please have a thorough look at the changes? It works fine on our heroku Nightscout instance.