summaryrefslogtreecommitdiff
path: root/L2Code.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2024-04-06 02:10:08 +0100
committerDave Hibberd <hibby@debian.org>2024-04-06 02:10:08 +0100
commit933e6c5b86d989cd13e9694fe53f910b5963c955 (patch)
tree999e544181f12ba909410c3de38d2f9606def839 /L2Code.c
parent5332f8b012034ba142c4a24fc6df74dfdc54f5a0 (diff)
New upstream version 6.0.24.34upstream/6.0.24.34
Diffstat (limited to 'L2Code.c')
-rw-r--r--L2Code.c54
1 files changed, 4 insertions, 50 deletions
diff --git a/L2Code.c b/L2Code.c
index 37a8aff..718f012 100644
--- a/L2Code.c
+++ b/L2Code.c
@@ -470,61 +470,15 @@ VOID MHPROC(struct PORTCONTROL * PORT, MESSAGE * Buffer)
PMHSTRUC MHBASE = MH;
int i;
int OldCount = 0;
- char Freq[16] = "";
+ char Freq[64] = "";
char DIGI = '*';
double ReportFreq = 0;
- // if port has Rigcontrol associated with it, get frequency
+ // if port has a freq associated with it use it
- struct TNCINFO * TNC = PORT->TNC;
+ GetPortFrequency(PORT->PORTNUMBER, Freq);
- if (TNC && TNC->RIG && TNC->RIG->Valchar[0])
- {
- if (TNC->Hardware == H_UZ7HO)
- {
- // See if we have Center Freq Info
- if (TNC->AGWInfo->CenterFreq)
- {
- ReportFreq = atof(TNC->RIG->Valchar) + ((TNC->AGWInfo->CenterFreq * 1.0) / 1000000.0);
- }
-#ifdef WIN32
- else if (TNC->AGWInfo->hFreq)
- {
- char Centre[16];
- double ModemFreq;
-
- SendMessage(TNC->AGWInfo->hFreq, WM_GETTEXT, 15, (LPARAM)Centre);
-
- ModemFreq = atof(Centre);
-
- ReportFreq = atof(TNC->RIG->Valchar) + (ModemFreq / 1000000);
- }
-#endif
- else
- ReportFreq = atof(TNC->RIG->Valchar) + 0.0015; // Assume 1500
- }
- else
-
- // Not UZ7HO or Linux
-
- ReportFreq = atof(TNC->RIG->Valchar) + 0.0015;
-
- _gcvt(ReportFreq, 9, Freq);
- }
- else
- {
- if (PORT->RIGPort)
- {
- struct TNCINFO * TNC = TNCInfo[PORT->RIGPort];
-
- if (TNC && TNC->RIG)
- {
- strcpy(Freq, TNC->RIG->Valchar);
- Freq[11] = 0;
- }
- }
- }
-// if (Buffer->ORIGIN[6] & 1)
+ // if (Buffer->ORIGIN[6] & 1)
DIGI = 0; // DOn't think we want to do this
// See if in list