kopia lustrzana https://github.com/Hamlib/Hamlib
Change to using RIG_IS macros
Fix segfault on non 76XX rigs https://github.com/Hamlib/Hamlib/issues/1319pull/1322/head
rodzic
c0c70b0146
commit
a3ac6e0be3
186
rigs/icom/icom.c
186
rigs/icom/icom.c
|
@ -689,30 +689,30 @@ int icom_init(RIG *rig)
|
|||
// we can add rigs here that will never use the 0x25 cmd
|
||||
// some like the 751 don't even reject the command and have to time out
|
||||
if (
|
||||
rig->caps->rig_model == RIG_MODEL_IC275
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC375
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC706
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC706MKII
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC706MKIIG
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC751
|
||||
|| rig->caps->rig_model == RIG_MODEL_X5105
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC1275
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC746
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC756
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC756PRO
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC756PROII
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC756PROIII
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC746PRO
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC756
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7000
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7100
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7200
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7700
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC821H
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC910
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC2730
|
||||
|| rig->caps->rig_model == RIG_MODEL_ID5100
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC9100
|
||||
RIG_IS_IC275
|
||||
|| RIG_IS_IC375
|
||||
|| RIG_IS_IC706
|
||||
|| RIG_IS_IC706MKII
|
||||
|| RIG_IS_IC706MKIIG
|
||||
|| RIG_IS_IC751
|
||||
|| RIG_IS_X5105
|
||||
|| RIG_IS_IC1275
|
||||
|| RIG_IS_IC746
|
||||
|| RIG_IS_IC756
|
||||
|| RIG_IS_IC756PRO
|
||||
|| RIG_IS_IC756PROII
|
||||
|| RIG_IS_IC756PROIII
|
||||
|| RIG_IS_IC746PRO
|
||||
|| RIG_IS_IC756
|
||||
|| RIG_IS_IC7000
|
||||
|| RIG_IS_IC7100
|
||||
|| RIG_IS_IC7200
|
||||
|| RIG_IS_IC7700
|
||||
|| RIG_IS_IC821H
|
||||
|| RIG_IS_IC910
|
||||
|| RIG_IS_IC2730
|
||||
|| RIG_IS_ID5100
|
||||
|| RIG_IS_IC9100
|
||||
)
|
||||
{
|
||||
priv->x25cmdfails = 1;
|
||||
|
@ -961,13 +961,13 @@ static vfo_t icom_current_vfo(RIG *rig)
|
|||
// some rigs like IC9700 cannot do 0x25 0x26 command in satmode
|
||||
static void icom_satmode_fix(RIG *rig, int satmode)
|
||||
{
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC9700)
|
||||
if (RIG_IS_IC9700)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: toggling IC9700 targetable for satmode=%d\n",
|
||||
__func__, satmode);
|
||||
|
||||
if (satmode) { rig->caps->targetable_vfo = 0; }
|
||||
else { rig->caps->targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE; }
|
||||
if (satmode) { rig->caps->targetable_vfo = rig->state.targetable_vfo = 0; }
|
||||
else { rig->caps->targetable_vfo = rig->state.targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1342,7 +1342,7 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
|
||||
freq_len = priv->civ_731_mode ? 4 : 5;
|
||||
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC905) { freq /= 10; freq_len = 6; }
|
||||
if (RIG_IS_IC905) { freq /= 10; freq_len = 6; }
|
||||
|
||||
/*
|
||||
* to_bcd requires nibble len
|
||||
|
@ -1373,8 +1373,8 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
HAMLIB_TRACE;
|
||||
subcmd = 0x01; // get unselected VFO
|
||||
}
|
||||
if (rig->state.rig_model == RIG_MODEL_IC7600)
|
||||
{ // the 7600 does it different 0=Main, 1=Sub -- maybe other Icoms will start doing this too
|
||||
if (RIG_IS_IC7600)
|
||||
{ // the 7600/7610 do it different 0=Main, 1=Sub -- maybe other Icoms will start doing this too
|
||||
subcmd = 0;
|
||||
if (vfo & RIG_VFO_B || vfo & RIG_VFO_SUB) subcmd = 1;
|
||||
}
|
||||
|
@ -1535,7 +1535,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
subcmd = -1;
|
||||
|
||||
if (vfo == RIG_VFO_MEM && (priv->civ_731_mode
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC706))
|
||||
|| RIG_IS_IC706))
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: VFO=MEM so turning off civ_731\n", __func__);
|
||||
civ_731_mode = 1;
|
||||
|
@ -1666,10 +1666,10 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
|
||||
// Rigs like IC-7600 new firmware has 0x25 and 0x26
|
||||
// So if this succeeds we'll assume all such rigs are targetable freq & mode
|
||||
rig->caps->targetable_vfo = rig->state.targetable_vfo |= RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: TARGETABLE_FREQ and TARGETABLE_MODE enabled\n", __func__);
|
||||
if (rig->state.rig_model == RIG_MODEL_IC7600)
|
||||
{ // the 7600 does it different 0=Main, 1=Sub -- maybe other Icoms will start doing this too
|
||||
if (RIG_IS_IC7600 || RIG_IS_IC7610)
|
||||
{ // the 7600/7610 do it different 0=Main, 1=Sub -- maybe other Icoms will start doing this too
|
||||
rig->caps->targetable_vfo = rig->state.targetable_vfo |= RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE;
|
||||
subcmd2 = 0;
|
||||
if (vfo & RIG_VFO_B || vfo & RIG_VFO_SUB) subcmd2 = 1;
|
||||
}
|
||||
|
@ -1780,7 +1780,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
|
||||
if (freq_len == 3) { *freq *= 10000; } // 3-byte freq for ID5100 is in 10000Hz units so convert to Hz
|
||||
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC905) { *freq *= 10; }
|
||||
if (RIG_IS_IC905) { *freq *= 10; }
|
||||
|
||||
if (vfo == RIG_VFO_MEM && civ_731_mode) { priv->civ_731_mode = 1; }
|
||||
|
||||
|
@ -2208,19 +2208,19 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
pbwidth_t twidth;
|
||||
//struct icom_priv_data *priv = (struct icom_priv_data *) rig->state.priv;
|
||||
unsigned char dm_sub_cmd =
|
||||
rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE;
|
||||
int filter_byte = rig->caps->rig_model == RIG_MODEL_IC7100
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7200
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7300
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7600
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7610
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7700
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7800
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC785x
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC9100
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC9700
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC705
|
||||
|| rig->caps->rig_model == RIG_MODEL_X6100;
|
||||
RIG_IS_IC7200 ? 0x04 : S_MEM_DATA_MODE;
|
||||
int filter_byte = RIG_IS_IC7100
|
||||
|| RIG_IS_IC7200
|
||||
|| RIG_IS_IC7300
|
||||
|| RIG_IS_IC7600
|
||||
|| RIG_IS_IC7610
|
||||
|| RIG_IS_IC7700
|
||||
|| RIG_IS_IC7800
|
||||
|| RIG_IS_IC785X
|
||||
|| RIG_IS_IC9100
|
||||
|| RIG_IS_IC9700
|
||||
|| RIG_IS_IC705
|
||||
|| RIG_IS_X6100;
|
||||
|
||||
ENTERFUNC;
|
||||
|
||||
|
@ -2417,12 +2417,12 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
/* IC-375, IC-731, IC-726, IC-735, IC-910, IC-7000 don't support passband data */
|
||||
/* IC-726 & IC-475A/E also limited support - only on CW */
|
||||
/* TODO: G4WJS CW wide/narrow are possible with above two radios */
|
||||
if (priv->civ_731_mode || rig->caps->rig_model == RIG_MODEL_OS456
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC375
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC726
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC475
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC910
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7000)
|
||||
if (priv->civ_731_mode || RIG_IS_OS456
|
||||
|| RIG_IS_IC375
|
||||
|| RIG_IS_IC726
|
||||
|| RIG_IS_IC475
|
||||
|| RIG_IS_IC910
|
||||
|| RIG_IS_IC7000)
|
||||
{
|
||||
icmode_ext = -1;
|
||||
}
|
||||
|
@ -2711,13 +2711,13 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
/* Likewise, don't ask if we happen to be an Omni VI Plus */
|
||||
/* Likewise, don't ask if we happen to be an IC-R30 */
|
||||
/* Likewise, don't ask if we happen to be an IC-706* */
|
||||
if ((rig->caps->rig_model == RIG_MODEL_IC910) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_OMNIVIP) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_IC706) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_IC706MKII) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_IC706MKIIG) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_IC756) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_ICR30))
|
||||
if ((RIG_IS_IC910) ||
|
||||
(RIG_IS_OMNIVIP) ||
|
||||
(RIG_IS_IC706) ||
|
||||
(RIG_IS_IC706MKII) ||
|
||||
(RIG_IS_IC706MKIIG) ||
|
||||
(RIG_IS_IC756) ||
|
||||
(RIG_IS_ICR30))
|
||||
{
|
||||
RETURNFUNC2(RIG_OK);
|
||||
}
|
||||
|
@ -2879,7 +2879,7 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
|
|||
if (rig->state.cache.split == RIG_SPLIT_ON && !rig->state.cache.satmode) { vfo = RIG_VFO_A; }
|
||||
|
||||
// Seems the IC821H reverses Main/Sub when in satmode
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC821H && rig->state.cache.satmode) { vfo = RIG_VFO_SUB; }
|
||||
if (RIG_IS_IC821H && rig->state.cache.satmode) { vfo = RIG_VFO_SUB; }
|
||||
}
|
||||
else if ((vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) && VFO_HAS_DUAL)
|
||||
{
|
||||
|
@ -2896,7 +2896,7 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
|
|||
else if (rig->state.cache.split == RIG_SPLIT_ON) { vfo = RIG_VFO_B; }
|
||||
|
||||
// Seems the IC821H reverses Main/Sub when in satmode
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC821H && rig->state.cache.satmode) { vfo = RIG_VFO_MAIN; }
|
||||
if (RIG_IS_IC821H && rig->state.cache.satmode) { vfo = RIG_VFO_MAIN; }
|
||||
}
|
||||
else if ((vfo == RIG_VFO_A || vfo == RIG_VFO_B) && !VFO_HAS_A_B
|
||||
&& VFO_HAS_MAIN_SUB)
|
||||
|
@ -3362,7 +3362,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
}
|
||||
|
||||
/* convert values to 0 .. 255 range */
|
||||
if (rig->caps->rig_model == RIG_MODEL_ICR75)
|
||||
if (RIG_IS_ICR75)
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
|
@ -3514,7 +3514,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
lvl_sc = S_LVL_CWPITCH;
|
||||
|
||||
/* use 'set mode' call for CWPITCH on IC-R75 */
|
||||
if (rig->caps->rig_model == RIG_MODEL_ICR75)
|
||||
if (RIG_IS_ICR75)
|
||||
{
|
||||
lvl_cn = C_CTL_MEM;
|
||||
lvl_sc = S_MEM_MODE_SLCT;
|
||||
|
@ -3644,7 +3644,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_VOXGAIN:
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
/* IC-910H */
|
||||
lvl_cn = C_CTL_MEM;
|
||||
|
@ -3659,7 +3659,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_ANTIVOX:
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
/* IC-910H */
|
||||
lvl_cn = C_CTL_MEM;
|
||||
|
@ -4021,7 +4021,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
lvl_sc = S_LVL_CWPITCH;
|
||||
|
||||
/* use 'set mode' call for CWPITCH on IC-R75 */
|
||||
if (rig->caps->rig_model == RIG_MODEL_ICR75)
|
||||
if (RIG_IS_ICR75)
|
||||
{
|
||||
lvl_cn = C_CTL_MEM;
|
||||
lvl_sc = S_MEM_MODE_SLCT;
|
||||
|
@ -4072,7 +4072,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_VOXGAIN: /* IC-910H */
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
/* IC-910H */
|
||||
lvl_cn = C_CTL_MEM;
|
||||
|
@ -4087,7 +4087,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_ANTIVOX:
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
/* IC-910H */
|
||||
lvl_cn = C_CTL_MEM;
|
||||
|
@ -4519,7 +4519,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
}
|
||||
|
||||
/* convert values from 0 .. 255 range */
|
||||
if (rig->caps->rig_model == RIG_MODEL_ICR75)
|
||||
if (RIG_IS_ICR75)
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
|
@ -5571,7 +5571,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
|||
|
||||
// we can add rigs we know will never have 0x25 here to skip this check
|
||||
if ((satmode == 0)
|
||||
&& !(rig->caps->rig_model == RIG_MODEL_IC751)
|
||||
&& !(RIG_IS_IC751)
|
||||
) // only worth trying if not in satmode
|
||||
{
|
||||
int cmd, subcmd, freq_len, retry_save;
|
||||
|
@ -5761,7 +5761,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
|||
rig_strvfo(rig->state.current_vfo));
|
||||
|
||||
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
ptt_t ptt;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: ic910#2\n", __func__);
|
||||
|
@ -5818,8 +5818,8 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
|||
// when transmitting in split mode the split VFO is active
|
||||
subcmd = (rig->state.cache.split
|
||||
&& rig->state.cache.ptt) ? 0x00 : 0x01; // get the unselected vfo
|
||||
if (rig->state.rig_model == RIG_MODEL_IC7600)
|
||||
{ // the 7600 does it different 0=Main, 1=Sub -- maybe other Icoms will start doing this too
|
||||
if (RIG_IS_IC7600 || RIG_IS_IC7610)
|
||||
{ // the 7600/7610 do it different 0=Main, 1=Sub -- maybe other Icoms will start doing this too
|
||||
subcmd = 0;
|
||||
if (vfo & RIG_VFO_B || vfo & RIG_VFO_SUB) subcmd = 1;
|
||||
}
|
||||
|
@ -7200,9 +7200,9 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
break;
|
||||
|
||||
case RIG_FUNC_DUAL_WATCH:
|
||||
if ((rig->caps->rig_model == RIG_MODEL_IC9100)
|
||||
|| (rig->caps->rig_model == RIG_MODEL_IC9700)
|
||||
|| (rig->caps->rig_model == RIG_MODEL_ID5100))
|
||||
if ((RIG_IS_IC9100)
|
||||
|| (RIG_IS_IC9700)
|
||||
|| (RIG_IS_ID5100))
|
||||
{
|
||||
fct_cn = C_CTL_FUNC;
|
||||
fct_sc = S_MEM_DUALMODE;
|
||||
|
@ -7217,7 +7217,7 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
break;
|
||||
|
||||
case RIG_FUNC_SATMODE:
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
// Is the 910 the only one that uses this command?
|
||||
fct_cn = C_CTL_MEM;
|
||||
|
@ -7442,8 +7442,8 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
break;
|
||||
|
||||
case RIG_FUNC_DUAL_WATCH:
|
||||
if ((rig->caps->rig_model == RIG_MODEL_IC9100) ||
|
||||
(rig->caps->rig_model == RIG_MODEL_IC9700))
|
||||
if ((RIG_IS_IC9100) ||
|
||||
(RIG_IS_IC9700))
|
||||
{
|
||||
fct_cn = C_CTL_FUNC;
|
||||
fct_sc = S_MEM_DUALMODE;
|
||||
|
@ -7457,7 +7457,7 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
break;
|
||||
|
||||
case RIG_FUNC_SATMODE:
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC910)
|
||||
if (RIG_IS_IC910)
|
||||
{
|
||||
// Is the 910 the only one that uses this command?
|
||||
fct_cn = C_CTL_MEM;
|
||||
|
@ -8096,7 +8096,7 @@ int icom_set_powerstat(RIG *rig, powerstat_t status)
|
|||
retval =
|
||||
icom_transaction(rig, C_SET_PWR, pwr_sc, NULL, 0, ackbuf, &ack_len);
|
||||
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC7300)
|
||||
if (RIG_IS_IC7300)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: waiting 5 seconds for rig to wake up\n",
|
||||
__func__);
|
||||
|
@ -8215,7 +8215,7 @@ int icom_get_powerstat(RIG *rig, powerstat_t *status)
|
|||
*status = RIG_POWER_OFF; // default return until proven otherwise
|
||||
|
||||
/* r75 has no way to get power status, so fake it */
|
||||
if (rig->caps->rig_model == RIG_MODEL_ICR75)
|
||||
if (RIG_IS_ICR75)
|
||||
{
|
||||
/* getting the mode doesn't work if a memory is blank */
|
||||
/* so use one of the more innocuous 'set mode' commands instead */
|
||||
|
@ -8234,14 +8234,14 @@ int icom_get_powerstat(RIG *rig, powerstat_t *status)
|
|||
RIG_POWER_ON : RIG_POWER_OFF;
|
||||
}
|
||||
|
||||
if (rig->caps->rig_model == RIG_MODEL_IC2730
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7100
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7300
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7600
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7610
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7700
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC7800
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC905)
|
||||
if (RIG_IS_IC2730
|
||||
|| RIG_IS_IC7100
|
||||
|| RIG_IS_IC7300
|
||||
|| RIG_IS_IC7600
|
||||
|| RIG_IS_IC7610
|
||||
|| RIG_IS_IC7700
|
||||
|| RIG_IS_IC7800
|
||||
|| RIG_IS_IC905)
|
||||
{
|
||||
freq_t freq;
|
||||
int retrysave = rig->caps->retry;
|
||||
|
@ -8512,7 +8512,7 @@ int icom_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option,
|
|||
{
|
||||
retval = icom_transaction(rig, C_CTL_ANT, -1, NULL, 0, ackbuf, &ack_len);
|
||||
}
|
||||
else if (rig->caps->rig_model == RIG_MODEL_IC785x)
|
||||
else if (RIG_IS_IC785X)
|
||||
{
|
||||
unsigned char buf[2];
|
||||
buf[0] = 0x03;
|
||||
|
|
|
@ -509,4 +509,88 @@ extern const struct rig_caps x5105_caps;
|
|||
extern const struct rig_caps icr8600_caps;
|
||||
extern const struct rig_caps icr30_caps;
|
||||
|
||||
#define RIG_IS_IC1271 (rig->state.rig_model == RIG_MODEL_IC1271)
|
||||
#define RIG_IS_IC1275 (rig->state.rig_model == RIG_MODEL_IC1275)
|
||||
#define RIG_IS_IC271 (rig->state.rig_model == RIG_MODEL_IC271)
|
||||
#define RIG_IS_IC2730 (rig->state.rig_model == RIG_MODEL_IC2730)
|
||||
#define RIG_IS_IC275 (rig->state.rig_model == RIG_MODEL_IC275)
|
||||
#define RIG_IS_IC375 (rig->state.rig_model == RIG_MODEL_IC375)
|
||||
#define RIG_IS_IC471 (rig->state.rig_model == RIG_MODEL_IC471)
|
||||
#define RIG_IS_IC475 (rig->state.rig_model == RIG_MODEL_IC475)
|
||||
#define RIG_IS_IC575 (rig->state.rig_model == RIG_MODEL_IC575)
|
||||
#define RIG_IS_IC7000 (rig->state.rig_model == RIG_MODEL_IC7000)
|
||||
#define RIG_IS_IC703 (rig->state.rig_model == RIG_MODEL_IC703)
|
||||
#define RIG_IS_IC705 (rig->state.rig_model == RIG_MODEL_IC705)
|
||||
#define RIG_IS_IC706 (rig->state.rig_model == RIG_MODEL_IC706)
|
||||
#define RIG_IS_IC706MKII (rig->state.rig_model == RIG_MODEL_IC706MKII)
|
||||
#define RIG_IS_IC706MKIIG (rig->state.rig_model == RIG_MODEL_IC706MKIIG)
|
||||
#define RIG_IS_IC707 (rig->state.rig_model == RIG_MODEL_IC707)
|
||||
#define RIG_IS_IC7100 (rig->state.rig_model == RIG_MODEL_IC7100)
|
||||
#define RIG_IS_IC718 (rig->state.rig_model == RIG_MODEL_IC718)
|
||||
#define RIG_IS_IC7200 (rig->state.rig_model == RIG_MODEL_IC7200)
|
||||
#define RIG_IS_IC725 (rig->state.rig_model == RIG_MODEL_IC725)
|
||||
#define RIG_IS_IC726 (rig->state.rig_model == RIG_MODEL_IC726)
|
||||
#define RIG_IS_IC728 (rig->state.rig_model == RIG_MODEL_IC728)
|
||||
#define RIG_IS_IC729 (rig->state.rig_model == RIG_MODEL_IC729)
|
||||
#define RIG_IS_IC7300 (rig->state.rig_model == RIG_MODEL_IC7300)
|
||||
#define RIG_IS_IC731 (rig->state.rig_model == RIG_MODEL_IC731)
|
||||
#define RIG_IS_IC735 (rig->state.rig_model == RIG_MODEL_IC735)
|
||||
#define RIG_IS_IC736 (rig->state.rig_model == RIG_MODEL_IC736)
|
||||
#define RIG_IS_IC737 (rig->state.rig_model == RIG_MODEL_IC737)
|
||||
#define RIG_IS_IC738 (rig->state.rig_model == RIG_MODEL_IC738)
|
||||
#define RIG_IS_IC7410 (rig->state.rig_model == RIG_MODEL_IC7410)
|
||||
#define RIG_IS_IC746 (rig->state.rig_model == RIG_MODEL_IC746)
|
||||
#define RIG_IS_IC746PRO (rig->state.rig_model == RIG_MODEL_IC746PRO)
|
||||
#define RIG_IS_IC751 (rig->state.rig_model == RIG_MODEL_IC751)
|
||||
#define RIG_IS_IC751A (rig->state.rig_model == RIG_MODEL_IC751A)
|
||||
#define RIG_IS_IC756 (rig->state.rig_model == RIG_MODEL_IC756)
|
||||
#define RIG_IS_IC756PRO (rig->state.rig_model == RIG_MODEL_IC756PRO)
|
||||
#define RIG_IS_IC756PROII (rig->state.rig_model == RIG_MODEL_IC756PROII)
|
||||
#define RIG_IS_IC756PROIII (rig->state.rig_model == RIG_MODEL_IC756PROIII)
|
||||
#define RIG_IS_IC7600 (rig->state.rig_model == RIG_MODEL_IC7600)
|
||||
#define RIG_IS_IC761 (rig->state.rig_model == RIG_MODEL_IC761)
|
||||
#define RIG_IS_IC7610 (rig->state.rig_model == RIG_MODEL_IC7610)
|
||||
#define RIG_IS_IC765 (rig->state.rig_model == RIG_MODEL_IC765)
|
||||
#define RIG_IS_IC7700 (rig->state.rig_model == RIG_MODEL_IC7700)
|
||||
#define RIG_IS_IC775 (rig->state.rig_model == RIG_MODEL_IC775)
|
||||
#define RIG_IS_IC78 (rig->state.rig_model == RIG_MODEL_IC78)
|
||||
#define RIG_IS_IC7800 (rig->state.rig_model == RIG_MODEL_IC7800)
|
||||
#define RIG_IS_IC781 (rig->state.rig_model == RIG_MODEL_IC781)
|
||||
#define RIG_IS_IC785X (rig->state.rig_model == RIG_MODEL_IC785x)
|
||||
#define RIG_IS_IC820 (rig->state.rig_model == RIG_MODEL_IC820)
|
||||
#define RIG_IS_IC821 (rig->state.rig_model == RIG_MODEL_IC821)
|
||||
#define RIG_IS_IC821H (rig->state.rig_model == RIG_MODEL_IC821H)
|
||||
#define RIG_IS_IC905 (rig->state.rig_model == RIG_MODEL_IC905)
|
||||
#define RIG_IS_IC910 (rig->state.rig_model == RIG_MODEL_IC910)
|
||||
#define RIG_IS_IC9100 (rig->state.rig_model == RIG_MODEL_IC9100)
|
||||
#define RIG_IS_IC92D (rig->state.rig_model == RIG_MODEL_IC92D)
|
||||
#define RIG_IS_IC970 (rig->state.rig_model == RIG_MODEL_IC970)
|
||||
#define RIG_IS_IC9700 (rig->state.rig_model == RIG_MODEL_IC9700)
|
||||
#define RIG_IS_IC8101 (rig->state.rig_model == RIG_MODEL_ICF8101)
|
||||
#define RIG_IS_ICID1 (rig->state.rig_model == RIG_MODEL_ICID1)
|
||||
#define RIG_IS_ICM700PRO (rig->state.rig_model == RIG_MODEL_IC_M700PRO)
|
||||
#define RIG_IS_ICM710 (rig->state.rig_model == RIG_MODEL_IC_M710)
|
||||
#define RIG_IS_ICM802 (rig->state.rig_model == RIG_MODEL_IC_M802)
|
||||
#define RIG_IS_ICM803 (rig->state.rig_model == RIG_MODEL_IC_M803)
|
||||
#define RIG_IS_ICR10 (rig->state.rig_model == RIG_MODEL_ICR10)
|
||||
#define RIG_IS_ICR20 (rig->state.rig_model == RIG_MODEL_ICR20)
|
||||
#define RIG_IS_ICR30 (rig->state.rig_model == RIG_MODEL_ICR30)
|
||||
#define RIG_IS_ICR6 (rig->state.rig_model == RIG_MODEL_ICR6)
|
||||
#define RIG_IS_ICR7000 (rig->state.rig_model == RIG_MODEL_ICR7000)
|
||||
#define RIG_IS_ICR71 (rig->state.rig_model == RIG_MODEL_ICR71)
|
||||
#define RIG_IS_ICR7100 (rig->state.rig_model == RIG_MODEL_ICR7100)
|
||||
#define RIG_IS_ICR72 (rig->state.rig_model == RIG_MODEL_ICR72)
|
||||
#define RIG_IS_ICR75 (rig->state.rig_model == RIG_MODEL_ICR75)
|
||||
#define RIG_IS_ICR8500 (rig->state.rig_model == RIG_MODEL_ICR8500)
|
||||
#define RIG_IS_ICR8600 (rig->state.rig_model == RIG_MODEL_ICR8600)
|
||||
#define RIG_IS_ICR9000 (rig->state.rig_model == RIG_MODEL_ICR9000)
|
||||
#define RIG_IS_ICR9500 (rig->state.rig_model == RIG_MODEL_ICR9500)
|
||||
#define RIG_IS_ICRX7 (rig->state.rig_model == RIG_MODEL_ICRX7)
|
||||
#define RIG_IS_ID5100 (rig->state.rig_model == RIG_MODEL_ID5100)
|
||||
#define RIG_IS_OMNIVIP (rig->state.rig_model == RIG_MODEL_OMNIVIP)
|
||||
#define RIG_IS_OS456 (rig->state.rig_model == RIG_MODEL_OS456)
|
||||
#define RIG_IS_X5105 (rig->state.rig_model == RIG_MODEL_X5105)
|
||||
#define RIG_IS_X6100 (rig->state.rig_model == RIG_MODEL_X6100)
|
||||
|
||||
|
||||
#endif /* _ICOM_H */
|
||||
|
|
Ładowanie…
Reference in New Issue