Skip to content

Commit

Permalink
run subg-ww-radio-parameters script on mmtune
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterGit committed Dec 29, 2016
1 parent 816dfdf commit bee2e25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,14 @@ if [[ -z "$ttyport" ]]; then
openaps alias add wait-for-long-silence 'report invoke monitor/temp_basal.json'
openaps alias add mmtune 'report invoke monitor/temp_basal.json'
else
# radio_locale requires openaps 0.1.6-dev or later
openaps device add pump mmeowlink subg_rfspy $ttyport $serial $radio_locale || die "Can't add pump"
openaps alias add wait-for-silence '! bash -c "(mmeowlink-any-pump-comms.py --port '$ttyport' --wait-for 1 | grep -q comms && echo -n Radio ok, || openaps mmtune) && echo -n \" Listening: \"; for i in $(seq 1 100); do echo -n .; mmeowlink-any-pump-comms.py --port '$ttyport' --wait-for 30 2>/dev/null | egrep -v subg | egrep No && break; done"'
openaps alias add wait-for-long-silence '! bash -c "echo -n \"Listening: \"; for i in $(seq 1 200); do echo -n .; mmeowlink-any-pump-comms.py --port '$ttyport' --wait-for 45 2>/dev/null | egrep -v subg | egrep No && break; done"'
if [[ ${radio_locale,,} =~ "WW" ]]; then
# add subg-ww-radio-parameters script to mmtune for WW pump. See https://github.com/oskarpearson/mmeowlink/issues/51 or https://github.com/oskarpearson/mmeowlink/wiki/Non-USA-pump-settings for details
sed -i"" 's/^\(mmtune.*\); \(echo -n .*mmtune:\)/\1; echo -n subg-ww-radio-parameters:; \/usr\/local\/bin\/oref0-subg-ww-radio-parameters-timeout; \2/g' openaps.ini
fi
fi

# Medtronic CGM
Expand Down

0 comments on commit bee2e25

Please sign in to comment.