Revert "Fix FT897 freq set/get for > 100MHz"

This reverts commit 44ad5c6363.
This commit is contained in:
Mike Black W9MDB 2022-07-28 07:10:13 -05:00
parent a83eb3bf42
commit 57aa5e8399
3 changed files with 8 additions and 12 deletions

View File

@ -1071,8 +1071,9 @@ static int netrigctl_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
char buf[BUF_MAX];
char vfostr[16] = "";
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, ptt=%d\n", __func__,
rig_strvfo(vfo), ptt);
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, ptt=%d, ptt_type=%d\n", __func__,
rig_strvfo(vfo), ptt, rig->state.pttport.type.ptt);
if(rig->state.pttport.type.ptt == RIG_PTT_NONE) return RIG_OK;
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);

View File

@ -250,7 +250,7 @@ const struct rig_caps ft897_caps =
RIG_MODEL(RIG_MODEL_FT897),
.model_name = "FT-897",
.mfg_name = "Yaesu",
.version = "20220727.0",
.version = "20220404.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -394,7 +394,7 @@ const struct rig_caps ft897d_caps =
RIG_MODEL(RIG_MODEL_FT897D),
.model_name = "FT-897D",
.mfg_name = "Yaesu",
.version = "20220727.0",
.version = "20220407.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -729,11 +729,7 @@ int ft897_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
}
}
int factor = 10;
if (p->fm_status[3] == 1) { factor = 100; }
*freq = from_bcd_be(p->fm_status, 8) * factor;
*freq = from_bcd_be(p->fm_status, 8) * 10;
return RIG_OK;
}
@ -1086,9 +1082,8 @@ int ft897_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_debug(RIG_DEBUG_VERBOSE, "%s: requested freq = %"PRIfreq" Hz\n", __func__,
freq);
int factor = freq > 100000000 ? 100 : 10;
/* fill in the frequency */
to_bcd_be(data, (freq + 5) / factor, 8);
to_bcd_be(data, (freq + 5) / 10, 8);
/*invalidate frequency cache*/
rig_force_cache_timeout(&((struct ft897_priv_data *)

View File

@ -684,7 +684,7 @@ int main(int argc, char *argv[])
/*
* ex: RIG_PTT_PARALLEL and /dev/parport0
*/
if (ptt_type != RIG_PTT_NONE)
//if (ptt_type != RIG_PTT_NONE)
{
my_rig->state.pttport.type.ptt = ptt_type;
my_rig->state.pttport_deprecated.type.ptt = ptt_type;