Remove dead code

TS-890S set_mode(SF command) was separated from TS-990S. Remove the remnants
  of common processing.
pull/1608/head
George Baltz N3GB 2024-09-02 14:20:09 -04:00
rodzic 67c62e9b2a
commit c498890069
1 zmienionych plików z 4 dodań i 28 usunięć

Wyświetl plik

@ -2379,7 +2379,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
rig_strvfo(vfo), rig_strrmode(mode), (int)width, rig_strvfo(vfo), rig_strrmode(mode), (int)width,
rig_strvfo(STATE(rig)->current_vfo)); rig_strvfo(STATE(rig)->current_vfo));
// we wont' set opposite VFO if the mode is the same as requested // we won't set opposite VFO if the mode is the same as requested
// setting VFOB mode requires split modifications which cause VFO flashing // setting VFOB mode requires split modifications which cause VFO flashing
// this should generally work unless the user changes mode on VFOB // this should generally work unless the user changes mode on VFOB
// in which case VFOB won't get mode changed until restart // in which case VFOB won't get mode changed until restart
@ -2492,28 +2492,12 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
reading the mode. */ reading the mode. */
vfo_t curr_vfo; vfo_t curr_vfo;
if (RIG_IS_TS990S) err = kenwood_get_vfo_main_sub(rig, &curr_vfo);
{
err = kenwood_get_vfo_main_sub(rig, &curr_vfo);
}
else // RIG_IS_TS890
{
err = kenwood_get_vfo_if(rig, &curr_vfo);
}
if (err != RIG_OK) { RETURNFUNC2(err); } if (err != RIG_OK) { RETURNFUNC2(err); }
if (vfo != RIG_VFO_CURR && vfo != curr_vfo) if (vfo != RIG_VFO_CURR && vfo != curr_vfo)
{ {
if (RIG_IS_TS990S) err = kenwood_set_vfo_main_sub(rig, vfo);
{
err = kenwood_set_vfo_main_sub(rig, vfo);
}
else // RIG_IS_TS890
{
err = kenwood_set_vfo(rig, vfo);
}
if (err != RIG_OK) { RETURNFUNC2(err); } if (err != RIG_OK) { RETURNFUNC2(err); }
} }
@ -2524,15 +2508,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{ {
int err2; int err2;
if (RIG_IS_TS990S) err2 = kenwood_set_vfo_main_sub(rig, curr_vfo);
{
err2 = kenwood_set_vfo_main_sub(rig, curr_vfo);
}
else // RIG_IS_TS890
{
err2 = kenwood_set_vfo(rig, curr_vfo);
}
if (err2 != RIG_OK) { RETURNFUNC2(err2); } if (err2 != RIG_OK) { RETURNFUNC2(err2); }
} }