[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. c332036efe325b94e8271
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-06-29 12:56:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via c332036efe325b94e827196f34eaf928de3b0d60 (commit) via 555dba37fb038c559607405507023ba956af444c (commit) from 3fbaeaf871cc6f0cc72e018a31d392aba36270b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c332036efe325b94e827196f34eaf928de3b0d60 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jun 29 07:55:55 2020 -0500 astyle ft817.c diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index fbdfc8ba..1715f371 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -392,6 +392,7 @@ static int ft817_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out) unsigned char data[YAESU_CMD_LENGTH]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); memcpy(data, (char *)p->pcs[FT817_NATIVE_CAT_EEPROM_READ].nseq, YAESU_CMD_LENGTH); @@ -424,6 +425,8 @@ static int ft817_get_status(RIG *rig, int status) int n; int retries = rig->state.rigport.retry; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (status) { case FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS: @@ -493,6 +496,8 @@ int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) int retries = rig->state.rigport.retry + 1; // +1 because, because 2 steps are needed even in best scenario + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + while ((f1 == 0 || f1 != f2) && retries-- > 0) { rig_debug(RIG_DEBUG_TRACE, "%s: retries=%d\n", __func__, retries); @@ -523,6 +528,8 @@ int ft817_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->fm_status_tv)) { int n; @@ -604,6 +611,8 @@ int ft817_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_TX_STATUS)) < 0) { @@ -634,6 +643,8 @@ int ft817_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -653,6 +664,8 @@ static int ft817_get_pometer_level(RIG *rig, value_t *val) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -687,6 +700,8 @@ static int ft817_get_smeter_level(RIG *rig, value_t *val) struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_RX_STATUS)) < 0) { @@ -725,6 +740,8 @@ static int ft817_get_raw_smeter_level(RIG *rig, value_t *val) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) { int n; @@ -770,6 +787,8 @@ int ft817_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) { int n; @@ -800,13 +819,17 @@ int ft817_read_ack(RIG *rig) char dummy; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (rig->state.rigport.post_write_delay == 0) { if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) { rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", __func__); - rig->state.rigport.post_write_delay = 10; // arbitrary choice right now of max 100 cmds/sec + rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", + __func__); + rig->state.rigport.post_write_delay = + 10; // arbitrary choice right now of max 100 cmds/sec return RIG_OK; // let it continue without checking for ack now } @@ -829,6 +852,8 @@ static int ft817_send_cmd(RIG *rig, int index) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: Incomplete sequence\n", __func__); @@ -847,6 +872,8 @@ static int ft817_send_icmd(RIG *rig, int index, unsigned char *data) struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; unsigned char cmd[YAESU_CMD_LENGTH]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 1) { rig_debug(RIG_DEBUG_VERBOSE, "%s: Complete sequence\n", __func__); @@ -998,6 +1025,8 @@ int ft817_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) int ft817_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (func) { case RIG_FUNC_LOCK: @@ -1205,6 +1234,8 @@ int ft817_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) int ft817_set_powerstat(RIG *rig, powerstat_t status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (status) { case RIG_POWER_OFF: @@ -1221,6 +1252,8 @@ int ft817_set_powerstat(RIG *rig, powerstat_t status) int ft817_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (op) { int n; @@ -1287,6 +1320,7 @@ int ft817_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) int ft817_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); *mwpower = (int)(power * 6000); return RIG_OK; } @@ -1296,6 +1330,7 @@ int ft817_power2mW(RIG *rig, unsigned int *mwpower, float power, int ft817_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); *power = mwpower / 6000.0; return RIG_OK; } commit 555dba37fb038c559607405507023ba956af444c Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jun 29 07:50:55 2020 -0500 Add debug to FT817/857/897 Add fallback to non-ack protocol with 10ms post_write_delay if ack error occurs https://github.com/Hamlib/Hamlib/issues/330 diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 266c6715..fbdfc8ba 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -164,7 +164,7 @@ const struct rig_caps ft817_caps = RIG_MODEL(RIG_MODEL_FT817), .model_name = "FT-817", .mfg_name = "Yaesu", - .version = "20200625.0", + .version = "20200629.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -805,7 +805,9 @@ int ft817_read_ack(RIG *rig) if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) { rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - return n; + rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", __func__); + rig->state.rigport.post_write_delay = 10; // arbitrary choice right now of max 100 cmds/sec + return RIG_OK; // let it continue without checking for ack now } rig_debug(RIG_DEBUG_TRACE, "%s: ack received (%d)\n", __func__, dummy); diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index de7c2480..518f7ba8 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -383,6 +383,7 @@ static int ft857_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out) unsigned char data[YAESU_CMD_LENGTH]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); memcpy(data, (char *)p->pcs[FT857_NATIVE_CAT_EEPROM_READ].nseq, YAESU_CMD_LENGTH); @@ -414,6 +415,8 @@ static int ft857_get_status(RIG *rig, int status) int len; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + switch (status) { case FT857_NATIVE_CAT_GET_FREQ_MODE_STATUS: @@ -477,6 +480,8 @@ static int ft857_send_cmd(RIG *rig, int index) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (p->pcs[index].ncomp == 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: incomplete sequence\n", __func__); @@ -495,6 +500,8 @@ static int ft857_send_icmd(RIG *rig, int index, unsigned char *data) struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; unsigned char cmd[YAESU_CMD_LENGTH]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (p->pcs[index].ncomp == 1) { rig_debug(RIG_DEBUG_VERBOSE, "%s: complete sequence\n", __func__); @@ -515,6 +522,8 @@ int ft857_get_vfo(RIG *rig, vfo_t *vfo) unsigned char c; *vfo = RIG_VFO_B; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (ft857_read_eeprom(rig, 0x0068, &c) < 0) /* get vfo status */ { return -RIG_EPROTO; @@ -530,6 +539,8 @@ int ft857_set_vfo(RIG *rig, vfo_t vfo) vfo_t curvfo; int retval = ft857_get_vfo(rig, &curvfo); + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (retval != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: error get_vfo '%s'\n", __func__, @@ -549,6 +560,8 @@ int ft857_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -572,6 +585,8 @@ int ft857_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) static void get_mode(RIG *rig, struct ft857_priv_data *priv, rmode_t *mode, pbwidth_t *width) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + switch (priv->fm_status[4] & 0x7f) { case 0x00: @@ -642,6 +657,8 @@ int ft857_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -667,6 +684,8 @@ int ft857_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, { int retcode; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR && vfo != RIG_VFO_TX) { return -RIG_ENTARGET; @@ -696,6 +715,8 @@ int ft857_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -731,6 +752,8 @@ int ft857_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -754,6 +777,7 @@ int ft857_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) static int ft857_get_pometer_level(RIG *rig, value_t *val) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); if (check_cache_timeout(&p->tx_status_tv)) { @@ -785,6 +809,8 @@ static int ft857_get_smeter_level(RIG *rig, value_t *val) struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) if ((n = ft857_get_status(rig, FT857_NATIVE_CAT_GET_RX_STATUS)) < 0) { @@ -801,6 +827,8 @@ static int ft857_get_smeter_level(RIG *rig, value_t *val) int ft857_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -825,6 +853,8 @@ int ft857_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -857,6 +887,8 @@ int ft857_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -877,6 +909,8 @@ int ft857_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int index; /* index of sequence to send */ + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -945,6 +979,8 @@ int ft857_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq, rmode_t mode, { int retcode; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR && vfo != RIG_VFO_TX) { return -RIG_ENTARGET; @@ -973,6 +1009,8 @@ int ft857_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1011,6 +1049,8 @@ int ft857_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1047,6 +1087,8 @@ int ft857_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) int ft857_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1118,6 +1160,8 @@ int ft857_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1147,6 +1191,8 @@ int ft857_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1176,6 +1222,8 @@ int ft857_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1205,6 +1253,8 @@ int ft857_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1231,6 +1281,8 @@ int ft857_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) int ft857_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1257,6 +1309,8 @@ int ft857_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1275,6 +1329,8 @@ int ft857_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1307,6 +1363,8 @@ int ft857_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) int ft857_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + switch (op) { case RIG_OP_TOGGLE: diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index 5c2b8ef5..60600d8d 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -418,6 +418,7 @@ static int ft897_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out) unsigned char data[YAESU_CMD_LENGTH]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); memcpy(data, (char *)p->pcs[FT897_NATIVE_CAT_EEPROM_READ].nseq, YAESU_CMD_LENGTH); @@ -449,6 +450,8 @@ static int ft897_get_status(RIG *rig, int status) int len; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (status) { case FT897_NATIVE_CAT_GET_FREQ_MODE_STATUS: @@ -510,6 +513,8 @@ int ft897_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -534,6 +539,8 @@ int ft897_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -621,6 +628,8 @@ int ft897_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -645,6 +654,8 @@ static int ft897_get_pometer_level(RIG *rig, value_t *val) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -672,6 +683,8 @@ static int ft897_get_swr_level(RIG *rig, value_t *val) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -700,6 +713,8 @@ static int ft897_get_smeter_level(RIG *rig, value_t *val) struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) if ((n = ft897_get_status(rig, FT897_NATIVE_CAT_GET_RX_STATUS)) < 0) { @@ -717,6 +732,8 @@ static int ft897_get_rawstr_level(RIG *rig, value_t *val) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) { int n; @@ -734,6 +751,8 @@ static int ft897_get_rawstr_level(RIG *rig, value_t *val) int ft897_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -764,6 +783,8 @@ int ft897_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -800,6 +821,8 @@ static int ft897_send_cmd(RIG *rig, int index) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: incomplete sequence\n", __func__); @@ -818,6 +841,8 @@ static int ft897_send_icmd(RIG *rig, int index, unsigned char *data) struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; unsigned char cmd[YAESU_CMD_LENGTH]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 1) { rig_debug(RIG_DEBUG_VERBOSE, "%s: Complete sequence\n", __func__); @@ -837,6 +862,8 @@ int ft897_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -859,6 +886,8 @@ int ft897_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int index; /* index of sequence to send */ + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -922,6 +951,8 @@ int ft897_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -960,6 +991,8 @@ int ft897_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -993,6 +1026,8 @@ int ft897_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1032,6 +1067,8 @@ int ft897_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1065,6 +1102,8 @@ int ft897_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) int ft897_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1136,6 +1175,8 @@ int ft897_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1165,6 +1206,8 @@ int ft897_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1194,6 +1237,8 @@ int ft897_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1223,6 +1268,8 @@ int ft897_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1249,6 +1296,8 @@ int ft897_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) int ft897_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1275,6 +1324,8 @@ int ft897_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1293,6 +1344,8 @@ int ft897_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft817.c | 41 ++++++++++++++++++++++++++++++++++++-- rigs/yaesu/ft857.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ rigs/yaesu/ft897.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |