diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-04-06 02:17:26 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-04-06 02:17:26 +0100 |
| commit | f4f7f2944486cf7531921cbb2ee8d5a4df814c66 (patch) | |
| tree | d2e84a53307824f4338c5a92236c7fbb53cac16e /L2Code.c | |
| parent | 6cb7dff699b0acd577160cb630516340ee605c7f (diff) | |
| parent | 4b1144ed9441183cc07860f3b05246e5ce358da2 (diff) | |
Merge branch 'debian/latest' into debian/bookworm
Diffstat (limited to 'L2Code.c')
| -rw-r--r-- | L2Code.c | 54 |
1 files changed, 4 insertions, 50 deletions
@@ -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
|
