hf module status

pull/14/head
Tom Early 6 years ago
parent fd73e431fd
commit 329325f613

@ -54,7 +54,7 @@
#define CFG_DIR "/usr/local/etc" #define CFG_DIR "/usr/local/etc"
#endif #endif
const std::string GW_VERSION("QnetGateway-503"); const std::string GW_VERSION("QnetGateway-510");
static std::atomic<bool> keep_running(true); static std::atomic<bool> keep_running(true);
@ -253,6 +253,7 @@ bool CQnetGateway::ReadConfig(char *cfgFile)
} }
cfg.GetValue(path+"range", type, Rptr.mod[m].range, 0.0, 1609344.0); cfg.GetValue(path+"range", type, Rptr.mod[m].range, 0.0, 1609344.0);
cfg.GetValue(path+"agl", type, Rptr.mod[m].agl, 0.0, 1000.0); cfg.GetValue(path+"agl", type, Rptr.mod[m].agl, 0.0, 1000.0);
cfg.GetValue(path+"is_hf", type, IS_HF[m]);
} }
} }
if (! (Rptr.mod[0].defined || Rptr.mod[1].defined || Rptr.mod[2].defined)) { if (! (Rptr.mod[0].defined || Rptr.mod[1].defined || Rptr.mod[2].defined)) {
@ -829,7 +830,7 @@ void CQnetGateway::ProcessSlowData(unsigned char *data, const unsigned short sid
int x = FindIndex(i); int x = FindIndex(i);
if (x >= 0) if (x >= 0)
ii[x]->sendHeardWithTXMsg(band_txt[i].lh_mycall, band_txt[i].lh_sfx, band_txt[i].lh_yrcall, band_txt[i].lh_rpt1, band_txt[i].lh_rpt2, band_txt[i].flags[0], band_txt[i].flags[1], band_txt[i].flags[2], band_txt[i].dest_rptr, band_txt[i].txt); ii[x]->sendHeardWithTXMsg(band_txt[i].lh_mycall, band_txt[i].lh_sfx, band_txt[i].lh_yrcall, band_txt[i].lh_rpt1, band_txt[i].lh_rpt2, band_txt[i].flags[0], band_txt[i].flags[1], band_txt[i].flags[2], IS_HF[i] ? "" : band_txt[i].dest_rptr, band_txt[i].txt);
band_txt[i].sent_key_on_msg = true; band_txt[i].sent_key_on_msg = true;
} }
if (to_print[i] == 3) { if (to_print[i] == 3) {
@ -859,7 +860,7 @@ void CQnetGateway::ProcessSlowData(unsigned char *data, const unsigned short sid
// we have the 20-character message, send it to the server... // we have the 20-character message, send it to the server...
int x = FindIndex(i); int x = FindIndex(i);
if (x >= 0) if (x >= 0)
ii[x]->sendHeardWithTXMsg(band_txt[i].lh_mycall, band_txt[i].lh_sfx, band_txt[i].lh_yrcall, band_txt[i].lh_rpt1, band_txt[i].lh_rpt2, band_txt[i].flags[0], band_txt[i].flags[1], band_txt[i].flags[2], band_txt[i].dest_rptr, band_txt[i].txt); ii[x]->sendHeardWithTXMsg(band_txt[i].lh_mycall, band_txt[i].lh_sfx, band_txt[i].lh_yrcall, band_txt[i].lh_rpt1, band_txt[i].lh_rpt2, band_txt[i].flags[0], band_txt[i].flags[1], band_txt[i].flags[2], IS_HF[i] ? "" : band_txt[i].dest_rptr, band_txt[i].txt);
band_txt[i].sent_key_on_msg = true; band_txt[i].sent_key_on_msg = true;
} }
band_txt[i].txt_cnt = 0; band_txt[i].txt_cnt = 0;
@ -1646,7 +1647,7 @@ void CQnetGateway::ProcessModem()
} }
int x = FindIndex(i); int x = FindIndex(i);
if (x >= 0) if (x >= 0)
ii[x]->sendHeardWithTXMsg(band_txt[i].lh_mycall, band_txt[i].lh_sfx, band_txt[i].lh_yrcall, band_txt[i].lh_rpt1, band_txt[i].lh_rpt2, band_txt[i].flags[0], band_txt[i].flags[1], band_txt[i].flags[2], band_txt[i].dest_rptr, band_txt[i].txt); ii[x]->sendHeardWithTXMsg(band_txt[i].lh_mycall, band_txt[i].lh_sfx, band_txt[i].lh_yrcall, band_txt[i].lh_rpt1, band_txt[i].lh_rpt2, band_txt[i].flags[0], band_txt[i].flags[1], band_txt[i].flags[2], IS_HF[i] ? "" : band_txt[i].dest_rptr, band_txt[i].txt);
band_txt[i].sent_key_on_msg = true; band_txt[i].sent_key_on_msg = true;
} }
// send the "key off" message, this will end up in the openquad.net Last Heard webpage. // send the "key off" message, this will end up in the openquad.net Last Heard webpage.

