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 a new "Full-duplex node, that do not repeat audio" node type #72

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
28 changes: 16 additions & 12 deletions bin/node-setup
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,11 @@ do_update_node_duplex() {
fi
newarr+=("$i" "${duplex_modes[$i]}" "$ONOFF")
done
((i++))

ANSWER=$(whiptail \
--title "$TITLE" \
--radiolist "Select the duplex type.\n\nUse the arrow keys to scroll and the space bar to select." \
$WT_HEIGHT $WT_WIDTH \
$i \
$WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
"${newarr[@]}" \
3>&1 1>&2 2>&3)
if [[ $? -ne 0 ]]; then
Expand Down Expand Up @@ -1964,30 +1962,35 @@ do_query_node_defaults() {
--menu "What configuration settings should we use for node $CURRENT_NODE?" \
$WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
--ok-button "Select" \
"1" "Hotspot (half duplex) with courtesy tones" \
"2" "Hotspot (half duplex) with no courtesy tones" \
"3" "Repeater or full duplex hotspot" \
"4" "HUB w/no radio" \
"1" "Half-duplex node (Hotspot) with telemetry tones" \
"2" "Half-duplex node (Hotspot) with no telemetry tones" \
"3" "Full-duplex node (Repeater or Hotspot)" \
"4" "Full-duplex node, does not repeat audio" \
"5" "HUB node w/no radio interface" \
"0" "None of the above (show all settings)" \
3>&1 1>&2 2>&3)
if [[ $? -ne 0 ]]; then
return 1
fi

case "$ANSWER" in
1) # Hotspot (half duplex) with courtesy tones
1) # Half-duplex node (Hotspot) with telemetry tones
NEW_INTERFACE_TYPE="SimpleUSB"
NEW_DUPLEX=1
;;
2) # Hotspot (half duplex) with no courtesy tones
2) # Half-duplex node (Hotspot) with no telemetry tones
NEW_INTERFACE_TYPE="SimpleUSB"
NEW_DUPLEX=0
;;
3) # Repeater or full duplex hotspot
3) # Full-duplex node (Repeater or Hotspot)
NEW_INTERFACE_TYPE="SimpleUSB"
NEW_DUPLEX=2
;;
4) # Hub w/no radio
4) # Full-duplex node, does not repeat audio
NEW_INTERFACE_TYPE="SimpleUSB"
NEW_DUPLEX=3
;;
5) # HUB node w/no radio interface
NEW_INTERFACE_TYPE="Pseudo"
NEW_DUPLEX=2
;;
Expand All @@ -1998,7 +2001,7 @@ do_query_node_defaults() {
esac

case "$ANSWER" in
1 | 2 | 3)
1 | 2 | 3 | 4)
do_query_node_interface short
if [[ $? -ne 0 ]]; then
return 1
Expand Down Expand Up @@ -2043,6 +2046,7 @@ do_node_set_defaults() {
do_node_set_usrp
;;
esac
CURRENT_INTERFACE_TYPE=$NEW_INTERFACE_TYPE
fi

if [[ -n "$NEW_DUPLEX" ]]; then
Expand Down