Fix set_powerstat for ft817 and add for ft857 ft897

https://github.com/Hamlib/Hamlib/issues/363
pull/369/head
Michael Black W9MDB 2020-09-03 17:07:09 -05:00
rodzic 110cfe7abd
commit 86777dcf78
3 zmienionych plików z 10 dodań i 48 usunięć

Wyświetl plik

@ -111,7 +111,7 @@ static const yaesu_cmd_set_t ncmd[] =
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xe7 } }, /* get RX status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xf7 } }, /* get TX status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x03 } }, /* get FREQ and MODE status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* pwr wakeup sequence */
{ 1, { 0xff, 0xff, 0xff, 0xff, 0xff } }, /* pwr wakeup sequence */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x0f } }, /* pwr on */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x8f } }, /* pwr off */
{ 0, { 0x00, 0x00, 0x00, 0x00, 0xbb } }, /* eeprom read */
@ -164,7 +164,7 @@ const struct rig_caps ft817_caps =
RIG_MODEL(RIG_MODEL_FT817),
.model_name = "FT-817",
.mfg_name = "Yaesu",
.version = "20200821.0",
.version = "20200903.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -1383,6 +1383,7 @@ int ft817_set_powerstat(RIG *rig, powerstat_t status)
return ft817_send_cmd(rig, FT817_NATIVE_CAT_PWR_OFF);
case RIG_POWER_ON:
ft817_send_cmd(rig, FT817_NATIVE_CAT_PWR_WAKE);
return ft817_send_cmd(rig, FT817_NATIVE_CAT_PWR_ON);
case RIG_POWER_STANDBY:

Wyświetl plik

@ -118,7 +118,7 @@ static const yaesu_cmd_set_t ncmd[] =
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xe7 } }, /* get RX status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xf7 } }, /* get TX status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x03 } }, /* get FREQ and MODE status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* pwr wakeup sequence */
{ 1, { 0xff, 0xff, 0xff, 0xff, 0xff } }, /* pwr wakeup sequence */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x0f } }, /* pwr on */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x8f } }, /* pwr off */
{ 0, { 0x00, 0x00, 0x00, 0x00, 0xbb } }, /* eeprom read */
@ -147,6 +147,7 @@ enum ft857_digi
#define FT857_ANTS 0
extern int ft817_read_ack(RIG *rig);
extern int ft817_set_powerstat(RIG *rig, powerstat_t status);
static int ft857_send_icmd(RIG *rig, int index, unsigned char *data);
const struct rig_caps ft857_caps =
@ -285,6 +286,8 @@ const struct rig_caps ft857_caps =
.set_ctcss_tone = ft857_set_ctcss_tone,
.set_dcs_sql = ft857_set_dcs_sql,
.set_ctcss_sql = ft857_set_ctcss_sql,
.set_powerstat = ft817_set_powerstat,
.get_level = ft857_get_level,
.set_func = ft857_set_func,
.vfo_op = ft857_vfo_op,
@ -1379,26 +1382,5 @@ int ft857_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
return -RIG_EINVAL;
}
#if 0
/*
* This doesn't seem to work on FT857. It might work with FT817 though.
*/
int ft857_set_powerstat(RIG *rig, powerstat_t status)
{
switch (status)
{
case RIG_POWER_OFF:
return ft857_send_cmd(rig, FT857_NATIVE_CAT_PWR_OFF);
case RIG_POWER_ON:
return ft857_send_cmd(rig, FT857_NATIVE_CAT_PWR_ON);
case RIG_POWER_STANDBY:
default:
return -RIG_EINVAL;
}
}
#endif
/* ---------------------------------------------------------------------- */

Wyświetl plik

@ -112,7 +112,7 @@ static int ft897_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs);
static int ft897_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit);
static int ft897_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd);
extern int ft817_read_ack(RIG *rig);
// static int ft897_set_powerstat(RIG *rig, powerstat_t status);
extern int ft817_set_powerstat(RIG *rig, powerstat_t status);
/* Native ft897 cmd set prototypes. These are READ ONLY as each */
/* rig instance will copy from these and modify if required . */
@ -158,7 +158,7 @@ static const yaesu_cmd_set_t ncmd[] =
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xe7 } }, /* get RX status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xf7 } }, /* get TX status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x03 } }, /* get FREQ and MODE status */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* pwr wakeup sequence */
{ 1, { 0xff, 0xff, 0xff, 0xff, 0xff } }, /* pwr wakeup sequence */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x0f } }, /* pwr on */
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x8f } }, /* pwr off */
{ 0, { 0x00, 0x00, 0x00, 0x00, 0xbb } }, /* eeprom read */
@ -191,7 +191,7 @@ const struct rig_caps ft897_caps =
RIG_MODEL(RIG_MODEL_FT897),
.model_name = "FT-897",
.mfg_name = "Yaesu",
.version = "20200628.0",
.version = "20200903.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -1376,26 +1376,5 @@ int ft897_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
return RIG_OK;
}
#if 0
/*
* This doesn't seem to work on FT897. It might work with FT817 though.
*/
int ft897_set_powerstat(RIG *rig, powerstat_t status)
{
switch (status)
{
case RIG_POWER_OFF:
return ft897_send_cmd(rig, FT897_NATIVE_CAT_PWR_OFF);
case RIG_POWER_ON:
return ft897_send_cmd(rig, FT897_NATIVE_CAT_PWR_ON);
case RIG_POWER_STANDBY:
default:
return -RIG_EINVAL;
}
}
#endif
/* ---------------------------------------------------------------------- */