kopia lustrzana https://github.com/F5OEO/rpidatv
Add items to menu
rodzic
90d302cf19
commit
e33a83c1b5
|
@ -0,0 +1,107 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
./rpidatv/scripts/rpibutton.sh
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
./rpidatv/bin/rpidatvgui
|
||||||
|
|
|
@ -18,6 +18,9 @@ StrInputSetupIPTSINTitle="Configuration adresse IP"
|
||||||
StrCallContext="Paramètrage indicatif"
|
StrCallContext="Paramètrage indicatif"
|
||||||
StrCallTitle="Indicatif"
|
StrCallTitle="Indicatif"
|
||||||
|
|
||||||
|
StrLocatorContext="Paramètrage Locator"
|
||||||
|
StrLocatorTitle="Locator"
|
||||||
|
|
||||||
######## OUTPUT MENU #####################
|
######## OUTPUT MENU #####################
|
||||||
StrOutputSetupTitle="Mode de sortie"
|
StrOutputSetupTitle="Mode de sortie"
|
||||||
StrOutputSetupContext="Choix de la sortie"
|
StrOutputSetupContext="Choix de la sortie"
|
||||||
|
@ -51,15 +54,42 @@ StrOutputSR="Configure le débit symbole"
|
||||||
StrOutputFEC="choix du FEC"
|
StrOutputFEC="choix du FEC"
|
||||||
StrOutputMode="Configure le mode de sortie"
|
StrOutputMode="Configure le mode de sortie"
|
||||||
|
|
||||||
|
StrPIDSetup="Configure les PID"
|
||||||
|
StrPIDSetupTitle="Configuration PID"
|
||||||
|
StrPIDSetupContext="PID PMT (1000 par exemple)"
|
||||||
|
|
||||||
|
|
||||||
######### STATUS ##########
|
######### STATUS ##########
|
||||||
StrStatusTitle="En transmission"
|
StrStatusTitle="En transmission"
|
||||||
|
|
||||||
|
######### SYSTEM SETUP #######
|
||||||
|
StrSystemTitle="Configure le système"
|
||||||
|
StrSystemContext="Choix:"
|
||||||
|
StrAutostartMenu="Démarrage automatique"
|
||||||
|
StrDisplayMenu="Ecran"
|
||||||
|
StrIPMenu="Adresse IP"
|
||||||
|
|
||||||
|
StrAutostartSetupTitle="Configure le démarrage"
|
||||||
|
StrAutostartSetupContext="Choix:"
|
||||||
|
AutostartSetupConsole="Menu console(ce menu)"
|
||||||
|
AutostartSetupDisplay="Graphique(avec ecran tactile)"
|
||||||
|
AutostartSetupButton="Boutons poussoires"
|
||||||
|
|
||||||
|
StrDisplaySetupTitle="Configure un ecran tactile"
|
||||||
|
StrDisplaySetupContext="Choix:"
|
||||||
|
DisplaySetupTontec="Ecran Tontec 3,5 pouces"
|
||||||
|
DisplaySetupHDMI="HDMI tactile"
|
||||||
|
DisplaySetupRpiLCD="Rpi LCD"
|
||||||
|
|
||||||
|
StrIPSetupTitle="Configure en IP Statique"
|
||||||
|
StrIPSetupContext="Exemple: 192.168.1.60"
|
||||||
|
|
||||||
######## MAIN MENU #########
|
######## MAIN MENU #########
|
||||||
StrMainMenuTitle="RpiDATV GUI Version 1.2 (F5OEO Evariste)"
|
StrMainMenuTitle="RpiDATV GUI Version 2.0 (F5OEO Evariste)"
|
||||||
StrMainMenuSource="Selection de la source"
|
StrMainMenuSource="Selection de la source"
|
||||||
StrMainMenuOutput="Selection de la sortie"
|
StrMainMenuOutput="Selection de la sortie"
|
||||||
StrMainMenuCall="Configure la station"
|
StrMainMenuCall="Configure la station"
|
||||||
|
StrMainMenuSystem="Configuration système"
|
||||||
StrMainMenuExitTitle="Sortie"
|
StrMainMenuExitTitle="Sortie"
|
||||||
StrMainMenuExitContext="Merci d'avoir utilisé RpiDATV..73's de F5OEO(evaristec@gmail.com)"
|
StrMainMenuExitContext="Merci d'avoir utilisé RpiDATV..73's de F5OEO(evaristec@gmail.com)"
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ StrInputSetupIPTSINTitle="Setup IP address"
|
||||||
StrCallContext="CALL Setup"
|
StrCallContext="CALL Setup"
|
||||||
StrCallTitle="CALL"
|
StrCallTitle="CALL"
|
||||||
|
|
||||||
|
StrLocatorContext="Locator Setup"
|
||||||
|
StrLocatorTitle="Locator"
|
||||||
|
|
||||||
######## OUTPUT MENU #####################
|
######## OUTPUT MENU #####################
|
||||||
StrOutputSetupTitle="Output type"
|
StrOutputSetupTitle="Output type"
|
||||||
StrOutputSetupContext="Press down/up arrows to move, space to select"
|
StrOutputSetupContext="Press down/up arrows to move, space to select"
|
||||||
|
@ -51,15 +54,42 @@ StrOutputSR="Symbol Rate Setup"
|
||||||
StrOutputFEC="FEC Setup"
|
StrOutputFEC="FEC Setup"
|
||||||
StrOutputMode="Output Mode"
|
StrOutputMode="Output Mode"
|
||||||
|
|
||||||
|
StrPIDSetup="PID setup"
|
||||||
|
StrPIDSetupTitle="PID setup"
|
||||||
|
StrPIDSetupContext="PID PMT (512 for example)"
|
||||||
|
|
||||||
|
|
||||||
######### STATUS ##########
|
######### STATUS ##########
|
||||||
StrStatusTitle="Transmitting"
|
StrStatusTitle="Transmitting"
|
||||||
|
|
||||||
|
######### SYSTEM SETUP #######
|
||||||
|
StrSystemTitle="System setup"
|
||||||
|
StrSystemContext="Choice:"
|
||||||
|
StrAutostartMenu="Automatic startup"
|
||||||
|
StrDisplayMenu="Display type"
|
||||||
|
StrIPMenu="IP Address"
|
||||||
|
|
||||||
|
StrAutostartSetupTitle="Autostart setup"
|
||||||
|
StrAutostartSetupContext="Choice:"
|
||||||
|
AutostartSetupConsole="Console menu"
|
||||||
|
AutostartSetupDisplay="Display with touchscreen"
|
||||||
|
AutostartSetupButton="Push buttons"
|
||||||
|
|
||||||
|
StrDisplaySetupTitle="Touchscreen setup"
|
||||||
|
StrDisplaySetupContext="Choice:"
|
||||||
|
DisplaySetupTontec="Tontec 3,5 inches"
|
||||||
|
DisplaySetupHDMI="HDMI touchscreen"
|
||||||
|
DisplaySetupRpiLCD="Rpi LCD"
|
||||||
|
|
||||||
|
StrIPSetupTitle="Setup a static IP"
|
||||||
|
StrIPSetupContext="Example: 192.168.1.60"
|
||||||
|
|
||||||
######## MAIN MENU #########
|
######## MAIN MENU #########
|
||||||
StrMainMenuTitle="RpiDATV GUI Version 1.2 (F5OEO Evariste)"
|
StrMainMenuTitle="RpiDATV GUI Version 2.0 (F5OEO Evariste)"
|
||||||
StrMainMenuSource="Source select"
|
StrMainMenuSource="Source select"
|
||||||
StrMainMenuOutput="Output select"
|
StrMainMenuOutput="Output select"
|
||||||
StrMainMenuCall="Station call setup"
|
StrMainMenuCall="Station call setup"
|
||||||
|
StrMainMenuSystem="System setup"
|
||||||
StrMainMenuExitTitle="Exit"
|
StrMainMenuExitTitle="Exit"
|
||||||
StrMainMenuExitContext="Thanks to use RpiDATV... 73's de F5OEO(evaristec@gmail.com)"
|
StrMainMenuExitContext="Thanks to use RpiDATV... 73's de F5OEO(evaristec@gmail.com)"
|
||||||
|
|
||||||
|
|
142
scripts/menu.sh
142
scripts/menu.sh
|
@ -201,6 +201,13 @@ CALL=$(whiptail --inputbox "$StrCallContext" 8 78 $CALL --title "$StrCallTitle"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
set_config_var call "$CALL" $CONFIGFILE
|
set_config_var call "$CALL" $CONFIGFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CALL=$(get_config_var locator $CONFIGFILE)
|
||||||
|
CALL=$(whiptail --inputbox "$StrLocatorContext" 8 78 $CALL --title "$StrLocatorTitle" 3>&1 1>&2 2>&3)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
set_config_var locator "$CALL" $CONFIGFILE
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -390,16 +397,34 @@ if [ $? -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_PID_setup()
|
||||||
|
{
|
||||||
|
PID=$(get_config_var pidstart $CONFIGFILE)
|
||||||
|
PID=$(whiptail --inputbox "$StrPIDSetupContext" 8 78 $PID --title "$StrPIDSetupTitle" 3>&1 1>&2 2>&3)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
set_config_var pidstart "$PID" $CONFIGFILE
|
||||||
|
set_config_var pidpmt "$PID" $CONFIGFILE
|
||||||
|
#PID Video is PMT+1
|
||||||
|
let PID=PID+1
|
||||||
|
set_config_var pidvideo "$PID" $CONFIGFILE
|
||||||
|
#PID Audiop is PMT+1
|
||||||
|
let PID=PID+1
|
||||||
|
set_config_var pidaudio "$PID" $CONFIGFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
do_output_setup() {
|
do_output_setup() {
|
||||||
menuchoice=$(whiptail --title "$StrOutputTitle" --menu "$StrOutputContext" 16 78 5 \
|
menuchoice=$(whiptail --title "$StrOutputTitle" --menu "$StrOutputContext" 16 78 5 \
|
||||||
"1 SymbolRate" "$StrOutputSR" \
|
"1 SymbolRate" "$StrOutputSR" \
|
||||||
"2 FEC" "$StrOutputFEC" \
|
"2 FEC" "$StrOutputFEC" \
|
||||||
"3 Output mode" "$StrOutputMode" \
|
"3 Output mode" "$StrOutputMode" \
|
||||||
|
"4 PID" "$StrPIDSetup" \
|
||||||
3>&2 2>&1 1>&3)
|
3>&2 2>&1 1>&3)
|
||||||
case "$menuchoice" in
|
case "$menuchoice" in
|
||||||
1\ *) do_symbolrate_setup ;;
|
1\ *) do_symbolrate_setup ;;
|
||||||
2\ *) do_fec_setup ;;
|
2\ *) do_fec_setup ;;
|
||||||
3\ *) do_output_setup_mode ;;
|
3\ *) do_output_setup_mode ;;
|
||||||
|
4\ *) do_PID_setup ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,6 +490,119 @@ do_receive()
|
||||||
do_receive_status
|
do_receive_status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_autostart_setup()
|
||||||
|
{
|
||||||
|
MODE_STARTUP=$(get_config_var startup $CONFIGFILE)
|
||||||
|
case "$MODE_STARTUP" in
|
||||||
|
Console)
|
||||||
|
Radio1=ON
|
||||||
|
Radio2=OFF
|
||||||
|
Radio3=OFF
|
||||||
|
;;
|
||||||
|
Display)
|
||||||
|
Radio1=OFF
|
||||||
|
Radio2=ON
|
||||||
|
Radio3=OFF
|
||||||
|
;;
|
||||||
|
Button)
|
||||||
|
Radio1=OFF
|
||||||
|
Radio2=OFF
|
||||||
|
Radio3=ON
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
Radio1=ON
|
||||||
|
Radio2=OFF
|
||||||
|
Radio3=OFF
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
chstartup=$(whiptail --title "$StrAutostartSetupTitle" --radiolist \
|
||||||
|
"$StrAutostartSetupContext" 20 78 8 \
|
||||||
|
"Console" "$AutostartSetupConsole" $Radio1 \
|
||||||
|
"Display" "$AutostartSetupDisplay" $Radio2 \
|
||||||
|
"Button" "$AutostartSetupButton" $Radio3 \
|
||||||
|
3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
|
||||||
|
case "$chstartup" in
|
||||||
|
Console) cp ./install_bashrc /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||||
|
Display) cp ./install_display.fr /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||||
|
Button) cp ./install_button /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
set_config_var startup "$chstartup" $CONFIGFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_display_setup()
|
||||||
|
{
|
||||||
|
MODE_DISPLAY=$(get_config_var display $CONFIGFILE)
|
||||||
|
case "$MODE_DISPLAY" in
|
||||||
|
Tontec35)
|
||||||
|
Radio1=ON
|
||||||
|
Radio2=OFF
|
||||||
|
Radio3=OFF
|
||||||
|
;;
|
||||||
|
HDMITouch)
|
||||||
|
Radio1=OFF
|
||||||
|
Radio2=ON
|
||||||
|
Radio3=OFF
|
||||||
|
;;
|
||||||
|
RpiLCD)
|
||||||
|
Radio1=OFF
|
||||||
|
Radio2=OFF
|
||||||
|
Radio3=ON
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
Radio1=ON
|
||||||
|
Radio2=OFF
|
||||||
|
Radio3=OFF
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
chdisplay=$(whiptail --title "$StrDisplaySetupTitle" --radiolist \
|
||||||
|
"$StrDisplaySetupContext" 20 78 8 \
|
||||||
|
"Tontec35" "$DisplaySetupTontec" $Radio1 \
|
||||||
|
"HDMITouch" "$DisplaySetupHDMI" $Radio2 \
|
||||||
|
"RpiLCD" "$DisplaySetupRpiLCD" $Radio3 \
|
||||||
|
3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
|
||||||
|
case "$chdisplay" in
|
||||||
|
Tontec35) ;;
|
||||||
|
HDMITouch) ;;
|
||||||
|
RpiLCD) ;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
set_config_var display "$chdisplay" $CONFIGFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_IP_setup()
|
||||||
|
{
|
||||||
|
STATICIP=$(get_config_var staticip $CONFIGFILE)
|
||||||
|
STATICIP=$(whiptail --inputbox "$StrIPSetupContext" 8 78 $STATICIP --title "$StrIPSetupTitle" 3>&1 1>&2 2>&3)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
set_config_var staticip "$STATICIP" $CONFIGFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_system_setup()
|
||||||
|
{
|
||||||
|
menuchoice=$(whiptail --title "$StrSystemTitle" --menu "$StrSystemContext" 16 78 5 \
|
||||||
|
"1 Autostart" "$StrAutostartMenu" \
|
||||||
|
"2 Display" "$StrDisplayMenu" \
|
||||||
|
"3 IP" "$StrIPMenu" \
|
||||||
|
3>&2 2>&1 1>&3)
|
||||||
|
case "$menuchoice" in
|
||||||
|
1\ *) do_autostart_setup ;;
|
||||||
|
2\ *) do_display_setup ;;
|
||||||
|
3\ *) do_IP_setup ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
OnStartup()
|
OnStartup()
|
||||||
{
|
{
|
||||||
CALL=$(get_config_var call $CONFIGFILE)
|
CALL=$(get_config_var call $CONFIGFILE)
|
||||||
|
@ -508,12 +646,13 @@ INFO=$CALL":"$MODE_INPUT"-->"$MODE_OUTPUT"("$SYMBOLRATEK"KSymbol FEC "$FECNUM"/"
|
||||||
#do_status
|
#do_status
|
||||||
#do_display_on
|
#do_display_on
|
||||||
#"1 Transmission" "Demarre la transmission"\
|
#"1 Transmission" "Demarre la transmission"\
|
||||||
menuchoice=$(whiptail --title "$StrMainMenuTitle" --menu "$INFO" 16 82 5 \
|
menuchoice=$(whiptail --title "$StrMainMenuTitle" --menu "$INFO" 16 82 6 \
|
||||||
"0 Transmit" "Go transmit" \
|
"0 Transmit" "Go transmit" \
|
||||||
"1 Source" "$StrMainMenuSource" \
|
"1 Source" "$StrMainMenuSource" \
|
||||||
"2 Sortie" "$StrMainMenuOutput" \
|
"2 Sortie" "$StrMainMenuOutput" \
|
||||||
"3 Station" "$StrMainMenuCall" \
|
"3 Station" "$StrMainMenuCall" \
|
||||||
"4 Receive" "Receive via rtlsdr" \
|
"4 Receive" "Receive via rtlsdr" \
|
||||||
|
"5 System" "$StrMainMenuSystem" \
|
||||||
3>&2 2>&1 1>&3)
|
3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
case "$menuchoice" in
|
case "$menuchoice" in
|
||||||
|
@ -522,6 +661,7 @@ INFO=$CALL":"$MODE_INPUT"-->"$MODE_OUTPUT"("$SYMBOLRATEK"KSymbol FEC "$FECNUM"/"
|
||||||
2\ *) do_output_setup ;;
|
2\ *) do_output_setup ;;
|
||||||
3\ *) do_station_setup ;;
|
3\ *) do_station_setup ;;
|
||||||
4\ *) do_receive ;;
|
4\ *) do_receive ;;
|
||||||
|
5\ *) do_system_setup ;;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
whiptail --title "$StrMainMenuExitTitle" --msgbox "$StrMainMenuExitContext" 8 78
|
whiptail --title "$StrMainMenuExitTitle" --msgbox "$StrMainMenuExitContext" 8 78
|
||||||
|
|
Ładowanie…
Reference in New Issue