From 329325f6136fbcbfd7d9f3a3bf685b8999e2269c Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sun, 10 May 2020 04:30:06 -0700 Subject: [PATCH] hf module status --- QnetGateway.cpp | 9 +++++---- QnetGateway.h | 2 +- defaults | 1 + qnconfig | 3 +++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 5aeec89..90a8e86 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -54,7 +54,7 @@ #define CFG_DIR "/usr/local/etc" #endif -const std::string GW_VERSION("QnetGateway-503"); +const std::string GW_VERSION("QnetGateway-510"); static std::atomic 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+"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)) { @@ -829,7 +830,7 @@ void CQnetGateway::ProcessSlowData(unsigned char *data, const unsigned short sid int x = FindIndex(i); 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; } 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... int x = FindIndex(i); 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].txt_cnt = 0; @@ -1646,7 +1647,7 @@ void CQnetGateway::ProcessModem() } int x = FindIndex(i); 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; } // send the "key off" message, this will end up in the openquad.net Last Heard webpage. diff --git a/QnetGateway.h b/QnetGateway.h index 67ec717..a7308ec 100644 --- a/QnetGateway.h +++ b/QnetGateway.h @@ -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; 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; diff --git a/defaults b/defaults index da79bbf..7e0baf9 100644 --- a/defaults +++ b/defaults @@ -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_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_is_hf=false # set to true if this is an HF module ########################################################################################################################## # diff --git a/qnconfig b/qnconfig index 26db763..8ccb54d 100755 --- a/qnconfig +++ b/qnconfig @@ -430,6 +430,7 @@ ModuleMenu () { 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 "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 if [[ "${!mod}" == 'dvap' ]]; then 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" == fr* ]]; then eval ${mod}_frequency="$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" == ir* ]]; then SetBooleanValue ${mod}_rx_invert "$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}_acknowledge; [ -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 q=${p}_frequency; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile q=${p}_power; [ -z ${!q+x} ] || echo "${q}=${!q}" >> $outFile