These are chat archives for nightscout/intend-to-bolus

16th
Nov 2015
Matt Pressnall
@logichammer
Nov 16 2015 00:03
@scottleibrand / @danamlewis , can you add me as a collaborator to https://github.com/openaps/docs ? Trying to push my branch off of dev into the repro and no permissions to do so. Or if I should do my pull request some other way, let me know.
Scott Leibrand
@scottleibrand
Nov 16 2015 00:03
you'll want to fork the docs repo, push your changes there, and then create a pull request to openaps/docs dev
those pull requests allow everyone to review the changes before one of the repo maintainers merges them
LMK if it's not obvious how to do any of that. (it's not for most people.) :-)
Matt Pressnall
@logichammer
Nov 16 2015 00:06
So I cloned the repro, jumped into dev, did a checkout -b wheezy_to_jessie, made my changes, committed them locally and was going to push that branch up to then start a pull request. Not the correct way to do? I can look into forking...haven't done it that way before but up for learning.
Scott Leibrand
@scottleibrand
Nov 16 2015 00:07
yeah, forking is a github thing, rather than native git. you'll want to do it in the GUI: there's a fork button in the top right.
Matt Pressnall
@logichammer
Nov 16 2015 00:08
Gotcha and giving it a shot...thanks!
Scott Leibrand
@scottleibrand
Nov 16 2015 00:08
your approach would also work: the main advantage of forks is it allows random people to submit pull requests without giving them permissions to push directly to master
Matt Pressnall
@logichammer
Nov 16 2015 00:09
Yeah, that would be a headache to manage
Scott Leibrand
@scottleibrand
Nov 16 2015 00:09
an maybe more importantly, doesn't require them to pay as close attention to which branch they're on to avoid doing so accidentally
I've done that a few times. :)
Matt Pressnall
@logichammer
Nov 16 2015 00:18
Pretty easy! Thanks for pointing out how to do it...Let me know if anything looks goofy...
schulzedj
@schulzedj
Nov 16 2015 00:20
Well big day for a rookie- first post on the gitter AND
The tasty Raspberry Pi is configured!
Scott Leibrand
@scottleibrand
Nov 16 2015 00:22
@logichammer did you try looking at the contents of /etc/apt/sources.list ?
it will either say jessie or wheezy, and should be accessible from the mounted SD card file system on your PC
Matt Pressnall
@logichammer
Nov 16 2015 00:23
On Windows with the SD Card loaded up, I don't have an /etc at all...doesn't look like a normal unix filesystem to me.
I'm going to pull it out of the PI and take a screenshot
thanks, @schulzedj !
schulzedj
@schulzedj
Nov 16 2015 00:24
@scottleibrand - is there a command I can enter in the Pi to see what version 'Jessie or wheezy' is currently running?
Scott Leibrand
@scottleibrand
Nov 16 2015 00:25
yes. lsb_release -a
Scott Leibrand
@scottleibrand
Nov 16 2015 00:27
@logichammer there should be multiple partitions. you found the boot one: there should be another.
Matt Pressnall
@logichammer
Nov 16 2015 00:27
Hmmm...I'll take a look not seeing an easy way to access it via native windows
Scott Leibrand
@scottleibrand
Nov 16 2015 00:27
I don't use a windows box any more myself, though, so not sure how to make it show up if it doesn't automatically
I think we'll want to incorporate your Path 3 stuff into Path 2, since they're the same process, and path 2 doesn't document in much detail some of the steps that you wrote up
Matt Pressnall
@logichammer
Nov 16 2015 00:29
Yeah, please feel free to re-organize...
Scott Leibrand
@scottleibrand
Nov 16 2015 00:29
we're really not upgrading, we're just doing the Download Raspbian and Write Raspian to the MicroSD Card steps
ok, I'll merge and then edit
I can see the partition is there but it won't let me mount it
Scott Leibrand
@scottleibrand
Nov 16 2015 00:30
k. then you're in the same boat as all the Mac users
I wonder if we should just delete the Headless WiFi configuration section
Matt Pressnall
@logichammer
Nov 16 2015 00:30
Gotcha...Load and see!
Might simplify...too many options can be overwhelming for folks.
Dana Lewis
@danamlewis
Nov 16 2015 00:31
Welcome @schulzedj :)
Scott Leibrand
@scottleibrand
Nov 16 2015 00:32
has anyone else here successfully got their Pi set up by pre-configuring the wifi settings on a mounted SD card, and avoided needing a console cable or monitor/keyboard?
@channemann you wrote that part of the setup, right? any ideas what the requirements are to see and edit the main partition?
Matt Pressnall
@logichammer
Nov 16 2015 00:33
@scottleibrand , fyi...this line If it says anything about Release / Jessie should say If it says anything about Release 8 / Jessie
Scott Leibrand
@scottleibrand
Nov 16 2015 00:33
feel free to make more commits and push them to your fork
Matt Pressnall
@logichammer
Nov 16 2015 00:34
gotcha...on it
Scott Leibrand
@scottleibrand
Nov 16 2015 00:34
if we haven't merged yet, they'll be incorporated when we do
once we do, you can always submit another PR
@logichammer: ready to merge?
Scott Leibrand
@scottleibrand
Nov 16 2015 00:39
looks like it to me. merging and starting the reorganization.
diabeticgonewild
@diabeticgonewild
Nov 16 2015 00:40
Might seriously finish my part 1 of 3 of #VirtualPancreas this weekend. But I will have to check over it tomorrow. I'm relying too much on "luck" to be comfortable with it...
Matt Pressnall
@logichammer
Nov 16 2015 00:41
Yes, sorry...moving hardware around the house. You were all good!
diabeticgonewild
@diabeticgonewild
Nov 16 2015 00:44
And I just did something totally evil--"popped" a prednisone pill just "out of the blue" so I can finish this up...damn autoimmune diseases.
All_I_needed.jpg
All that is, is the "needed value" to solve for the stuff going on in the "random walks". That was pretty much all I needed to solve my stuff, and it took months to find.
Q is a precision matrix (inverse of the covariance matrix), generated via this MATLAB file: https://github.com/diabeticgonewild/Artificial-Pancreas-2015-Mathematical-Model/blob/master/igmrfprec.m
diabeticgonewild
@diabeticgonewild
Nov 16 2015 00:49
x sub i or j is just a value of a random number, in this case, generated from a normal distribution, and the means are zero but the variances are different, depending on which variable is being used for in the random walks.
Oh yeah, CalTech had a document on random walks, that saved me....
But yeah, back to work!
diabeticgonewild
@diabeticgonewild
Nov 16 2015 01:38
I don't think I can get this done tonight. :(
diabeticgonewild
@diabeticgonewild
Nov 16 2015 01:47
yeah I definitely did something wrong! :worried:
Scott Leibrand
@scottleibrand
Nov 16 2015 02:00
@logichammer or anyone else: can you take a look at my reorganized version at openaps/docs#29 and LMK if it looks good to merge to master?
Scott Leibrand
@scottleibrand
Nov 16 2015 02:25
Jim Matheson
@jmatheson
Nov 16 2015 02:43
Hi all, just a heads up that i am new and in the house. Just sent a pull request for a couple of minor things that helped me during my setup. (and my intro message is over in the G group https://groups.google.com/forum/#!topic/openaps-dev/jyyazw675lY)
Scott Leibrand
@scottleibrand
Nov 16 2015 02:45
cool, thx. re: ns-upload, see also https://gitter.im/nightscout/intend-to-bolus?at=5646f380bb11d0727959301a (guess that was you, not logichammer)
Chris Hannemann
@channemann
Nov 16 2015 02:58
@scottleibrand unfortunately, I did not write that part of the docs, just did some editing on it; however, I have done all of my wifi setup without keyboard/mouse/hdmi or console cable
I have simply connected the RPi to my router with an ethernet cable, then followed the instructions here to edit wpa_supplicant.conf
I have also done it from the command line using the stuff as written in the gitbook, but it gets a little trickier if you aren't doing it as root (can't just sudo, I believe)
Scott Leibrand
@scottleibrand
Nov 16 2015 03:01
ok. considering getting rid of that section of the docs, if no one has any objections. for now I just moved it down to be the last option listed, with easy links to skip past it if you do one of the other methods
@jmatheson just merged your changes into dev instead of master. thx.
@channemann those changes are at openaps/docs#29 if you want to give them a once-over.
Jim Matheson
@jmatheson
Nov 16 2015 03:06
sorry, thought i just did a pull request, did not realize I merged anything.
must have misclicked dev
Chris Hannemann
@channemann
Nov 16 2015 03:08
@scottleibrand probably wouldn't remove it, but maybe link to those instructions (they are the official RPi ones after all)
Scott Leibrand
@scottleibrand
Nov 16 2015 03:09
ah, yes, I would love to remove text and replace with link.
@jmatheson you just did a PR against master. that is fine, but we prefer to collect changes against dev and then merge them to master.
Jim Matheson
@jmatheson
Nov 16 2015 03:10
i see. got it.
Scott Leibrand
@scottleibrand
Nov 16 2015 03:11
so I created a new PR identical to yours, but targeting dev instead of master. had to manually resolve the merge conflicts with the stuff I changed while you were making your changes, but then once I did that I merged it.
@channemann you have the link handy?
diabeticgonewild
@diabeticgonewild
Nov 16 2015 03:22
Yeah the random walks are going to take longer than I want them to...
I am confident I can be done with part 1 of 3 before the new year though!
diabeticgonewild
@diabeticgonewild
Nov 16 2015 03:29
@channemann @scottleibrand if you scroll down to the third post, there are "sample" etc/network/interfaces files for people to use: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=116023
I found that post highly useful...
Scott Leibrand
@scottleibrand
Nov 16 2015 04:47
openaps/oref0#24
eyim
@eyim
Nov 16 2015 05:25
This message was deleted
@jmatheson you can find the information on uploading to nightscout here: :point_up: November 9, 2015 1:28 PM
Dana Lewis
@danamlewis
Nov 16 2015 05:27
+1 thanks @eyim !
Going to make you chief openaps gitter spelunker if you keep this up :)
eyim
@eyim
Nov 16 2015 05:28
:) No problem. Trying to be helpful
@jmatheson It didn't work for my azure Nightscout implementation but worked on my Heroku implementation. I'm not technical eough to understand why. I am also having time zone issues with it being uploaded at UTC time that I haven't been able to resolve yet
Scott Leibrand
@scottleibrand
Nov 16 2015 05:29
and succeeding. :)
@eyim that should be something you can fix by using tz to add PST timezones to pumphistory.json and clock.json first before uploading
Jim Matheson
@jmatheson
Nov 16 2015 05:31
@eyim thx!
Scott Leibrand
@scottleibrand
Nov 16 2015 05:32
@eyim check out openaps/oref0#24 to see a working and tested method
and feel free to use that to set up a second upload-only openaps instance for testing and comparison
eyim
@eyim
Nov 16 2015 05:33
@scottleibrand Thank you Scott!
Scott Leibrand
@scottleibrand
Nov 16 2015 05:35
if you set up two openaps instances (like in different directories on the same Pi) just be sure to update the cron jobs so they run at different times
eyim
@eyim
Nov 16 2015 05:38
I assume I have to upgrade to oref1 to do that. If so, I'll probably wait until I get another pi to arrive to that I don't mess up my current implementation based on oref0. This time zone issue seems to be my last big holdup. I send it through the tz device but it merely adds -00:00 rather than -08:00 to all the times
Scott Leibrand
@scottleibrand
Nov 16 2015 05:38
nah, oref1 isn't really a thing
eyim
@eyim
Nov 16 2015 05:39
ahhh - got it. I'll try it. Thank you
Scott Leibrand
@scottleibrand
Nov 16 2015 05:40
it was just an aborted attempt at naming the ns-uploader-setup.sh thing
at some point we may make an oref1 repo with that script and other stuff
but for now I just submitted a PR to add the script to oref0 dev branch. if you (or anyone) can test it out and +1 that PR if it works, we can go ahead and merge it
Dana Lewis
@danamlewis
Nov 16 2015 06:58

