Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* only do UAMpredBGs within DIA hours of a bolus * enable bolus snooze if we don't have COB * enableUAM after bolus or eating soon; enableSMB for COB too * don't SMB when minPredBG is already below max_bg * syntax * print out IOB/COB/UAM predBG in reason field * only calculate minDeviationSlope from maxDeviation to now * only calculate minDeviationSlope from maxDeviation to now * remove extra comma in reason field * change back to 1h of data (45m of deviations) fo UAM * use minAvgDelta for calculating predicted CI from UAM * only display IOB/COB/UAM predBG when used * only display each predBG if used * only consider carbs from last DIA hours as a workaround for undead carbs * predUCI debugging on * let's try decaying predicted CI from UAM at minDeviationSlope/2 * spacing for pebble * use the higher of minCOBPredBG or minUAMPredBG as minPredBG * debugging * spacing for pebble * debugging * debugging * define minPredBG outside the if clause * clean up old comments and whitespace * ignore future temps and reduce predBG oscillation * UAMduration off by 5m * Project UAM impact out to DIA hours Now that we're excluding future temps from predBGs, they're not as much "up and to the right" when we have a long zero temp running. So it should be safter to extend UAM impact out up to DIA hours when we're at peak recent deviations. As soon as deviations start to come down that'll limit the UAM impact predictions. * undefined-check basalprofile_data[0] * don't cancel low temps unless unneeded for naive_eventualBG too * only enact after refresh_old_pumphistory in non-SMB mode * debugging * return maxDeviation * return maxDeviation * run autosens every 90m if edison-battery < 60% * run autosens every 90m if edison-battery < 60% * wait up to 5 minutes for new BG if rig battery low * wait up to 5 minutes for new BG if rig battery low * syntax * syntax * inline * to -n or not to -n * run low_battery_wait on regular pump-loop too * run low_battery_wait on regular pump-loop too * simplify break-out logic * set mtime of glucose.json to time of most recent glucose value * don't SMB for a trace of bolusiob due to a microbolus delivered when basal was higher * run battery mode any time Edison isn't charged/charging * if no monitor/temp_basal.json file, break * check if monitor/edison-battery.json exists * clarity * don't print filename with ls * copy-pasta * to -n or not to -n * 60-70% inclusive = charging * allow high-temps 5mg/dL lower: at 70 instead of 75 when target is 100 * set Carb Impact high enough to absorb all meal carbs over 4 hours * syntax * formula was right originally; commented * only killall if stuff really gets stuck * wait longer for silence before giving up * don't print filename with ls * if we can't keep pumphistory refreshed, defer to other rigs * if we can't keep pumphistory refreshed, defer to other rigs * if we can't keep pumphistory refreshed, defer to other rigs * wait longer for silence before giving up * adjust the target ISF to be a weighted average of fullNewISF and pumpISF * cap adjustedISF before applying 10% * allow SMBs every 3 minutes * don't use a minPredBG that's higher than any maxPredBG * debugging * fix formulas * round meal_carbimpact * meal_carbimpact * 2 since it linearly decays to zero * use 6 hours for now, until we fix the TODO * instead of profile.min_5m_carbimpact, assume all carbs absorb over 4h * allow SMBs every 3 minutes * totalCI can't be negative * fix formulas * generate COBpredBGs if remainingCI > 0; don't let ci be negative * debugging * stop adding remainingCI after 4h * if UAM is enabled, use the higher of minCOBPredBG or minUAMPredBG * need to allow negative CI to get good downward predictions * truncate all BG predictions at 3 hours * don't allow negative durations * don't allow negative ci to mess up predCI * don't use long_avgdelta for minDelta, to respond more quickly to upticks * if naive_eventualBG < 40, set a 30m zero temp * only use maxUAMPredBG if enableUAM; otherwise it's current bg We don't need maxCOBPredBG here, because that is always >= minCOBPredBG, which we just used * don't let maxUAMPredBG prevent high-temping for carbs * cap remainingCarbs at 90g * include 0m-ago data points in now * chmod +x ./bin/*.py * Allow wider BG target adjustment for autosens * fix minPredBG logic for high-temping based on minIOBPredBG * set minPredBG etc. regardless of ci * re-add reset_spi_serial.py until oref0_init_pump_comms.py is fixed * kill pump-loop after 5 minutes of not writing to pump-loop.log * exclude the last 1/3 of carbs from remainingCarbs * skip SMB stuff if No bolus needed (yet) * syntax * don't return false (it forces a retry) * squelch stdout from enact/smb-suggested.json * debugging * newlines etc. * newlines etc. * wait on glucose data that is newer than last action * spacing * truncate all BG predictions at 3.5 hours * only use data from the same device as the most recent BG data point * set "charging" voltage at 58-68% * only wait 4 minutes for new BG (pump-loop takes at least 1 minute) * only wait 3 minutes for new BG (pump-loop takes at least 1 minute) * require enableUAM: true in preferences.json to enable UAM * go back to using minDeviationSlope to decay UAM CI * adjust target BG if needed to safely bring down high BG faster without causing lows * start at 85 for safety, which implies 100->130 * don't use adjustedTargetBG if it's above target_bg * add adjust_targets_when_high preference (default true) * fix variable name * revert move of timestamp updating outside of oref0-pump-loop * fix variable name * fix variable name * formula fix * formula fix * adjust min_bg and max_bg too * adjust min_bg and max_bg too * consolidate output onto single lines * consolidate output onto single lines * consolidate output onto single lines * consolidate output onto single lines * debugging * debugging * debugging * debugging * syntax * debugging * debugging * debugging * test 80 for minimum adjustedTargetBG * debugging * debugging * debugging * debugging * debugging * debugging * debugging * debugging * wait 90m before setting minIOBPredBG and 60m before setting COB and UAM * disable SMB/UAM except after a manual bolus for now * only lower adjustedTarget to 80 when BG >~ 160, not >~140 * add preferences.json settings for enableSMB with bolus, COB, or temp targets * revert autosens target range to 93-117 (for 100) * Change name of preference value to adv_target_adjustments * test 80 for minimum adjustedTargetBG * only lower adjustedTarget to 80 when BG >~ 160, not >~140 * default adv_target_adjustments: false * Call maxCOB var * create maxCOB and defaults to 120 create maxCOB and defaults to 120 because that's the most a typical body can absorb over 4 hours. (If someone enters more carbs or stacks more; OpenAPS will just truncate dosing based on 120. Essentially, this just limits AMA as a safety cap against weird COB calculations) * comment * un-revert the change that actually checks pump_loop_completed * break if monitor/pump_loop_completed doesn't yet exist * narrow the ranges for charged/charging * consider pump_loop_completed even if no bolus needed * wait 4 minutes for new BG now that we're doing it right * always wait_for_bg regardless of battery level * echo truthfully * syntax * comment out minutes_running code now that we're not incorporating future temps into eventualBG * try also waiting for upto30s after radio reset before mmtuning * whitespace * grammar * disable SMB when a high temptarget is set * if both minUAMPredBG or minCOBPredBG are set, average them for now * weighed average minUAMPredBG and minCOBPredBG based on how many carbs remain as COB * wait for longer silence the weaker mmtune RSSI is * grammar * rounding and debugging * grammar * calculate minCOBPredBG if remainingCI > 0 * make sure minIOBPredBG is at least 40 * average the minIOBPredBG and minUAMPredBG for minPredBG * we don't need to ignore low minPredBGs any more * print basal and sens when unchanged * include minPredBG in rT object * update to smb_enact_temp based on pump_loop_completed * add minPredBG to rT object * syntax * simplify and linearize rssi_wait * comment * remove unused code from autotune debugging (3c34aa0) * #447: if rewind_resets_autosens, use BG data since lastSiteChange * only do padding in autosens mode, not COB calc mode * cap all minPredBGs at 39 to avoid biasing averages * differentiate autosens adjustments from adjust_targets_when_high ones * allow temp rate within 0.025U/hr for decocare floating point math * profile.adjust_targets_when_high renamed to adv_target_adjustments * log when not Adjusting targets for high BG * whitespace * without COB, use max of minIOBPredBG,minUAMPredBG * if carb_ratio is null buy we have a valid carb_ratios object, use that * move carb_ratio null check to oref0-autotune-prep.js * variable name * if carb_ratio is null buy we have a valid carb_ratios object, use that * if carb_ratio is null buy we have a valid carb_ratios object, use that * if profile.json contains null carb_ratio use profile.pump.json * Revert "if carb_ratio is null buy we have a valid carb_ratios object, use that" This reverts commit 687edb8. * Revert "if carb_ratio is null buy we have a valid carb_ratios object, use that" This reverts commit 35d506e. * check for carb_ratio==null if oref0-autotune-core fails * don't do lastSiteChange stuff for oref0-meal * wait for a full 30s silence before mmtuning * grammar * wait for a full 30s silence before mmtuning * adv_target_adjustments comment * allow setting of adjustmentFraction via preferences.json * add remainingCarbsCap to preferences.json, defaulting to zero * always run mocha in color mode * don't set snoozeBG if minPredBG >= 400 * fix some tests; disable others * use average of naive_eventualBG and minIOBPredBG to calculate worstCaseInsulinReq this will allow it to stop zero temping sooner when it's not longer really needed. * only mmtune 20% of the time now that we're waiting longer * increase default min_5m_carbimpact to help avoid overestimating COB * Update oref0-setup.sh (#454) floating-carbs updated to allow comparison between NS and drip data and not update if values haven't changed.
- Loading branch information