Skip to content

Conversation

@bewest
Copy link
Member

@bewest bewest commented Oct 14, 2015

Some more tools.

bewest and others added 10 commits October 14, 2015 14:31
…tform/soc/3f980000.usb/buspower and use whichever exists
Eliminate illegal js, break keyword is not allowed outside of loops/switches.

Cause process to error out in case of mmol.
Prevent errors like this:

foo$ oref0-get-profile monitor/pump-history.json tagrgets-mm
ol.json

/usr/local/lib/node_modules/openaps-js/bin/oref0-get-profile.js:50
        break;
        ^^^^^
SyntaxError: Illegal break statement
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
bewest@hither:~/Documents/foo$

In favor of errors like this:

o$ oref0-get-profile monitor/pump-history.json tagrgets-mmol.json monitor/insulin-sensitivities.json monitor/active-basal-profile.json monitor/carb-ratios.json max_iob.json
BG Target data is expected to be expressed in mg/dL. Found mmol/L in tagrgets-mmol.json .
bewest@hither:~/Documents/foo$
If the file names don't match, the package will refuse to install.
This was referenced Oct 17, 2015
scottleibrand added a commit that referenced this pull request Oct 18, 2015
@scottleibrand scottleibrand merged commit 40bea4f into dev Oct 18, 2015
@scottleibrand scottleibrand deleted the wip/more-failsafes branch October 18, 2015 20:53
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