@ -105,7 +105,7 @@ private:
std::string OWNER, owner, FILE_DTMF, FILE_ECHOTEST, IRCDDB_PASSWORD[2], FILE_QNVOICE_FILE, DASH_SQL_NAME, DASH_SHOW_ORDER; std::string OWNER, owner, FILE_DTMF, FILE_ECHOTEST, IRCDDB_PASSWORD[2], FILE_QNVOICE_FILE, DASH_SQL_NAME, DASH_SHOW_ORDER;
bool GATEWAY_SEND_QRGS_MAP, GATEWAY_HEADER_REGEN, APRS_ENABLE, playNotInCache, showLastHeard; bool GATEWAY_SEND_QRGS_MAP, GATEWAY_HEADER_REGEN, APRS_ENABLE, playNotInCache, showLastHeard;
bool LOG_DEBUG, LOG_IRC, LOG_DTMF, LOG_QSO; bool LOG_DEBUG, LOG_IRC, LOG_DTMF, LOG_QSO, IS_HF[3];
int DASH_REFRESH, TIMING_PLAY_WAIT, TIMING_PLAY_DELAY, TIMING_TIMEOUT_ECHO, TIMING_TIMEOUT_VOICEMAIL, TIMING_TIMEOUT_REMOTE_G2, TIMING_TIMEOUT_LOCAL_RPTR, dtmf_digit; int DASH_REFRESH, TIMING_PLAY_WAIT, TIMING_PLAY_DELAY, TIMING_TIMEOUT_ECHO, TIMING_TIMEOUT_VOICEMAIL, TIMING_TIMEOUT_REMOTE_G2, TIMING_TIMEOUT_LOCAL_RPTR, dtmf_digit;

@ -105,6 +105,7 @@ module_x_acknowledge=false # Do you want an ACK back?
module_x_ack_delay=250 # millisecond delay before acknowledgment module_x_ack_delay=250 # millisecond delay before acknowledgment
module_x_range=0 # the range of this repeater, in meters 1609.344 meters is 1.0 miles module_x_range=0 # the range of this repeater, in meters 1609.344 meters is 1.0 miles
module_x_agl=0 # the height above ground level for this repeater's antenna module_x_agl=0 # the height above ground level for this repeater's antenna
module_x_is_hf=false # set to true if this is an HF module
########################################################################################################################## ##########################################################################################################################
# #

@ -430,6 +430,7 @@ ModuleMenu () {
echo -n "ac : Send acknowledgment on each transmission = "; EvaluateVar {${mod},module_x}_acknowledge echo -n "ac : Send acknowledgment on each transmission = "; EvaluateVar {${mod},module_x}_acknowledge
echo -n "ad : acknowledgment delay (in msec) = "; EvaluateVar {${mod},module_x}_ack_delay echo -n "ad : acknowledgment delay (in msec) = "; EvaluateVar {${mod},module_x}_ack_delay
echo -n "pw : in msec, packet wait time (test for timeout) = "; EvaluateVar {${mod},module_x}_packet_wait echo -n "pw : in msec, packet wait time (test for timeout) = "; EvaluateVar {${mod},module_x}_packet_wait
echo -n "hf : is an HF module = "; EvaluateVar {${mod},module_x}_is_hf
fi fi
if [[ "${!mod}" == 'dvap' ]]; then if [[ "${!mod}" == 'dvap' ]]; then
echo -n "fr : Frequency in MHz = "; EvaluateVar {${mod},dvap}_frequency echo -n "fr : Frequency in MHz = "; EvaluateVar {${mod},dvap}_frequency
@ -489,6 +490,7 @@ ModuleMenu () {
elif [[ "$key" == dv* ]]; then eval ${mod}_device="$value" elif [[ "$key" == dv* ]]; then eval ${mod}_device="$value"
elif [[ "$key" == fr* ]]; then eval ${mod}_frequency="$value" elif [[ "$key" == fr* ]]; then eval ${mod}_frequency="$value"
elif [[ "$key" == gp* ]]; then eval ${mod}_gateway_port="$value" elif [[ "$key" == gp* ]]; then eval ${mod}_gateway_port="$value"
elif [[ "$key" == hf* ]]; then SetBooleanValue ${mod}_is_hf "$value"
elif [[ "$key" == in* ]]; then eval ${mod}_inactivity="$value" elif [[ "$key" == in* ]]; then eval ${mod}_inactivity="$value"
elif [[ "$key" == ir* ]]; then SetBooleanValue ${mod}_rx_invert "$value" elif [[ "$key" == ir* ]]; then SetBooleanValue ${mod}_rx_invert "$value"
elif [[ "$key" == ip* ]]; then eval ${mod}_internal_ip="$value" elif [[ "$key" == ip* ]]; then eval ${mod}_internal_ip="$value"
@ -590,6 +592,7 @@ WriteCFGFile () {
q=${p}_packet_wait; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_packet_wait; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_acknowledge; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_acknowledge; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_ack_delay; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_ack_delay; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_is_hf; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
if [[ "${!p}" == "dvap" ]]; then if [[ "${!p}" == "dvap" ]]; then
q=${p}_frequency; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_frequency; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile
q=${p}_power; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_power; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile

Loading…
Cancel
Save

Powered by TurnKey Linux.