Fix 10Hz resolution problem with FT1000MP rigs

https://github.com/Hamlib/Hamlib/issues/616
pull/649/head
Michael Black W9MDB 2021-03-18 09:26:17 -05:00
rodzic 30eaa78034
commit b958e42a0c
1 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -38,6 +38,7 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <math.h>
#include "hamlib/rig.h"
#include "bandplan.h"
@ -222,7 +223,7 @@ const struct rig_caps ft1000mp_caps =
RIG_MODEL(RIG_MODEL_FT1000MP),
.model_name = "FT-1000MP",
.mfg_name = "Yaesu",
.version = "20210310.0",
.version = "20210318.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -356,7 +357,7 @@ const struct rig_caps ft1000mpmkv_caps =
RIG_MODEL(RIG_MODEL_FT1000MPMKV),
.model_name = "MARK-V FT-1000MP",
.mfg_name = "Yaesu",
.version = "20210310.0",
.version = "20210318.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -490,7 +491,7 @@ const struct rig_caps ft1000mpmkvfld_caps =
RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD),
.model_name = "MARK-V Field FT-1000MP",
.mfg_name = "Yaesu",
.version = "20210310.0",
.version = "20210318.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -763,8 +764,10 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
*/
memcpy(&p->p_cmd, &ncmd[cmd_index].nseq, YAESU_CMD_LENGTH);
// round freq to 10Hz intervals due to rig restriction
freq = round(freq/10.0)*10.0;
to_bcd(p->p_cmd, freq / 10, 8); /* store bcd format in in p_cmd */
/* TODO -- fix 10Hz resolution -- FS */
// cppcheck-suppress *
rig_debug(RIG_DEBUG_TRACE, "%s: freq = %"PRIll" Hz\n", __func__,