OGN - Give user the option to run calibration

pull/334/head
romeo-golf 2017-02-12 02:50:18 +00:00
rodzic 5a27b6cb6f
commit f21e0a6a7c
1 zmienionych plików z 19 dodań i 2 usunięć

Wyświetl plik

@ -589,8 +589,25 @@ if [[ -z "${OGN_GSM_GAIN}" ]] ; then
fi
# Calculate RTL-SDR device error rate.
if [[ -z "${OGN_FREQ_CORR}" ]] || [[ -z "${OGN_GSM_FREQ}" ]] ; then
CalibrateTuner ${OGN_DEVICE_ID}
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Tuner Calibration" --yesno "Would you like to calibrate the device \"${OGN_DEVICE_ID}\" which has been configured for use with ${COMPONENT_NAME}?" 8 78
if [[ $? -eq 0 ]] ; then
# User would like to calibrate the tuner.
if [[ -n "${OGN_DEVICE_ID}" ]] ; then
CalibrateTuner ${OGN_DEVICE_ID}
else
echo -en "\e[33m The specified device is either invalid or does not exist...\e[97m"
false
fi
CheckReturnCode
fi
elif [[ -z "${OGN_FREQ_CORR}" ]] || [[ -z "${OGN_GSM_FREQ}" ]] ; then
if [[ -n "${OGN_DEVICE_ID}" ]] ; then
CalibrateTuner ${OGN_DEVICE_ID}
else
echo -en "\e[33m The specified device is either invalid or does not exist...\e[97m"
false
fi
CheckReturnCode
fi