Skip to content
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

Add explorer board prompt and auto-port-itize it if so #381

Merged
merged 3 commits into from
Feb 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,24 @@ if [[ -z "$DIR" || -z "$serial" ]]; then
BLE_SERIAL=$REPLY
echo "$BLE_SERIAL? Got it."
fi
read -p "Are you using mmeowlink? If not, press enter. If so, what TTY port (full port address, looks like "/dev/ttySOMETHING" without the quotes - you probably want to copy paste it)? " -r
ttyport=$REPLY
echo -n "Ok, "
if [[ -z "$ttyport" ]]; then
echo -n Carelink


read -p "Are you using an Explorer Board? [Y/n] " -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
ttyport=/dev/spidev5.1
echo "Ok, yay for Explorer Board! "
else
echo -n TTY $ttyport
read -p 'Are you using mmeowlink (i.e. with a TI stick)? If not, press enter. If so, what TTY port (full port address, looks like "/dev/ttySOMETHING" without the quotes - you probably want to copy paste it)? ' -r
ttyport=$REPLY
echo -n "Ok, "
if [[ -z "$ttyport" ]]; then
echo -n Carelink
else
echo -n TTY $ttyport
fi
echo " it is. "
fi
echo " it is."


if [[ ! -z "${ttyport}" ]]; then
echo "Medtronic pumps come in two types: WW (Worldwide) pumps, and NA (North America) pumps."
Expand Down