Add 60M exception for FTDX10 to not try and set frequency or mode

pull/1077/head
Mike Black W9MDB 2022-07-03 07:58:47 -05:00
rodzic 7dee3aaf5d
commit fc0e80a0d1
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -734,6 +734,16 @@ int newcat_get_conf2(RIG *rig, token_t token, char *val, int val_len)
*
*/
int newcat_60m_exception(RIG *rig, freq_t freq)
{
// can we improve this to set memory mode and pick the memory slot?
if (is_ftdx10 && freq > 5.2 && freq < 5.5)
{
return 1;
}
return 0;
}
int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
char c;
@ -745,6 +755,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
ENTERFUNC;
if (newcat_60m_exception(rig,freq)) RETURNFUNC(RIG_OK); // we don't set freq in this case
if (!newcat_valid_command(rig, "FA"))
{
RETURNFUNC(-RIG_ENAVAIL);
@ -1262,6 +1274,8 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
ENTERFUNC;
if (newcat_60m_exception(rig,rig->state.cache.freqMainA)) RETURNFUNC(RIG_OK); // we don't set mode in this case
if (!newcat_valid_command(rig, "MD"))
{
RETURNFUNC(-RIG_ENAVAIL);

Wyświetl plik

@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
#define NEWCAT_VER "20220607"
#define NEWCAT_VER "20220703"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129