Finally submitted the docs re-org I have been working on for a while. #35 is waiting for review from folks - this is the big re-org of the docs I talked about to match the "rainbow outline" I had emailed out. Reference for the big picture (https://groups.google.com/d/msg/openaps-dev/GMBUHYYZInU/gw0AuWTODgAJ) or a preview from my gitbook version here (https://danamlewis.gitbooks.io/openaps-docs-november-2015-reorg-work/content/index.html). Compare to current openaps docs here (https://openaps.gitbooks.io/building-an-open-artificial-pancreas-system/content/index.html)

There's a lot of new info in here, especially around phase 3 and 4 that we need eyeballs on, in particular some feedback as to whether this is too much info for this type of doc.

I know @eyim and others have been doing some writeups as they work through this process (and have done a way better job tracking all the little notes in gitter), and would love to see some of that work layered in as more PRs on top of this one.
Scott Leibrand
@scottleibrand
Nov 16 2015 07:42
This is a huge improvement in a lot of ways. Hopefully this will get a lot of people un-stuck, without making things "too easy". As you read through the "Build a manual system" and "Automate your system" sections, please flag anything if you think it is too specific and should be more general.
Jason Calabrese
@jasoncalabrese
Nov 16 2015 08:03
@danamlewis I'm getting a 404 for your book link
Ben West
@bewest
Nov 16 2015 08:03
me too
might be time to enable another build method
Dana Lewis
@danamlewis
Nov 16 2015 08:04
Bleh. Was working a while ago. Maybe just look at the table of contents in dev branch of openAPS/docs to see the big picture, then.
Scott added that to dev after I PR'd to master, and fixed some more broken links, but that TOC is accurate.
Ben West
@bewest
Nov 16 2015 08:05
readthedocs is not bad, although I'd rather go with something based that tr-markdown framework (it'a prettier, but lacks nice versioning)
I think we need "apps" for phase 0
Dana Lewis
@danamlewis
Nov 16 2015 08:07
Yes, that's the outline so people can compare what moved around
Ben West
@bewest
Nov 16 2015 08:07
some way to make it concrete, maybe a quiz or something
like, if someone's been using NS, and they just want openaps to include their pump data
they are ready for something, for sure
Jason Calabrese
@jasoncalabrese
Nov 16 2015 08:08
think we could have a ready to go monitor only loop
basicly have the pi act as the connect
Ben West
@bewest
Nov 16 2015 08:08
did we make a decision on renaming openaps toolkit to something else?
Dana Lewis
@danamlewis
Nov 16 2015 08:09
Would like to get #35 up as a baseline while working on some of these other ideas, to help keep people moving forward in the meantime.
Ben West
@bewest
Nov 16 2015 08:09
I like the side-effects of something called openaps being used by lot of people to connect to devices more and more
it'll get easier and easier to use as we tweak the uses
Jason Calabrese
@jasoncalabrese
Nov 16 2015 08:09
yeah, if you let that sit there will be tons of merge conflicts
Ben West
@bewest
Nov 16 2015 08:10
and also, it'll get ported to other stuff
oh, need to add to docs to setup branch
basically once setup, git checkout -b my/concrete-install-per-device
I avoid merge conflicts this way, and it's conceivable to develop proper reports and such that get merged correctly, especially once we develop smarter agents/daemons
openaps/openaps#35 ?
Dana Lewis
@danamlewis
Nov 16 2015 08:12
Heading to bed, looking forward to comments or other fixes as part of #35 tomorrow
Ben West
@bewest
Nov 16 2015 08:12
oh, openaps/docs#35
Dana Lewis
@danamlewis
Nov 16 2015 08:12
Yes, #35 in docs
Ben West
@bewest
Nov 16 2015 08:12
nice :-)
Dana Lewis
@danamlewis
Nov 16 2015 08:12
Thx. Night!
timomer
@timomer
Nov 16 2015 17:07
Hello all, I have now gotten native javascript determine-basal.js working in Android using Rhino https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino
There where only a few small changes to determine-basal.js that where needed, you can see my modified version here, look for TODO Tim: https://github.com/timomer/HAPP/blob/master/app/src/main/assets/openaps/determine-basal.js
This is great, as means code can now be shared between both platforms
Ideally, I would like it so I can drop determine-basal.js as an assist direct into HAPP without changes
I am not hot on Javasscript (any programming for that matter), would it be possible to add my changes and adapt OpenAPS to accommodate them?
timomer
@timomer
Nov 16 2015 17:12
Also, I would like to take the function setTempBasal out of determine-basal.js as this function does not change often I would like to fully port it to Android and add my own HAPP based adjustments
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:17
that's great @timomer, maybe there's a better way than making some of those vars global
timomer
@timomer
Nov 16 2015 17:18
yep, passing them to the functions will fix that - making them global was the most easy change
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:18
most of the the determine-basal logic should be refactored into a module, and use that by the script
more like the way the iob calculation is done
timomer
@timomer
Nov 16 2015 17:19
as in called by another js script, is that the reason for if (!module.parent) {?
I could not get my head around that
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:37
yeah, it's a node.js thing
timomer
@timomer
Nov 16 2015 17:38
cool, ok that should not be difficult to reintroduce
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:38
a node module exports a function or object
timomer
@timomer
Nov 16 2015 17:39
my main issue is passing glucose_input,temps_input,iob_input,profile_input,offline_value
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:39
wonder if there's a good way to use node modules with Rhino
timomer
@timomer
Nov 16 2015 17:39
with Rhino I can pass a params Object[] to the script
I do not want to read them from the cwd
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:43
would need to do a little research, but if we can find something general that would work with any Node module, we can reuse a lot of code
timomer
@timomer
Nov 16 2015 17:43
but hardly any activity for awhile
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:44
might have to use browserify to rewrite the node modules
timomer
@timomer
Nov 16 2015 17:45
little over my head
Jason Calabrese
@jasoncalabrese
Nov 16 2015 17:46
in the end I bet it will look simple, but figuring it out would take some work
timomer
@timomer
Nov 16 2015 17:47
if we can get it to work would be great, my changes are very little to determine-basal.js
Scott Leibrand
@scottleibrand
Nov 16 2015 17:49
to start with, I would suggest we make a new branch off oref0 dev and PR your changes over to it, just to make sure openaps still passes all its tests and works as normal
timomer
@timomer
Nov 16 2015 17:53
sounds good, happy to get some direction on this, I have it working but I know my suggested changes will not be the best
Scott Leibrand
@scottleibrand
Nov 16 2015 17:57
as long as tests pass and nothing breaks, I'm fine with incorporating your changes into a branch and letting others go to town on refactoring. :)
timomer
@timomer
Nov 16 2015 18:00
:+1:
@scottleibrand would you make a new branch for me to work on?
Ben West
@bewest
Nov 16 2015 18:02
you can do it using git checkout -b wip/timomer/my-topic
timomer
@timomer
Nov 16 2015 18:03
ah got you, do it on my fork
Scott Leibrand
@scottleibrand
Nov 16 2015 18:04
I'll also create one in oref0 for you to target a PR
any preferred name for it?
wip/timomer/happ ?
when basal is 0, it says no temp
timomer
@timomer
Nov 16 2015 18:15
thanks @scottleibrand got it
Scott Leibrand
@scottleibrand
Nov 16 2015 18:16
@LorelaiL yeah, that looks like a cosmetic bug. that part of the code is dealing with setting high temps, so the behavior is the same whether there's a low-temp or no temp set, it just displays the wrong thing in the reason
Lori
@LoriLori
Nov 16 2015 18:16
yes @scottleibrand , just cosmetic
@timomer if you are interested https://gist.github.com/LorelaiL/632835053c9e83a49347, it runs without changes to oref0-determine-basal.js
Scott Leibrand
@scottleibrand
Nov 16 2015 18:16
there are actually a bunch of bugs like that I haven't gotten around to fixing yet, particularly related to whether avgdelta or delta is the thing driving the decision
PRs welcome of course. :)
Ben West
@bewest
Nov 16 2015 18:18
I'd like to steer back in @loudnate's direction going forward, considering tools that handle more things to reduce the bash-itude, and tools to pull our $x effect
carb-effect, insulin-effect, etc
Lori
@LoriLori
Nov 16 2015 18:19
how is riley link going? Not considering switching to Android?
Ben West
@bewest
Nov 16 2015 18:19
want a report that takes foo-effect's as inputs and spits out prediction
I have trouble writing for android, my time is better spent not in java
I think
rileylink is coming along, I have code that ipmlements an openaps driver
Scott Leibrand
@scottleibrand
Nov 16 2015 18:20
sounds like with tim getting oref0-determine-basal.js working in android we maybe should start porting some of @loudnate's stuff to js so we can use it in Android eventually
Ben West
@bewest
Nov 16 2015 18:20
or port oref0 to python
Scott Leibrand
@scottleibrand
Nov 16 2015 18:20
can python be used in android?
Nathan Racklyeft
@loudnate
Nov 16 2015 18:20
@LorelaiL I plan to continue to use my Pi/openaps setup for prototyping. it's verbose, and very componentized and great for testing algorithms.
Ben West
@bewest
Nov 16 2015 18:20
since it's easier to document multiple uses with tab completion, etc
timomer
@timomer
Nov 16 2015 18:20
@LorelaiL are you running that in a webview?
Nathan Racklyeft
@loudnate
Nov 16 2015 18:20
@LorelaiL but on that note, I have some exciting news to announce later this week
Scott Leibrand
@scottleibrand
Nov 16 2015 18:21
at d-data?
Nathan Racklyeft
@loudnate
Nov 16 2015 18:21
and my focus will switch back to mobile
Nathan Racklyeft
@loudnate
Nov 16 2015 18:21
@scottleibrand maybe, not sure how far I'll get before Thursday.
timomer
@timomer
Nov 16 2015 18:22
@LorelaiL nice, not seen this, will investigate
Ben West
@bewest
Nov 16 2015 18:22
yeah, there are multiple concurrent things... openaps as-is is great prototyping-exploration tool
an android/mobile version won't have same flexible properties
Lori
@LoriLori
Nov 16 2015 18:22
@timomer look at that gist it is quite nice
timomer
@timomer
Nov 16 2015 18:22
:+1:
Lori
@LoriLori
Nov 16 2015 18:23
I think I will have OpenAPS running on Android today with you know which pump
Ben West
@bewest
Nov 16 2015 18:23
hehe, that's really nift @LorelaiL
well, there are two candidates, but I suspect its your recent play thing
what does a pirate say?
did we miss that day, was it in september?
aaarRRRRRRRRgggh
Scott Leibrand
@scottleibrand
Nov 16 2015 18:23
lol
Ben West
@bewest
Nov 16 2015 18:24
that's really neat
I was curious if a similar technique could be used to run the uart code
Lori
@LoriLori
Nov 16 2015 18:25
JS uart code? yes
Ben West
@bewest
Nov 16 2015 18:25
because I'm insane
it works in chrome as a plugin with https://github.com/bewest/serial-chromeify
works on node via serial and usb interfaces
Lori
@LoriLori
Nov 16 2015 18:26
quick look and would say yes
wish you had rilet link in JS :)
Ben West
@bewest
Nov 16 2015 18:26
oh?
it can be
been thinking hard about it
Lori
@LoriLori
Nov 16 2015 18:27
we can bridge JS to any Java function
Ben West
@bewest
Nov 16 2015 18:27
I have a dexcom one too
Lori
@LoriLori
Nov 16 2015 18:27
except for process.exit(1) and return which is not in function :)
don't worry, I rarely close my handles or exit things
lol
that's why I'm a scripter
ok, well you seem more willing to play with this idea than most
I think the timing/async issues are kind of hard to deal with
not sure
but, in particular, if there's some interface that can emulate the "stream" logic, that would make the two interfaces very compatible, actually
Lori
@LoriLori
Nov 16 2015 18:30
no big deal with async I think, bridge is quite open
Ben West
@bewest
Nov 16 2015 18:31
the boilerplate to get it to work with chrome/C++ was simple https://github.com/bewest/serial-chromeify/blob/master/index.js
just need some bidirectional interface
Matthias Granberry
@mgranberry
Nov 16 2015 20:47
@bewest I did some drivers using Scala.js and scala.async to "flatten" out some of the async callbacks and it made it fairly easy to do.
but clearly it wasn't Javascript anymore.
Ben West
@bewest
Nov 16 2015 21:20
js community recently created a "stream" interface that allows flattening the logic fairly well
Jason Calabrese
@jasoncalabrese
Nov 16 2015 21:25
at my new job we're using promises for everything, still async but at least they can be chained
timomer
@timomer
Nov 16 2015 22:30
@LorelaiL I like the app, code looks really clean and easy to follow, ill step over it in detail this weekend and port over to HAPP - looks like this is the best way to get native openaps into android
should be easy to change my Rhino functions to support V8 adaptor
Scott Leibrand
@scottleibrand
Nov 16 2015 22:44
so would that method get updates to oref0-determine-basal.js automatically?
Lori
@LoriLori
Nov 16 2015 22:48
could be :) haven't thought about it, once something change it will likelly break
like when function parameters change, code structure of init(), what data are pulled from function parameters
think we have some kind of what we can call adapter, if something changes in JS we can adapt to it in adapter
Lori
@LoriLori
Nov 16 2015 22:56
what is good we can work on the same oref0-determine-basal.js and create pull requests
Scott Leibrand
@scottleibrand
Nov 16 2015 22:56
yeah, that's good at least
Lori
@LoriLori
Nov 16 2015 22:56
lets say somebody would like to add more logging I can change at create pull request
don't expect it should break rPI when it works on android
I still don't know "Eventual BG 77<106bolus snooze: eventual BG range 77-122"
don't have carbs on board, its later correction
Scott Leibrand
@scottleibrand
Nov 16 2015 23:01
yeah. most changes will probably be stuff like this: openaps/oref0#25
the idea with bolus snooze is that if you bolused, it might be due to carbs, or because you had some other good reason to do so. so as a result, openaps will avoid high-temping to counteract that bolus until some time has passed
the snooze BG range will start out a bit above current BG if you do a correction bolus, and then gradually narrow over the course of DIA/2 until it's back to normal again
Jason Calabrese
@jasoncalabrese
Nov 16 2015 23:03
will avoid low-temping right?
Scott Leibrand
@scottleibrand
Nov 16 2015 23:04
sorry yes, mostly it avoids low-temping
Lori
@LoriLori
Nov 16 2015 23:04
might be low temping would be good somehow in some cases
Scott Leibrand
@scottleibrand
Nov 16 2015 23:04
well, if you need a low temp, you probably shouldn't have done that big of a correction bolus. :)
Lori
@LoriLori
Nov 16 2015 23:04
sure yes :)
Scott Leibrand
@scottleibrand
Nov 16 2015 23:05
it won't second-guess you at first, but if it continues to be too low it will start to take action after an hour or so, depending on how far you're undershooting
Lori
@LoriLori
Nov 16 2015 23:05
just you know, it should correct me :)
Scott Leibrand
@scottleibrand
Nov 16 2015 23:05
heh, well it doesn't know if you did a correction bolus or meal bolus
Jason Calabrese
@jasoncalabrese
Nov 16 2015 23:06
wow, running 2 pumps gets crazy
Scott Leibrand
@scottleibrand
Nov 16 2015 23:06
linked from openaps/oref0#25
Jason Calabrese
@jasoncalabrese
Nov 16 2015 23:06
3 iobs and they are all wrong
Scott Leibrand
@scottleibrand
Nov 16 2015 23:07
oh, found the link to the actual test output
Jason Calabrese
@jasoncalabrese
Nov 16 2015 23:08
kids are home today since they have conferences at the school today and tomorrow so I ran the loop all night in just swapped pumps before they went out
will have to use NS for iob in that case
and tried to anticipate the tub of movie popcorn he's about to eat
Scott Leibrand
@scottleibrand
Nov 16 2015 23:09
heh fun
"eating soon" mode? :)
Lori
@LoriLori
Nov 16 2015 23:09
@scottleibrand https://travis-ci.org/openaps/oref0/builds/91489157 is changes of text, test is checking reason text
Scott Leibrand
@scottleibrand
Nov 16 2015 23:09
yeah, figured it out and just pushed a fix
Lori
@LoriLori
Nov 16 2015 23:10
sorry you asked :(
Scott Leibrand
@scottleibrand
Nov 16 2015 23:10
didn't realize the red build numbers were clickable links
thx
I do that a lot (answer my own questions)
Jason Calabrese
@jasoncalabrese
Nov 16 2015 23:10
set a temp on the other pump, but I know Heidi will forget about it, and correct with carbs
Scott Leibrand
@scottleibrand
Nov 16 2015 23:12
@LorelaiL if you see anything in oref0-determine-basal.js that's not covered by my very limited test cases, please go ahead and add new ones.
Lori
@LoriLori
Nov 16 2015 23:16
will try :)
Scott Leibrand
@scottleibrand
Nov 16 2015 23:16
:)
Lori
@LoriLori
Nov 16 2015 23:21
was thinking on body model, but I have no ideas on how to do it
then we could put addSensorNoise and test, addCanulaHitByCat test :)
Scott Leibrand
@scottleibrand
Nov 16 2015 23:22
lol
Lori
@LoriLori
Nov 16 2015 23:22
just run 5km lets test
Dana Lewis
@danamlewis
Nov 16 2015 23:24
Heh
Lori
@LoriLori
Nov 16 2015 23:52
wish it could do that "reason":"Eventual BG 66<106, no temp, setting -5U/hr" :)