Noticed while perusing cache code.
pull/1753/head
George Baltz N3GB 2025-05-12 15:05:51 -04:00
rodzic f5eb8f19e9
commit 29924af2f1
2 zmienionych plików z 7 dodań i 13 usunięć

Wyświetl plik

@ -6030,10 +6030,10 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
if (ptt) if (ptt)
{ {
int cache_ms_freq; int cache_ms_freq;
rig_get_cache_freq(rig, vfo, tx_freq, &cache_ms_freq); retval = rig_get_cache_freq(rig, vfo, tx_freq, &cache_ms_freq);
rig_debug(RIG_DEBUG_TRACE, "%s: ptt is on so returning last known freq\n", rig_debug(RIG_DEBUG_TRACE, "%s: ptt is on so returning last known freq\n",
__func__); __func__);
RETURNFUNC2(RIG_OK); RETURNFUNC2(retval);
} }
} }

Wyświetl plik

@ -666,19 +666,13 @@ transaction_read:
* the decoder for callback. That way we don't ignore any * the decoder for callback. That way we don't ignore any
* commands. * commands.
*/ */
// if we got FA or FB unexpectedly then perhaps RIG_TRN is enabled and we just need to handle it // If we got FA or FB unexpectedly then perhaps RIG_TRN is enabled
if (strncmp(buffer, "FA", 2) == 0) // and we just need to handle it
if (buffer[0] == 'F' && (buffer[1] == 'A' || buffer[1] == 'B'))
{ {
freq_t freq; freq_t freq;
sscanf(buffer, "FA%lg", &freq); sscanf(buffer + 2, "%lg", &freq);
rig_set_cache_freq(rig, RIG_VFO_A, freq); rig_set_cache_freq(rig, buffer[1] == 'A' ? RIG_VFO_A : RIG_VFO_B, freq);
goto transaction_read;
}
else if (strncmp(buffer, "FB", 2) == 0)
{
freq_t freq;
sscanf(buffer, "FB%lg", &freq);
rig_set_cache_freq(rig, RIG_VFO_B, freq);
goto transaction_read; goto transaction_read;
} }