kopia lustrzana https://github.com/Hamlib/Hamlib
Add disable_yaesu_bandselect option
rodzic
8cad9dc200
commit
5fec08b262
|
@ -2190,6 +2190,7 @@ struct rig_state {
|
||||||
int power_now; /*!< Current RF power level in rig units */
|
int power_now; /*!< Current RF power level in rig units */
|
||||||
int power_min; /*!< Minimum RF power level in rig units */
|
int power_min; /*!< Minimum RF power level in rig units */
|
||||||
int power_max; /*!< Maximum RF power level in rig units */
|
int power_max; /*!< Maximum RF power level in rig units */
|
||||||
|
unsigned char disable_yaesu_bandselect; /*!< Disables Yaeus band select logic */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @cond Doxygen_Suppress
|
//! @cond Doxygen_Suppress
|
||||||
|
|
|
@ -845,6 +845,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newcat_valid_command(rig, "BS") && changing
|
if (newcat_valid_command(rig, "BS") && changing
|
||||||
|
&& !rig->state.disable_yaesu_bandselect
|
||||||
// remove the split check here -- hopefully works OK
|
// remove the split check here -- hopefully works OK
|
||||||
//&& !rig->state.cache.split
|
//&& !rig->state.cache.split
|
||||||
&& !is_ft891 // 891 does not remember bandwidth so don't do this
|
&& !is_ft891 // 891 does not remember bandwidth so don't do this
|
||||||
|
|
27
src/conf.c
27
src/conf.c
|
@ -138,6 +138,11 @@ static const struct confparams frontend_cfg_params[] =
|
||||||
"True enables compatible rigs to have their screen saver disabled on open",
|
"True enables compatible rigs to have their screen saver disabled on open",
|
||||||
"0", RIG_CONF_CHECKBUTTON, { }
|
"0", RIG_CONF_CHECKBUTTON, { }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
TOK_DISABLE_YAESU_BANDSELECT, "disable_yaesu_bandselect", "Disable Yaesu band select logic",
|
||||||
|
"True disables the automatic band select on band change for Yaesu rigs",
|
||||||
|
"0", RIG_CONF_CHECKBUTTON, { }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
TOK_PTT_SHARE, "ptt_share", "Share ptt port with other apps",
|
TOK_PTT_SHARE, "ptt_share", "Share ptt port with other apps",
|
||||||
"True enables ptt port to be shared with other apps",
|
"True enables ptt port to be shared with other apps",
|
||||||
|
@ -590,6 +595,15 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
||||||
rs->auto_disable_screensaver = val_i ? 1 : 0;
|
rs->auto_disable_screensaver = val_i ? 1 : 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TOK_DISABLE_YAESU_BANDSELECT:
|
||||||
|
if (1 != sscanf(val, "%d", &val_i))
|
||||||
|
{
|
||||||
|
return -RIG_EINVAL; //value format error
|
||||||
|
}
|
||||||
|
|
||||||
|
rs->disable_yaesu_bandselect = val_i ? 1 : 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case TOK_PTT_SHARE:
|
case TOK_PTT_SHARE:
|
||||||
if (1 != sscanf(val, "%d", &val_i))
|
if (1 != sscanf(val, "%d", &val_i))
|
||||||
{
|
{
|
||||||
|
@ -928,6 +942,19 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val)
|
||||||
sprintf(val, "%d", rs->auto_disable_screensaver);
|
sprintf(val, "%d", rs->auto_disable_screensaver);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TOK_PTT_SHARE:
|
||||||
|
sprintf(val, "%d", rs->ptt_share);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TOK_FLUSHX:
|
||||||
|
sprintf(val, "%d", rs->rigport.flushx);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TOK_DISABLE_YAESU_BANDSELECT:
|
||||||
|
sprintf(val, "%d", rs->disable_yaesu_bandselect);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,8 @@
|
||||||
#define TOK_AUTO_POWER_ON TOKEN_FRONTEND(124)
|
#define TOK_AUTO_POWER_ON TOKEN_FRONTEND(124)
|
||||||
/** \brief rig: Auto disable screensaver */
|
/** \brief rig: Auto disable screensaver */
|
||||||
#define TOK_AUTO_DISABLE_SCREENSAVER TOKEN_FRONTEND(125)
|
#define TOK_AUTO_DISABLE_SCREENSAVER TOKEN_FRONTEND(125)
|
||||||
|
/** \brief rig: Disable Yaesu band select logic */
|
||||||
|
#define TOK_DISABLE_YAESU_BANDSELECT TOKEN_FRONTEND(126)
|
||||||
/*
|
/*
|
||||||
* rotator specific tokens
|
* rotator specific tokens
|
||||||
* (strictly, should be documented as rotator_internal)
|
* (strictly, should be documented as rotator_internal)
|
||||||
|
|
Ładowanie…
Reference in New Issue