hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 23)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
(21) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael B. <mdb...@us...> - 2021-01-04 04:59:19
|
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 98d0f20daaf7c3ce0e2554cf9cda9cb0793d7426 (commit) from 8d9f7378db8f8c8c71f9790f9564060d130864e7 (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 98d0f20daaf7c3ce0e2554cf9cda9cb0793d7426 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 3 22:52:56 2021 -0600 Change RIG_TARGETABLE_PURE to appropriate RIG_TARGETABLE -- might actually work now No rig has/had this flag This change affects rig_set_func, rig_get_func, rig_set_ext_level, rig_get_ext_func, rig_set_level, rig_get_level https://github.com/Hamlib/Hamlib/issues/414 diff --git a/src/settings.c b/src/settings.c index 357c2e17..42e72136 100644 --- a/src/settings.c +++ b/src/settings.c @@ -632,7 +632,7 @@ int HAMLIB_API rig_set_ext_level(RIG *rig, return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_LEVEL) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -698,7 +698,7 @@ int HAMLIB_API rig_get_ext_level(RIG *rig, return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_LEVEL) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -763,7 +763,7 @@ int HAMLIB_API rig_set_ext_func(RIG *rig, return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_FUNC) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -829,7 +829,7 @@ int HAMLIB_API rig_get_ext_func(RIG *rig, return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_FUNC) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { ----------------------------------------------------------------------- Summary of changes: src/settings.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-03 21:29:05
|
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 8d9f7378db8f8c8c71f9790f9564060d130864e7 (commit) from ea6854844cd796bf565f62448d8c48307e479ce7 (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 8d9f7378db8f8c8c71f9790f9564060d130864e7 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 3 15:27:25 2021 -0600 Add ft100_get_dcs_code and ft100_get_rptr_shift diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index c08ca643..31a5f993 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -286,7 +286,7 @@ const struct rig_caps ft100_caps = .get_ptt = ft100_get_ptt, .get_dcd = NULL, .set_rptr_shift = ft100_set_rptr_shift, - .get_rptr_shift = NULL, + .get_rptr_shift = ft100_get_rptr_shift, .set_rptr_offs = NULL, .get_rptr_offs = NULL, .set_split_freq = NULL, @@ -302,7 +302,7 @@ const struct rig_caps ft100_caps = .set_ts = NULL, .get_ts = NULL, .set_dcs_code = ft100_set_dcs_code, - .get_dcs_code = NULL, + .get_dcs_code = ft100_get_dcs_code, .set_ctcss_tone = ft100_set_ctcss_tone, .get_ctcss_tone = ft100_get_ctcss_tone, .set_dcs_sql = NULL, @@ -1008,6 +1008,28 @@ int ft100_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) return ft100_send_priv_cmd(rig, cmd_index); } +int ft100_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *shift) +{ + int ret; + struct ft100_priv_data *priv = (struct ft100_priv_data *)rig->state.priv; + + ret = ft100_read_status(rig); + + if (ret != RIG_OK) + { + return ret; + } + + *shift = RIG_RPT_SHIFT_NONE; + + if (priv->status.flag1 && 1 << 2) { *shift = RIG_RPT_SHIFT_MINUS; } + else if (priv->status.flag1 && 1 << 3) { *shift = RIG_RPT_SHIFT_PLUS; } + + rig_debug(RIG_DEBUG_VERBOSE, "%s: flag1=0x%02x\n", __func__, + priv->status.flag1); + + return RIG_OK; +} /* @@ -1048,6 +1070,24 @@ int ft100_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) return write_block(&rig_s->rigport, (char *) p_cmd, YAESU_CMD_LENGTH); } +int ft100_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code) +{ + int ret; + struct ft100_priv_data *priv = (struct ft100_priv_data *)rig->state.priv; + + ret = ft100_read_status(rig); + + if (ret != RIG_OK) + { + return ret; + } + + *code = ft100_dcs_list[priv->status.dcs]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: P1=0x%02x, code=%d\n", __func__, + priv->status.dcs, *code); + + return RIG_OK; +} /* * TODO: enable/disable encoding/decoding diff --git a/rigs/yaesu/ft100.h b/rigs/yaesu/ft100.h index ad913cd3..64c2dc58 100644 --- a/rigs/yaesu/ft100.h +++ b/rigs/yaesu/ft100.h @@ -165,10 +165,10 @@ static int ft100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) static int ft100_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo); static int ft100_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift); -//static int ft100_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *shift); +static int ft100_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *shift); static int ft100_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code); -//static int ft100_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code); +static int ft100_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code); static int ft100_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone); static int ft100_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft100.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- rigs/yaesu/ft100.h | 4 ++-- 2 files changed, 44 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-03 20:57:20
|
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 ea6854844cd796bf565f62448d8c48307e479ce7 (commit) from 1e98661ce4c5f01a8c368a61af1d88a437f6924a (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 ea6854844cd796bf565f62448d8c48307e479ce7 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 3 14:55:09 2021 -0600 Fix Barrett 950 set_freq https://github.com/Hamlib/Hamlib/issues/483 diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c index 2ca93178..2229f1b1 100644 --- a/rigs/barrett/950.c +++ b/rigs/barrett/950.c @@ -61,7 +61,7 @@ const struct rig_caps barrett950_caps = .mfg_name = "Barrett", .version = BACKEND_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_ALPHA, + .status = RIG_STATUS_BETA, .rig_type = RIG_TYPE_TRANSCEIVER, .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE, .ptt_type = RIG_PTT_RIG, @@ -139,7 +139,7 @@ int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != RIG_VFO_B) { char *response = NULL; - sprintf((char *) cmd_buf, "OR%08.0f", freq); + sprintf((char *) cmd_buf, "PR%08.0f", freq); retval = barrett_transaction(rig, cmd_buf, 0, &response); if (retval < 0) @@ -152,7 +152,7 @@ int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (strncmp(response, "OK", 2) != 0) { rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response); - return -RIG_EINVAL; + return -RIG_EPROTO; } } @@ -172,7 +172,7 @@ int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (strncmp(response, "OK", 2) != 0) { rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response); - return -RIG_EINVAL; + return -RIG_EPROTO; } } ----------------------------------------------------------------------- Summary of changes: rigs/barrett/950.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-03 19:34:11
|
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 1e98661ce4c5f01a8c368a61af1d88a437f6924a (commit) from 54ab3b951d2eb3a01263b37b72b64c6e67a50827 (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 1e98661ce4c5f01a8c368a61af1d88a437f6924a Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 3 13:33:15 2021 -0600 Add FT-897D https://github.com/Hamlib/Hamlib/issues/384 diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 97de42c9..c424e3a3 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -119,6 +119,7 @@ #define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40) #define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41) #define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42) +#define RIG_MODEL_FT897D RIG_MAKE_MODEL(RIG_YAESU, 43) /* diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index b3dbafc6..95b95134 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -329,6 +329,147 @@ const struct rig_caps ft897_caps = .vfo_op = ft897_vfo_op, }; +const struct rig_caps ft897d_caps = +{ + RIG_MODEL(RIG_MODEL_FT897D), + .model_name = "FT-897D", + .mfg_name = "Yaesu", + .version = "20210103.0", + .copyright = "LGPL", + .status = RIG_STATUS_BETA, + .rig_type = RIG_TYPE_TRANSCEIVER, + .ptt_type = RIG_PTT_RIG, + .dcd_type = RIG_DCD_RIG, + .port_type = RIG_PORT_SERIAL, + .serial_rate_min = 4800, + .serial_rate_max = 38400, + .serial_data_bits = 8, + .serial_stop_bits = 2, + .serial_parity = RIG_PARITY_NONE, + .serial_handshake = RIG_HANDSHAKE_NONE, + .write_delay = FT897_WRITE_DELAY, + .post_write_delay = FT897_POST_WRITE_DELAY, + .timeout = FT897_TIMEOUT, + .retry = 0, + .has_get_func = RIG_FUNC_NONE, + .has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL, + .has_get_level = RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER | RIG_LEVEL_SWR | RIG_LEVEL_RAWSTR, + .has_set_level = RIG_LEVEL_NONE, + .has_get_parm = RIG_PARM_NONE, + .has_set_parm = RIG_PARM_NONE, + .level_gran = {}, /* granularity */ + .parm_gran = {}, + .ctcss_list = common_ctcss_list, + .dcs_list = common_dcs_list, /* only 104 supported */ + .preamp = { RIG_DBLST_END, }, + .attenuator = { RIG_DBLST_END, }, + .max_rit = Hz(9990), + .max_xit = Hz(0), + .max_ifshift = Hz(0), + .targetable_vfo = 0, + .transceive = RIG_TRN_OFF, + .bank_qty = 0, + .chan_desc_sz = 0, + .chan_list = { RIG_CHAN_END, }, + .vfo_ops = RIG_OP_TOGGLE, + + .rx_range_list1 = { + {kHz(100), MHz(56), FT897_ALL_RX_MODES, -1, -1}, + {MHz(76), MHz(108), RIG_MODE_WFM, -1, -1}, + {MHz(118), MHz(164), FT897_ALL_RX_MODES, -1, -1}, + {MHz(420), MHz(470), FT897_ALL_RX_MODES, -1, -1}, + RIG_FRNG_END, + }, + .tx_range_list1 = { + FRQ_RNG_HF(1, FT897_OTHER_TX_MODES, W(10), W(100), FT897_VFO_ALL, FT897_ANTS), + FRQ_RNG_6m(1, FT897_OTHER_TX_MODES, W(10), W(100), FT897_VFO_ALL, FT897_ANTS), + + /* AM class */ + FRQ_RNG_HF(1, FT897_AM_TX_MODES, W(2.5), W(25), FT897_VFO_ALL, FT897_ANTS), + FRQ_RNG_6m(1, FT897_AM_TX_MODES, W(2.5), W(25), FT897_VFO_ALL, FT897_ANTS), + FRQ_RNG_2m(1, FT897_OTHER_TX_MODES, W(5), W(50), FT897_VFO_ALL, FT897_ANTS), + /* AM class */ + FRQ_RNG_2m(1, FT897_AM_TX_MODES, W(2.5), W(25), FT897_VFO_ALL, FT897_ANTS), + FRQ_RNG_70cm(1, FT897_OTHER_TX_MODES, W(2), W(20), FT897_VFO_ALL, FT897_ANTS), + /* AM class */ + FRQ_RNG_70cm(1, FT897_AM_TX_MODES, W(0.5), W(5), FT897_VFO_ALL, FT897_ANTS), + RIG_FRNG_END, + }, + + + .rx_range_list2 = { + {kHz(100), MHz(56), FT897_ALL_RX_MODES, -1, -1}, + {MHz(76), MHz(108), RIG_MODE_WFM, -1, -1}, + {MHz(118), MHz(164), FT897_ALL_RX_MODES, -1, -1}, + {MHz(420), MHz(470), FT897_ALL_RX_MODES, -1, -1}, + RIG_FRNG_END, + }, + .tx_range_list2 = { + FRQ_RNG_HF(2, FT897_OTHER_TX_MODES, W(10), W(100), FT897_VFO_ALL, FT897_ANTS), + /* AM class */ + FRQ_RNG_HF(2, FT897_AM_TX_MODES, W(2.5), W(25), FT897_VFO_ALL, FT897_ANTS), + FRQ_RNG_2m(2, FT897_OTHER_TX_MODES, W(5), W(50), FT897_VFO_ALL, FT897_ANTS), + /* AM class */ + FRQ_RNG_2m(2, FT897_AM_TX_MODES, W(2.5), W(25), FT897_VFO_ALL, FT897_ANTS), + FRQ_RNG_70cm(2, FT897_OTHER_TX_MODES, W(2), W(20), FT897_VFO_ALL, FT897_ANTS), + /* AM class */ + FRQ_RNG_70cm(2, FT897_AM_TX_MODES, W(0.5), W(5), FT897_VFO_ALL, FT897_ANTS), + RIG_FRNG_END, + }, + + .tuning_steps = { + {FT897_SSB_CW_RX_MODES, 10}, + {FT897_SSB_CW_RX_MODES, 100}, + {FT897_AM_FM_RX_MODES, 10}, + {FT897_AM_FM_RX_MODES, 100}, + RIG_TS_END, + }, + + /* filter selection is not supported by CAT functions + * per testing by Rich Newsom, WA4SXZ + */ + .filters = { +// {RIG_MODE_SSB, kHz(2.2)}, +// {RIG_MODE_CW, kHz(2.2)}, +// {RIG_MODE_CWR, kHz(2.2)}, +// {RIG_MODE_RTTY, kHz(2.2)}, +// {RIG_MODE_AM, kHz(6)}, +// {RIG_MODE_FM, kHz(15)}, +// {RIG_MODE_PKTFM, kHz(15)}, +// {RIG_MODE_FM, kHz(9)}, +// {RIG_MODE_PKTFM, kHz(9)}, +// {RIG_MODE_WFM, kHz(230)}, /* ?? */ + RIG_FLT_END, + }, + + .rig_init = ft897_init, + .rig_cleanup = ft897_cleanup, + .rig_open = ft897_open, + .rig_close = ft897_close, + .get_vfo = ft857_get_vfo, + .set_vfo = ft857_set_vfo, + .set_freq = ft897_set_freq, + .get_freq = ft897_get_freq, + .set_mode = ft897_set_mode, + .get_mode = ft897_get_mode, + .set_ptt = ft897_set_ptt, + .get_ptt = ft897_get_ptt, + .get_dcd = ft897_get_dcd, + .set_rptr_shift = ft897_set_rptr_shift, + .set_rptr_offs = ft897_set_rptr_offs, + .set_split_vfo = ft897_set_split_vfo, + .get_split_vfo = ft897_get_split_vfo, + .set_rit = ft897_set_rit, + .set_dcs_code = ft897_set_dcs_code, + .set_ctcss_tone = ft897_set_ctcss_tone, + .set_dcs_sql = ft897_set_dcs_sql, + .set_ctcss_sql = ft897_set_ctcss_sql, + .set_powerstat = ft817_set_powerstat, + .get_level = ft897_get_level, + .set_func = ft897_set_func, + .vfo_op = ft897_vfo_op, +}; + /* ---------------------------------------------------------------------- */ int ft897_init(RIG *rig) diff --git a/rigs/yaesu/yaesu.c b/rigs/yaesu/yaesu.c index a2af869e..c421f430 100644 --- a/rigs/yaesu/yaesu.c +++ b/rigs/yaesu/yaesu.c @@ -114,6 +114,7 @@ DECLARE_INITRIG_BACKEND(yaesu) rig_register(&ftdx101d_caps); rig_register(&ft818_caps); rig_register(&ftdx10_caps); + rig_register(&ft897d_caps); return RIG_OK; } diff --git a/rigs/yaesu/yaesu.h b/rigs/yaesu/yaesu.h index 8e84fc27..2392d6dd 100644 --- a/rigs/yaesu/yaesu.h +++ b/rigs/yaesu/yaesu.h @@ -55,6 +55,7 @@ extern const struct rig_caps ft767gx_caps; extern const struct rig_caps ft817_caps; extern const struct rig_caps ft857_caps; extern const struct rig_caps ft897_caps; +extern const struct rig_caps ft897d_caps; extern const struct rig_caps ft847_caps; extern const struct rig_caps ft840_caps; extern const struct rig_caps ft890_caps; ----------------------------------------------------------------------- Summary of changes: include/hamlib/riglist.h | 1 + rigs/yaesu/ft897.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++ rigs/yaesu/yaesu.c | 1 + rigs/yaesu/yaesu.h | 1 + 4 files changed, 144 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-03 15:17:58
|
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 54ab3b951d2eb3a01263b37b72b64c6e67a50827 (commit) from cf44a1a4e5fa5bfc900fd844624c7684683b0f26 (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 54ab3b951d2eb3a01263b37b72b64c6e67a50827 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 3 09:16:20 2021 -0600 Add RIG_CAPS_STATUS_CPTR WSJT-X HamlibTransceiver.cpp now has no dependencies on structure offsets https://github.com/Hamlib/Hamlib/issues/484 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b406b000..cc731fb7 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1953,7 +1953,8 @@ enum rig_caps_int_e { enum rig_caps_cptr_e { RIG_CAPS_VERSION_CPTR, RIG_CAPS_MFG_NAME_CPTR, - RIG_CAPS_MODEL_NAME_CPTR + RIG_CAPS_MODEL_NAME_CPTR, + RIG_CAPS_STATUS_CPTR }; /** diff --git a/src/misc.c b/src/misc.c index 1824a8c8..a504376e 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2120,6 +2120,9 @@ const char *rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_ca case RIG_CAPS_MODEL_NAME_CPTR: return caps->model_name; + case RIG_CAPS_STATUS_CPTR: + return rig_strstatus(caps->status); + default: rig_debug(RIG_DEBUG_ERR, "%s: Unknown requested rig_caps value=%d\n", __func__, rig_caps); return "Unknown caps value"; ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 3 ++- src/misc.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-03 14:26:22
|
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 cf44a1a4e5fa5bfc900fd844624c7684683b0f26 (commit) via 90bdf5248c4dffd8a4691386d36108839dd31dae (commit) via 1994abd03125a47133f52f524c186f015493070b (commit) from 5fdf5f0e63e6e82b683dab48d7b1ed5fd0449c0c (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 cf44a1a4e5fa5bfc900fd844624c7684683b0f26 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 3 08:19:16 2021 -0600 Change all rig_level_e enums to 64BIT Some compilers couldnt' figure out the correct size https://github.com/Hamlib/Hamlib/issues/486 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 41caa86d..b406b000 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -844,76 +844,75 @@ typedef union { * * \sa rig_parse_level(), rig_strlevel() */ -enum rig_level_e { - RIG_LEVEL_NONE = 0, /*!< '' -- No Level */ - RIG_LEVEL_PREAMP = (1 << 0), /*!< \c PREAMP -- Preamp, arg int (dB) */ - RIG_LEVEL_ATT = (1 << 1), /*!< \c ATT -- Attenuator, arg int (dB) */ - RIG_LEVEL_VOXDELAY = (1 << 2), /*!< \c VOXDELAY -- VOX delay, arg int (tenth of seconds) */ - RIG_LEVEL_AF = (1 << 3), /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */ - RIG_LEVEL_RF = (1 << 4), /*!< \c RF -- RF gain (not TX power), arg float [0.0 ... 1.0] */ - RIG_LEVEL_SQL = (1 << 5), /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */ - RIG_LEVEL_IF = (1 << 6), /*!< \c IF -- IF, arg int (Hz) */ - RIG_LEVEL_APF = (1 << 7), /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */ - RIG_LEVEL_NR = (1 << 8), /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */ - RIG_LEVEL_PBT_IN = (1 << 9), /*!< \c PBT_IN -- Twin PBT (inside), arg float [0.0 ... 1.0] */ - RIG_LEVEL_PBT_OUT = (1 << 10), /*!< \c PBT_OUT -- Twin PBT (outside), arg float [0.0 ... 1.0] */ - RIG_LEVEL_CWPITCH = (1 << 11), /*!< \c CWPITCH -- CW pitch, arg int (Hz) */ - RIG_LEVEL_RFPOWER = (1 << 12), /*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */ - RIG_LEVEL_MICGAIN = (1 << 13), /*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */ - RIG_LEVEL_KEYSPD = (1 << 14), /*!< \c KEYSPD -- Key Speed, arg int (WPM) */ - RIG_LEVEL_NOTCHF = (1 << 15), /*!< \c NOTCHF -- Notch Freq., arg int (Hz) */ - RIG_LEVEL_COMP = (1 << 16), /*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */ - RIG_LEVEL_AGC = (1 << 17), /*!< \c AGC -- AGC, arg int (see enum agc_level_e) */ - RIG_LEVEL_BKINDL = (1 << 18), /*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */ - RIG_LEVEL_BALANCE = (1 << 19), /*!< \c BAL -- Balance (Dual Watch), arg float [0.0 ... 1.0] */ - RIG_LEVEL_METER = (1 << 20), /*!< \c METER -- Display meter, arg int (see enum meter_level_e) */ - RIG_LEVEL_VOXGAIN = (1 << 21), /*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */ - RIG_LEVEL_ANTIVOX = (1 << 22), /*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */ - RIG_LEVEL_SLOPE_LOW = (1 << 23), /*!< \c SLOPE_LOW -- Slope tune, low frequency cut, */ - RIG_LEVEL_SLOPE_HIGH = (1 << 24), /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, */ - RIG_LEVEL_BKIN_DLYMS = (1 << 25), /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */ +typedef uint64_t rig_level_e; +#define RIG_LEVEL_NONE 0 /*!< '' -- No Level */ +#define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0) /*!< \c PREAMP -- Preamp, arg int (dB) */ +#define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1) /*!< \c ATT -- Attenuator, arg int (dB) */ +#define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2) /*!< \c VOXDELAY -- VOX delay, arg int (tenth of seconds) */ +#define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3) /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4) /*!< \c RF -- RF gain (not TX power) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5) /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6) /*!< \c IF -- IF, arg int (Hz) */ +#define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7) /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8) /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9) /*!< \c PBT_IN -- Twin PBT (inside) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10) /*!< \c PBT_OUT -- Twin PBT (outside) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11) /*!< \c CWPITCH -- CW pitch, arg int (Hz) */ +#define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12) /*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13) /*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14) /*!< \c KEYSPD -- Key Speed, arg int (WPM) */ +#define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15) /*!< \c NOTCHF -- Notch Freq., arg int (Hz) */ +#define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16) /*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17) /*!< \c AGC -- AGC, arg int (see enum agc_level_e) */ +#define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18) /*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */ +#define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19) /*!< \c BAL -- Balance (Dual Watch) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20) /*!< \c METER -- Display meter, arg int (see enum meter_level_e) */ +#define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21) /*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22) /*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23) /*!< \c SLOPE_LOW -- Slope tune, low frequency cut, */ +#define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24) /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, */ +#define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25) /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */ /*!< These are not settable */ - RIG_LEVEL_RAWSTR = (1 << 26), /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */ - RIG_LEVEL_SQLSTAT = (1 << 27), /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */ - RIG_LEVEL_SWR = (1 << 28), /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */ - RIG_LEVEL_ALC = (1 << 29), /*!< \c ALC -- ALC, arg float */ - RIG_LEVEL_STRENGTH = (1 << 30), /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */ - /* RIG_LEVEL_BWC = (1<<31) */ /*!< Bandwidth Control, arg int (Hz) */ - RIG_LEVEL_RFPOWER_METER = CONSTANT_64BIT_FLAG(32), /*!< \c RFPOWER_METER -- RF power output meter, arg float [0.0 ... 1.0] (percentage of maximum power) */ - RIG_LEVEL_COMP_METER = CONSTANT_64BIT_FLAG(33), /*!< \c COMP_METER -- Audio output level compression meter, arg float (dB) */ - RIG_LEVEL_VD_METER = CONSTANT_64BIT_FLAG(34), /*!< \c VD_METER -- Input voltage level meter, arg float (V, volts) */ - RIG_LEVEL_ID_METER = CONSTANT_64BIT_FLAG(35), /*!< \c ID_METER -- Current draw meter, arg float (A, amperes) */ - - RIG_LEVEL_NOTCHF_RAW = CONSTANT_64BIT_FLAG(36), /*!< \c NOTCHF_RAW -- Notch Freq., arg float [0.0 ... 1.0] */ - RIG_LEVEL_MONITOR_GAIN = CONSTANT_64BIT_FLAG(37), /*!< \c MONITOR_GAIN -- Monitor gain (level for monitoring of transmitted audio), arg float [0.0 ... 1.0] */ - RIG_LEVEL_NB = CONSTANT_64BIT_FLAG(38), /*!< \c NB -- Noise Blanker level, arg float [0.0 ... 1.0] */ - RIG_LEVEL_RFPOWER_METER_WATTS = CONSTANT_64BIT_FLAG(39), /*!< \c RFPOWER_METER_WATTS -- RF power output meter, arg float [0.0 ... MAX] (output power in watts) */ - RIG_LEVEL_40 = CONSTANT_64BIT_FLAG(40), /*!< \c Future use */ - RIG_LEVEL_41 = CONSTANT_64BIT_FLAG(41), /*!< \c Future use */ - RIG_LEVEL_42 = CONSTANT_64BIT_FLAG(42), /*!< \c Future use */ - RIG_LEVEL_43 = CONSTANT_64BIT_FLAG(43), /*!< \c Future use */ - RIG_LEVEL_44 = CONSTANT_64BIT_FLAG(44), /*!< \c Future use */ - RIG_LEVEL_45 = CONSTANT_64BIT_FLAG(45), /*!< \c Future use */ - RIG_LEVEL_46 = CONSTANT_64BIT_FLAG(46), /*!< \c Future use */ - RIG_LEVEL_47 = CONSTANT_64BIT_FLAG(47), /*!< \c Future use */ - RIG_LEVEL_48 = CONSTANT_64BIT_FLAG(48), /*!< \c Future use */ - RIG_LEVEL_49 = CONSTANT_64BIT_FLAG(49), /*!< \c Future use */ - RIG_LEVEL_50 = CONSTANT_64BIT_FLAG(50), /*!< \c Future use */ - RIG_LEVEL_51 = CONSTANT_64BIT_FLAG(51), /*!< \c Future use */ - RIG_LEVEL_52 = CONSTANT_64BIT_FLAG(52), /*!< \c Future use */ - RIG_LEVEL_53 = CONSTANT_64BIT_FLAG(53), /*!< \c Future use */ - RIG_LEVEL_54 = CONSTANT_64BIT_FLAG(54), /*!< \c Future use */ - RIG_LEVEL_55 = CONSTANT_64BIT_FLAG(55), /*!< \c Future use */ - RIG_LEVEL_56 = CONSTANT_64BIT_FLAG(56), /*!< \c Future use */ - RIG_LEVEL_57 = CONSTANT_64BIT_FLAG(57), /*!< \c Future use */ - RIG_LEVEL_58 = CONSTANT_64BIT_FLAG(58), /*!< \c Future use */ - RIG_LEVEL_59 = CONSTANT_64BIT_FLAG(59), /*!< \c Future use */ - RIG_LEVEL_60 = CONSTANT_64BIT_FLAG(60), /*!< \c Future use */ - RIG_LEVEL_61 = CONSTANT_64BIT_FLAG(61), /*!< \c Future use */ - RIG_LEVEL_62 = CONSTANT_64BIT_FLAG(62), /*!< \c Future use */ - RIG_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< \c Future use */ -}; +#define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26) /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */ +#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */ +#define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28) /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */ +#define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29) /*!< \c ALC -- ALC, arg float */ +#define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */ + /* RIG_LEVEL_BWC (1<<31) */ /*!< Bandwidth Control, arg int (Hz) */ +#define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32) /*!< \c RFPOWER_METER -- RF power output meter, arg float [0.0 ... 1.0] (percentage of maximum power) */ +#define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33) /*!< \c COMP_METER -- Audio output level compression meter, arg float (dB) */ +#define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34) /*!< \c VD_METER -- Input voltage level meter, arg float (V, volts) */ +#define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35) /*!< \c ID_METER -- Current draw meter, arg float (A, amperes) */ + +#define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36) /*!< \c NOTCHF_RAW -- Notch Freq., arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37) /*!< \c MONITOR_GAIN -- Monitor gain (level for monitoring of transmitted audio) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38) /*!< \c NB -- Noise Blanker level, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39) /*!< \c RFPOWER_METER_WATTS -- RF power output meter, arg float [0.0 ... MAX] (output power in watts) */ +#define RIG_LEVEL_40 CONSTANT_64BIT_FLAG(40) /*!< \c Future use */ +#define RIG_LEVEL_41 CONSTANT_64BIT_FLAG(41) /*!< \c Future use */ +#define RIG_LEVEL_42 CONSTANT_64BIT_FLAG(42) /*!< \c Future use */ +#define RIG_LEVEL_43 CONSTANT_64BIT_FLAG(43) /*!< \c Future use */ +#define RIG_LEVEL_44 CONSTANT_64BIT_FLAG(44) /*!< \c Future use */ +#define RIG_LEVEL_45 CONSTANT_64BIT_FLAG(45) /*!< \c Future use */ +#define RIG_LEVEL_46 CONSTANT_64BIT_FLAG(46) /*!< \c Future use */ +#define RIG_LEVEL_47 CONSTANT_64BIT_FLAG(47) /*!< \c Future use */ +#define RIG_LEVEL_48 CONSTANT_64BIT_FLAG(48) /*!< \c Future use */ +#define RIG_LEVEL_49 CONSTANT_64BIT_FLAG(49) /*!< \c Future use */ +#define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50) /*!< \c Future use */ +#define RIG_LEVEL_51 CONSTANT_64BIT_FLAG(51) /*!< \c Future use */ +#define RIG_LEVEL_52 CONSTANT_64BIT_FLAG(52) /*!< \c Future use */ +#define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53) /*!< \c Future use */ +#define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54) /*!< \c Future use */ +#define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55) /*!< \c Future use */ +#define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56) /*!< \c Future use */ +#define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57) /*!< \c Future use */ +#define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58) /*!< \c Future use */ +#define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59) /*!< \c Future use */ +#define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60) /*!< \c Future use */ +#define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61) /*!< \c Future use */ +#define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62) /*!< \c Future use */ +#define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63) /*!< \c Future use */ //! @cond Doxygen_Suppress #define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB) commit 90bdf5248c4dffd8a4691386d36108839dd31dae Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 2 23:37:54 2021 -0600 Add rig_list_foreach_model https://github.com/Hamlib/Hamlib/issues/484 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 43de5a9e..41caa86d 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2876,6 +2876,10 @@ extern HAMLIB_EXPORT(int) rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t), rig_ptr_t data)); +extern HAMLIB_EXPORT(int) +rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t), + rig_ptr_t data)); + extern HAMLIB_EXPORT(int) rig_load_backend HAMLIB_PARAMS((const char *be_name)); diff --git a/src/register.c b/src/register.c index e9ea57d4..85ee3f3f 100644 --- a/src/register.c +++ b/src/register.c @@ -382,6 +382,41 @@ int HAMLIB_API rig_list_foreach(int (*cfunc)(const struct rig_caps *, } //! @endcond +/* + * rig_list_foreach_model + * executes cfunc on all the elements stored in the rig hash list + */ +//! @cond Doxygen_Suppress +int HAMLIB_API rig_list_foreach_model(int (*cfunc)(const rig_model_t rig_model, + rig_ptr_t), + rig_ptr_t data) +{ + struct rig_list *p; + int i; + + if (!cfunc) + { + return -RIG_EINVAL; + } + + for (i = 0; i < RIGLSTHASHSZ; i++) + { + struct rig_list *next = NULL; + + for (p = rig_hash_table[i]; p; p = next) + { + next = p->next; /* read before call in case it is unregistered */ + + if ((*cfunc)(p->caps->rig_model, data) == 0) + { + return RIG_OK; + } + } + } + + return RIG_OK; +} +//! @endcond //! @cond Doxygen_Suppress static int dummy_rig_probe(const hamlib_port_t *p, commit 1994abd03125a47133f52f524c186f015493070b Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 2 23:08:43 2021 -0600 Add ft100_get_ctcss_tone diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index cf5e8d6c..c08ca643 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -124,15 +124,14 @@ static const tone_t ft100_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, \ 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, \ - 1318, 1365, 1413, 1462, 1514, 1567, 1622, 1679, \ - 1738, 1799, 1862, 1928, \ - 2035, 2107, 2181, 2257, 2336, 2418, 2503, \ - 0, + 1318, 1365, 1413, 1462, 1514, 1567, 1622, 1679, 1738, 1799, \ + 1738, 1799, 1862, 1928, 2035, 2107, 2181, 2257, 2336, 2418, \ + 2503, 0 }; static const tone_t ft100_dcs_list[] = { - 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, \ + 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, \ 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, \ 132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, \ 212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, \ @@ -175,7 +174,7 @@ const struct rig_caps ft100_caps = RIG_MODEL(RIG_MODEL_FT100), .model_name = "FT-100", .mfg_name = "Yaesu", - .version = "20201009.0", + .version = "20210102.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -283,17 +282,17 @@ const struct rig_caps ft100_caps = .get_mode = ft100_get_mode, .set_vfo = ft100_set_vfo, .get_vfo = ft100_get_vfo, - .set_ptt = ft100_set_ptt, - .get_ptt = ft100_get_ptt, + .set_ptt = ft100_set_ptt, + .get_ptt = ft100_get_ptt, .get_dcd = NULL, - .set_rptr_shift = ft100_set_rptr_shift, - .get_rptr_shift = NULL, + .set_rptr_shift = ft100_set_rptr_shift, + .get_rptr_shift = NULL, .set_rptr_offs = NULL, .get_rptr_offs = NULL, - .set_split_freq = NULL, - .get_split_freq = NULL, - .set_split_mode = NULL, - .get_split_mode = NULL, + .set_split_freq = NULL, + .get_split_freq = NULL, + .set_split_mode = NULL, + .get_split_mode = NULL, .set_split_vfo = ft100_set_split_vfo, .get_split_vfo = ft100_get_split_vfo, .set_rit = NULL, @@ -304,15 +303,15 @@ const struct rig_caps ft100_caps = .get_ts = NULL, .set_dcs_code = ft100_set_dcs_code, .get_dcs_code = NULL, - .set_ctcss_tone = ft100_set_ctcss_tone, - .get_ctcss_tone = NULL, + .set_ctcss_tone = ft100_set_ctcss_tone, + .get_ctcss_tone = ft100_get_ctcss_tone, .set_dcs_sql = NULL, .get_dcs_sql = NULL, .set_ctcss_sql = NULL, .get_ctcss_sql = NULL, .set_powerstat = NULL, .get_powerstat = NULL, - .reset = NULL, + .reset = NULL, .set_ant = NULL, .get_ant = NULL, .set_level = NULL, @@ -1088,3 +1087,21 @@ int ft100_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) return write_block(&rig_s->rigport, (char *) p_cmd, YAESU_CMD_LENGTH); } +int ft100_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone) +{ + int ret; + struct ft100_priv_data *priv = (struct ft100_priv_data *)rig->state.priv; + + ret = ft100_read_status(rig); + + if (ret != RIG_OK) + { + return ret; + } + + *tone = ft100_ctcss_list[priv->status.ctcss]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: P1=0x%02x, tone=%.1f\n", __func__, + priv->status.ctcss, *tone / 10.0); + + return RIG_OK; +} diff --git a/rigs/yaesu/ft100.h b/rigs/yaesu/ft100.h index ce784989..ad913cd3 100644 --- a/rigs/yaesu/ft100.h +++ b/rigs/yaesu/ft100.h @@ -171,7 +171,7 @@ static int ft100_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code); //static int ft100_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code); static int ft100_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone); -//static int ft100_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone); +static int ft100_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone); //static int ft100_get_info(RIG *rig, FT100_STATUS_INFO *ft100_status, FT100_METER_INFO *ft100_meter, FT100_FLAG_INFO *ft100_flags); ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 139 ++++++++++++++++++++++++++------------------------- rigs/yaesu/ft100.c | 51 ++++++++++++------- rigs/yaesu/ft100.h | 2 +- src/register.c | 35 +++++++++++++ 4 files changed, 141 insertions(+), 86 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-02 22:33:26
|
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 5fdf5f0e63e6e82b683dab48d7b1ed5fd0449c0c (commit) from 92c6d98e8ee1f0b236898fb65d75307d9df2ac06 (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 5fdf5f0e63e6e82b683dab48d7b1ed5fd0449c0c Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 2 16:32:16 2021 -0600 Fix freq_new error https://github.com/Hamlib/Hamlib/issues/485 diff --git a/src/rig.c b/src/rig.c index 5c9b64a5..18cceacb 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1395,6 +1395,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { const struct rig_caps *caps; int retcode; + freq_t freq_new = freq; rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%g\n", __func__, rig_strvfo(vfo), freq); @@ -1483,7 +1484,6 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retcode == RIG_OK && caps->get_freq != NULL) { - freq_t freq_new = freq; // verify our freq to ensure HZ mods are seen // some rigs truncate or round e.g. 1,2,5,10,20,100Hz intervals ----------------------------------------------------------------------- Summary of changes: src/rig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-02 21:35:54
|
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 92c6d98e8ee1f0b236898fb65d75307d9df2ac06 (commit) via 9726e07db69c9e2e4cabb5c27826ad5a79ab9a6e (commit) from 2bbe4c1f31b90c4ef7df140efa7947238d4a5c8f (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 92c6d98e8ee1f0b236898fb65d75307d9df2ac06 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 2 15:22:01 2021 -0600 Fix set_freq to not call get_freq if get_freq is not available Correct cache setting for set_freq https://github.com/Hamlib/Hamlib/issues/485 diff --git a/src/rig.c b/src/rig.c index 8aff645e..5c9b64a5 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1481,7 +1481,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } } - if (retcode == RIG_OK) + if (retcode == RIG_OK && caps->get_freq != NULL) { freq_t freq_new = freq; @@ -1510,15 +1510,15 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_new); } - // update our current freq too - if (vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { rig->state.current_freq = freq_new; } - - elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); - rig->state.cache.freq = freq_new; - //future 4.1 caching - set_cache_freq(rig, vfo, freq_new); - rig->state.cache.vfo_freq = vfo; } + // update our current freq too + if (vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { rig->state.current_freq = freq_new; } + + elapsed_ms(&(rig->state.cache.time_freq), HAMLIB_ELAPSED_SET); + rig->state.cache.freq = freq_new; + //future 4.1 caching + set_cache_freq(rig, vfo, freq_new); + rig->state.cache.vfo_freq = vfo; return retcode; } commit 9726e07db69c9e2e4cabb5c27826ad5a79ab9a6e Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 2 09:22:02 2021 -0600 Change rig_get_function_ptr, rig_get_caps_intg, and rig_get_caps_cptr to use rig_model_t instead of RIG* https://github.com/Hamlib/Hamlib/issues/484 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 4fabe256..43de5a9e 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1936,7 +1936,7 @@ enum rig_function_e { * */ //! @cond Doxygen_Suppress -extern void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function); +extern void *rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function); /** * \brief Enumeration of rig->caps values @@ -1962,14 +1962,14 @@ enum rig_caps_cptr_e { * */ //! @cond Doxygen_Suppress -extern int rig_get_caps_int(RIG *rig, enum rig_caps_int_e rig_caps); +extern int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps); /** * \brief Function to return char pointer value from rig->caps * */ //! @cond Doxygen_Suppress -extern const char* rig_get_caps_cptr(RIG *rig, enum rig_caps_cptr_e rig_caps); +extern const char* rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps); /** * \brief Port definition diff --git a/src/misc.c b/src/misc.c index 7274bf23..1824a8c8 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1812,261 +1812,263 @@ const char *HAMLIB_API rot_strstatus(rot_status_t status) * \param RIG* and rig_function_e * \return the corresponding function pointer */ -void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function) +void *rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function) { + const struct rig_caps *caps = rig_get_caps(rig_model); + switch (rig_function) { case RIG_FUNCTION_INIT: - return rig->caps->rig_init; + return caps->rig_init; case RIG_FUNCTION_CLEANUP: - return rig->caps->rig_cleanup; + return caps->rig_cleanup; case RIG_FUNCTION_OPEN: - return rig->caps->rig_open; + return caps->rig_open; case RIG_FUNCTION_CLOSE: - return rig->caps->rig_close; + return caps->rig_close; case RIG_FUNCTION_SET_FREQ: - return rig->caps->set_freq; + return caps->set_freq; case RIG_FUNCTION_GET_FREQ: - return rig->caps->get_freq; + return caps->get_freq; case RIG_FUNCTION_SET_MODE: - return rig->caps->set_mode; + return caps->set_mode; case RIG_FUNCTION_GET_MODE: - return rig->caps->get_mode; + return caps->get_mode; case RIG_FUNCTION_SET_VFO: - return rig->caps->set_vfo; + return caps->set_vfo; case RIG_FUNCTION_GET_VFO: - return rig->caps->get_vfo; + return caps->get_vfo; case RIG_FUNCTION_SET_PTT: - return rig->caps->set_ptt; + return caps->set_ptt; case RIG_FUNCTION_GET_PTT: - return rig->caps->get_ptt; + return caps->get_ptt; case RIG_FUNCTION_GET_DCD: - return rig->caps->get_dcd; + return caps->get_dcd; case RIG_FUNCTION_SET_RPTR_SHIFT: - return rig->caps->set_rptr_shift; + return caps->set_rptr_shift; case RIG_FUNCTION_GET_RPTR_SHIFT: - return rig->caps->get_rptr_shift; + return caps->get_rptr_shift; case RIG_FUNCTION_SET_RPTR_OFFS: - return rig->caps->set_rptr_offs; + return caps->set_rptr_offs; case RIG_FUNCTION_GET_RPTR_OFFS: - return rig->caps->get_rptr_offs; + return caps->get_rptr_offs; case RIG_FUNCTION_SET_SPLIT_FREQ: - return rig->caps->set_split_freq; + return caps->set_split_freq; case RIG_FUNCTION_GET_SPLIT_FREQ: - return rig->caps->get_split_freq; + return caps->get_split_freq; case RIG_FUNCTION_SET_SPLIT_MODE: - return rig->caps->set_split_mode; + return caps->set_split_mode; case RIG_FUNCTION_SET_SPLIT_FREQ_MODE: - return rig->caps->set_split_freq_mode; + return caps->set_split_freq_mode; case RIG_FUNCTION_GET_SPLIT_FREQ_MODE: - return rig->caps->get_split_freq_mode; + return caps->get_split_freq_mode; case RIG_FUNCTION_SET_SPLIT_VFO: - return rig->caps->set_split_vfo; + return caps->set_split_vfo; case RIG_FUNCTION_GET_SPLIT_VFO: - return rig->caps->get_split_vfo; + return caps->get_split_vfo; case RIG_FUNCTION_SET_RIT: - return rig->caps->set_rit; + return caps->set_rit; case RIG_FUNCTION_GET_RIT: - return rig->caps->get_rit; + return caps->get_rit; case RIG_FUNCTION_SET_XIT: - return rig->caps->set_xit; + return caps->set_xit; case RIG_FUNCTION_GET_XIT: - return rig->caps->get_xit; + return caps->get_xit; case RIG_FUNCTION_SET_TS: - return rig->caps->set_ts; + return caps->set_ts; case RIG_FUNCTION_GET_TS: - return rig->caps->get_ts; + return caps->get_ts; case RIG_FUNCTION_SET_DCS_CODE: - return rig->caps->set_dcs_code; + return caps->set_dcs_code; case RIG_FUNCTION_GET_DCS_CODE: - return rig->caps->get_dcs_code; + return caps->get_dcs_code; case RIG_FUNCTION_SET_TONE: - return rig->caps->set_tone; + return caps->set_tone; case RIG_FUNCTION_GET_TONE: - return rig->caps->get_tone; + return caps->get_tone; case RIG_FUNCTION_SET_CTCSS_TONE: - return rig->caps->set_ctcss_tone; + return caps->set_ctcss_tone; case RIG_FUNCTION_GET_CTCSS_TONE: - return rig->caps->get_ctcss_tone; + return caps->get_ctcss_tone; case RIG_FUNCTION_SET_DCS_SQL: - return rig->caps->set_dcs_sql; + return caps->set_dcs_sql; case RIG_FUNCTION_GET_DCS_SQL: - return rig->caps->get_dcs_sql; + return caps->get_dcs_sql; case RIG_FUNCTION_SET_TONE_SQL: - return rig->caps->set_tone_sql; + return caps->set_tone_sql; case RIG_FUNCTION_GET_TONE_SQL: - return rig->caps->get_tone_sql; + return caps->get_tone_sql; case RIG_FUNCTION_SET_CTCSS_SQL: - return rig->caps->set_ctcss_sql; + return caps->set_ctcss_sql; case RIG_FUNCTION_GET_CTCSS_SQL: - return rig->caps->get_ctcss_sql; + return caps->get_ctcss_sql; case RIG_FUNCTION_POWER2MW: - return rig->caps->power2mW; + return caps->power2mW; case RIG_FUNCTION_MW2POWER: - return rig->caps->mW2power; + return caps->mW2power; case RIG_FUNCTION_SET_POWERSTAT: - return rig->caps->set_powerstat; + return caps->set_powerstat; case RIG_FUNCTION_GET_POWERSTAT: - return rig->caps->get_powerstat; + return caps->get_powerstat; case RIG_FUNCTION_RESET: - return rig->caps->reset; + return caps->reset; case RIG_FUNCTION_SET_ANT: - return rig->caps->set_ant; + return caps->set_ant; case RIG_FUNCTION_GET_ANT: - return rig->caps->get_ant; + return caps->get_ant; case RIG_FUNCTION_SET_LEVEL: - return rig->caps->set_level; + return caps->set_level; case RIG_FUNCTION_GET_LEVEL: - return rig->caps->get_level; + return caps->get_level; case RIG_FUNCTION_SET_FUNC: - return rig->caps->set_func; + return caps->set_func; case RIG_FUNCTION_GET_FUNC: - return rig->caps->get_func; + return caps->get_func; case RIG_FUNCTION_SET_PARM: - return rig->caps->set_parm; + return caps->set_parm; case RIG_FUNCTION_GET_PARM: - return rig->caps->get_parm; + return caps->get_parm; case RIG_FUNCTION_SET_EXT_LEVEL: - return rig->caps->set_ext_level; + return caps->set_ext_level; case RIG_FUNCTION_GET_EXT_LEVEL: - return rig->caps->get_ext_level; + return caps->get_ext_level; case RIG_FUNCTION_SET_EXT_FUNC: - return rig->caps->set_ext_func; + return caps->set_ext_func; case RIG_FUNCTION_GET_EXT_FUNC: - return rig->caps->get_ext_func; + return caps->get_ext_func; case RIG_FUNCTION_SET_EXT_PARM: - return rig->caps->set_ext_parm; + return caps->set_ext_parm; case RIG_FUNCTION_GET_EXT_PARM: - return rig->caps->get_ext_parm; + return caps->get_ext_parm; case RIG_FUNCTION_SET_CONF: - return rig->caps->set_conf; + return caps->set_conf; case RIG_FUNCTION_GET_CONF: - return rig->caps->get_conf; + return caps->get_conf; case RIG_FUNCTION_SEND_DTMF: - return rig->caps->send_dtmf; + return caps->send_dtmf; case RIG_FUNCTION_SEND_MORSE: - return rig->caps->send_morse; + return caps->send_morse; case RIG_FUNCTION_STOP_MORSE: - return rig->caps->stop_morse; + return caps->stop_morse; case RIG_FUNCTION_WAIT_MORSE: - return rig->caps->wait_morse; + return caps->wait_morse; case RIG_FUNCTION_SEND_VOICE_MEM: - return rig->caps->send_voice_mem; + return caps->send_voice_mem; case RIG_FUNCTION_SET_BANK: - return rig->caps->set_bank; + return caps->set_bank; case RIG_FUNCTION_SET_MEM: - return rig->caps->set_mem; + return caps->set_mem; case RIG_FUNCTION_GET_MEM: - return rig->caps->get_mem; + return caps->get_mem; case RIG_FUNCTION_VFO_OP: - return rig->caps->vfo_op; + return caps->vfo_op; case RIG_FUNCTION_SCAN: - return rig->caps->scan; + return caps->scan; case RIG_FUNCTION_SET_TRN: - return rig->caps->set_trn; + return caps->set_trn; case RIG_FUNCTION_GET_TRN: - return rig->caps->get_trn; + return caps->get_trn; case RIG_FUNCTION_DECODE_EVENT: - return rig->caps->decode_event; + return caps->decode_event; case RIG_FUNCTION_SET_CHANNEL: - return rig->caps->set_channel; + return caps->set_channel; case RIG_FUNCTION_GET_CHANNEL: - return rig->caps->get_channel; + return caps->get_channel; case RIG_FUNCTION_GET_INFO: - return rig->caps->get_info; + return caps->get_info; case RIG_FUNCTION_SET_CHAN_ALL_CB: - return rig->caps->set_chan_all_cb; + return caps->set_chan_all_cb; case RIG_FUNCTION_GET_CHAN_ALL_CB: - return rig->caps->get_chan_all_cb; + return caps->get_chan_all_cb; case RIG_FUNCTION_SET_MEM_ALL_CB: - return rig->caps->set_mem_all_cb; + return caps->set_mem_all_cb; case RIG_FUNCTION_GET_MEM_ALL_CB: - return rig->caps->get_mem_all_cb; + return caps->get_mem_all_cb; case RIG_FUNCTION_SET_VFO_OPT: - return rig->caps->set_vfo_opt; + return caps->set_vfo_opt; default: rig_debug(RIG_DEBUG_ERR, "Unknown function?? function=%d\n", rig_function); @@ -2077,21 +2079,23 @@ void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function) return RIG_OK; } -int rig_get_caps_int(RIG *rig, enum rig_caps_int_e rig_caps) +int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps) { + const struct rig_caps *caps = rig_get_caps(rig_model); + switch (rig_caps) { case RIG_CAPS_TARGETABLE_VFO: - return rig->caps->targetable_vfo; + return caps->targetable_vfo; case RIG_CAPS_RIG_MODEL: - return rig->caps->rig_model; + return caps->rig_model; case RIG_CAPS_PTT_TYPE: - return rig->caps->ptt_type; + return caps->ptt_type; case RIG_CAPS_PORT_TYPE: - return rig->caps->port_type; + return caps->port_type; default: rig_debug(RIG_DEBUG_ERR, "%s: Unknown rig_caps value=%d\n", __func__, rig_caps); @@ -2101,21 +2105,23 @@ int rig_get_caps_int(RIG *rig, enum rig_caps_int_e rig_caps) return RIG_OK; } -const char *rig_get_caps_cptr(RIG *rig, enum rig_caps_cptr_e rig_caps) +const char *rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps) { + const struct rig_caps *caps = rig_get_caps(rig_model); + switch (rig_caps) { case RIG_CAPS_VERSION_CPTR: - return rig->caps->version; + return caps->version; case RIG_CAPS_MFG_NAME_CPTR: - return rig->caps->mfg_name; + return caps->mfg_name; case RIG_CAPS_MODEL_NAME_CPTR: - return rig->caps->model_name; + return caps->model_name; default: - rig_debug(RIG_DEBUG_ERR, "%s: Unknown rig_caps value=%d\n", __func__, rig_caps); + rig_debug(RIG_DEBUG_ERR, "%s: Unknown requested rig_caps value=%d\n", __func__, rig_caps); return "Unknown caps value"; } } ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 6 +- src/misc.c | 196 ++++++++++++++++++++++++++------------------------- src/rig.c | 18 ++--- 3 files changed, 113 insertions(+), 107 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-01 21:26:53
|
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 2bbe4c1f31b90c4ef7df140efa7947238d4a5c8f (commit) via a59bdad6f5beaed1a442b9cd8bae2bcb2a7a630d (commit) via c530867165441e37958a6dc18868143f2f145a2d (commit) via aafaafd473dbb7b8174004594a1259c3e051b780 (commit) via 325dc8497b4df5920f3b4f879e110555b16a98b8 (commit) via 671f2070eb1b317b2cf5d8b47eb46386edf26ba6 (commit) via f7ff96fec85a831ee4f33f163c0a58b58fc9ca70 (commit) via 44c1645785ca9f178a578c418f85624c992a3904 (commit) from 29f56de41d0c9e9a6c34e73ec236851f0f353a9e (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 2bbe4c1f31b90c4ef7df140efa7947238d4a5c8f Merge: a59bdad6 c5308671 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 1 15:13:27 2021 -0600 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit a59bdad6f5beaed1a442b9cd8bae2bcb2a7a630d Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 1 15:12:31 2021 -0600 https://github.com/Hamlib/Hamlib/issues/484 diff --git a/NEWS b/NEWS index 909ffc57..c7a64f93 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ Copyright (C) 2000-2020 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... Version 4.1 + * Nobody should need to use rig->caps or rig->state anymore + If you need a variable added please contact us. + Note that rig->state abstraction is not implemented yet...no need known * New rig_get_caps_int and rig_get_caps_cptr functions to replace using caps-> values * New rig_get_function to replace using caps-> function pointers diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index bdfb64c8..4fabe256 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1952,9 +1952,9 @@ enum rig_caps_int_e { }; enum rig_caps_cptr_e { - RIG_CAPS_VERSION, - RIG_CAPS_MFG_NAME, - RIG_CAPS_MODEL_NAME + RIG_CAPS_VERSION_CPTR, + RIG_CAPS_MFG_NAME_CPTR, + RIG_CAPS_MODEL_NAME_CPTR }; /** diff --git a/src/misc.c b/src/misc.c index 976db49e..7274bf23 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2105,13 +2105,13 @@ const char *rig_get_caps_cptr(RIG *rig, enum rig_caps_cptr_e rig_caps) { switch (rig_caps) { - case RIG_CAPS_VERSION: + case RIG_CAPS_VERSION_CPTR: return rig->caps->version; - case RIG_CAPS_MFG_NAME: + case RIG_CAPS_MFG_NAME_CPTR: return rig->caps->mfg_name; - case RIG_CAPS_MODEL_NAME: + case RIG_CAPS_MODEL_NAME_CPTR: return rig->caps->model_name; default: commit c530867165441e37958a6dc18868143f2f145a2d Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 1 15:12:31 2021 -0600 Rename CAPS strings to have CPTR for easier editing diff --git a/NEWS b/NEWS index 909ffc57..c7a64f93 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ Copyright (C) 2000-2020 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... Version 4.1 + * Nobody should need to use rig->caps or rig->state anymore + If you need a variable added please contact us. + Note that rig->state abstraction is not implemented yet...no need known * New rig_get_caps_int and rig_get_caps_cptr functions to replace using caps-> values * New rig_get_function to replace using caps-> function pointers diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index bdfb64c8..4fabe256 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1952,9 +1952,9 @@ enum rig_caps_int_e { }; enum rig_caps_cptr_e { - RIG_CAPS_VERSION, - RIG_CAPS_MFG_NAME, - RIG_CAPS_MODEL_NAME + RIG_CAPS_VERSION_CPTR, + RIG_CAPS_MFG_NAME_CPTR, + RIG_CAPS_MODEL_NAME_CPTR }; /** diff --git a/src/misc.c b/src/misc.c index 976db49e..7274bf23 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2105,13 +2105,13 @@ const char *rig_get_caps_cptr(RIG *rig, enum rig_caps_cptr_e rig_caps) { switch (rig_caps) { - case RIG_CAPS_VERSION: + case RIG_CAPS_VERSION_CPTR: return rig->caps->version; - case RIG_CAPS_MFG_NAME: + case RIG_CAPS_MFG_NAME_CPTR: return rig->caps->mfg_name; - case RIG_CAPS_MODEL_NAME: + case RIG_CAPS_MODEL_NAME_CPTR: return rig->caps->model_name; default: commit aafaafd473dbb7b8174004594a1259c3e051b780 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 1 10:59:36 2021 -0600 Added rig_get_caps_int and rig_get_caps_cptr functions to replace using caps-> values https://github.com/Hamlib/Hamlib/issues/484 diff --git a/NEWS b/NEWS index e1407ba7..909ffc57 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ Copyright (C) 2000-2020 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... +Version 4.1 + * New rig_get_caps_int and rig_get_caps_cptr functions to replace using caps-> values + * New rig_get_function to replace using caps-> function pointers + Version 4.0 2020-11-29 * API/ABI changes, advance ABI to 4 0 0. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 3fafa6b2..bdfb64c8 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1938,6 +1938,39 @@ enum rig_function_e { //! @cond Doxygen_Suppress extern void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function); +/** + * \brief Enumeration of rig->caps values + * + */ +//! @cond Doxygen_Suppress +// values enumerated for rig->caps values +enum rig_caps_int_e { + RIG_CAPS_TARGETABLE_VFO, + RIG_CAPS_RIG_MODEL, + RIG_CAPS_PORT_TYPE, + RIG_CAPS_PTT_TYPE +}; + +enum rig_caps_cptr_e { + RIG_CAPS_VERSION, + RIG_CAPS_MFG_NAME, + RIG_CAPS_MODEL_NAME +}; + +/** + * \brief Function to return int value from rig->caps + * + */ +//! @cond Doxygen_Suppress +extern int rig_get_caps_int(RIG *rig, enum rig_caps_int_e rig_caps); + +/** + * \brief Function to return char pointer value from rig->caps + * + */ +//! @cond Doxygen_Suppress +extern const char* rig_get_caps_cptr(RIG *rig, enum rig_caps_cptr_e rig_caps); + /** * \brief Port definition * diff --git a/src/misc.c b/src/misc.c index 89aedd2a..976db49e 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2077,7 +2077,48 @@ void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function) return RIG_OK; } +int rig_get_caps_int(RIG *rig, enum rig_caps_int_e rig_caps) +{ + switch (rig_caps) + { + case RIG_CAPS_TARGETABLE_VFO: + return rig->caps->targetable_vfo; + + case RIG_CAPS_RIG_MODEL: + return rig->caps->rig_model; + + case RIG_CAPS_PTT_TYPE: + return rig->caps->ptt_type; + + case RIG_CAPS_PORT_TYPE: + return rig->caps->port_type; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: Unknown rig_caps value=%d\n", __func__, rig_caps); + return -RIG_EINVAL; + } + + return RIG_OK; +} + +const char *rig_get_caps_cptr(RIG *rig, enum rig_caps_cptr_e rig_caps) +{ + switch (rig_caps) + { + case RIG_CAPS_VERSION: + return rig->caps->version; + case RIG_CAPS_MFG_NAME: + return rig->caps->mfg_name; + + case RIG_CAPS_MODEL_NAME: + return rig->caps->model_name; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: Unknown rig_caps value=%d\n", __func__, rig_caps); + return "Unknown caps value"; + } +} //! @endcond commit 325dc8497b4df5920f3b4f879e110555b16a98b8 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 31 23:39:05 2020 -0600 Rename RIG_FUNCTION in misc.c https://github.com/Hamlib/Hamlib/issues/484 diff --git a/src/misc.c b/src/misc.c index fab7a03f..89aedd2a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1816,256 +1816,256 @@ void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function) { switch (rig_function) { - case RIG_FUNCTION_RIG_INIT: + case RIG_FUNCTION_INIT: return rig->caps->rig_init; - case RIG_FUNCTION_RIG_CLEANUP: + case RIG_FUNCTION_CLEANUP: return rig->caps->rig_cleanup; - case RIG_FUNCTION_RIG_OPEN: + case RIG_FUNCTION_OPEN: return rig->caps->rig_open; - case RIG_FUNCTION_RIG_CLOSE: + case RIG_FUNCTION_CLOSE: return rig->caps->rig_close; - case RIG_FUNCTION_RIG_SET_FREQ: + case RIG_FUNCTION_SET_FREQ: return rig->caps->set_freq; - case RIG_FUNCTION_RIG_GET_FREQ: + case RIG_FUNCTION_GET_FREQ: return rig->caps->get_freq; - case RIG_FUNCTION_RIG_SET_MODE: + case RIG_FUNCTION_SET_MODE: return rig->caps->set_mode; - case RIG_FUNCTION_RIG_GET_MODE: + case RIG_FUNCTION_GET_MODE: return rig->caps->get_mode; - case RIG_FUNCTION_RIG_SET_VFO: + case RIG_FUNCTION_SET_VFO: return rig->caps->set_vfo; - case RIG_FUNCTION_RIG_GET_VFO: + case RIG_FUNCTION_GET_VFO: return rig->caps->get_vfo; - case RIG_FUNCTION_RIG_SET_PTT: + case RIG_FUNCTION_SET_PTT: return rig->caps->set_ptt; - case RIG_FUNCTION_RIG_GET_PTT: + case RIG_FUNCTION_GET_PTT: return rig->caps->get_ptt; - case RIG_FUNCTION_RIG_GET_DCD: + case RIG_FUNCTION_GET_DCD: return rig->caps->get_dcd; - case RIG_FUNCTION_RIG_SET_RPTR_SHIFT: + case RIG_FUNCTION_SET_RPTR_SHIFT: return rig->caps->set_rptr_shift; - case RIG_FUNCTION_RIG_GET_RPTR_SHIFT: + case RIG_FUNCTION_GET_RPTR_SHIFT: return rig->caps->get_rptr_shift; - case RIG_FUNCTION_RIG_SET_RPTR_OFFS: + case RIG_FUNCTION_SET_RPTR_OFFS: return rig->caps->set_rptr_offs; - case RIG_FUNCTION_RIG_GET_RPTR_OFFS: + case RIG_FUNCTION_GET_RPTR_OFFS: return rig->caps->get_rptr_offs; - case RIG_FUNCTION_RIG_SET_SPLIT_FREQ: + case RIG_FUNCTION_SET_SPLIT_FREQ: return rig->caps->set_split_freq; - case RIG_FUNCTION_RIG_GET_SPLIT_FREQ: + case RIG_FUNCTION_GET_SPLIT_FREQ: return rig->caps->get_split_freq; - case RIG_FUNCTION_RIG_SET_SPLIT_MODE: + case RIG_FUNCTION_SET_SPLIT_MODE: return rig->caps->set_split_mode; - case RIG_FUNCTION_RIG_SET_SPLIT_FREQ_MODE: + case RIG_FUNCTION_SET_SPLIT_FREQ_MODE: return rig->caps->set_split_freq_mode; - case RIG_FUNCTION_RIG_GET_SPLIT_FREQ_MODE: + case RIG_FUNCTION_GET_SPLIT_FREQ_MODE: return rig->caps->get_split_freq_mode; - case RIG_FUNCTION_RIG_SET_SPLIT_VFO: + case RIG_FUNCTION_SET_SPLIT_VFO: return rig->caps->set_split_vfo; - case RIG_FUNCTION_RIG_GET_SPLIT_VFO: + case RIG_FUNCTION_GET_SPLIT_VFO: return rig->caps->get_split_vfo; - case RIG_FUNCTION_RIG_SET_RIT: + case RIG_FUNCTION_SET_RIT: return rig->caps->set_rit; - case RIG_FUNCTION_RIG_GET_RIT: + case RIG_FUNCTION_GET_RIT: return rig->caps->get_rit; - case RIG_FUNCTION_RIG_SET_XIT: + case RIG_FUNCTION_SET_XIT: return rig->caps->set_xit; - case RIG_FUNCTION_RIG_GET_XIT: + case RIG_FUNCTION_GET_XIT: return rig->caps->get_xit; - case RIG_FUNCTION_RIG_SET_TS: + case RIG_FUNCTION_SET_TS: return rig->caps->set_ts; - case RIG_FUNCTION_RIG_GET_TS: + case RIG_FUNCTION_GET_TS: return rig->caps->get_ts; - case RIG_FUNCTION_RIG_SET_DCS_CODE: + case RIG_FUNCTION_SET_DCS_CODE: return rig->caps->set_dcs_code; - case RIG_FUNCTION_RIG_GET_DCS_CODE: + case RIG_FUNCTION_GET_DCS_CODE: return rig->caps->get_dcs_code; - case RIG_FUNCTION_RIG_SET_TONE: + case RIG_FUNCTION_SET_TONE: return rig->caps->set_tone; - case RIG_FUNCTION_RIG_GET_TONE: + case RIG_FUNCTION_GET_TONE: return rig->caps->get_tone; - case RIG_FUNCTION_RIG_SET_CTCSS_TONE: + case RIG_FUNCTION_SET_CTCSS_TONE: return rig->caps->set_ctcss_tone; - case RIG_FUNCTION_RIG_GET_CTCSS_TONE: + case RIG_FUNCTION_GET_CTCSS_TONE: return rig->caps->get_ctcss_tone; - case RIG_FUNCTION_RIG_SET_DCS_SQL: + case RIG_FUNCTION_SET_DCS_SQL: return rig->caps->set_dcs_sql; - case RIG_FUNCTION_RIG_GET_DCS_SQL: + case RIG_FUNCTION_GET_DCS_SQL: return rig->caps->get_dcs_sql; - case RIG_FUNCTION_RIG_SET_TONE_SQL: + case RIG_FUNCTION_SET_TONE_SQL: return rig->caps->set_tone_sql; - case RIG_FUNCTION_RIG_GET_TONE_SQL: + case RIG_FUNCTION_GET_TONE_SQL: return rig->caps->get_tone_sql; - case RIG_FUNCTION_RIG_SET_CTCSS_SQL: + case RIG_FUNCTION_SET_CTCSS_SQL: return rig->caps->set_ctcss_sql; - case RIG_FUNCTION_RIG_GET_CTCSS_SQL: + case RIG_FUNCTION_GET_CTCSS_SQL: return rig->caps->get_ctcss_sql; - case RIG_FUNCTION_RIG_POWER2MW: + case RIG_FUNCTION_POWER2MW: return rig->caps->power2mW; - case RIG_FUNCTION_RIG_MW2POWER: + case RIG_FUNCTION_MW2POWER: return rig->caps->mW2power; - case RIG_FUNCTION_RIG_SET_POWERSTAT: + case RIG_FUNCTION_SET_POWERSTAT: return rig->caps->set_powerstat; - case RIG_FUNCTION_RIG_GET_POWERSTAT: + case RIG_FUNCTION_GET_POWERSTAT: return rig->caps->get_powerstat; - case RIG_FUNCTION_RIG_RESET: + case RIG_FUNCTION_RESET: return rig->caps->reset; - case RIG_FUNCTION_RIG_SET_ANT: + case RIG_FUNCTION_SET_ANT: return rig->caps->set_ant; - case RIG_FUNCTION_RIG_GET_ANT: + case RIG_FUNCTION_GET_ANT: return rig->caps->get_ant; - case RIG_FUNCTION_RIG_SET_LEVEL: + case RIG_FUNCTION_SET_LEVEL: return rig->caps->set_level; - case RIG_FUNCTION_RIG_GET_LEVEL: + case RIG_FUNCTION_GET_LEVEL: return rig->caps->get_level; - case RIG_FUNCTION_RIG_SET_FUNC: + case RIG_FUNCTION_SET_FUNC: return rig->caps->set_func; - case RIG_FUNCTION_RIG_GET_FUNC: + case RIG_FUNCTION_GET_FUNC: return rig->caps->get_func; - case RIG_FUNCTION_RIG_SET_PARM: + case RIG_FUNCTION_SET_PARM: return rig->caps->set_parm; - case RIG_FUNCTION_RIG_GET_PARM: + case RIG_FUNCTION_GET_PARM: return rig->caps->get_parm; - case RIG_FUNCTION_RIG_SET_EXT_LEVEL: + case RIG_FUNCTION_SET_EXT_LEVEL: return rig->caps->set_ext_level; - case RIG_FUNCTION_RIG_GET_EXT_LEVEL: + case RIG_FUNCTION_GET_EXT_LEVEL: return rig->caps->get_ext_level; - case RIG_FUNCTION_RIG_SET_EXT_FUNC: + case RIG_FUNCTION_SET_EXT_FUNC: return rig->caps->set_ext_func; - case RIG_FUNCTION_RIG_GET_EXT_FUNC: + case RIG_FUNCTION_GET_EXT_FUNC: return rig->caps->get_ext_func; - case RIG_FUNCTION_RIG_SET_EXT_PARM: + case RIG_FUNCTION_SET_EXT_PARM: return rig->caps->set_ext_parm; - case RIG_FUNCTION_RIG_GET_EXT_PARM: + case RIG_FUNCTION_GET_EXT_PARM: return rig->caps->get_ext_parm; - case RIG_FUNCTION_RIG_SET_CONF: + case RIG_FUNCTION_SET_CONF: return rig->caps->set_conf; - case RIG_FUNCTION_RIG_GET_CONF: + case RIG_FUNCTION_GET_CONF: return rig->caps->get_conf; - case RIG_FUNCTION_RIG_SEND_DTMF: + case RIG_FUNCTION_SEND_DTMF: return rig->caps->send_dtmf; - case RIG_FUNCTION_RIG_SEND_MORSE: + case RIG_FUNCTION_SEND_MORSE: return rig->caps->send_morse; - case RIG_FUNCTION_RIG_STOP_MORSE: + case RIG_FUNCTION_STOP_MORSE: return rig->caps->stop_morse; - case RIG_FUNCTION_RIG_WAIT_MORSE: + case RIG_FUNCTION_WAIT_MORSE: return rig->caps->wait_morse; - case RIG_FUNCTION_RIG_SEND_VOICE_MEM: + case RIG_FUNCTION_SEND_VOICE_MEM: return rig->caps->send_voice_mem; - case RIG_FUNCTION_RIG_SET_BANK: + case RIG_FUNCTION_SET_BANK: return rig->caps->set_bank; - case RIG_FUNCTION_RIG_SET_MEM: + case RIG_FUNCTION_SET_MEM: return rig->caps->set_mem; - case RIG_FUNCTION_RIG_GET_MEM: + case RIG_FUNCTION_GET_MEM: return rig->caps->get_mem; - case RIG_FUNCTION_RIG_VFO_OP: + case RIG_FUNCTION_VFO_OP: return rig->caps->vfo_op; - case RIG_FUNCTION_RIG_SCAN: + case RIG_FUNCTION_SCAN: return rig->caps->scan; - case RIG_FUNCTION_RIG_SET_TRN: + case RIG_FUNCTION_SET_TRN: return rig->caps->set_trn; - case RIG_FUNCTION_RIG_GET_TRN: + case RIG_FUNCTION_GET_TRN: return rig->caps->get_trn; - case RIG_FUNCTION_RIG_DECODE_EVENT: + case RIG_FUNCTION_DECODE_EVENT: return rig->caps->decode_event; - case RIG_FUNCTION_RIG_SET_CHANNEL: + case RIG_FUNCTION_SET_CHANNEL: return rig->caps->set_channel; - case RIG_FUNCTION_RIG_GET_CHANNEL: + case RIG_FUNCTION_GET_CHANNEL: return rig->caps->get_channel; - case RIG_FUNCTION_RIG_GET_INFO: + case RIG_FUNCTION_GET_INFO: return rig->caps->get_info; - case RIG_FUNCTION_RIG_SET_CHAN_ALL_CB: + case RIG_FUNCTION_SET_CHAN_ALL_CB: return rig->caps->set_chan_all_cb; - case RIG_FUNCTION_RIG_GET_CHAN_ALL_CB: + case RIG_FUNCTION_GET_CHAN_ALL_CB: return rig->caps->get_chan_all_cb; - case RIG_FUNCTION_RIG_SET_MEM_ALL_CB: + case RIG_FUNCTION_SET_MEM_ALL_CB: return rig->caps->set_mem_all_cb; - case RIG_FUNCTION_RIG_GET_MEM_ALL_CB: + case RIG_FUNCTION_GET_MEM_ALL_CB: return rig->caps->get_mem_all_cb; - case RIG_FUNCTION_RIG_SET_VFO_OPT: + case RIG_FUNCTION_SET_VFO_OPT: return rig->caps->set_vfo_opt; default: commit 671f2070eb1b317b2cf5d8b47eb46386edf26ba6 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 31 23:31:27 2020 -0600 Rename RIG_FUNCTION enums to shorten them up a bit https://github.com/Hamlib/Hamlib/issues/484 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 39f7d433..3fafa6b2 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1845,90 +1845,90 @@ struct rig_caps { //! @cond Doxygen_Suppress // all functions enumerated for rig_get_function_ptr enum rig_function_e { - RIG_FUNCTION_RIG_INIT, - RIG_FUNCTION_RIG_CLEANUP, - RIG_FUNCTION_RIG_OPEN, - RIG_FUNCTION_RIG_CLOSE, - RIG_FUNCTION_RIG_SET_FREQ, - RIG_FUNCTION_RIG_GET_FREQ, - RIG_FUNCTION_RIG_SET_MODE, - RIG_FUNCTION_RIG_GET_MODE, - RIG_FUNCTION_RIG_SET_VFO, - RIG_FUNCTION_RIG_GET_VFO, - RIG_FUNCTION_RIG_SET_PTT, - RIG_FUNCTION_RIG_GET_PTT, - RIG_FUNCTION_RIG_GET_DCD, - RIG_FUNCTION_RIG_SET_RPTR_SHIFT, - RIG_FUNCTION_RIG_GET_RPTR_SHIFT, - RIG_FUNCTION_RIG_SET_RPTR_OFFS, - RIG_FUNCTION_RIG_GET_RPTR_OFFS, - RIG_FUNCTION_RIG_SET_SPLIT_FREQ, - RIG_FUNCTION_RIG_GET_SPLIT_FREQ, - RIG_FUNCTION_RIG_SET_SPLIT_MODE, - RIG_FUNCTION_RIG_SET_SPLIT_FREQ_MODE, - RIG_FUNCTION_RIG_GET_SPLIT_FREQ_MODE, - RIG_FUNCTION_RIG_SET_SPLIT_VFO, - RIG_FUNCTION_RIG_GET_SPLIT_VFO, - RIG_FUNCTION_RIG_SET_RIT, - RIG_FUNCTION_RIG_GET_RIT, - RIG_FUNCTION_RIG_SET_XIT, - RIG_FUNCTION_RIG_GET_XIT, - RIG_FUNCTION_RIG_SET_TS, - RIG_FUNCTION_RIG_GET_TS, - RIG_FUNCTION_RIG_SET_DCS_CODE, - RIG_FUNCTION_RIG_GET_DCS_CODE, - RIG_FUNCTION_RIG_SET_TONE, - RIG_FUNCTION_RIG_GET_TONE, - RIG_FUNCTION_RIG_SET_CTCSS_TONE, - RIG_FUNCTION_RIG_GET_CTCSS_TONE, - RIG_FUNCTION_RIG_SET_DCS_SQL, - RIG_FUNCTION_RIG_GET_DCS_SQL, - RIG_FUNCTION_RIG_SET_TONE_SQL, - RIG_FUNCTION_RIG_GET_TONE_SQL, - RIG_FUNCTION_RIG_SET_CTCSS_SQL, - RIG_FUNCTION_RIG_GET_CTCSS_SQL, - RIG_FUNCTION_RIG_POWER2MW, - RIG_FUNCTION_RIG_MW2POWER, - RIG_FUNCTION_RIG_SET_POWERSTAT, - RIG_FUNCTION_RIG_GET_POWERSTAT, - RIG_FUNCTION_RIG_RESET, - RIG_FUNCTION_RIG_SET_ANT, - RIG_FUNCTION_RIG_GET_ANT, - RIG_FUNCTION_RIG_SET_LEVEL, - RIG_FUNCTION_RIG_GET_LEVEL, - RIG_FUNCTION_RIG_SET_FUNC, - RIG_FUNCTION_RIG_GET_FUNC, - RIG_FUNCTION_RIG_SET_PARM, - RIG_FUNCTION_RIG_GET_PARM, - RIG_FUNCTION_RIG_SET_EXT_LEVEL, - RIG_FUNCTION_RIG_GET_EXT_LEVEL, - RIG_FUNCTION_RIG_SET_EXT_FUNC, - RIG_FUNCTION_RIG_GET_EXT_FUNC, - RIG_FUNCTION_RIG_SET_EXT_PARM, - RIG_FUNCTION_RIG_GET_EXT_PARM, - RIG_FUNCTION_RIG_SET_CONF, - RIG_FUNCTION_RIG_GET_CONF, - RIG_FUNCTION_RIG_SEND_DTMF, - RIG_FUNCTION_RIG_SEND_MORSE, - RIG_FUNCTION_RIG_STOP_MORSE, - RIG_FUNCTION_RIG_WAIT_MORSE, - RIG_FUNCTION_RIG_SEND_VOICE_MEM, - RIG_FUNCTION_RIG_SET_BANK, - RIG_FUNCTION_RIG_SET_MEM, - RIG_FUNCTION_RIG_GET_MEM, - RIG_FUNCTION_RIG_VFO_OP, - RIG_FUNCTION_RIG_SCAN, - RIG_FUNCTION_RIG_SET_TRN, - RIG_FUNCTION_RIG_GET_TRN, - RIG_FUNCTION_RIG_DECODE_EVENT, - RIG_FUNCTION_RIG_SET_CHANNEL, - RIG_FUNCTION_RIG_GET_CHANNEL, - RIG_FUNCTION_RIG_GET_INFO, - RIG_FUNCTION_RIG_SET_CHAN_ALL_CB, - RIG_FUNCTION_RIG_GET_CHAN_ALL_CB, - RIG_FUNCTION_RIG_SET_MEM_ALL_CB, - RIG_FUNCTION_RIG_GET_MEM_ALL_CB, - RIG_FUNCTION_RIG_SET_VFO_OPT + RIG_FUNCTION_INIT, + RIG_FUNCTION_CLEANUP, + RIG_FUNCTION_OPEN, + RIG_FUNCTION_CLOSE, + RIG_FUNCTION_SET_FREQ, + RIG_FUNCTION_GET_FREQ, + RIG_FUNCTION_SET_MODE, + RIG_FUNCTION_GET_MODE, + RIG_FUNCTION_SET_VFO, + RIG_FUNCTION_GET_VFO, + RIG_FUNCTION_SET_PTT, + RIG_FUNCTION_GET_PTT, + RIG_FUNCTION_GET_DCD, + RIG_FUNCTION_SET_RPTR_SHIFT, + RIG_FUNCTION_GET_RPTR_SHIFT, + RIG_FUNCTION_SET_RPTR_OFFS, + RIG_FUNCTION_GET_RPTR_OFFS, + RIG_FUNCTION_SET_SPLIT_FREQ, + RIG_FUNCTION_GET_SPLIT_FREQ, + RIG_FUNCTION_SET_SPLIT_MODE, + RIG_FUNCTION_SET_SPLIT_FREQ_MODE, + RIG_FUNCTION_GET_SPLIT_FREQ_MODE, + RIG_FUNCTION_SET_SPLIT_VFO, + RIG_FUNCTION_GET_SPLIT_VFO, + RIG_FUNCTION_SET_RIT, + RIG_FUNCTION_GET_RIT, + RIG_FUNCTION_SET_XIT, + RIG_FUNCTION_GET_XIT, + RIG_FUNCTION_SET_TS, + RIG_FUNCTION_GET_TS, + RIG_FUNCTION_SET_DCS_CODE, + RIG_FUNCTION_GET_DCS_CODE, + RIG_FUNCTION_SET_TONE, + RIG_FUNCTION_GET_TONE, + RIG_FUNCTION_SET_CTCSS_TONE, + RIG_FUNCTION_GET_CTCSS_TONE, + RIG_FUNCTION_SET_DCS_SQL, + RIG_FUNCTION_GET_DCS_SQL, + RIG_FUNCTION_SET_TONE_SQL, + RIG_FUNCTION_GET_TONE_SQL, + RIG_FUNCTION_SET_CTCSS_SQL, + RIG_FUNCTION_GET_CTCSS_SQL, + RIG_FUNCTION_POWER2MW, + RIG_FUNCTION_MW2POWER, + RIG_FUNCTION_SET_POWERSTAT, + RIG_FUNCTION_GET_POWERSTAT, + RIG_FUNCTION_RESET, + RIG_FUNCTION_SET_ANT, + RIG_FUNCTION_GET_ANT, + RIG_FUNCTION_SET_LEVEL, + RIG_FUNCTION_GET_LEVEL, + RIG_FUNCTION_SET_FUNC, + RIG_FUNCTION_GET_FUNC, + RIG_FUNCTION_SET_PARM, + RIG_FUNCTION_GET_PARM, + RIG_FUNCTION_SET_EXT_LEVEL, + RIG_FUNCTION_GET_EXT_LEVEL, + RIG_FUNCTION_SET_EXT_FUNC, + RIG_FUNCTION_GET_EXT_FUNC, + RIG_FUNCTION_SET_EXT_PARM, + RIG_FUNCTION_GET_EXT_PARM, + RIG_FUNCTION_SET_CONF, + RIG_FUNCTION_GET_CONF, + RIG_FUNCTION_SEND_DTMF, + RIG_FUNCTION_SEND_MORSE, + RIG_FUNCTION_STOP_MORSE, + RIG_FUNCTION_WAIT_MORSE, + RIG_FUNCTION_SEND_VOICE_MEM, + RIG_FUNCTION_SET_BANK, + RIG_FUNCTION_SET_MEM, + RIG_FUNCTION_GET_MEM, + RIG_FUNCTION_VFO_OP, + RIG_FUNCTION_SCAN, + RIG_FUNCTION_SET_TRN, + RIG_FUNCTION_GET_TRN, + RIG_FUNCTION_DECODE_EVENT, + RIG_FUNCTION_SET_CHANNEL, + RIG_FUNCTION_GET_CHANNEL, + RIG_FUNCTION_GET_INFO, + RIG_FUNCTION_SET_CHAN_ALL_CB, + RIG_FUNCTION_GET_CHAN_ALL_CB, + RIG_FUNCTION_SET_MEM_ALL_CB, + RIG_FUNCTION_GET_MEM_ALL_CB, + RIG_FUNCTION_SET_VFO_OPT }; /** commit f7ff96fec85a831ee4f33f163c0a58b58fc9ca70 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 31 23:05:54 2020 -0600 Adding rig_get_function to replace use of rig->caps->set_vfo and such https://github.com/Hamlib/Hamlib/issues/484 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 3650026e..39f7d433 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1838,6 +1838,105 @@ struct rig_caps { }; //! @endcond +/** + * \brief Enumeration of all rig_ functions + * + */ +//! @cond Doxygen_Suppress +// all functions enumerated for rig_get_function_ptr +enum rig_function_e { + RIG_FUNCTION_RIG_INIT, + RIG_FUNCTION_RIG_CLEANUP, + RIG_FUNCTION_RIG_OPEN, + RIG_FUNCTION_RIG_CLOSE, + RIG_FUNCTION_RIG_SET_FREQ, + RIG_FUNCTION_RIG_GET_FREQ, + RIG_FUNCTION_RIG_SET_MODE, + RIG_FUNCTION_RIG_GET_MODE, + RIG_FUNCTION_RIG_SET_VFO, + RIG_FUNCTION_RIG_GET_VFO, + RIG_FUNCTION_RIG_SET_PTT, + RIG_FUNCTION_RIG_GET_PTT, + RIG_FUNCTION_RIG_GET_DCD, + RIG_FUNCTION_RIG_SET_RPTR_SHIFT, + RIG_FUNCTION_RIG_GET_RPTR_SHIFT, + RIG_FUNCTION_RIG_SET_RPTR_OFFS, + RIG_FUNCTION_RIG_GET_RPTR_OFFS, + RIG_FUNCTION_RIG_SET_SPLIT_FREQ, + RIG_FUNCTION_RIG_GET_SPLIT_FREQ, + RIG_FUNCTION_RIG_SET_SPLIT_MODE, + RIG_FUNCTION_RIG_SET_SPLIT_FREQ_MODE, + RIG_FUNCTION_RIG_GET_SPLIT_FREQ_MODE, + RIG_FUNCTION_RIG_SET_SPLIT_VFO, + RIG_FUNCTION_RIG_GET_SPLIT_VFO, + RIG_FUNCTION_RIG_SET_RIT, + RIG_FUNCTION_RIG_GET_RIT, + RIG_FUNCTION_RIG_SET_XIT, + RIG_FUNCTION_RIG_GET_XIT, + RIG_FUNCTION_RIG_SET_TS, + RIG_FUNCTION_RIG_GET_TS, + RIG_FUNCTION_RIG_SET_DCS_CODE, + RIG_FUNCTION_RIG_GET_DCS_CODE, + RIG_FUNCTION_RIG_SET_TONE, + RIG_FUNCTION_RIG_GET_TONE, + RIG_FUNCTION_RIG_SET_CTCSS_TONE, + RIG_FUNCTION_RIG_GET_CTCSS_TONE, + RIG_FUNCTION_RIG_SET_DCS_SQL, + RIG_FUNCTION_RIG_GET_DCS_SQL, + RIG_FUNCTION_RIG_SET_TONE_SQL, + RIG_FUNCTION_RIG_GET_TONE_SQL, + RIG_FUNCTION_RIG_SET_CTCSS_SQL, + RIG_FUNCTION_RIG_GET_CTCSS_SQL, + RIG_FUNCTION_RIG_POWER2MW, + RIG_FUNCTION_RIG_MW2POWER, + RIG_FUNCTION_RIG_SET_POWERSTAT, + RIG_FUNCTION_RIG_GET_POWERSTAT, + RIG_FUNCTION_RIG_RESET, + RIG_FUNCTION_RIG_SET_ANT, + RIG_FUNCTION_RIG_GET_ANT, + RIG_FUNCTION_RIG_SET_LEVEL, + RIG_FUNCTION_RIG_GET_LEVEL, + RIG_FUNCTION_RIG_SET_FUNC, + RIG_FUNCTION_RIG_GET_FUNC, + RIG_FUNCTION_RIG_SET_PARM, + RIG_FUNCTION_RIG_GET_PARM, + RIG_FUNCTION_RIG_SET_EXT_LEVEL, + RIG_FUNCTION_RIG_GET_EXT_LEVEL, + RIG_FUNCTION_RIG_SET_EXT_FUNC, + RIG_FUNCTION_RIG_GET_EXT_FUNC, + RIG_FUNCTION_RIG_SET_EXT_PARM, + RIG_FUNCTION_RIG_GET_EXT_PARM, + RIG_FUNCTION_RIG_SET_CONF, + RIG_FUNCTION_RIG_GET_CONF, + RIG_FUNCTION_RIG_SEND_DTMF, + RIG_FUNCTION_RIG_SEND_MORSE, + RIG_FUNCTION_RIG_STOP_MORSE, + RIG_FUNCTION_RIG_WAIT_MORSE, + RIG_FUNCTION_RIG_SEND_VOICE_MEM, + RIG_FUNCTION_RIG_SET_BANK, + RIG_FUNCTION_RIG_SET_MEM, + RIG_FUNCTION_RIG_GET_MEM, + RIG_FUNCTION_RIG_VFO_OP, + RIG_FUNCTION_RIG_SCAN, + RIG_FUNCTION_RIG_SET_TRN, + RIG_FUNCTION_RIG_GET_TRN, + RIG_FUNCTION_RIG_DECODE_EVENT, + RIG_FUNCTION_RIG_SET_CHANNEL, + RIG_FUNCTION_RIG_GET_CHANNEL, + RIG_FUNCTION_RIG_GET_INFO, + RIG_FUNCTION_RIG_SET_CHAN_ALL_CB, + RIG_FUNCTION_RIG_GET_CHAN_ALL_CB, + RIG_FUNCTION_RIG_SET_MEM_ALL_CB, + RIG_FUNCTION_RIG_GET_MEM_ALL_CB, + RIG_FUNCTION_RIG_SET_VFO_OPT +}; + +/** + * \brief Function to return pointer to rig_* function + * + */ +//! @cond Doxygen_Suppress +extern void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function); /** * \brief Port definition diff --git a/src/misc.c b/src/misc.c index fa023d5b..fab7a03f 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1807,6 +1807,277 @@ const char *HAMLIB_API rot_strstatus(rot_status_t status) return ""; } +/** + * \brief Get pointer to rig function instead of using rig->caps + * \param RIG* and rig_function_e + * \return the corresponding function pointer + */ +void *rig_get_function_ptr(RIG *rig, enum rig_function_e rig_function) +{ + switch (rig_function) + { + case RIG_FUNCTION_RIG_INIT: + return rig->caps->rig_init; + + case RIG_FUNCTION_RIG_CLEANUP: + return rig->caps->rig_cleanup; + + case RIG_FUNCTION_RIG_OPEN: + return rig->caps->rig_open; + + case RIG_FUNCTION_RIG_CLOSE: + return rig->caps->rig_close; + + case RIG_FUNCTION_RIG_SET_FREQ: + return rig->caps->set_freq; + + case RIG_FUNCTION_RIG_GET_FREQ: + return rig->caps->get_freq; + + case RIG_FUNCTION_RIG_SET_MODE: + return rig->caps->set_mode; + + case RIG_FUNCTION_RIG_GET_MODE: + return rig->caps->get_mode; + + case RIG_FUNCTION_RIG_SET_VFO: + return rig->caps->set_vfo; + + case RIG_FUNCTION_RIG_GET_VFO: + return rig->caps->get_vfo; + + case RIG_FUNCTION_RIG_SET_PTT: + return rig->caps->set_ptt; + + case RIG_FUNCTION_RIG_GET_PTT: + return rig->caps->get_ptt; + + case RIG_FUNCTION_RIG_GET_DCD: + return rig->caps->get_dcd; + + case RIG_FUNCTION_RIG_SET_RPTR_SHIFT: + return rig->caps->set_rptr_shift; + + case RIG_FUNCTION_RIG_GET_RPTR_SHIFT: + return rig->caps->get_rptr_shift; + + case RIG_FUNCTION_RIG_SET_RPTR_OFFS: + return rig->caps->set_rptr_offs; + + case RIG_FUNCTION_RIG_GET_RPTR_OFFS: + return rig->caps->get_rptr_offs; + + case RIG_FUNCTION_RIG_SET_SPLIT_FREQ: + return rig->caps->set_split_freq; + + case RIG_FUNCTION_RIG_GET_SPLIT_FREQ: + return rig->caps->get_split_freq; + + case RIG_FUNCTION_RIG_SET_SPLIT_MODE: + return rig->caps->set_split_mode; + + case RIG_FUNCTION_RIG_SET_SPLIT_FREQ_MODE: + return rig->caps->set_split_freq_mode; + + case RIG_FUNCTION_RIG_GET_SPLIT_FREQ_MODE: + return rig->caps->get_split_freq_mode; + + case RIG_FUNCTION_RIG_SET_SPLIT_VFO: + return rig->caps->set_split_vfo; + + case RIG_FUNCTION_RIG_GET_SPLIT_VFO: + return rig->caps->get_split_vfo; + + case RIG_FUNCTION_RIG_SET_RIT: + return rig->caps->set_rit; + + case RIG_FUNCTION_RIG_GET_RIT: + return rig->caps->get_rit; + + case RIG_FUNCTION_RIG_SET_XIT: + return rig->caps->set_xit; + + case RIG_FUNCTION_RIG_GET_XIT: + return rig->caps->get_xit; + + case RIG_FUNCTION_RIG_SET_TS: + return rig->caps->set_ts; + + case RIG_FUNCTION_RIG_GET_TS: + return rig->caps->get_ts; + + case RIG_FUNCTION_RIG_SET_DCS_CODE: + return rig->caps->set_dcs_code; + + case RIG_FUNCTION_RIG_GET_DCS_CODE: + return rig->caps->get_dcs_code; + + case RIG_FUNCTION_RIG_SET_TONE: + return rig->caps->set_tone; + + case RIG_FUNCTION_RIG_GET_TONE: + return rig->caps->get_tone; + + case RIG_FUNCTION_RIG_SET_CTCSS_TONE: + return rig->caps->set_ctcss_tone; + + case RIG_FUNCTION_RIG_GET_CTCSS_TONE: + return rig->caps->get_ctcss_tone; + + case RIG_FUNCTION_RIG_SET_DCS_SQL: + return rig->caps->set_dcs_sql; + + case RIG_FUNCTION_RIG_GET_DCS_SQL: + return rig->caps->get_dcs_sql; + + case RIG_FUNCTION_RIG_SET_TONE_SQL: + return rig->caps->set_tone_sql; + + case RIG_FUNCTION_RIG_GET_TONE_SQL: + return rig->caps->get_tone_sql; + + case RIG_FUNCTION_RIG_SET_CTCSS_SQL: + return rig->caps->set_ctcss_sql; + + case RIG_FUNCTION_RIG_GET_CTCSS_SQL: + return rig->caps->get_ctcss_sql; + + case RIG_FUNCTION_RIG_POWER2MW: + return rig->caps->power2mW; + + case RIG_FUNCTION_RIG_MW2POWER: + return rig->caps->mW2power; + + case RIG_FUNCTION_RIG_SET_POWERSTAT: + return rig->caps->set_powerstat; + + case RIG_FUNCTION_RIG_GET_POWERSTAT: + return rig->caps->get_powerstat; + + case RIG_FUNCTION_RIG_RESET: + return rig->caps->reset; + + case RIG_FUNCTION_RIG_SET_ANT: + return rig->caps->set_ant; + + case RIG_FUNCTION_RIG_GET_ANT: + return rig->caps->get_ant; + + case RIG_FUNCTION_RIG_SET_LEVEL: + return rig->caps->set_level; + + case RIG_FUNCTION_RIG_GET_LEVEL: + return rig->caps->get_level; + + case RIG_FUNCTION_RIG_SET_FUNC: + return rig->caps->set_func; + + case RIG_FUNCTION_RIG_GET_FUNC: + return rig->caps->get_func; + + case RIG_FUNCTION_RIG_SET_PARM: + return rig->caps->set_parm; + + case RIG_FUNCTION_RIG_GET_PARM: + return rig->caps->get_parm; + + case RIG_FUNCTION_RIG_SET_EXT_LEVEL: + return rig->caps->set_ext_level; + + case RIG_FUNCTION_RIG_GET_EXT_LEVEL: + return rig->caps->get_ext_level; + + case RIG_FUNCTION_RIG_SET_EXT_FUNC: + return rig->caps->set_ext_func; + + case RIG_FUNCTION_RIG_GET_EXT_FUNC: + return rig->caps->get_ext_func; + + case RIG_FUNCTION_RIG_SET_EXT_PARM: + return rig->caps->set_ext_parm; + + case RIG_FUNCTION_RIG_GET_EXT_PARM: + return rig->caps->get_ext_parm; + + case RIG_FUNCTION_RIG_SET_CONF: + return rig->caps->set_conf; + + case RIG_FUNCTION_RIG_GET_CONF: + return rig->caps->get_conf; + + case RIG_FUNCTION_RIG_SEND_DTMF: + return rig->caps->send_dtmf; + + case RIG_FUNCTION_RIG_SEND_MORSE: + return rig->caps->send_morse; + + case RIG_FUNCTION_RIG_STOP_MORSE: + return rig->caps->stop_morse; + + case RIG_FUNCTION_RIG_WAIT_MORSE: + return rig->caps->wait_morse; + + case RIG_FUNCTION_RIG_SEND_VOICE_MEM: + return rig->caps->send_voice_mem; + + case RIG_FUNCTION_RIG_SET_BANK: + return rig->caps->set_bank; + + case RIG_FUNCTION_RIG_SET_MEM: + return rig->caps->set_mem; + + case RIG_FUNCTION_RIG_GET_MEM: + return rig->caps->get_mem; + + case RIG_FUNCTION_RIG_VFO_OP: + return rig->caps->vfo_op; + + case RIG_FUNCTION_RIG_SCAN: + return rig->caps->scan; + + case RIG_FUNCTION_RIG_SET_TRN: + return rig->caps->set_trn; + + case RIG_FUNCTION_RIG_GET_TRN: + return rig->caps->get_trn; + + case RIG_FUNCTION_RIG_DECODE_EVENT: + return rig->caps->decode_event; + + case RIG_FUNCTION_RIG_SET_CHANNEL: + return rig->caps->set_channel; + + case RIG_FUNCTION_RIG_GET_CHANNEL: + return rig->caps->get_channel; + + case RIG_FUNCTION_RIG_GET_INFO: + return rig->caps->get_info; + + case RIG_FUNCTION_RIG_SET_CHAN_ALL_CB: + return rig->caps->set_chan_all_cb; + + case RIG_FUNCTION_RIG_GET_CHAN_ALL_CB: + return rig->caps->get_chan_all_cb; + + case RIG_FUNCTION_RIG_SET_MEM_ALL_CB: + return rig->caps->set_mem_all_cb; + + case RIG_FUNCTION_RIG_GET_MEM_ALL_CB: + return rig->caps->get_mem_all_cb; + + case RIG_FUNCTION_RIG_SET_VFO_OPT: + return rig->caps->set_vfo_opt; + + default: + rig_debug(RIG_DEBUG_ERR, "Unknown function?? function=%d\n", rig_function); + return NULL; + + } + + return RIG_OK; +} + + //! @endcond commit 44c1645785ca9f178a578c418f85624c992a3904 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 31 14:24:22 2020 -0600 Fix PowerSDR STRENGTH diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 539d3b25..2b183e62 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1967,7 +1967,8 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) switch (level) { case RIG_LEVEL_STRENGTH: - val->i = atoi(value); + val->i = atoi(value) - 54; + //if (val->i > 0) val->i /= 10; rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); break; diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index 3b9c3ced..f6ebb384 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -53,7 +53,7 @@ #define POWERSDR_FUNC_ALL (RIG_FUNC_VOX|RIG_FUNC_SQL|RIG_FUNC_NB|RIG_FUNC_ANF|RIG_FUNC_MUTE|RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER) -#define POWERSDR_LEVEL_ALL (RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW|RIG_LEVEL_KEYSPD|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_MICGAIN|RIG_LEVEL_VOXGAIN|RIG_LEVEL_SQL|RIG_LEVEL_AF|RIG_LEVEL_AGC|RIG_LEVEL_RF|RIG_LEVEL_IF) +#define POWERSDR_LEVEL_ALL (RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW|RIG_LEVEL_KEYSPD|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_MICGAIN|RIG_LEVEL_VOXGAIN|RIG_LEVEL_SQL|RIG_LEVEL_AF|RIG_LEVEL_AGC|RIG_LEVEL_RF|RIG_LEVEL_IF|RIG_LEVEL_STRENGTH) static rmode_t flex_mode_table[KENWOOD_MODE_TABLE_MAX] = @@ -739,6 +739,7 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rmode_t mode; pbwidth_t width; ptt_t ptt; + double dval; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -773,6 +774,20 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) ans = 4; break; + case RIG_LEVEL_STRENGTH: + flex6k_get_ptt(rig, vfo, &ptt); + + if (ptt) // not applicable if transmitting + { + val->f = 0; + return RIG_OK; + } + + cmd = "ZZRM0"; + len = 5; + ans = 9; + break; + case RIG_LEVEL_RFPOWER_METER: case RIG_LEVEL_RFPOWER_METER_WATTS: flex6k_get_ptt(rig, vfo, &ptt); @@ -810,7 +825,7 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return kenwood_get_level(rig, vfo, level, val); } - retval = kenwood_safe_transaction(rig, cmd, lvlbuf, 10, len + ans); + retval = kenwood_safe_transaction(rig, cmd, lvlbuf, sizeof(lvlbuf), len + ans); if (retval != RIG_OK) { @@ -845,6 +860,21 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; + case RIG_LEVEL_STRENGTH: + n = sscanf(lvlbuf, "ZZRM0%lf", &dval); + + if (n != 1) + { + rig_debug(RIG_DEBUG_ERR, "%s: Error parsing value from lvlbuf='%s'\n", + __func__, lvlbuf); + val->i = 0; + return -RIG_EPROTO; + } + + val->i = dval + 73; // dbm to S9-based=0dB + break; + + case RIG_LEVEL_AF: case RIG_LEVEL_RFPOWER_METER: case RIG_LEVEL_RFPOWER_METER_WATTS: @@ -1162,7 +1192,7 @@ const struct rig_caps powersdr_caps = RIG_MODEL(RIG_MODEL_POWERSDR), .model_name = "PowerSDR/Thetis", .mfg_name = "FlexRadio/ANAN", - .version = "20201227.0", + .version = "20201231.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 73370375..2f3609b4 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -598,6 +598,8 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, do { size_t length; + // some PowerSDR commands have variable len + int checklen = !RIG_IS_POWERSDR; err = kenwood_transaction(rig, cmd, buf, buf_size); if (err != RIG_OK) /* return immediately on error as any @@ -608,7 +610,7 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, length = strlen(buf); - if (length != expected) /* worth retrying as some rigs + if (checklen && length != expected) /* worth retrying as some rigs occasionally send short results */ { rig_debug(RIG_DEBUG_ERR, @@ -637,7 +639,8 @@ rmode_t kenwood2rmode(unsigned char mode, const rmode_t mode_table[]) char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, rig_strrmode(mode)); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, + rig_strrmode(mode)); if (mode != RIG_MODE_NONE) { @@ -1840,7 +1843,8 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) struct kenwood_priv_caps *caps = kenwood_caps(rig); - rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, + rig_strvfo(vfo), rig_strrmode(mode), (int)width); if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS950S || RIG_IS_TS950SDX) { @@ -1892,6 +1896,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { c = 'A' + kmode - 10; } + rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c\n", __func__, kmode, c); if (RIG_IS_TS990S) diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 7816efff..7382156d 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -27,7 +27,7 @@ #include <string.h> #include "token.h" -#define BACKEND_VER "20201214" +#define BACKEND_VER "20201231" #define EOM_KEN ';' #define EOM_TH '\r' ----------------------------------------------------------------------- Summary of changes: NEWS | 7 ++ include/hamlib/rig.h | 132 ++++++++++++++++++++ rigs/dummy/flrig.c | 3 +- rigs/kenwood/flex6xxx.c | 36 +++++- rigs/kenwood/kenwood.c | 11 +- rigs/kenwood/kenwood.h | 2 +- src/misc.c | 312 ++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 495 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-31 15:52:38
|
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 29f56de41d0c9e9a6c34e73ec236851f0f353a9e (commit) from 77bd4e2322be269a03adad9a4513d61bcb14874a (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 29f56de41d0c9e9a6c34e73ec236851f0f353a9e Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 31 09:52:07 2020 -0600 Fix flrig STRENGTH call diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 3224e59a..539d3b25 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1944,7 +1944,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_MICGAIN: cmd = "rig.get_micgain"; break; - case RIG_LEVEL_STRENGTH: cmd = "rig.get_power"; break; + case RIG_LEVEL_STRENGTH: cmd = "rig.get_smeter"; break; case RIG_LEVEL_RFPOWER_METER_WATTS: case RIG_LEVEL_RFPOWER_METER: cmd = "rig.get_pwrmeter"; break; ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-31 13:43:56
|
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 77bd4e2322be269a03adad9a4513d61bcb14874a (commit) from 2b448d28154491a628ca607c6c1c0aed73382b36 (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 77bd4e2322be269a03adad9a4513d61bcb14874a Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 31 07:43:13 2020 -0600 Fix RIG_LEVEL_STRENGTH break in flrig.c diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 4f7f0239..3224e59a 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1969,6 +1969,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_STRENGTH: val->i = atoi(value); rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); + break; case RIG_LEVEL_RFPOWER_METER: val->f = atof(value) / 100.0 * priv->powermeter_scale; diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index 0f5a7fa4..dd0ecc19 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201227" +#define BACKEND_VER "20201231" #define EOM "\r" #define TRUE 1 ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 1 + rigs/dummy/flrig.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-31 05:19:03
|
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 2b448d28154491a628ca607c6c1c0aed73382b36 (commit) via 7a9e909b619376f8dc029b8cb0336de614ab1e89 (commit) from d425c8af709994248f0eb5d85bbcbcd9c16bf66c (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 2b448d28154491a628ca607c6c1c0aed73382b36 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 30 23:18:18 2020 -0600 Add 950.c https://github.com/Hamlib/Hamlib/issues/483 diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c new file mode 100644 index 00000000..2ca93178 --- /dev/null +++ b/rigs/barrett/950.c @@ -0,0 +1,212 @@ +/* + * Hamlib Barrett 950 backend - main file + * Copyright (c) 2017-2020 by Michael Black W9MDB + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <math.h> + +#include <hamlib/rig.h> +#include "serial.h" +#include "misc.h" +#include "cal.h" +#include "token.h" +#include "register.h" + +#include "barrett.h" + +#define MAXCMDLEN 32 + +#define BARRETT950_VFOS (RIG_VFO_A|RIG_VFO_MEM) + +#define BARRETT950_MODES (RIG_MODE_AM | RIG_MODE_CW | RIG_MODE_RTTY | RIG_MODE_SSB) + +#define BARRETT950_LEVELS (RIG_LEVEL_NONE) + + +static int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq); + +static int barrett950_get_level(RIG *rig, vfo_t vfo, setting_t level, + value_t *val); + +static const char *barrett950_get_info(RIG *rig); + + +const struct rig_caps barrett950_caps = +{ + RIG_MODEL(RIG_MODEL_BARRETT_950), + .model_name = "950", + .mfg_name = "Barrett", + .version = BACKEND_VER ".0", + .copyright = "LGPL", + .status = RIG_STATUS_ALPHA, + .rig_type = RIG_TYPE_TRANSCEIVER, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE, + .ptt_type = RIG_PTT_RIG, + .dcd_type = RIG_DCD_NONE, + .port_type = RIG_PORT_SERIAL, + .serial_rate_min = 9600, + .serial_rate_max = 9600, + .serial_data_bits = 8, + .serial_stop_bits = 1, + .serial_parity = RIG_PARITY_NONE, + .serial_handshake = RIG_HANDSHAKE_XONXOFF, + .write_delay = 0, + .post_write_delay = 50, + .timeout = 1000, + .retry = 3, + + .has_get_func = RIG_FUNC_NONE, + .has_set_func = RIG_FUNC_NONE, + .has_get_level = BARRETT950_LEVELS, + .has_set_level = RIG_LEVEL_NONE, + .has_get_parm = RIG_PARM_NONE, + .has_set_parm = RIG_PARM_NONE, + .transceive = RIG_TRN_RIG, + .rx_range_list1 = {{ + .startf = kHz(1600), .endf = MHz(30), .modes = BARRETT950_MODES, + .low_power = -1, .high_power = -1, BARRETT950_VFOS, RIG_ANT_1 + }, + RIG_FRNG_END, + }, + .rx_range_list2 = {RIG_FRNG_END,}, + .tx_range_list1 = {RIG_FRNG_END,}, + .tx_range_list2 = {RIG_FRNG_END,}, + .tuning_steps = { {BARRETT950_MODES, 1}, {BARRETT950_MODES, RIG_TS_ANY}, RIG_TS_END, }, + .filters = { + {RIG_MODE_SSB | RIG_MODE_CW | RIG_MODE_RTTY, kHz(2.4)}, + {RIG_MODE_CW, Hz(500)}, + {RIG_MODE_AM, kHz(8)}, + {RIG_MODE_AM, kHz(2.4)}, + RIG_FLT_END, + }, + .priv = NULL, + + .rig_init = barrett_init, + .rig_cleanup = barrett_cleanup, + + .set_freq = barrett950_set_freq, + .get_freq = barrett_get_freq, + .set_mode = barrett_set_mode, + .get_mode = barrett_get_mode, + + .get_level = barrett950_get_level, + + .get_info = barrett950_get_info, + .set_ptt = barrett_set_ptt, + .get_ptt = NULL, + .set_split_freq = barrett_set_split_freq, + .set_split_vfo = barrett_set_split_vfo, + .get_split_vfo = barrett_get_split_vfo, +}; + +/* + * barrett950_set_freq + * assumes rig!=NULL, rig->state.priv!=NULL + */ +int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +{ + char cmd_buf[MAXCMDLEN]; + int retval; + struct barrett_priv_data *priv = rig->state.priv; + + rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%.0f\n", __func__, + rig_strvfo(vfo), freq); + + // If we are not explicitly asking for VFO_B then we'll set the receive side also + if (vfo != RIG_VFO_B) + { + char *response = NULL; + sprintf((char *) cmd_buf, "OR%08.0f", freq); + retval = barrett_transaction(rig, cmd_buf, 0, &response); + + if (retval < 0) + { + return retval; + } + + //dump_hex((unsigned char *)response, strlen(response)); + + if (strncmp(response, "OK", 2) != 0) + { + rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response); + return -RIG_EINVAL; + } + } + + if (priv->split == 0 + || vfo == RIG_VFO_B) // if we aren't in split mode we have to set the TX VFO too + { + + char *response = NULL; + sprintf((char *) cmd_buf, "PT%08.0f", freq); + retval = barrett_transaction(rig, cmd_buf, 0, &response); + + if (retval < 0) + { + return retval; + } + + if (strncmp(response, "OK", 2) != 0) + { + rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response); + return -RIG_EINVAL; + } + } + + return RIG_OK; +} + +/* + * barrett950_get_level + */ +int barrett950_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +{ + return -RIG_ENIMPL; +} + +/* + * barrett950_get_info + */ +const char *barrett950_get_info(RIG *rig) +{ + char *response = NULL; + int retval; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + retval = barrett_transaction(rig, "IV", 0, &response); + + if (retval == RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: result=%s\n", __func__, response); + } + else + { + rig_debug(RIG_DEBUG_VERBOSE, "Software Version %s\n", response); + } + + return response; +} commit 7a9e909b619376f8dc029b8cb0336de614ab1e89 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 30 23:15:42 2020 -0600 Add Barrett 950 https://github.com/Hamlib/Hamlib/issues/483 diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 75f121e2..97de42c9 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -619,6 +619,7 @@ #define RIG_BARRETT 32 #define RIG_BACKEND_BARRETT "barrett" #define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1) +#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2) /* * Elad diff --git a/rigs/barrett/Makefile.am b/rigs/barrett/Makefile.am index d170a3cf..71953213 100644 --- a/rigs/barrett/Makefile.am +++ b/rigs/barrett/Makefile.am @@ -1,4 +1,4 @@ -BARRETTSRC = barrett.c barrett.h +BARRETTSRC = barrett.c barrett.h 950.c noinst_LTLIBRARIES = libhamlib-barrett.la libhamlib_barrett_la_SOURCES = $(BARRETTSRC) diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c index cf4c8d3b..739825c9 100644 --- a/rigs/barrett/barrett.c +++ b/rigs/barrett/barrett.c @@ -46,21 +46,21 @@ #define BARRETT_LEVELS (RIG_LEVEL_STRENGTH) -static int barrett_init(RIG *rig); -static int barrett_cleanup(RIG *rig); +int barrett_init(RIG *rig); +int barrett_cleanup(RIG *rig); static int barrett_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -static int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); -static int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); +int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); +int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); static int barrett_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); -static int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); -static int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, +int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); +int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); -static int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); -static int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split, +int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); +int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split, vfo_t txvfo); -static int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split, +int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split, vfo_t *txvfo); static int barrett_get_level(RIG *rig, vfo_t vfo, setting_t level, @@ -211,6 +211,7 @@ DECLARE_INITRIG_BACKEND(barrett) rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__); rig_register(&barrett_caps); + rig_register(&barrett950_caps); rig_debug(RIG_DEBUG_VERBOSE, "%s: _init back from rig_register\n", __func__); return RIG_OK; diff --git a/rigs/barrett/barrett.h b/rigs/barrett/barrett.h index 33e5da2a..9395d72b 100644 --- a/rigs/barrett/barrett.h +++ b/rigs/barrett/barrett.h @@ -39,6 +39,7 @@ #define BARRETT_DATA_LEN 64 extern const struct rig_caps barrett_caps; +extern const struct rig_caps barrett950_caps; struct barrett_priv_data { char cmd_str[BARRETT_DATA_LEN]; /* command string buffer */ @@ -46,4 +47,23 @@ struct barrett_priv_data { char split; /* split on/off */ }; +extern int barrett_transaction(RIG *rig, char *cmd, int expected, char **result); + +extern int barrett_init(RIG *rig); +extern int barrett_cleanup(RIG *rig); +extern int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); +extern int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); +extern int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, + pbwidth_t *width); +extern int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); +extern int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); +extern int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split, + vfo_t txvfo); + +extern int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split, + vfo_t *txvfo); + + + + #endif /* _BARRETT_H */ diff --git a/tests/testrig.c b/tests/testrig.c index b7b9ab97..a2a8e890 100644 --- a/tests/testrig.c +++ b/tests/testrig.c @@ -83,6 +83,7 @@ int main(int argc, char *argv[]) printf("Port %s opened ok\n", SERIAL_PORT); + printf("Offset of vfo_list=%p\n", &my_rig->state.vfo_list); /* * Below are examples of set/get routines. * Must add checking of functionality map prior to command execution -- FS ----------------------------------------------------------------------- Summary of changes: include/hamlib/riglist.h | 1 + rigs/barrett/950.c | 212 +++++++++++++++++++++++++++++++++++++++++++++++ rigs/barrett/Makefile.am | 2 +- rigs/barrett/barrett.c | 19 +++-- rigs/barrett/barrett.h | 20 +++++ tests/testrig.c | 1 + 6 files changed, 245 insertions(+), 10 deletions(-) create mode 100644 rigs/barrett/950.c hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-30 23:44:14
|
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 d425c8af709994248f0eb5d85bbcbcd9c16bf66c (commit) via 31dedcf4f79d8fc5fcf287360e5d017842c8e4c0 (commit) via dbb06f9e7ba96d2f74d5adaba54b5718b5271f3f (commit) from 98d9b535efa66d06463f4ee2c061e6075b80a45e (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 d425c8af709994248f0eb5d85bbcbcd9c16bf66c Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 30 17:41:31 2020 -0600 Fix cygwin compile warning diff --git a/rigs/kenwood/flex.c b/rigs/kenwood/flex.c index d64bf6fa..75f3c8c1 100644 --- a/rigs/kenwood/flex.c +++ b/rigs/kenwood/flex.c @@ -70,36 +70,36 @@ int verify_flexradio_id(RIG *rig, char *id) if (strcmp("900", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (PowerSDR compatible)\n", + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (PowerSDR compatible)\n", __func__, id); } else if (strcmp("904", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (Flex 6700)\n", __func__, id); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (Flex 6700)\n", __func__, id); } else if (strcmp("905", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (Flex 6500)\n", __func__, id); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (Flex 6500)\n", __func__, id); } else if (strcmp("906", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (Flex 6500R)\n", __func__, id); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (Flex 6500R)\n", __func__, id); } else if (strcmp("907", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (Flex 6300)\n", __func__, id); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (Flex 6300)\n", __func__, id); } else if (strcmp("908", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (Flex 6400)\n", __func__, id); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (Flex 6400)\n", __func__, id); } else if (strcmp("909", idptr) == 0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s (Flex 6600)\n", __func__, id); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.5s (Flex 6600)\n", __func__, id); } else { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig (%s) is not a Flex 6000 Series\n", + rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig (%.5s) is not a Flex 6000 Series\n", __func__, id); return -RIG_EPROTO; } commit 31dedcf4f79d8fc5fcf287360e5d017842c8e4c0 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 30 08:06:02 2020 -0600 Allow rig_load_all_backends to be called more than once diff --git a/src/register.c b/src/register.c index 659b91fa..e9ea57d4 100644 --- a/src/register.c +++ b/src/register.c @@ -454,6 +454,8 @@ int rig_load_all_backends() { int i; + memset(rig_hash_table, 0 , sizeof(rig_hash_table)); + for (i = 0; i < RIG_BACKEND_MAX && rig_backend_list[i].be_name; i++) { rig_load_backend(rig_backend_list[i].be_name); commit dbb06f9e7ba96d2f74d5adaba54b5718b5271f3f Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 29 16:15:54 2020 -0600 Add debug to show vfos in vfo_list https://github.com/Hamlib/Hamlib/issues/482 diff --git a/src/rig.c b/src/rig.c index fc5034b2..8aff645e 100644 --- a/src/rig.c +++ b/src/rig.c @@ -475,6 +475,16 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) rs->vfo_list |= caps->tx_range_list2[i].vfo; rs->mode_list |= caps->tx_range_list2[i].modes; } + if (rs->vfo_list & RIG_VFO_A) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_A\n", __func__); + if (rs->vfo_list & RIG_VFO_B) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_B\n", __func__); + if (rs->vfo_list & RIG_VFO_C) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_C\n", __func__); + if (rs->vfo_list & RIG_VFO_SUB_A) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_SUB_A\n", __func__); + if (rs->vfo_list & RIG_VFO_SUB_B) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_SUB_B\n", __func__); + if (rs->vfo_list & RIG_VFO_MAIN_A) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_MAIN_A\n", __func__); + if (rs->vfo_list & RIG_VFO_MAIN_B) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_MAIN_B\n", __func__); + if (rs->vfo_list & RIG_VFO_SUB) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_SUB\n", __func__); + if (rs->vfo_list & RIG_VFO_MAIN) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_MAIN\n", __func__); + if (rs->vfo_list & RIG_VFO_MEM) rig_debug(RIG_DEBUG_VERBOSE, "%s: rig has VFO_MEM\n", __func__); memcpy(rs->preamp, caps->preamp, sizeof(int)*MAXDBLSTSIZ); memcpy(rs->attenuator, caps->attenuator, sizeof(int)*MAXDBLSTSIZ); ----------------------------------------------------------------------- Summary of changes: rigs/kenwood/flex.c | 16 ++++++++-------- src/register.c | 2 ++ src/rig.c | 10 ++++++++++ 3 files changed, 20 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-29 16:01:26
|
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 98d9b535efa66d06463f4ee2c061e6075b80a45e (commit) from f484c4fdc8b16bf4c8f5385f275f76ff0eb812d3 (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 98d9b535efa66d06463f4ee2c061e6075b80a45e Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 29 10:01:02 2020 -0600 Change max baud on ic7300 to 115,200 diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index 64f724e4..963093d0 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -281,7 +281,7 @@ const struct rig_caps ic7300_caps = RIG_MODEL(RIG_MODEL_IC7300), .model_name = "IC-7300", .mfg_name = "Icom", - .version = BACKEND_VER ".1", + .version = BACKEND_VER ".2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -289,7 +289,7 @@ const struct rig_caps ic7300_caps = .dcd_type = RIG_DCD_RIG, .port_type = RIG_PORT_SERIAL, .serial_rate_min = 4800, - .serial_rate_max = 19200, + .serial_rate_max = 115200, .serial_data_bits = 8, .serial_stop_bits = 1, .serial_parity = RIG_PARITY_NONE, ----------------------------------------------------------------------- Summary of changes: rigs/icom/ic7300.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-29 15:09:35
|
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 f484c4fdc8b16bf4c8f5385f275f76ff0eb812d3 (commit) from e95df17e2c0a39e68336b8e1669aa8becb304a45 (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 f484c4fdc8b16bf4c8f5385f275f76ff0eb812d3 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 29 09:09:14 2020 -0600 Update copyright diff --git a/src/rig.c b/src/rig.c index 6f2771ee..fc5034b2 100644 --- a/src/rig.c +++ b/src/rig.c @@ -94,6 +94,7 @@ const char *hamlib_version2 = "Hamlib " PACKAGE_VERSION; const char *hamlib_copyright2 = "Copyright (C) 2000-2012 Stephane Fillod\n" "Copyright (C) 2000-2003 Frank Singleton\n" + "Copyright (C) 2014-2020 Michael Black W9MDB\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."; //! @cond Doxygen_Suppress ----------------------------------------------------------------------- Summary of changes: src/rig.c | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-29 13:17:37
|
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 e95df17e2c0a39e68336b8e1669aa8becb304a45 (commit) via f4df454f73feffce8a3a7b70b708aa9a6337d119 (commit) via f08903d8ce50e3aa36c4b4fe92246c7d9112a030 (commit) via decb02fa3057753f7dde02cae8b343ce2c510be7 (commit) from c2feb98693b0ca607dd9c47250bbc688bad6a680 (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 e95df17e2c0a39e68336b8e1669aa8becb304a45 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Dec 28 22:14:56 2020 -0600 Add files for ftdx10 that missed the commit diff --git a/rigs/yaesu/ftdx10.c b/rigs/yaesu/ftdx10.c new file mode 100644 index 00000000..aa4e7c95 --- /dev/null +++ b/rigs/yaesu/ftdx10.c @@ -0,0 +1,247 @@ +/* + * hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) + * + * ftdx10.c - (C) Nate Bargmann 2007 (n0nb at arrl.net) + * (C) Stephane Fillod 2008-2010 + * (C) Terry Embry 2008-2009 + * (C) Mikael Nousiainen 2020 + * + * This shared library provides an API for communicating + * via serial interface to an FTDX10(D/MP) using the "CAT" interface + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "hamlib/rig.h" +#include "bandplan.h" +#include "idx_builtin.h" +#include "tones.h" +#include "newcat.h" +#include "ftdx10.h" + +const struct newcat_priv_caps ftdx10_priv_caps = +{ + .roofing_filter_count = 6, + .roofing_filters = + { + // The index must match ext level combo index + { .index = 0, .set_value = '0', .get_value = 0, .width = 12000, .optional = 0 }, + { .index = 1, .set_value = '1', .get_value = '6', .width = 12000, .optional = 0 }, + { .index = 2, .set_value = '2', .get_value = '7', .width = 3000, .optional = 0 }, +// { .index = 3, .set_value = '3', .get_value = '8', .width = 1200, .optional = 1 }, + { .index = 4, .set_value = '4', .get_value = '9', .width = 500, .optional = 0 }, + { .index = 5, .set_value = '5', .get_value = 'A', .width = 300, .optional = 0 }, + } +}; + +const struct confparams ftdx10_ext_levels[] = +{ + { + TOK_ROOFING_FILTER, + "ROOFINGFILTER", + "Roofing filter", + "Roofing filter", + NULL, + RIG_CONF_COMBO, + { .c = { .combostr = { "AUTO", "12 kHz", "3 kHz", "500 Hz", "300 Hz (optional)", NULL } } } + }, + { RIG_CONF_END, NULL, } +}; + +int ftdx10_ext_tokens[] = +{ + TOK_ROOFING_FILTER, TOK_BACKEND_NONE +}; + +const struct rig_caps ftdx10_caps = +{ + RIG_MODEL(RIG_MODEL_FTDX10), + .model_name = "FTDX-10", + .mfg_name = "Yaesu", + .version = NEWCAT_VER ".0", + .copyright = "LGPL", + .status = RIG_STATUS_ALPHA, + .rig_type = RIG_TYPE_TRANSCEIVER, + .ptt_type = RIG_PTT_RIG, + .dcd_type = RIG_DCD_NONE, + .port_type = RIG_PORT_SERIAL, + .serial_rate_min = 4800, + .serial_rate_max = 38400, + .serial_data_bits = 8, + .serial_stop_bits = 1, + .serial_parity = RIG_PARITY_NONE, + .serial_handshake = RIG_HANDSHAKE_HARDWARE, + .write_delay = FTDX10_WRITE_DELAY, + .post_write_delay = FTDX10_POST_WRITE_DELAY, + .timeout = 2000, + .retry = 3, + .has_get_func = FTDX10_FUNCS, + .has_set_func = FTDX10_FUNCS, + .has_get_level = FTDX10_LEVELS, + .has_set_level = RIG_LEVEL_SET(FTDX10_LEVELS), + .has_get_parm = RIG_PARM_NONE, + .has_set_parm = RIG_PARM_NONE, + .level_gran = { + [LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } }, + [LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 1050 }, .step = { .i = 10 } }, + [LVL_KEYSPD] = { .min = { .i = 4 }, .max = { .i = 60 }, .step = { .i = 1 } }, + [LVL_NOTCHF] = { .min = { .i = 1 }, .max = { .i = 3200 }, .step = { .i = 10 } }, + }, + .ctcss_list = common_ctcss_list, + .dcs_list = NULL, + .preamp = { 10, 20, RIG_DBLST_END, }, + .attenuator = { 6, 12, 18, RIG_DBLST_END, }, + .max_rit = Hz(9999), + .max_xit = Hz(9999), + .max_ifshift = Hz(1200), + .vfo_ops = FTDX10_VFO_OPS, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_COMMON, + .transceive = RIG_TRN_OFF, /* May enable later as the FTDX10 has an Auto Info command */ + .bank_qty = 0, + .chan_desc_sz = 0, + .rfpower_meter_cal = FTDX10_RFPOWER_METER_CAL, + .swr_cal = FTDX10_SWR_CAL, + .chan_list = { + { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, + RIG_CHAN_END, + }, + + .rx_range_list1 = { + /* General coverage + ham, ANT_5 is RX only antenna */ + {kHz(30), MHz(60), FTDX10_ALL_RX_MODES, -1, -1, FTDX10_VFO_ALL, FTDX10_TX_ANTS, "USA"}, + RIG_FRNG_END, + }, + + .tx_range_list1 = { /* the 101DX is 100W and the MP is 200W */ + FRQ_RNG_HF(1, FTDX10_OTHER_TX_MODES, W(5), W(200), FTDX10_VFO_ALL, FTDX10_TX_ANTS), + FRQ_RNG_HF(1, FTDX10_AM_TX_MODES, W(2), W(75), FTDX10_VFO_ALL, FTDX10_TX_ANTS), /* AM class */ + FRQ_RNG_6m(1, FTDX10_OTHER_TX_MODES, W(5), W(200), FTDX10_VFO_ALL, FTDX10_TX_ANTS), + FRQ_RNG_6m(1, FTDX10_AM_TX_MODES, W(2), W(75), FTDX10_VFO_ALL, FTDX10_TX_ANTS), /* AM class */ + + RIG_FRNG_END, + }, + + .rx_range_list2 = { + {kHz(30), MHz(60), FTDX10_ALL_RX_MODES, -1, -1, FTDX10_VFO_ALL, FTDX10_TX_ANTS, "EUR"}, + RIG_FRNG_END, + }, + + .tx_range_list2 = { + FRQ_RNG_HF(2, FTDX10_OTHER_TX_MODES, W(5), W(200), FTDX10_VFO_ALL, FTDX10_TX_ANTS), + FRQ_RNG_HF(2, FTDX10_AM_TX_MODES, W(2), W(75), FTDX10_VFO_ALL, FTDX10_TX_ANTS), /* AM class */ + FRQ_RNG_6m(2, FTDX10_OTHER_TX_MODES, W(5), W(200), FTDX10_VFO_ALL, FTDX10_TX_ANTS), + FRQ_RNG_6m(2, FTDX10_AM_TX_MODES, W(2), W(75), FTDX10_VFO_ALL, FTDX10_TX_ANTS), /* AM class */ + FRQ_RNG_4m_REGION2(FTDX10_OTHER_TX_MODES, W(5), W(200), FTDX10_VFO_ALL, FTDX10_TX_ANTS), + FRQ_RNG_4m_REGION2(FTDX10_AM_TX_MODES, W(2), W(75), FTDX10_VFO_ALL, FTDX10_TX_ANTS), /* AM class */ + + RIG_FRNG_END, + }, + + .tuning_steps = { + {FTDX10_SSB_CW_RX_MODES, Hz(10)}, /* Normal */ + {FTDX10_SSB_CW_RX_MODES, Hz(100)}, /* Fast */ + + {FTDX10_AM_RX_MODES, Hz(100)}, /* Normal */ + {FTDX10_AM_RX_MODES, kHz(1)}, /* Fast */ + + {FTDX10_FM_RX_MODES, Hz(100)}, /* Normal */ + {FTDX10_FM_RX_MODES, kHz(1)}, /* Fast */ + + RIG_TS_END, + + }, + + /* mode/filter list, remember that order matters! */ + .filters = { + {FTDX10_CW_RTTY_PKT_RX_MODES, Hz(600)}, /* Normal CW, RTTY, PKT/USER */ + {FTDX10_CW_RTTY_PKT_RX_MODES, Hz(300)}, /* Narrow CW, RTTY, PKT/USER */ + {FTDX10_CW_RTTY_PKT_RX_MODES, Hz(2400)}, /* Wide CW, RTTY, PKT/USER */ + {FTDX10_CW_RTTY_PKT_RX_MODES, Hz(1200)}, /* Normal CW, RTTY, PKT/USER */ + {RIG_MODE_SSB, Hz(2400)}, /* Normal SSB */ + {RIG_MODE_SSB, Hz(1800)}, /* Narrow SSB */ + {RIG_MODE_SSB, Hz(3000)}, /* Wide SSB */ + {RIG_MODE_AM, Hz(9000)}, /* Normal AM */ + {RIG_MODE_AMN, Hz(6000)}, /* Narrow AM */ + {RIG_MODE_FM | RIG_MODE_PKTFM, Hz(16000)}, /* Normal FM */ + {RIG_MODE_FMN | RIG_MODE_PKTFMN, Hz(9000)}, /* Narrow FM */ + {FTDX10_CW_RTTY_PKT_RX_MODES | RIG_MODE_SSB, RIG_FLT_ANY}, + + RIG_FLT_END, + }, + + .ext_tokens = ftdx10_ext_tokens, + .extlevels = ftdx10_ext_levels, + + .priv = &ftdx10_priv_caps, + + .rig_init = newcat_init, + .rig_cleanup = newcat_cleanup, + .rig_open = newcat_open, /* port opened */ + .rig_close = newcat_close, /* port closed */ + + .cfgparams = newcat_cfg_params, + .set_conf = newcat_set_conf, + .get_conf = newcat_get_conf, + .set_freq = newcat_set_freq, + .get_freq = newcat_get_freq, + .set_mode = newcat_set_mode, + .get_mode = newcat_get_mode, + .set_vfo = newcat_set_vfo, + .get_vfo = newcat_get_vfo, + .set_ptt = newcat_set_ptt, + .get_ptt = newcat_get_ptt, + .set_split_vfo = newcat_set_split_vfo, + .get_split_vfo = newcat_get_split_vfo, + .set_rit = newcat_set_rit, + .get_rit = newcat_get_rit, + .set_xit = newcat_set_xit, + .get_xit = newcat_get_xit, + .set_ant = newcat_set_ant, + .get_ant = newcat_get_ant, + .get_func = newcat_get_func, + .set_func = newcat_set_func, + .get_level = newcat_get_level, + .set_level = newcat_set_level, + .get_mem = newcat_get_mem, + .set_mem = newcat_set_mem, + .vfo_op = newcat_vfo_op, + .get_info = newcat_get_info, + .power2mW = newcat_power2mW, + .mW2power = newcat_mW2power, + .set_rptr_shift = newcat_set_rptr_shift, + .get_rptr_shift = newcat_get_rptr_shift, + .set_rptr_offs = newcat_set_rptr_offs, + .get_rptr_offs = newcat_get_rptr_offs, + .set_ctcss_tone = newcat_set_ctcss_tone, + .get_ctcss_tone = newcat_get_ctcss_tone, + .set_ctcss_sql = newcat_set_ctcss_sql, + .get_ctcss_sql = newcat_get_ctcss_sql, + .set_powerstat = newcat_set_powerstat, + .get_powerstat = newcat_get_powerstat, + .get_ts = newcat_get_ts, + .set_ts = newcat_set_ts, + .set_trn = newcat_set_trn, + .get_trn = newcat_get_trn, + .set_channel = newcat_set_channel, + .get_channel = newcat_get_channel, + .set_ext_level = newcat_set_ext_level, + .get_ext_level = newcat_get_ext_level, +}; diff --git a/rigs/yaesu/ftdx10.h b/rigs/yaesu/ftdx10.h new file mode 100644 index 00000000..7863efd2 --- /dev/null +++ b/rigs/yaesu/ftdx10.h @@ -0,0 +1,129 @@ +/* + * hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) + * + * ftdx10.h - (C) Nate Bargmann 2007 (n0nb at arrl.net) + * (C) Stephane Fillod 2008-2010 + * (C) Mikael Nousiainen 2020 + * (C) Michael Black W9MDB 2020 + * + * This shared library provides an API for communicating + * via serial interface to an FTDX10(D/MP) using the "CAT" interface + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + + +#ifndef _FTDX10_H +#define _FTDX10_H 1 + +#define FTDX10_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM) + +/* Receiver caps */ + +#define FTDX10_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_AMN|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|\ + RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM|\ + RIG_MODE_FM|RIG_MODE_FMN|RIG_MODE_PKTFMN) + +#define FTDX10_SSB_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|\ + RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB) +#define FTDX10_AM_RX_MODES (RIG_MODE_AM|RIG_MODE_AMN) +#define FTDX10_FM_RX_MODES (RIG_MODE_FM|RIG_MODE_PKTFM|RIG_MODE_FMN|RIG_MODE_PKTFMN) +#define FTDX10_CW_RTTY_PKT_RX_MODES (RIG_MODE_RTTY|RIG_MODE_RTTYR|\ + RIG_MODE_PKTUSB|RIG_MODE_PKTLSB|RIG_MODE_CW|RIG_MODE_CWR) + +/* TRX caps */ + +#define FTDX10_OTHER_TX_MODES (RIG_MODE_AM|RIG_MODE_AMN|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_RTTY| \ + RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM|RIG_MODE_FM|RIG_MODE_FMN|RIG_MODE_PKTFMN) /* 100 W class */ +#define FTDX10_AM_TX_MODES (RIG_MODE_AM|RIG_MODE_AMN) /* set 25W max */ + +#define FTDX10_LEVELS (RIG_LEVEL_ATT|RIG_LEVEL_PREAMP|\ + RIG_LEVEL_ALC|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_SWR|\ + RIG_LEVEL_RFPOWER|RIG_LEVEL_RF|RIG_LEVEL_SQL|\ + RIG_LEVEL_MICGAIN|RIG_LEVEL_IF|RIG_LEVEL_CWPITCH|\ + RIG_LEVEL_KEYSPD|RIG_LEVEL_AF|RIG_LEVEL_AGC|\ + RIG_LEVEL_METER|RIG_LEVEL_BKINDL|RIG_LEVEL_SQL|\ + RIG_LEVEL_VOXGAIN|RIG_LEVEL_VOXDELAY|RIG_LEVEL_COMP|\ + RIG_LEVEL_ANTIVOX|RIG_LEVEL_NR|RIG_LEVEL_NOTCHF|\ + RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|\ + RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER) + +#define FTDX10_FUNCS (RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_LOCK|\ + RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\ + RIG_FUNC_FBKIN|RIG_FUNC_COMP|RIG_FUNC_ANF|RIG_FUNC_MN|\ + RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER) + +/* TBC */ +#define FTDX10_VFO_OPS (RIG_OP_TUNE|RIG_OP_CPY|RIG_OP_XCHG|\ + RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ + RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) + +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FTDX10_RFPOWER_METER_CAL \ + { \ + 5, \ + { \ + {35, 5.0f}, \ + {94, 25.0f}, \ + {147, 50.0f}, \ + {176, 75.0f}, \ + {205, 100.0f}, \ + } \ + } + +// Based on testing with G3VPX Ian Sumner for the FTDX101D +#define FTDX10_SWR_CAL \ + { \ + 8, \ + { \ + {0, 1.0f}, \ + {26, 1.2f}, \ + {52, 1.5f}, \ + {89, 2.0f}, \ + {126, 3.0f}, \ + {173, 4.0f}, \ + {236, 5.0f}, \ + {255, 25.0f}, \ + } \ + } + +/* + * Other features (used by rig_caps) + */ + +#define FTDX10_TX_ANTS RIG_ANT_CURR + +#define FTDX10_MEM_CHNL_LENGTH 1 /* 0x10 P1 = 01 return size */ +#define FTDX10_OP_DATA_LENGTH 19 /* 0x10 P1 = 03 return size */ +#define FTDX10_VFO_DATA_LENGTH 18 /* 0x10 P1 = 03 return size -- A & B returned */ +#define FTDX10_MEM_CHNL_DATA_LENGTH 19 /* 0x10 P1 = 04, P4 = 0x01-0x20 return size */ +#define FTDX10_STATUS_FLAGS_LENGTH 5 /* 0xf7, 0xfa return size */ +#define FTDX10_ALL_DATA_LENGTH 649 /* 0x10 P1 = 00 return size */ + +/* Timing values in mS */ + +/* Delay between bytes sent + * Should not exceed value set in CAT TOT menu (rig default is 10 mSec) + */ +#define FTDX10_WRITE_DELAY 0 + + +/* Delay sequential fast writes */ + +#define FTDX10_POST_WRITE_DELAY 5 + +#endif /* _FTDX10_H */ commit f4df454f73feffce8a3a7b70b708aa9a6337d119 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Dec 28 15:21:37 2020 -0600 Normalize Yaeus DX model names diff --git a/rigs/yaesu/ft1200.c b/rigs/yaesu/ft1200.c index 3e295e95..1a2da5d5 100644 --- a/rigs/yaesu/ft1200.c +++ b/rigs/yaesu/ft1200.c @@ -87,7 +87,7 @@ int ftdx1200_ext_tokens[] = const struct rig_caps ftdx1200_caps = { RIG_MODEL(RIG_MODEL_FTDX1200), - .model_name = "FTDX 1200", + .model_name = "FTDX-1200", .mfg_name = "Yaesu", .version = NEWCAT_VER ".0", .copyright = "LGPL", diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index 6a7e20a3..c06274b6 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -92,7 +92,7 @@ int ftdx3000_ext_tokens[] = const struct rig_caps ftdx3000_caps = { RIG_MODEL(RIG_MODEL_FTDX3000), - .model_name = "FTDX 3000", + .model_name = "FTDX-3000", .mfg_name = "Yaesu", .version = NEWCAT_VER ".2", .copyright = "LGPL", diff --git a/rigs/yaesu/ft5000.c b/rigs/yaesu/ft5000.c index df68029d..0a8e6cf8 100644 --- a/rigs/yaesu/ft5000.c +++ b/rigs/yaesu/ft5000.c @@ -86,7 +86,7 @@ int ftdx5000_ext_tokens[] = const struct rig_caps ftdx5000_caps = { RIG_MODEL(RIG_MODEL_FTDX5000), - .model_name = "FTDX 5000", + .model_name = "FTDX-5000", .mfg_name = "Yaesu", .version = NEWCAT_VER ".0", .copyright = "LGPL", diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index 5152e05c..8ecc1b77 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -74,7 +74,7 @@ int ftdx101d_ext_tokens[] = const struct rig_caps ftdx101d_caps = { RIG_MODEL(RIG_MODEL_FTDX101D), - .model_name = "FTDX101D", + .model_name = "FTDX-101D", .mfg_name = "Yaesu", .version = NEWCAT_VER ".7", .copyright = "LGPL", commit f08903d8ce50e3aa36c4b4fe92246c7d9112a030 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Dec 28 15:17:49 2020 -0600 Add Yaesu FTDX10 rig diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 7cbc0a26..75f121e2 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -118,6 +118,7 @@ #define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39) #define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40) #define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41) +#define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42) /* diff --git a/rigs/yaesu/Makefile.am b/rigs/yaesu/Makefile.am index 422bf22a..d6857ab4 100644 --- a/rigs/yaesu/Makefile.am +++ b/rigs/yaesu/Makefile.am @@ -5,12 +5,12 @@ YAESUSRC = ft100.c ft100.h ft747.c ft747.h ft817.c ft817.h ft847.c ft847.h \ ft890.c ft890.h ft900.c ft900.h ft920.c ft920.h ft1000mp.c ft1000mp.h \ ft857.c ft857.h ft897.c ft897.h ft990.c ft990.h frg8800.c ft757gx.c \ ft757gx.h ft600.h ft600.c ft736.c frg100.c frg100.h frg9600.c ft1000d.c ft1000d.h \ - vr5000.c ft767gx.c ft767gx.h ft840.c ft840.h ft980.c vx1700.c vx1700.h + vr5000.c ft767gx.c ft767gx.h ft840.c ft840.h ft980.c vx1700.c vx1700.h ftdx10.h ## Yaesu radios that use the new Kenwood style CAT commands NEWCATSRC = newcat.c newcat.h ft450.c ft450.h ft950.c ft950.h ft991.c ft991.h \ ft2000.c ft2000.h ft9000.c ft9000.h ft5000.c ft5000.h ft1200.c ft1200.h \ - ft891.c ft891.h ftdx101.c ftdx101.h ft3000.c + ft891.c ft891.h ftdx101.c ftdx101.h ft3000.c ftdx10.c noinst_LTLIBRARIES = libhamlib-yaesu.la libhamlib_yaesu_la_SOURCES = $(YAESUSRC) $(NEWCATSRC) yaesu.c yaesu.h diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 7c231116..705a9e35 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -91,6 +91,7 @@ typedef struct _yaesu_newcat_commands ncboolean ft1200; ncboolean ft3000; ncboolean ft101; + ncboolean ft10; } yaesu_newcat_commands_t; /** @@ -209,6 +210,7 @@ static ncboolean is_ftdx5000; static ncboolean is_ftdx1200; static ncboolean is_ftdx3000; static ncboolean is_ftdx101; +static ncboolean is_ftdx10; /* * Even thought this table does make a handy reference, it could be depreciated as it is not really needed. @@ -228,126 +230,128 @@ static ncboolean is_ftdx101; */ static const yaesu_newcat_commands_t valid_commands[] = { - /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D */ - {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AN", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AO", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"BA", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, - {"BC", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"BP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CO", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"DA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"DN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"DT", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE }, - {"DP", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE }, - {"DS", TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE }, - {"ED", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"EK", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE }, - {"EN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, - {"EU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"EX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FK", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, - {"FR", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"GT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"ID", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"IF", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"IS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"LK", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"LM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MA", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MB", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"MC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MK", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE }, - {"ML", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"MW", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MX", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NA", TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE }, - {"NB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"OI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"OS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RO", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, - {"RP", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - {"RS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SQ", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SS", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, + /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 */ + {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AN", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"AO", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"BA", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE }, + {"BC", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"BP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CO", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"DA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"DN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"DT", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE }, + {"DP", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + {"DS", TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + {"ED", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"EK", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE }, + {"EM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"EN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE }, + {"EU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"EX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FK", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"FN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"FR", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"GT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"ID", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"IF", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"IS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"LK", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"LM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MA", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MB", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"MC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MK", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + {"ML", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"MW", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MX", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"NA", TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"NB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"NL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"NR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"OI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"OS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"PA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"PB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"PC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"PL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"PR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"PS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"QS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RO", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, + {"RP", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"RS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"RU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SQ", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SS", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, // ST command has two meanings Step or Split Status // If new rig is added that has ST ensure it means Split // Otherwise modify newcat_get_tx_vfo - {"ST", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"SV", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SY", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"TS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"TX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"UL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"UP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"VD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"VF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, - {"VG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"VM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"VR", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - {"VS", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"VT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"VV", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - {"VX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"XT", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"ZI", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, + {"ST", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + {"SV", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"SY", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE }, + {"TS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"TX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"UL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"UP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"VD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"VF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, + {"VG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"VM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"VR", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"VS", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"VT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE }, + {"VV", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"VX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"XT", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"ZI", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, }; -int valid_commands_count = sizeof(valid_commands) / sizeof( - yaesu_newcat_commands_t); + +int valid_commands_count = sizeof(valid_commands) / sizeof(yaesu_newcat_commands_t); /* * configuration Tokens @@ -1693,15 +1697,17 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%04li%c", command, offs, cat_term); } - else if (is_ftdx101) + else if (is_ftdx101 || is_ftdx10) { if (freq >= 28000000 && freq <= 29700000) { strcpy(command, "EX010315"); + if (is_ftdx10) strcpy(command, "EX010317"); } else if (freq >= 50000000 && freq <= 54000000) { strcpy(command, "EX010316"); + if (is_ftdx10) strcpy(command, "EX010318"); } else { @@ -1897,15 +1903,19 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs) // Step size is 1 kHz step = 1000; } - else if (is_ftdx101) + else if (is_ftdx101 || is_ftdx10) { if (freq >= 28000000 && freq <= 29700000) { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX010315%c", cat_term); + char *cmd = "EX010315%c"; + if (is_ftdx10) cmd = "EX010317%c"; + snprintf(priv->cmd_str, sizeof(priv->cmd_str), cmd, cat_term); } else if (freq >= 50000000 && freq <= 54000000) { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX010316%c", cat_term); + char *cmd = "EX010316%c"; + if (is_ftdx10) cmd = "EX010318%c"; + snprintf(priv->cmd_str, sizeof(priv->cmd_str), cmd, cat_term); } else { @@ -2349,7 +2359,7 @@ int newcat_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) } else { - err = newcat_set_faststep(rig, TRUE); + err = newcat_set_faststep(rig, TRUE); } if (err != RIG_OK) @@ -2514,6 +2524,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) { if (is_ft891 || is_ft991 || is_ftdx101) { + // note ftdx101 cat manual says CTP1P2; not CTP1P2P3; so is this correct? snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT%c00%c", main_sub_vfo, cat_term); } @@ -2525,7 +2536,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) } else { - if (is_ft891 || is_ft991 || is_ftdx101) + if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CN%c0%03d%cCT%c2%c", main_sub_vfo, i, cat_term, main_sub_vfo, cat_term); @@ -2570,7 +2581,7 @@ int newcat_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone) main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } - if (is_ft891 || is_ft991 || is_ftdx101) + if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c0%c", cmd, main_sub_vfo, cat_term); @@ -2655,7 +2666,7 @@ int newcat_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) /* Change to sql */ if (tone) { - err = newcat_set_func(rig, vfo, RIG_FUNC_TSQL, TRUE); + err = newcat_set_func(rig, vfo, RIG_FUNC_TSQL, TRUE); if (err != RIG_OK) { @@ -3176,7 +3187,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } if (is_ft950 || is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 - || is_ftdx101) + || is_ftdx101 || is_ftdx10) { scale = 100.; } @@ -3191,7 +3202,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) fpf = newcat_scale_float(scale, val.f); - if (is_ft950 || is_ft891 || is_ft991 || is_ftdx3000 || is_ftdx101) + if (is_ft950 || is_ft891 || is_ft991 || is_ftdx3000 || is_ftdx101 || is_ftdx10) { // Minimum is 5 watts on these rigs if (fpf < 5) @@ -3273,7 +3284,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } - if (is_ftdx101) + if (is_ftdx101 || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "IS%c0%+.4d%c", main_sub_vfo, val.i, cat_term); @@ -3350,7 +3361,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return -RIG_ENAVAIL; } - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101) + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { fpf = newcat_scale_float(100, val.f); } @@ -3612,7 +3623,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) millis = dot10ths_to_millis(val.i, keyspd.i); - if (is_ftdx101) + if (is_ftdx101 || is_ftdx10) { if (millis <= 30) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SD00;"); } else if (millis <= 50) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SD01;"); } @@ -3695,7 +3706,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return -RIG_ENAVAIL; } - if (is_ft891 || is_ft991 || is_ftdx101) + if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { scale = 100; } @@ -3733,7 +3744,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VD%04d%c", val.i, cat_term); } - else if (is_ftdx101) // new lookup table argument + else if (is_ftdx101 || is_ftdx10) // new lookup table argument { rig_debug(RIG_DEBUG_TRACE, "%s: ft101 #1 val.i=%d\n", __func__, val.i); @@ -3743,7 +3754,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) else if (val.i > 3000) { val.i = 33; } else { val.i = (val.i - 300) / 100 + 6; } - rig_debug(RIG_DEBUG_TRACE, "%s: ft101 #1 val.i=%d\n", __func__, val.i); + rig_debug(RIG_DEBUG_TRACE, "%s: ftdx101/ftdx10 #1 val.i=%d\n", __func__, val.i); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VD%02d%c", val.i, cat_term); } @@ -3789,7 +3800,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) break; case RIG_LEVEL_ANTIVOX: - if (is_ftdx101) + if (is_ftdx101 || is_ftdx10) { fpf = newcat_scale_float(100, val.f); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AV%03d%c", fpf, cat_term); @@ -3854,7 +3865,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } - if (is_ft891 || is_ft991 || is_ftdx101) + if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { if (val.i > 320) { @@ -3896,7 +3907,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return -RIG_ENAVAIL; } - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101) + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { fpf = newcat_scale_float(100, val.f); } @@ -4220,7 +4231,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_ANTIVOX: - if (is_ftdx101) + if (is_ftdx101 || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AV%c", cat_term); } @@ -4318,7 +4329,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { case RIG_LEVEL_RFPOWER: if (is_ft950 || is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 - || is_ftdx101) + || is_ftdx101 || is_ftdx10) { scale = 100.; } @@ -4481,7 +4492,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_MICGAIN: - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101) + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { scale = 100.; } @@ -4511,7 +4522,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_SQL: - if (is_ft891 || is_ft991 || is_ftdx101) + if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { scale = 100.; } @@ -4529,7 +4540,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) int millis; value_t keyspd; - if (is_ftdx101) + if (is_ftdx101 || is_ftdx10) { switch (raw_value) { @@ -4577,7 +4588,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ft891 || is_ft991 - || is_ftdx101) + || is_ftdx101 || is_ftdx10) { val->i = round(rig_raw2val(atoi(retlvl), &yaesu_default_str_cal)); } @@ -6140,9 +6151,11 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) is_ftdx1200 = newcat_is_rig(rig, RIG_MODEL_FTDX1200); is_ftdx3000 = newcat_is_rig(rig, RIG_MODEL_FTDX3000); is_ftdx101 = newcat_is_rig(rig, RIG_MODEL_FTDX101D); + is_ftdx10 = newcat_is_rig(rig, RIG_MODEL_FTDX10); if (!is_ft450 && !is_ft950 && !is_ft891 && !is_ft991 && !is_ft2000 - && !is_ftdx5000 && !is_ftdx9000 && !is_ftdx1200 && !is_ftdx3000 && !is_ftdx101) + && !is_ftdx5000 && !is_ftdx9000 && !is_ftdx1200 && !is_ftdx3000 && !is_ftdx101 + && !is_ftdx10) { rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n", __func__, caps->model_name); return FALSE; @@ -6217,6 +6230,10 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) { return TRUE; } + else if (is_ftdx10 && valid_commands[search_index].ft10) + { + return TRUE; + } else { rig_debug(RIG_DEBUG_TRACE, "%s: '%s' command '%s' not supported\n", @@ -6720,7 +6737,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_PKTFM: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -6812,7 +6829,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_PKTFM: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -6913,7 +6930,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_AMN: if (width == RIG_PASSBAND_NORMAL || width == 6000) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } return err; @@ -6929,7 +6946,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_FMN: if (width == RIG_PASSBAND_NORMAL || width == 9000) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } return err; @@ -6937,7 +6954,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_C4FM: if (width == RIG_PASSBAND_NORMAL || width == 16000) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else if (width == 9000) { @@ -6953,7 +6970,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_PKTFM: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -7070,7 +7087,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_FMN: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -7182,7 +7199,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_FMN: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -7192,7 +7209,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return err; } } // end is_ftdx5000 - else if (is_ftdx101) + else if (is_ftdx101 || is_ftdx10) { switch (mode) { @@ -7277,7 +7294,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_PKTFM: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -7373,7 +7390,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_FMN: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -7416,7 +7433,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_PKTFM: if (width > 0 && width < rig_passband_normal(rig, mode)) { - err = newcat_set_narrow(rig, vfo, TRUE); + err = newcat_set_narrow(rig, vfo, TRUE); } else { @@ -7434,7 +7451,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) } /* end else */ - if (is_ftdx101 || is_ft891) + if (is_ftdx101 || is_ft891 || is_ftdx10) { // some rigs now require the bandwidth be turned "on" int on = is_ft891; @@ -8424,7 +8441,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) } /* end switch(mode) */ } /* end if is_ftdx5000 */ - else if (is_ftdx101) + else if (is_ftdx101 || is_ftdx10) { rig_debug(RIG_DEBUG_TRACE, "%s: is_ftdx101 w=%d, mode=%s\n", __func__, w, rig_strrmode(mode)); ... [truncated message content] |
From: Michael B. <mdb...@us...> - 2020-12-27 23:17:37
|
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 c2feb98693b0ca607dd9c47250bbc688bad6a680 (commit) from 41f5e8d24abca6b4bde67817bc73a367bb406256 (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 c2feb98693b0ca607dd9c47250bbc688bad6a680 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 27 17:15:57 2020 -0600 Fix uninitialized value in prosistel.c diff --git a/rotators/prosistel/prosistel.c b/rotators/prosistel/prosistel.c index 25fd64cc..1767fe9f 100644 --- a/rotators/prosistel/prosistel.c +++ b/rotators/prosistel/prosistel.c @@ -225,7 +225,7 @@ static int prosistel_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) char cmdstr[64]; char data[20]; float posval; - int retval; + int retval = RIG_OK; int n; // Query azimuth only if the rotator has the capability to do so ----------------------------------------------------------------------- Summary of changes: rotators/prosistel/prosistel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-27 22:38:22
|
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 41f5e8d24abca6b4bde67817bc73a367bb406256 (commit) via 82958c957c0add447ab7355e0f520211a4ef68b7 (commit) via a53f494582afd837d439fe9ad767663a5920b478 (commit) via d0c8cff98634df834d507e2fa8b19d6325a5c69e (commit) via 5f73977ec0cbf3e8623d76dfa284f27d4a82412e (commit) from a714899cb0040ff0bb906b140171f81dce144888 (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 41f5e8d24abca6b4bde67817bc73a367bb406256 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 27 15:33:21 2020 -0600 Add RIG_MODE_SPEC to misc.c diff --git a/src/misc.c b/src/misc.c index 40b0f6df..fa023d5b 100644 --- a/src/misc.c +++ b/src/misc.c @@ -391,6 +391,7 @@ static struct { RIG_MODE_PSK, "PSK"}, { RIG_MODE_PSKR, "PSKR"}, { RIG_MODE_C4FM, "C4FM"}, + { RIG_MODE_SPEC, "SPEC"}, { RIG_MODE_NONE, "" }, }; commit 82958c957c0add447ab7355e0f520211a4ef68b7 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 27 14:53:39 2020 -0600 Add RIG_MODE_SPEC for PowerSDR and perhaps others to come diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 8825c8d6..3650026e 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1153,7 +1153,7 @@ typedef uint64_t rmode_t; #define RIG_MODE_DD CONSTANT_64BIT_FLAG (32) /*!< \c DD Mode IC-9700 */ #define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33) /*!< \c Yaesu C4FM mode */ #define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34) /*!< \c Yaesu DATA-FM-N */ -#define RIG_MODE_BIT35 CONSTANT_64BIT_FLAG (35) /*!< \c reserved for future expansion */ +#define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35) /*!< \c Unfiltered as in PowerSDR */ #define RIG_MODE_BIT36 CONSTANT_64BIT_FLAG (36) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT37 CONSTANT_64BIT_FLAG (37) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT38 CONSTANT_64BIT_FLAG (38) /*!< \c reserved for future expansion */ diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index bb6bb9be..4f7f0239 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -908,7 +908,8 @@ static int flrig_open(RIG *rig) else if (streq(p, "WFM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "UCW")) { modeMapAdd(&modes, RIG_MODE_CW, p); } else if (streq(p, "C4FM")) { modeMapAdd(&modes, RIG_MODE_C4FM, p); } - else if (streq(p, "SPEC") || streq(p,"DRM")) + else if (streq(p, "SPEC")) { modeMapAdd(&modes, RIG_MODE_SPEC, p); } + else if (streq(p,"DRM")) // we don't support DRM yet (or maybe ever) { rig_debug(RIG_DEBUG_VERBOSE, "%s: no mapping for mode %s\n", __func__, p); } diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index 9e017c2c..0f5a7fa4 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201226" +#define BACKEND_VER "20201227" #define EOM "\r" #define TRUE 1 diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index 492d5205..83c2249f 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -49,6 +49,8 @@ #define F6K_ANTS (RIG_ANT_1|RIG_ANT_2|RIG_ANT_3) /* PowerSDR differences */ +#define POWERSDR_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_AM|RIG_MODE_FM|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_SPEC) + #define POWERSDR_FUNC_ALL (RIG_FUNC_VOX|RIG_FUNC_SQL|RIG_FUNC_NB|RIG_FUNC_ANF|RIG_FUNC_MUTE|RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER) #define POWERSDR_LEVEL_ALL (RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW|RIG_LEVEL_KEYSPD|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_MICGAIN|RIG_LEVEL_VOXGAIN|RIG_LEVEL_SQL|RIG_LEVEL_AF|RIG_LEVEL_AGC|RIG_LEVEL_RF|RIG_LEVEL_IF) @@ -1206,31 +1208,31 @@ const struct rig_caps powersdr_caps = .chan_list = { RIG_CHAN_END }, .rx_range_list1 = { - {kHz(30), MHz(77), F6K_MODES, -1, -1, F6K_VFO, F6K_ANTS}, - {MHz(135), MHz(165), F6K_MODES, -1, - 1, F6K_VFO, F6K_ANTS}, + {kHz(30), MHz(77), POWERSDR_MODES, -1, -1, F6K_VFO, F6K_ANTS}, + {MHz(135), MHz(165), POWERSDR_MODES, -1, - 1, F6K_VFO, F6K_ANTS}, RIG_FRNG_END, }, /* rx range */ .tx_range_list1 = { - FRQ_RNG_HF(1, F6K_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), - FRQ_RNG_6m(1, F6K_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), - FRQ_RNG_2m(1, F6K_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), + FRQ_RNG_HF(1, POWERSDR_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), + FRQ_RNG_6m(1, POWERSDR_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), + FRQ_RNG_2m(1, POWERSDR_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), RIG_FRNG_END, }, /* tx range */ .rx_range_list2 = { - {kHz(30), MHz(77), F6K_MODES, -1, -1, F6K_VFO, F6K_ANTS}, - { MHz(135), MHz(165), F6K_MODES, -1, -1, F6K_VFO, F6K_ANTS}, + {kHz(30), MHz(77), POWERSDR_MODES, -1, -1, F6K_VFO, F6K_ANTS}, + { MHz(135), MHz(165), POWERSDR_MODES, -1, -1, F6K_VFO, F6K_ANTS}, RIG_FRNG_END, }, /* rx range */ .tx_range_list2 = { - FRQ_RNG_HF(2, F6K_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), - FRQ_RNG_6m(2, F6K_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), - FRQ_RNG_2m(2, F6K_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), + FRQ_RNG_HF(2, POWERSDR_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), + FRQ_RNG_6m(2, POWERSDR_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), + FRQ_RNG_2m(2, POWERSDR_MODES, mW(10), W(100), F6K_VFO, F6K_ANTS), RIG_FRNG_END, }, /* tx range */ .tuning_steps = { - {F6K_MODES, 1}, + {POWERSDR_MODES, 1}, RIG_TS_END, }, commit a53f494582afd837d439fe9ad767663a5920b478 Merge: 5f73977e d0c8cff9 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 27 13:01:27 2020 -0600 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit d0c8cff98634df834d507e2fa8b19d6325a5c69e Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 27 18:57:01 2020 +0000 Fix cygwin compilation for g313-winradio https://github.com/Hamlib/Hamlib/issues/479 diff --git a/rigs/winradio/g313-win.c b/rigs/winradio/g313-win.c index 8bbc3328..abc99cf3 100644 --- a/rigs/winradio/g313-win.c +++ b/rigs/winradio/g313-win.c @@ -27,7 +27,7 @@ #define G313_MODES (RIG_MODE_NONE) -#ifdef _WIN32 +#if defined (_WIN32) || !defined(OTHER_POSIX) #ifdef HAVE_WINDOWS_H #include <windows.h> commit 5f73977ec0cbf3e8623d76dfa284f27d4a82412e Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 27 12:44:14 2020 -0600 fix cygwin compile warning on rotorex.c diff --git a/rotators/rotorez/rotorez.c b/rotators/rotorez/rotorez.c index 36d684c3..e3c87472 100644 --- a/rotators/rotorez/rotorez.c +++ b/rotators/rotorez/rotorez.c @@ -764,7 +764,7 @@ static int rt21_rot_get_position(ROT *rot, azimuth_t *azimuth, * Seems as though at least five characters are returned and a * space is used as a leading pad character if needed. */ - if ((isdigit(az[0])) || (isspace(az[0]))) + if ((isdigit((int)az[0])) || (isspace((int)az[0]))) { azimuth_t tmp = strtof(az, NULL); rig_debug(RIG_DEBUG_TRACE, "%s: \"%s\" after conversion = %.1f\n", ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 2 +- rigs/dummy/flrig.c | 3 ++- rigs/dummy/flrig.h | 2 +- rigs/kenwood/flex6xxx.c | 24 +++++++++++++----------- rigs/winradio/g313-win.c | 2 +- rotators/rotorez/rotorez.c | 2 +- src/misc.c | 1 + 7 files changed, 20 insertions(+), 16 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-27 05:55:58
|
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 a714899cb0040ff0bb906b140171f81dce144888 (commit) from f14054b6fa3ddf173628d4e90286accedbfffa76 (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 a714899cb0040ff0bb906b140171f81dce144888 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 26 23:55:28 2020 -0600 Update modes for PowerSDR in flrig.c diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 4b8cae14..bb6bb9be 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -856,6 +856,8 @@ static int flrig_open(RIG *rig) else if (streq(p, "D-USB")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DATA")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DATA-FM")) { modeMapAdd(&modes, RIG_MODE_PKTFM, p); } + else if (streq(p, "DATA-L")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } + else if (streq(p, "DATA-R")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "DATA-LSB")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "DATA-USB")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DATA-U")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } @@ -863,8 +865,7 @@ static int flrig_open(RIG *rig) else if (streq(p, "DIGI")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DIGL")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "DIGU")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } - else if (streq(p, "DATA-L")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } - else if (streq(p, "DATA-R")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } + else if (streq(p, "DSB")) { modeMapAdd(&modes, RIG_MODE_DSB, p); } else if (streq(p, "FM")) { modeMapAdd(&modes, RIG_MODE_FM, p); } else if (streq(p, "FM-D")) { modeMapAdd(&modes, RIG_MODE_PKTFM, p); } else if (streq(p, "FMN")) { modeMapAdd(&modes, RIG_MODE_FMN, p); } @@ -907,6 +908,10 @@ static int flrig_open(RIG *rig) else if (streq(p, "WFM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "UCW")) { modeMapAdd(&modes, RIG_MODE_CW, p); } else if (streq(p, "C4FM")) { modeMapAdd(&modes, RIG_MODE_C4FM, p); } + else if (streq(p, "SPEC") || streq(p,"DRM")) + { + rig_debug(RIG_DEBUG_VERBOSE, "%s: no mapping for mode %s\n", __func__, p); + } else { rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode (new?) for this rig='%s'\n", __func__, p); } } ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-27 05:38:36
|
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 f14054b6fa3ddf173628d4e90286accedbfffa76 (commit) from b9d79641a6eb1b1ecd01de314048446397665d5f (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 f14054b6fa3ddf173628d4e90286accedbfffa76 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 26 23:38:06 2020 -0600 Add DIGU/DIGL for flrig modes for PowerSDR diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index b4df56df..4b8cae14 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -196,15 +196,11 @@ static struct s_modeMap modeMap[] = {RIG_MODE_LSB, NULL}, {RIG_MODE_PKTUSB, NULL}, {RIG_MODE_PKTLSB, NULL}, - {RIG_MODE_PKTUSB, NULL}, - {RIG_MODE_PKTLSB, NULL}, {RIG_MODE_AM, NULL}, {RIG_MODE_FM, NULL}, {RIG_MODE_FMN, NULL}, {RIG_MODE_WFM, NULL}, {RIG_MODE_CW, NULL}, - {RIG_MODE_CW, NULL}, - {RIG_MODE_CWR, NULL}, {RIG_MODE_CWR, NULL}, {RIG_MODE_RTTY, NULL}, {RIG_MODE_RTTYR, NULL}, @@ -865,6 +861,8 @@ static int flrig_open(RIG *rig) else if (streq(p, "DATA-U")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DIG")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DIGI")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } + else if (streq(p, "DIGL")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } + else if (streq(p, "DIGU")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DATA-L")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "DATA-R")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "FM")) { modeMapAdd(&modes, RIG_MODE_FM, p); } diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index b46ceeb7..9e017c2c 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201224" +#define BACKEND_VER "20201226" #define EOM "\r" #define TRUE 1 ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 6 ++---- rigs/dummy/flrig.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-26 17:12:08
|
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 b9d79641a6eb1b1ecd01de314048446397665d5f (commit) from 35c1d9c3bf07bdaa19450a7a271ca32e8979cc77 (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 b9d79641a6eb1b1ecd01de314048446397665d5f Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 26 11:10:50 2020 -0600 Fix g313_caps for Linux build in winradio.h https://github.com/Hamlib/Hamlib/issues/479 diff --git a/rigs/winradio/winradio.h b/rigs/winradio/winradio.h index 5aa88507..707eba79 100644 --- a/rigs/winradio/winradio.h +++ b/rigs/winradio/winradio.h @@ -59,7 +59,7 @@ extern const struct rig_caps wr3500_caps; extern const struct rig_caps wr3700_caps; extern const struct rig_caps g303_caps; extern const struct rig_caps g305_caps; -#ifdef _WIN32 +#if defined( _WIN32) || !defined(OTHER_POSIX) extern const struct rig_caps g313_caps; #endif ----------------------------------------------------------------------- Summary of changes: rigs/winradio/winradio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-12-26 15:50:33
|
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 35c1d9c3bf07bdaa19450a7a271ca32e8979cc77 (commit) via 1e6bce288f284fba4db4ab376dbbd0edcaa065f3 (commit) via 18e9d56b4745097be56ac3899e4237afbf3f1736 (commit) from 5d2f5012c0623411be02308167a85cab64a7e328 (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 35c1d9c3bf07bdaa19450a7a271ca32e8979cc77 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 26 08:49:17 2020 -0600 Fix g313_caps undefined referenced when _WIN32 is not defined https://github.com/Hamlib/Hamlib/issues/479 diff --git a/rigs/winradio/winradio.h b/rigs/winradio/winradio.h index 5174211e..5aa88507 100644 --- a/rigs/winradio/winradio.h +++ b/rigs/winradio/winradio.h @@ -59,6 +59,8 @@ extern const struct rig_caps wr3500_caps; extern const struct rig_caps wr3700_caps; extern const struct rig_caps g303_caps; extern const struct rig_caps g305_caps; +#ifdef _WIN32 extern const struct rig_caps g313_caps; +#endif #endif /* _WINRADIO_H */ commit 1e6bce288f284fba4db4ab376dbbd0edcaa065f3 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 24 23:15:42 2020 -0600 Add C4FM mode to flrig.c https://github.com/Hamlib/Hamlib/issues/478 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 5dc4f823..b4df56df 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -55,7 +55,8 @@ RIG_MODE_RTTY | RIG_MODE_RTTYR |\ RIG_MODE_PKTLSB | RIG_MODE_PKTUSB |\ RIG_MODE_SSB | RIG_MODE_LSB | RIG_MODE_USB |\ - RIG_MODE_FM | RIG_MODE_WFM | RIG_MODE_FMN |RIG_MODE_PKTFM ) + RIG_MODE_FM | RIG_MODE_WFM | RIG_MODE_FMN | RIG_MODE_PKTFM |\ + RIG_MODE_C4FM) #define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER | RIG_LEVEL_RFPOWER_METER_WATTS) @@ -207,6 +208,7 @@ static struct s_modeMap modeMap[] = {RIG_MODE_CWR, NULL}, {RIG_MODE_RTTY, NULL}, {RIG_MODE_RTTYR, NULL}, + {RIG_MODE_C4FM, NULL}, {0, NULL} }; @@ -906,6 +908,7 @@ static int flrig_open(RIG *rig) else if (streq(p, "W-FM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "WFM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "UCW")) { modeMapAdd(&modes, RIG_MODE_CW, p); } + else if (streq(p, "C4FM")) { modeMapAdd(&modes, RIG_MODE_C4FM, p); } else { rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode (new?) for this rig='%s'\n", __func__, p); } } diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index ad0e0f74..b46ceeb7 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201217" +#define BACKEND_VER "20201224" #define EOM "\r" #define TRUE 1 commit 18e9d56b4745097be56ac3899e4237afbf3f1736 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 22 17:01:06 2020 -0600 Add some debug for set_mode stuff diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index c366f3b1..73370375 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -637,7 +637,7 @@ rmode_t kenwood2rmode(unsigned char mode, const rmode_t mode_table[]) char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, rig_strrmode(mode)); if (mode != RIG_MODE_NONE) { @@ -647,6 +647,7 @@ char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) { if (mode_table[i] == mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: returning %d\n", __func__, i); return i; } } @@ -1839,7 +1840,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) struct kenwood_priv_caps *caps = kenwood_caps(rig); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width); if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS950S || RIG_IS_TS950SDX) { @@ -1891,6 +1892,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { c = 'A' + kmode - 10; } + rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c\n", __func__, kmode, c); if (RIG_IS_TS990S) { diff --git a/src/rig.c b/src/rig.c index 0a3a4cc5..6f2771ee 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1727,7 +1727,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) const struct rig_caps *caps; int retcode; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width); if (CHECK_RIG_ARG(rig)) { ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 5 ++++- rigs/dummy/flrig.h | 2 +- rigs/kenwood/kenwood.c | 6 ++++-- rigs/winradio/winradio.h | 2 ++ src/rig.c | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2020-12-25 03:00:03
|
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 annotated tag, 4.0 has been created at 9411bea1b6f4c3d477321520edf0504c08e0d117 (tag) tagging 519f8294691d3a64afa4ae6bf9257c5b66f3aa33 (commit) tagged by Nate Bargmann on Thu Dec 24 20:57:07 2020 -0600 - Log ----------------------------------------------------------------- Hamlib 4.0 release -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEG5vcSeqIHtMzWHg79yYl4u2+1ZgFAl/lVSQACgkQ9yYl4u2+ 1ZjDIgwAh/6QzBtbw1jX/8aQXnQVR8nJXLM531MMwn2/z7G+85kYCcGDVxjNFtY6 p+sotTWjAK7VsHF0ER6JjYJFOGtuzCbdBE8YG/Zoj5mMZYTLGHHCWgrRxb6MACtE fXrCz7Dkk5rT9/4VqQD6YJjA1O++j9NPF6LUbzVvluLnQZREAvfRmO3MiRDtNjkt V5FGoNZcNkNYA1JzdH1O2Fcq/vfbZ1zlqTjVzGDID/rX+K7UWcg40XRO+RRpGYbB A/1T8RZm6RUfyOHHDT+J9TU4e3QEuzGIZxZFhY0YZNe+qKlu1bbKNDWg9UXbBsfp 6hnzcRpI/bQbFb69FeNbkFhe+Rdyn38g0FmDu0tRsW7YFYzmoDZknRE3RgTLtCgj fvRLPJoXPbUBdi4ssZfIzz4ylveOkZnPsZCktSBkkrSX/C4mLjUQyfuI/uhFZMvp 4J6Yb6ROPfzBLUO1EgSfWqf+yRWJeW0iIZI3d7NqhUU4LNmDARkpuT1Al781pynS vqNBXBLk =qdWP -----END PGP SIGNATURE----- (no author) (1): New repository initialized by cvs2svn. Adrian Chadd (1): Upgrade TS-711 and TS-811 to work. Agis Zisimatos (1): easycomm: Return the correct value of pointer val Alessandro Zummo, IZ1PRB (36): Remove const from priv_caps to allow kenwood_init to initialize default values if they're missing Call kenwood_init in each and every driver Use an appropriate debug level Support get/set_powerstat on pcr100 Add kenwood_simple_cmd Make set_ptt behave as before, fix set_ant for ts570.c ts450: remove RIG_FUNC_TONE from has_xx_func if tone unit is not detected ts450,ts690,ts850: use FL command to get/set filters in get/set_mode. (code from ts850.c) ts450: indentation fixes remove fixed command terminator (;) from generic code ts140,ts2000,ts480,ts570,ts680,ts850,ts870s: remove usage of fixed ; and EOM fix tabs thg71,tmv7,ts450s,ts690: verify rig id at rig_open ts450: implement set_channel remove unused parameter from get_kenwood_func ts570,ts850,ts870s,ts140,ts480,ts680: use kenwood_simple_cmd where possible Replace __FUNCTION__, which is gcc specific and was deprecated a long time ago, with __func__, which is at least defined in C99. generic, ts850: implemented CTCSS TN command (reported not working for ts850, should now be fixed) Add description for the kenwood mode n. 8 implemented set/get_ext_param (voice, fine, xit, rit). enabled on ts450 and ts850 Added my call sign removed comment about switch optimizatons. the compiler will generate the assembly code in a different order which is usually based on the case value. other compiler optimizations might also affect it, so it's useless to optimize the order. check ptt status before set_ptt. enabled on ts850. style fixes band up/down was inverted Try to compensate for leftover characters Try to cope withe the PCR100 and PCR1000 at the same time Bumped out to beta, solved a few bugs. Tested with PCR100/1000/1500. kenwood: send the whole buffer at once, added kenwood_cmd - removed EOM, it's handled by kenwood_transaction - fixed tabs and spaces - added generic routine for vfo errors - set_mem: do not switch vfo if already in mem mode - simplified invocation of some commands - buffer optimizations - added PARM_BEEP and PARM_APO - fixed getting of LEVEL_RFPOWER - fixed get_ant tmv7: removed EOM thg71: removed EOM thf7: - wrong rfpower level granularity - added .reset - call kenwood_open - use generic th_set_vfo th: fixed formatting issue th: fixed stack corruption th: fixed a missing newline Alex V Flinsch, KC2IVL (8): Initial changes for ft100 Initial release initial release fixed various command options new file, list of tones/codes and sequence used by various yaesu rigs added get frequency to ft100 code added getinfo func hdr *** empty log message *** Alexander Sack (1): Get firmware revision level from K3/KX3. Alexander Schultze (3): easycomm: include a new EasyComm3 to support move speed and infostring update EasyComm3 to include setting and getting of config and status easycomm: implement get/set config, easycom include status and error bytes, fix get_info Alexandru Csete OZ9AEC (34): Added new stylesheet to make API docs look better. Modified to use new stylesheet. Added doxygen comments. Added rotator.h and rotlist.h to the input list. Applied Tommi's improvements from the FT-857 backend with the following changes and additions: Full RF power scale corresponds to 10 bars, not 15. Added RIT, XIT and IF shift ranges to dummy backend. Cast constant caps to variable caps in order to avoid compiler warnings. Cast from const to variable in order to avoid compiler warnings. - Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (ft920). - Disable unused functions and variables (frg100). - Incremented backend version numbers. Use tone_t for pcr1_ctcss_list. Changed arg 4 of pcr_transaction to unsigned. Cast the other mismatches to (char *). Cast unsigned char to char in order to avoid compiler warnings. Incremented backend version number. - Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (tentec.c). - Cast unsigned char to char in order to avoid compiler warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast unsigned char to char in order to avoid compiler warnings. - Handle all enum values in switch statements. Fixed type mismatches that caused compile warnings. Fixed type mismatches that caused compile warnings. Initialise icom_val to avoid compiler warning. Fixed type mismatches between signed and unsigned char. There are a few very suspicious 'if' statements in icom.c and frame.c - Fixed type mismatches and unhandled switch cases. - Incremented backend version numbers. Cast constant caps to variable caps in order to avoid compiler warnings. Updated. Added infor about w (send_cmd). Max serial rate is 9600. Changed backend status to stable. Escape the backslash character. The 765 can do RIG_SCAN_PROG and RIG_SCAN_MEM. Fixed S-meter reading to use calibration table since frontend always uses RAWSTR. Fixed RF power reading and added power2mw and mw2power. Fixed RIG_LEVEL_STRENGTH reading. Andrew Errington (1): Initial support for CM108 GPIO contorl of PTT Ben Coleman, NJ8J (6): Fixed bug in rpcrig_set_parm (using RIG_LEVEL_IS_FLOAT instead of RIG_PARM_FLOAT) Fixed same bug in rigctl_get_parm. Added checking of return string from rig on set (non-retrieval) commands. Added code for COMP function. Added alinco_set_parm & tweaked dx77 capabilities. Handle setting Keyer speed and CW Pitch Added NJ8J's email address. Change email address for NJ8J Berndt Josef Wulf, VK5ABN (11): Implemented rig_set_channel() Implemented set_parm() for BACKLIGHT operation Commented out RIG_MODE_PKTFM overlooked at the submission of previous code Implemented RIG_MODE_PKTFM and RIG_MODE_PKTLSB modes Changed debug message format for freq_t from long long to double ft990_get_ptt() now uses the FT990_SF_XMIT instead of FT990_SF_PTT. FT990_SF_PTT only returns status of PTT activated by CAT commands, whereas FT990_SF_XMIT reports the actual status of the ptt line. ft990_get_mem(): Fixed bug that prevented the reporting of current channel number when vfo != RIG_VFO_MEM Fixed erroneous return value Fixed mispelled name for VK5ABN Added missing modes to RX/TX caps Fixed bug in ft990_set_mode that caused RTTY interchanged modes USB/LSB Fixed bugs in ft990_get_channel Bill Barker (1): Add test for Flex 6300 ID Bill Somerville (208): Patch submission for IC-756 Patch to allow same serial port for PTT and CAT. Patch to fix broken Yaesu backend with FT-2000(D) Fix rig_open not failing when PTT/DCD port is unavailable. Fix Icom IC-756 filter handling. Fix Yaesu newcat backend set_tx_vfo issue. Add support for Data Modes on Icom "Pro" models. Fix Icom IC-726 mode handling. Fix Kenwood TS-2000 split operation. Fix Kenwood Split Operation for TS50 & TS480. Fix Kenwood TS-870s split and bandwidth set/get. Correct receive buffer length for IS; comamnd. Fix Kenwood CAT transaction busy retry mechanism. Fix Kenwood get split VFO function. Add data sub-mode support for TS590s. Correct order of MD and DA commands for TS590s. Get firmware revision for TS590s in rig_open. Fix TS590s firmware defect. Fix Kenwood get_vfo function returning wrong VFO in split TX. Make Kenwood TS590s firmware defect fixup revision specific. Extend TS590s firmware defect fixup to both VFOs. Fix Icom IC-756 Pro III get data mode. Add spilt mode get and set for Elecraft K3. Fix data sub-modes on Elecraft K3. Fix Elecraft Data Mode Translation. Fix Elecraft K3 Data Sub-Mode Setting. Fix Yaesu FT1000MP and FT1000MP Mk V modes. Fix configure.ac Fix a warning message. Added option to not use VFO XCHG command when setting split parameters. Fix a buffer overflow in the Windows termios emulation. Fix pkg-config generation. Fix Icom IC-756Pro mode get/set. Facility for rigctl to read commands from standard input. Add a pause command to the rigctl command set. Prefix action function names so as not to clash with system names. Prefix action function names so as not to clash with system names. Corrected typos in rigctl.1 manpage. Add read commands from stdin and pause command features to rotctl. Merge branch 'rigctl-stdin' of ssh://git.code.sf.net/u/bsomervi/hamlib into rigctl-stdin Fix manpage errors. Remove redundant RIG_PTT_SERIAL_CAT enum from ptt_t Only check for serial control line conflicts if PTT shares CAT port Fix Ten-Tec Orion get/set split functions Icom IC-7410 has VFO A/B not MAIN/SUB Added IC-7410 data modes Add retry mechanism for Yaesu "newcat" backend Implement retries for Yaesu "newcat" rigs Disable auto information mode on open Add retry mechanism for Yaesu "newcat" backend Implement retries for Yaesu "newcat" rigs Disable auto information mode on open Merge branch 'yaesu-retries' of ssh://git.code.sf.net/u/bsomervi/hamlib into yaesu-retries RIG_OK is zero and need not be negated and this will not change Fix response length expected error in K3 back end Data mode support for the Icom IC-7700 Data mode support for the Icom IC-9100 Data mode support for the Icom IC-7200 Add support for the Kenwood TS-590SG Kenwood TS-590SG Always clear serial control lines when used for PTT Disable AI mode on open for Kenwood/Elecraft rigs Add more diagnostics and error checks to serial line control Move serial line control error checks to lower level routines Merge branch 'master' into kenwood-ai-off-at-start Merge branch 'master' into ptt-control-on-cat-port Fix serial i/o on Windows. Yaesu newcat style command response reading improvements Increase communications timeout for Icom rigs Kenwood AIn; command has no reply Revert read_string() to partial results are a success status Remove gratuitous sleeps before function exits Error checks on simulated direct VFO addressing Elecraft K2 RTTY modes are not FSK Kenwood and Elecraft rigs sometimes ignore commands Removed kenwood_cmd function and replaced uses of it Allow for failed test command on the K2 Elecraft K3 has 1 stop bit Kenwood TS-570 series IF returns current frequency Switch to "ID;" command for verification as no "AI;" on TS-840s Increase Elecraft K2 comms timeout and retries Switch Kenwood TS940 to generic kenwood CAT functions Improve command verification for Kenwood & Elecraft Use local buffer in kenwood transaction funciton Clarify the handling of Kenwood CAT message terminators Further clarification in the implementation of kenwood_transaction() Removed redundant precondition test Remove kenwood_simple_cmd as kenwood_transaction has that functionality Call kenwood_open() for TS-2000 to ensure AI mode is disabled Allow for bad ID from DDUtil in TS-2000 mode Allow one extra byte in read_string() length to accomodate terminator Enable data modes for the Icom IC-7100 Allow for PowerSDR ID in Kenwood TS2000 emulation mode Fix TenTec Argonaut message lengths and timeout Fix TenTec set split command Implement get PTT status for the TenTec Argonaut Fix error with width in set mode for the TT argonaut Yaesu FT540 can only change the frequency of the current VFO Fix defect in Kenwood TS-940 IF command response parsing Fix response lengths for the TT Jupiter 538 Do not attempt CAT PTT commands on the Icom IC-706mkIIG Use correct argument type for serial control line functions Initial back end implementation for the Kenwood TS-990s Mode set is not VFO targetable on the Kenwood TS990s The Kenwood TS990s only does split Tx on SUB VFO The doesn't appear to be a way of getting PTT/SEND on the TS990s Lower both RTS and DTR on alternate PTT serial port Honour any error status from serial port calls Dummy get_ptt function needs to read RTS/DTR/PARALLEL Make autogen.sh agnostic to whitespace in paths Increase the number or retries for most Kenwood rigs Command validation for Yaesu set commands Remove unecessary delays from TS-940S backend Proper IPv6 and dual stack networking Fix compiler warnings Proper IPv6 and dual stack networking for rotator net daemon Attempt to restore AI status on exit Allow for poor emulations of Kenwood rigs that have no ID command Use correct function to execute set type commands with no response Add a new command line option '--no-restore-ai' ('-n') to rigctl Fix FT-817/857/897 issues and add some missing functionality Fix missing PKTUSB mode setting code for FT-817 & FT-897 Fix a logic error in band detection during IC-910 set frequency Add missing configuration getters Detect C-IV NAK returns as rejected commands Elecraft rigs do not switch VFO in IF command responses during split Tx. Redundant split mode directives on Elecraft rigs cause Tx failures Only use IPv6 features on Windows versions that support it (>=XP) Improve IPv6 portability and consistency Add 23cms to IC-910(H) backend Implement combined split VFO frequency and mode setting. Initial implementation of rig_{set,get}_split_freq_mode() for FT-857. Implement rig_{set,get}_split_freq_mode() for IC-756 series. Add {get,set}_splitfrequency_mode for the IC-910(H) Elide unnecessary CAT commands when setting split frequency and mode Do not swap VFO unnecessarily Better set frequency semantics for the IC-910(h) VFO targetable get frequency operation for the Icom IC-910(h) Make sure right band is used when setting frequency on IC-910(H) Use rig state rig port retry option rather than from capabilities Use a sensible port timeout value for the Kenwood TS-850 Further attempts to simplify and improve Icom CAT for split operating Add RIG_PASSBAND_NOCHANGE as possible set_{split_,split_freq_,}mode argument Switch to POSIXLY_CORRECT mode for getopt_long() Fix a regression introduced in 222ad74 Do not crash if expected CTCSS tones not sepcified Do not attempt to query AI state on the TS-450s as it is not supported Some more Kenwood rigs with no AI query Adjust rig_list_foreach to allow use for unregistering Fix an issue presenting on the Yaesu FT-450(D) Release the serial port used for PTT when possible Change the IC7600 & IC7800 set/get mode to versions that support DATA modes Add rig_{open,close} functions to TS-790 backend Revised kenwood rig busy response handling Add get and set split functions for the TS450S Simplify and fix defects in the FT991 back end Fix some endian issues in the si570/AVR SDR back ends Fix a state machine defect with repeated PTT reset calls Do not pass --no-cpp_precomp to compilers on Mac OS X Allow RIG_LEVEL_STRENGTH queries over the network link Stop rigctld and rotctld crashing when service threads cannot write to clients Use snprintf throughout kenwood/kenwood.c for buffer safety Fix off-by-one issue in reading memory mode from IF command response Fix some issues with commands not supported by TS-2000 CAT emulations Add best guess transmit status to rig state structure Take out unecessary delays in K(X)3(S) back end. FT-817 status queries honour retries and timeout Make rig_open() call in rigctld lazy and add graceful termination Simplify SWIG interface definition and hide 64-bit values from Lua binding Remove unnecessary delays from TS-990 and TS-2000 back ends Change frequency setting for the FT-747GX to something more basic Fix an incorrect error return value from win32_serial_select() Fix timeout issues with the Ten-Tec Orion/Eagle Ensure compilation works with a pre C11 compiler Make code C90 compliant again Move unnecessary global and file static variables to the stack Simplify unnecessary persistence of extended response state Fix misunderstanding of netrigctl_transaction() return value Made PTT and DCD options consistent between rigctl and rigctld Report unrecognised PTT and DCD types in rigctl and rigctld Update i/o functions to support GPIO(N) port closure Fixed erroneous messages in rig_close with GPIO(N) PTT or DCD types Remove duplication across GPIO and GPION handling of PTT and DCD Improved get PTT state handling in dummy backend Simplify closing of device files Repair a regression with the dummy get PTT functionality Revert "Add debug to serial.c" Repair a regression with the dummy get PTT functionality Revert "Add debug to serial.c" Fix regression with slow responses from SmartSDR causing errors Deal with remote PTT type at the client end Avoid 'echo -n' as macOS sh doesn't support it Fixing an operator precedence defect Updates to the TH-D7A/E back end Less ambiguous variable name and repair merge issue in prior commit Add missing config parameters for rig power on/off and screen-saver New power on option rather than power on/off Make version recording safe for parallel builds without breaking make dist Ensure old hamlibdatetime.h headers in the source dir are ignored Fix make dist versioning Use BUILT_SOURCES make mechanism as intended Fix rebuild dependency Build hamlibdatetime.h every time Force copy over existing Minimize rebuilding Correct use of sh if Another attempt at a reliable SCS version header generation Remove temporary file Blaine Kubesh (8): added Icom803 to icmarine added Icom803 to icmarine added Icom803 to icmarine Update ic-m803 remote-id to 20 Update icm803.c Update AUTHORS undo author changes Update icm803.c Bob Freeman (1): New CNCTRK rotor backend Brian G. Lucas (10): Pretty much a complete re-write of thd72.c, since the old one didn't work at all. Many commands have been tested with real hardware. But more work remains to be done. WIP: thd72 driver. More level, func, and parm stuff works. WIP: thd72 driver. Try to simplify the menu based interface. WIP: thd72 driver. First cut at get_channel(). Other cleanup. WIP: thd72 driver. More interfaces implemented. Other cleanup. Implement some more interfaces. Comment out get_chan_all_cb because the block read routine doesn't work. Fix a format so that it works with Windows. Can't test it because I have no Windows machines. Fix RFPOWER level for FT-450D. It uses 5-100, rather than 0-255 that the FT-450 does. In newcat_open(), initialize rig_id in case any subsequent commands need it. Some calls to thd72_get_menu_item where passing wrong values for range check. C-Elegans (1): Add ability to have rigctld display transverter frequency Charles Suprin (7): Add file for TM-D710 support. Merge branch 'master' of ssh://hamlib.git.sourceforge.net/gitroot/hamlib/hamlib Add D710 to riglist. Add D710 code to kenwood library. Register D710 interface. Initial D710 Implementation. Register D710 interface. Charles Suprin, AA1VS (3): extend th_get_vfo_char to support D700 Changed th_set_freq to round and select step size to use. Allows 6.25kHz and 5kHz channelization. Use new th_set_freq for TM-D700 Chris Karpinsky, AA1VL (7): add serial_flush() method to clean rx buffer initial stab at this for the Yaesu FT-817 add ft817.* add ft817 bump the backend status to ALPHA Initial entry of cgirig giving ability to use hamlib from a web browser. increased post write delay to 300 Chris Ruvolo (4): TS-690: deal with optional tone board using TS-450 logic TS-690 does not implement the PC command to get/set output power level TS-690 does not implement the GT command to get/set AGC rate TS-690: bump version Chuck Hemker, N2POR (1): Use RIG_TARGETABLE_MODE in rig_set_mode and rig_get_mode DL1YCF (5): Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Dale E. Edmons, KD7ENI (19): Added comments to commandline in rigctl (second time) --Dale Started TS-2000 update/overhaul --Dale Copied too much stuff, backed out what I broke. Bring ts2k.c more in line with current CVS. Changed ts2000.c to ts2000.h. Start of rig menuing functions. New file. Renamed ts2000.c.new ts2000.h Bring code more in line with CVS code. Changes often, so added status. Will delete when things stabilize. Corrected status to CVS branch. Renamed new ts2000.c to ts2000.h Wouldn't compile. Removed ts2k.c. Haven't got all new rig.h stuff removed. Temp kludge to make ts2k.c compile (keeps Hamlib from compiling!). Updated status. Added working TS-2000 files. There are some changes left out but this is the minimum I could commit and have a functional rig. The cost is that I've broken kylix and others that duplicate rig.h. I'm in the process of repairing the damage. Please be patient. I hope a day or so, but am asking for up to a week. E-mail me about *anything* you find broken. Kylix (and similar) is (are) known to not work. Changed name back to original. Had to re-run automake kenwood/Makefile. 1) Updated branch_ts2k with respect to HEAD. 2) Working ts2k_menu. (only in RIG_MODEL_TS2K) 3) Split TS-2000 into experimental and standard versions: RIG_MODEL_TS2000 = standard, RIG_MODEL_TS2K = experimental. 4) Basic command parser in tests/rc. Will open/close rig or copy a freq from one rig/vfo to another rig/vfo. Very cool. Very basic. Very experimental. 5) Added test programs. a) testcmd - calls parser (no command prompt yet!) b) testts2k - replacement for testrig (with trivial modification) c) testptt - testts2k/testrig should not transmit. TX stuff in testptt. 6) Used crowbar to merge HEAD into branch_ts2k. Working on clean-up. 7) I'm sure I've forgotten or neglected to mention some other stuff. Daniel Estévez (2): Fix DIG MODE for FT817-ND Fix DIG MODE for FT817-ND Daniele Forsi (5): Set the executable bits on py3test.py Fix spelling errors Fix more spelling errors Fix more spelling errors Fix typos Daniele Forsi IU5HKX (1): Fix a [missingInclude] "information" when running cppcheck --check-config Dario Ventura (3): New Prosistel rotor backend from IZ7CRX Add elevation code to Prosistel backend TS2000 Satellite mode and Gpredict Dariusz Bismor, SQ9KEJ (1): rigmem: implement CSV file loading David Fannin (1): Submission for new backend model (134) for Yaesu FT-DX1200 Davide Gerhard (3): tests/{memcsv.c,memsave.c}: partially revert commit 4072f9f4 ic746.c: correct chanbuf length, fix channel structure and support split ic746.c: add ic746pro_set_channel() to load memory from csv Dawid Szymanski (2): ICOM Voice Keyer implemented. typo fix Diane Bruce, VA3DB (5): - first cut at fixing configure to recognise --without-tcl-binding and --without-python-binding options - gt_HEADER_INTTYPES_H is definitely bogus here, leftover from what? - document debian/FreeBSD needs for AUTOMAKE etc. - add in libtoolize which should be there - These should have been commented out. - Extra comma on RIG_STATUS_BUGGY can cause a compiler error. Dieter Röver (1): Fix bug in vfo_comp calculation in Hamlib Ekki Plicht (DF4OR) (2): New model Icom IC-R8600 Patch for Icom DCS code handling Elliott Liggett (1): Added functionality for the IC-7300 auto antenna tuner Eriks Dobelis (2): ft817: adding delay before next retry after returning from tx to rx ft817: Moving delay value into #define section of the header Ervin Hegedus (9): RIG_PASSBAND_NORMAL wasn't handled correctly when rig_set_mode() was called - fixed Fixed SWIG `Setting a const char * variable may leak memory' error Fixed Kenwood filter cmd when passband is set to 500Hz Merged from upstream Merge branch 'master' of http://git.code.sf.net/p/hamlib/code Added Lua binding and demo script Added new example to Python demo script (set/get float type level) Change variable length argument handling in affected functions Fix two typos Ervin Hegedüs (1): rig.swg: New properly formatted macro Francois Retief (21): Added read_serial function to read strings from a port. Corrected some comments Added code to hexdump to right align ASCII dump column added private caps for rig termination character add private caps and more commands. Changed to a new transaction function and adde quite a few commands. add private caps to store the termination character of Kenwood rigs commands. added a kenwood_init and _cleanup routine for priv caps & priv data. Added a new function: LCD Lamp ON/OFF (for Kenwood TH-7DA) check trn state of rig in rig_open. Initial commit of Kylix binding New backend for rotators New RPC backend for rotators Added rot_move function Fix macro name Added rot_move function Added easycomm and rpcrot backends Fixed circular dependency for rpc.rigd and rpc.rotd regenerated Added IC-910 rig. Added constants for the IC-910 rig. Frank Goenninger (3): Add ADAT ADT-200A backend adat updates from Frank, DG1SBG ADAT fixes on Windows Frank Singleton, VK3FCS (165): Initial revision Initial revision *** empty log message *** *** empty log message *** *** empty log message *** Initial revision Initial revision *** empty log message *** *** empty log message *** added build_all ,cleanall and verify targets *** empty log message *** initial top level makefile add some things initial import initial import initial import fixed some typos use rig_open and rig_close added rig_open and rig_close fixed cmd_sat_on / off added sat-on and sat_off to test changed cmd_get_rx_status, must do tx also updated test() all reads use while (1) and break added ../common as object path added rig_open and rig_close using rig_open and rig_close and serial.h use common dir for serial stuff use ft747 on serial port /dev/ttyS0 read uses while(1) and break use while(1) and break added read_sleep use read_sleep now from serial.h using read_sleep from serial.h had rx and tx status swapped (document error?) removed cmd_get_update using CVS instead of RCS directories use MODE_xx defines cannot use const int in case statements ?? so use #define instead use #defines for MODE_XXX used in case statements working out freq conversion, unfinished playing with test routines long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode); long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode) frq = cmd_get_freq_mode_status_main_vfo(fd, &mode); starting with the cmd_set commands now starting on cmd_set commands now starting on cmd_set_freq commands now add scanning todo now set sat rx and tx freq and mode also fix typo dump raw hex data when writing and reading trying some cms_set_freq_xxx commands added routines for dec <-> packed decimal conversion minor added generic hex dump routine, static void dump_hex(unsigned char *ptr, int size, int width); removed unwanted debug printf's removed dump_hex from here.. calc_freq_from_packed4 is about to be replaced calc_packed_from_char and calc_char_from_packed now here cleanup cleanup void dump_hex(unsigned char *ptr, int size, int width); adding dcs tables and repeater offset in Hz describe faulty yaesu documentation added README.license for GPL added GPL license info included full GPL license Updated docs to point to http://sourceforge.net/projects/hamlib/ and added a C code snippet on how to use the API. added -I$(COMMON_DIR) to find rig.h added -I$(COMMON_DIR) to find rig.h adding capabilities initial capabilities stuff starting to add rig_caps stuff starting to add rig_caps stuff starting to add rig_caps stuff. added GPL stuff and comments adding rig_caps stuff adding rig_cap stuff adding rig_caps stuff add capabilities and preferences adding rig_caps functionality adding rig_caps stuff frontend reduction on backend function namespace - phew !! frontend API clarification removed old open_port2() using old rig_caps fixed some typos, added 3 more candidates for API missing ; in some enums converting to frontend/backend structure compiles ok removed open_port() and write_block() removed open_port() and write_block() fixed typos, added &ft747_caps in rig_caps changing to frontend/backend style converting to frontend/backend style added 3 more cmd_* for API examples Example of setting rig Main VFO to 439.700 Mhz FM cleanup comments added extern const struct rig_caps ft747_caps; still thinking about set/get strategy minor updates added extra rig caps added some set/get examples with return code checking added testrig to Makefile, no linking yet added usleep to read_sleep() updated rig_caps structure *** empty log message *** test making a shared lib (at last) for the frontend - more todo test making a shared lib for the frontend - make hamlib describe frontend/backend structure updated code snippet example started ft747_set_ptt and ft747_set_vfo starting to implement set/get pairs added typedef enum ptt_type_e ptt_type_t; added VFO types to enum starting on libhamlib Makefile, added ./lib and ./include under common make, make install, and make clean work ok, using ./lib and ./include directories also. make, make install, and make clean work ok, using ./lib and ./include directories also. removed "make verify". Added reference to common/Makefile added printf("testrig:main() has been called \n"); for testing linking makefile for testing testrig linking alternative rig_base declaration removes references to rig_caps at compile time. should populate it another way -- FS added printf's to confirm rig.c (hamlib) is being called ok better libhamlib.so version :-) added ft847_open and ft847_close to enable CAT ON/OFF added ft747_open and ft747_close updated lib names for backend to libhamlib-xxxxx.so API updates - added set/get_mode merge with TRN stuff and add some set/get_mode and vfo stuff added post_write_delay cvs mails to hamlib-cvs-digest cvs mail update works ok :-) minor fixes updated ptt/mode/vfo added set/get freq to use generic bcd etc more set_freq() examples 1. Added VFO as target for some set/get cmds. 2. ./testrig still runs ok using RIG_VFO_CURR. minor update to active VFO handling in _set_vfo some new defines for FT747_VFO_A/B minor updates to active vfo handling added ptt handling example, stand back ! trying different approach to storing cmd sequence. _set_ptt is being converted. Needs tidying up though. Some sequences are complete, and can be read from static data. Incomplete sequences will eventually be copied form static declaration, and completed in priv data. Removed static stuff from functions. Also, begin to implement table driven command translation from API to rig native. priv now contains a cmd table that is used for backend commands towards rig. Added some new freq/mode combinations. converting ft847 to table driven, similar to ft747. more table driven stuff for ft847. cat/ptt/freq being converted. Added ft847_send_priv_cmd(), converted some part of API to use this. Added _set_mode to work now. TODO: put _send_priv_cmd into yaesu.[ch] so ft747 can use also. Turned on PTT also (stand back).. rig_cleanup and rig_close not calling backend removed unused calc_ functions. removed old API functions, general cleanup tested rig_close and rig_cleanup Initial release, common yaesu declareations etc. add version tag nseq uses YAESU_CMD_LENGTH Initial yaesu Makefile Moved from ft747 and ft847 dirs common yaesu handling common yaesu dir Begin to use common yaesu code general cleanup, added _send_priv_cmd added targetable_vfo value to caps minor cleanup ChangeLog history started Initial import for ChangeLog handling starting to convert rig struct to readable form more of convert rig struct to readable form Changelog update for HAMLIB-1.1.1 Gerardo Richarte (1): gs232b.c: Improve get_position string parsing Gisle Vanem (1): Enable verbose mode in bindings/pytest.py Greg Troxel (1): Warning about dodgy code in drake.c HB9EIK (4): Initial release ELAD FDM DUO Update ELAD files Update build system for ELAD backend Update copyright for fdm_duo.c Hans Van Ingelgom (1): Added Peaberry V1 and V2 models Hegedüs Ervin (4): Merge branch 'master' of http://git.code.sf.net/p/hamlib/code Check SWIG string functions for some languages Leave off multiply 'typedef const char * const_char_string' definition (in rig.swg and rotator.swg) Fixed int[10] type variable error in bindings Jae Stutzman (5): Added HPSDR backend Clears potential garbage data in read buffer prior to command being sent Updated PiHPSDR backend defaults Use Windows ioctlsocket to avoid buffer overrun Added new AGC control for PiHPSDR James Watson, HZ1JW (2): Added ic7200 to icom Corrected modes in ic7200.c Jaroslav Skarvada (2): Fix hardcoded pcconfig libdir Fix serial_port DCD squelch Jeroen Vreeken (9): Add support for GPIO PTT. Add missing breaks and improve error messages Add Dorji DRA818 modules (VHF and UHF variants) Also works with NiceRF SA818 modules Merge branch 'master' of git://git.code.sf.net/p/hamlib/code Small fixes to DRA818 volume handling Add GPIO and GPION options for DCD. Also bump abi version since the config params struct needed resizing. Merge branch 'master' of github.com:Hamlib/Hamlib GPIO working after debugging Merge branch 'master' of github.com:Hamlib/Hamlib Johan Ström (1): Backup serial options on open, restore on close Jonathan Bastien-Filiatrault (3): Correct FT; command that does not exist on the FT-891. Allow setting split mode without smashing the VFOB frequency. Scale power values correctly for Yaesu FT-891. Jonny public (1): ether6: New rotor backend from Jonny, DG9OAA Joop Stakenborg, PG4I (116): update (kenwood is not a WIP anymore) first implementation of kenwood_get_ptt enable get_ptt for this rig add get_ptt for this rig additional protocol checks and cleanups fix signal strength add RIG_LEVEL_RFPOWER fix_compilation add rit capabilities bring comands in sync with other kenwood rigs add rit capabilities send_morse added explain set_rit fix get_ctcss_tone by using IF command typo add xit capabilities add set_level and get_level bring rig in sync with other kenwood rigs bump version numbers nothing returned by the rig for these commands fix get_level_agc fix set_level_agc getting in sync with the debian 1.1.2 package remove template files initial checkin make this NMU for now correct the path for copying files in the apropriate package do not install the old changelog versioning not used move .la, .a, .so files to the correct package include rpc.rigd and rpc.rotd include pkgconfig support don't create shlibs file for drake, jrc and easycomm libraries move hamlib1 to the top so the documentations gets installed correctly make building easier, call autogen.sh INSTALL file not used build the documentation package we don't have to call configure twice cleanup remove some build dependencies and don't call autogen.sh ts450s uses IF command for get_vfo, get_freq and get_mode minor bugfix, bump to beta add CWR and RTTYR this rig does not have a command for reading IF bandwidth retrieve passband with FW command passband should be calculated after mode is set use rig_passband_normal here various lintian fixes one last lintian fix use FW command to set bandpass cw filters for normal, narrow and wide more filters get_mode and set_mode for this rig filters some comments correct rit add get_level cleanups more modes set_level for this rig should use kenwood_get_freq minor bug add rpm support need hamlib.spec for 'make rpm' make rpm will fail with a '-' in the version number a working spec file update debian build for rotorez and fodtrack, minor fixes unofficial fix the debian build script, new maintainer update the debian build tree to the latest correct baudrate for the ts-950, use the information field IF for get_vfo by default (supported by most kenwood rigs), ts870s will use the much shorter FR command for get_vfo correct baudrate for some rigs and add ts-950 to the id_list ts-850 returns ID 009 according to martin, OK1RR fix 'make rpm' build for hamlib-1.1.5 not needed sync with latest debian package and add tcl, c++, python and perl bindings correct spelling s-meter calibration by Matt Dawson basic functionality by Matt Dawson, tested with grig and xlog lifetime e-mail address :-) sync with latest debian release more functionality, mode and frequency get by Matt Dawson only switch tx vfo is split is on set attenuator level export convenience function get_kenwood_level, so they can be use by other backends add RIG_LEVEL_SWR, copied from ts850 add RIG_LEVEL_COMP, RIG_LEVEL_AGC, copied from ts850 bump version, no preamp really add ALC read this time, only change meter if needed, cleanups split has_get_level and has_set_level fix coding, python2.4 compatibility fix compilation warnings more compilation warnings nuked, use tone_t for ctcss_list use size_t fix more compilation warnings, int->size_t, unsigned char->char more unsigned char->char and int->size_t transitions set functions should have ack_len zero, also need to check other rigs make sure we use ack_len=0 for functions that return nothing (set functions) more unsigned char->char and int->size_t transitions extend rig capabilities, patch by Tom, DL1JBE add RIG_LEVEL_STRENGTH to caps, set post write delay to 0 and do some cleanups re-establish post-write delay remove rpath backdoor long long really needed here? updates by matt, GW0VNR long long really needed here? - patch by diane Bruce distribute footer.html correct set/get power try better s-meter readings packages renamed obsolete sync with latest debian release no need to link to python sync with latest, python changes another debian update: use 'make distclean' in the rules file Juergen Rinas, DC3BW (4): added antenna switching... added a few get_level/set_level get_function/set_functions. * fixed set_func (concerns most kenwood rigs) * added 115200 to the list of baudrates in probeallrigs_kenwood() * fixed ptt * expanded frequency range (available after firmware update) according to http://www.kenwood.com/i/products/info/amateur/ts_480/firmware/pop_ts480_e.htm * added tuning steps * added filter list * increased version info Julian Cable (3): WinRadio G313: Updates from Julian Campbell wrg313api.c: Fix Win32 (MinGW) build issue Use Automake conditionals for G313 build Kamal Mostafa (3): Fix mingw32 cross-compilation procedure and config Do not let macros/ac_python_devel.m4 trash CPPFLAGS and LIBS Fix spelling errors Kamal Mostafa, KA6MAL (19): Hard-code length of hamlib_version and hamlib_copyright strings to stay compliant with hamlib 1.2 ABI and avoid spurious "consider relinking" warnings from dynamic loader. Removed stale debian/ dir from the hamlib source (it is maintained in the Debian diff and isn't useful in this tree). Update bundled libltdl (libtool) to version 2.2.6b to address CVE-2009-3736. - autogen.sh: never downgrade our bundled libltdl/ (only run libtoolize if system version is newer than our bundled version). - autofixer.sh: script removed as libtool 1.x is no longer allowed. - configure.ac: (not enabled) optional setting to deprecate embedded libltdl/. Added Kamal Mostafa and Jaime Robles as maintainers for Debian packaging. Fix build --with-python-binding breakage introduced by Python 2.6: Do not reference LOCALMODLIBS, else it will add libraries to our link line (e.g -lssl) which are not necessarily installed. Elektor 507 frequency selection resolution improvements, contributed by John Nogatch AC6SL. Move backend libraries into /usr/lib/hamlib directory. Force automake to invoke the C (not C++) linker in kit/ when no C++ is in use. python: fix --with-python-binding configure macro fix configure.ac paths for FreeBSD Remove bundled libltdl (libtool) README.developer: restore libtool prerequisite text Fix segfault on improper -C syntax configure: add check and advice for missing ltdl.h configure: refine advice for missing ltdl.h source warnings cleanup: rpcgen-generated code source warnings cleanup: #if-0 out a few unused routines source warnings cleanup: #ifdef out unused FT-840 routines source warnings cleanup: rotorez_rot_reset wrapper for stop Kosta Arvanitis (1): Allow IC-7410 to send cw messages Kārlis Millers (1): Merge pull request #1 from Hamlib/master Ladislav Vaiz (3): Add Android build support Android build updates for monolithic build Initial support for FUNcube Dongle Pro Larry Gadallah (1): AR7030+: Error reading signal strength for low signal levels. Larry Gadallah, VE6VQ (20): Added Larry Gadallah as maintainer of AOR AR7030+ Added AOR AR7030 Plus Added caps for AR7030+ Added caps for AR7030+ Added AR7030+ Alpha version of AR7030+ backend Alpha version of AR7030+ backend Rationalized naming convention, ran everything through lint. Rationalized naming convention, ran everything through lint. Fixed SVN tags Fixed SVN tags Added AR7030P utilities in ar7030p_utils.c Initial version of utility functions for AR7030 Plus receiver Removed utility/helper functions, added/updated Rig API functions Added new I/O helper functions, IR code definitions Added private data to support channel information Added init/cleanup functions, started implementation of mem/channel access functions Added prototypes for pbsToHz() and hzToPBS() helper functions. Added comments to denote mey_sq, mey_pb, and mey_id labels Added implementation for pbsToHz() and hzToPBS() helper functions. Added various memory/VFO functions. Magne Mæhre (1): Enable set_powerstat (turning radio on/off) for IC-7100. Malcolm Herring (62): init branch init branch New model: Icom IC-R6 Icom IC-R10 & 20 testing complete. Move to Beta ignore build Complete R6 commands Add IC-R30 daily fix tones Merge remote-tracking branch 'Hamlib/master' update Merge branch 'master' into icr6 ICR6 new functions merge update Merge remote-tracking branch 'Hamlib/master' commands 00-15 Merge branch 'master' into icr30 icr30 updates Automatically detect CI-V echo state Icom R8600 to Alpha Update contributors Merge branch 'master' into origin/master Fix Icom DCS SQL funnctions Merge remote-tracking branch 'Hamlib/master' Merge remote-tracking branch 'Hamlib/master' Prepare for D-STAR implementation Merge remote-tracking branch 'Hamlib/master' Initial implementation of icom extended operations more extended operations Merge remote-tracking branch 'Hamlib/master' more ext functions fix merge conflicts more ext_cmd updates ic7100 ext functions Merge remote-tracking branch 'mdblack/master' Merge branch 'master' of https://github.com/malcolmh/Hamlib add token list for ext operations Merge remote-tracking branch 'mdblack/master' more ext operations Merge remote-tracking branch 'mdblack/master' custom ops using ext ops scheme custom level ops Merge remote-tracking branch 'mdblack/master' Merge remote-tracking branch 'Hamlib/master' add scope functions update IC7100 update rigs for new functions Merge remote-tracking branch 'Hamlib/master' new directory structure Merge remote-tracking branch 'Hamlib/master' correct powerstat caps Merge remote-tracking branch 'Hamlib/master' New custom parm implementations restore get_powerstat correct rig_close cap Merge remote-tracking branch 'Hamlib/master' Merge remote-tracking branch 'Hamlib/master' Merge remote-tracking branch 'Hamlib/master' add g/set_ext_func to API additional error checking for extended operations Add Macports to README.osx Mark J. Fine (25): Fixed post-write-delay timing Added support for ECSS/FAX and meter strength Added support for meter strength Added ECSS support to R8B and reconfigured default filter modes Reconfigured default filter modes Updated to reflect recent changes within v1.2.2cvs-2 Fixed CWPITCH function on IC-R75 to use 'set mode data' command. Added level granularity steps included other rig_ prefixes fixed get_powerstat to read correctly when memory channel is blank Added memory switching function in set_vfo Added set memory channel# in radio in set_mem Added set_vfo command for vfo/mem switching Corrected handling of "vacant" memory channels Correctly detect if in memory mode in get_vfo() Reduced large decision trees with bitwise math Added set/get channel functions Updated set/get channel functions Made get_channel aware of untunable blank memory channel accounted for dual preamp (10 & 20db) Fixed passband width return for IC-756PROII Added FM narrow to passband spec Added a provisional define for a variable bandwidth control Added a provisional variable bandwidth control to the RIG_LEVEL enumeration Added provisions for a variable bandwidth control Added provisions for a tone control Corrected problems with Squelch (SQL) and Notch (NOTCHF) controls Added provisions for a variable bandwidth control (BWC) Fixed low-end of freq range from 100kHz to 10kHz. Fixed several differences in 535/545 commands Added missing manual notch switch for the NRD-545 Martin Cooper (2): Don't expect a response when none is required. Don't send EasyComm I commands to EasyComm II rotators. Martin Ewing (7): Add test for valid set frequency, esp. for VFOA (ham band only) Expand valid range_lists for full hardware ranges Fix tt565_transaction to allow Morse commands. Orion.c: remove spurious debug statement. implement level settting and misc fixes remove debug stmt Increment Jupiter version Trim TS950 commands that are not provided by CAT jupiter.c: Updates from Martin, AA6E Martin Ewing, AA6E (69): specified buffer lengths, added default vfo A setting Fix SWR & S-meter, set ATT, set AGC, add rough STR_CAL func. Fix timeout, add retry, better S-mtr scale various bug fixes Added RIG_LEVEL_CWPITCH, RIG_LEVEL_KEYSPD, send_morse() Added RIG_FUNC_TUNER, RIG_FUNC_LOCK and RIG_FUNC_VOX, fixed MEM_CAP. Added VFO_OPS, promote to Beta Support LEVEL_VOX, VOXGAIN, ANTIVOX Support LEVEL_NR as Orion NB setting (firmware bug), FUNC_NB -> NB=0,4 Add get_, set_ant (ignores rx only ant) Added Orion, Orion 2 info Squashed warnings about signedness Orion S-meter cal minor - add doxygen info for enums minor - doxygen parameters doxygen formatting add comments info on generating docs doc improvements add comment documentation documentation allow atten = 0 dB patch from SM6PPS fix enum documentation documentation page documentation documentation split orion.c and add doc info documentation SM6PPS mods for AOR 5000a further rx-320 mods by Ken Prox use binary mode VFO requests correct CHANNEL_CAPS sytax Dead simple sample Hamlib program Correct float vs int interpolation options Add autodetect version 1 or 2 firmware (using rig_get_info). Correct V1 calibration. Make V2 calibration the default. Signal RIG_LEVEL_STRENGTH supported. Moved firmware detection to new tt565_open routine, where it is done every time the rig is opened. Add more functions to example program. Ensure printable get_info string Fix bug that seg faulted when get_info returned null. (No reward points!) Add S meter operations to sample program. Adjust retry & timeout values to help in case of no response from rig, i.e., if rig power happens to be off. Prettify some code indents. Better error handling, reliability for serial I/O. Misc prettification. TT Omni VI / Plus improvements Fix typo Fix Omni VI PTT function Update Icom info Declutter Omni VI memories, rit/xit Fix serial I/O error checking Add author. (credits info added to web page, also) Switch back to ASCII freq. setting because of hardware(?) bug. Add AF, RF gain and squelch level capability. Add thanks to W1RFI & ARRL minor changes RIG_STATUS_ALPHA reflecting initial tests. fix missing comma use rawstrength.i which matters in PPC compile fix string handling in LEVEL_RAWSTR Orion - implement RIG_LEVEL_STRENGTH Example updates Orion: Allow frontend to handle RIG_LEVEL_STRENGTH Minor comment re rit/xit Downgrade ERR to WARN (i/o retry) Init revision - tnx Stephane Autofixer sets up for libtool v1 or v2 autofixer.sh supportin libtool v1 and v2 minor update repair echo cmd Max Lock (1): Addition of support for CM108B PTT Michael Black (1262): TenTec Omni VII update from W9MDB New XG3 backend Fixes to termios.c on W32 targets xg3 patch Check TS-590S for EU or US firmware New backend for FT-991 Flush the debug stream Omni VII to set VFO_CURR correctly Omni VII patch for WSJT-X FT-991 patch Small FT-991 patch for WSJT support Omni VII patch FT-857 and FT-991 patches Fix possible frequency overflow on Kenwood and Yaesu Add get_freq to FRG-100 Clean up clang warnings on adat.c Clear up a clang compiler warning in kenwood/elecraft.h Clean up clang warnings in tentec Fix port->pathname checks Quell clang warnings in tests directory Various Yaesu updates Simply define TRUE to 1 in omnivii.c Allow the ft757gx to work with WSJT-X. Remove input redirects in autogen.sh Initial support for the IC-7300 Add send_morse to icom rigs tmd710 patch Icom frame patch Exposed constants via function calls Remove define Merge branch 'master' of https://github.com/N0NB/hamlib Changed some modules to LGPL in lieu of GPL Fixed buffer overflow in rigctl_parse and rotctl_parse Merge branch 'master' of https://github.com/N0NB/hamlib Move K3 DT0 before mode switch, add version info to electraft rig open, WSJT-X VOX rig split now works Merge branch 'master' of https://github.com/N0NB/hamlib Added IC-7850/51 -- works with WSJT-X Merge branch 'master' of https://github.com/N0NB/hamlib Add ic7850 ic7851 -- works with wsjtx Add ic7850 ic7851 -- works with wsjtx Merger 7850/51 into 785x Fix ft991_get_mode Added ft891 backend Fix ic785x default addr to 0x8e Fix FT-891 recognition IC-M710 now working with WSJST-X Add icm710.h to icmarine Makefile.am Merge pull request #1 from Hamlib/master Fix FT857 to return the SMeter-based value Reduce debug info in flrig.c Change RIG_MODE and RIG_FUNC to 64-bit values Merge hamlib head Add PRXll macro for 64-bit use Fixup for 64-bit in memcsv.c 64 bit mods to netrigctl.c testrig.c Add TS-890S as derivative of TS-480 plus new modes Add XHCG to ic706.c Change rmode_t to uint64_t and remove unneeded casts Fix RIG_MODE structure in src/msic.c Fix some 64bit items and add RIG_FUNC_NB2 for TS-890S Suppress GCC unused-return warning Fix rig_idx2settings for 64-bit sprintf_list functions Fix flrig when WSJT-X startup causes rig mode change Increase flrig timeout value Add USB mode to flrig Fix flrig memory leak Fix bug where constant value was being trashed Add PKT modes to ts590.c Add BC2 and NB2 functions for newer kenwoods Change RIG_SETTING_MAX for 64-bit compatibility All kenwoods to have 3-char commands for functions and return whatever value the rig returns instead of 0/1 Changes to add more ts890 capabilities, e.g. NB2, BC2 Fix kenwoood BC BC2 returns Fix kenwood BC BC2 return merge master New utility to allow non-hamlib-aware programs to use hamlib rigs via COM ports Virtual com ports providing a TS-2000 Emulator Example connecting N1MM or such to FLRig via COM5/COM6 virtual COM pair rigctlcom -m 4 -R COM5 -S 115200 N1MM connects to COM6 TS-2000 115200 8N1 Add TUNER on/off fnction for Yaesu rigs Fix segfault in rigctlcom with no args and improve usage Add rigctlcom to install scripts Add FT847UNI for early serial number units that are one-way comm Add rigctlcom to gitignore Reduce verbosity in FLRig Ensure buf is zeroed in kenwood_safe_transaction to avoid return random data Reduce verbosity of rig_strrmode and read_string Improve error handling in network_flush when disconnect happens Reduce verbosity of rig_strvfo netrigctl can now do vfo mode -- has automatic detection of rigctld vfo mode rigctl automatically detects vfo mode of rigctld rigctli and rigctld recommend vfo mode if not selected Merge branch 'master' of https://github.com/Hamlib/Hamlib Fix memset in kenwood.c Fix network_flush as it was not actually flushing before This was causing an infinite loop and WSJT-X to lock up using flex6xxx backend network.c astyle applied Add ability for rigctlcom to work with Ham Radio Deluxe astyle format of rigctlcom.c Relax chk_vfo requirement for backward compatibility astyle for netrigctl.c Merge branch 'master' of https://github.com/Hamlib/Hamlib Fix ts590 RIG_LEVEL_AF astyle ts590.c Update TS590 version and make it STABLE Add set/get powerstat for ic785x.c Have kenwood set_powerstat ON wait for get_powerstat Fix set_powerstat wait loop Bump version for kenwood.c Add wait for set_powerstat in icom.c Change powerstat to wait for get_freq as this is generic to all cache timeout when swapping vfos on ft817 and ft897 Add flush to serial open Add set/get vfo to ft857 Improved set_powerstat for icom & kenwood Add IC-9700 to ic7300.c Add priv_caps for IC9700 Add icom get_vfo introduced on IC-9700 Add DD mode for IC-9700 Numerous IC-9700 updates Implement new get_freq for IC9700 with TARGETABLE_FREQ now Fix ic9700 get_freq frame len Fix get_freq for IC9700 Undo get_vfo attempt for ic9700 Implement icom Main/Sub get_freq -- broken for IC9700 firmware 1.05 Prototype for ic9700 set_freq to allow band change when Main ... [truncated message content] |
From: Nate B. <n0...@us...> - 2020-12-25 02:31:42
|
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, Hamlib-4.0 has been updated via 519f8294691d3a64afa4ae6bf9257c5b66f3aa33 (commit) from e53d1092de6d0be007270ca9e73adb9c8fe39129 (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 519f8294691d3a64afa4ae6bf9257c5b66f3aa33 Author: Nate Bargmann <n0...@n0...> Date: Thu Dec 24 20:30:30 2020 -0600 Advance to Hamlib 4.0 release Final! diff --git a/configure.ac b/configure.ac index 83902f4c..737f3ba9 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! AC_INIT([Hamlib], - [4.0~rc4], + [4.0], [ham...@li...], [hamlib], [http://www.hamlib.org]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2020-12-25 02:27:45
|
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, Hamlib-4.0 has been updated via e53d1092de6d0be007270ca9e73adb9c8fe39129 (commit) via 9d6e0fb73089b4343ecf14fb2da8f454fdb09ec8 (commit) via 3c270f3a2920c592876d4b4849a87fc2cb16172b (commit) via 030f0fbe878715c199711f6aec599e4ee742faad (commit) via e1d71692d6f6cefd9ce3248fcd02a3c9a3ae96cd (commit) via 21dd5f6ce0d999e563e1c67988864d70f17df2d9 (commit) via 0fe2dd8e0ea9fe14fdb01e68b3573c50522824d3 (commit) via 93df854a5b403809dc0fcc41283616eae7cbd1ea (commit) via bd6652e7ddbf3ea59dad5aa69a629e766c1681d7 (commit) via d1a1247cdba10e7647a972eaec7de245c4c45db9 (commit) via 2ad464fe3d16f041b91db8c88a45ce762d64d970 (commit) via 42cfa891f3119ab4c5753e4ce8f405b56f789e3b (commit) via d8079adeb44b2ae496240821604cabb265c42a48 (commit) via e3d74c89e4c1832bdcee1d9b22f599b96cdbd1ed (commit) via c60b9889282a3f77032171866375df0fff928205 (commit) via eaeb367af95c6f2408f3071bd8921e3ca5113e71 (commit) via 28237deeb0eceb6703ba6a668328f80ac1dacce2 (commit) via 9205dd15211f0178646e5760b4c54a3807398aa2 (commit) via 383b5cb4d549c220687cc3832c17684b0e3fe81c (commit) via a272d3d73073c7bb2ec33c48444460175825923c (commit) via bcc12a4c5a8c108af431cb8125192737f85e5f40 (commit) via d35dc1348063a275e496423b96a6824ac79190e8 (commit) via b9673b7f31cf348569b4e116028c28d9a646fcc3 (commit) via 879b7f3f8a9638ac33ec603952d8bf31ed559770 (commit) via f317b49e6c106993173d76105db5d8f70997ac75 (commit) via e730dcde9507fc2f32bd7a5127bed44cb9578215 (commit) via 392e5063402133664e207c029e52fd3878c00ff0 (commit) via 3fcb57373120c866fcd44af5ba500d869c3ce046 (commit) via 4dbe3a7528161244da689efe038130dcfe23b6aa (commit) via 0f4fbefafc9e03e409c0a683149ba161c599e6ec (commit) via 61aff573a00bceab4ae02cdd94a4247c32158226 (commit) via c32ebf67b12420ee91b1f3d7bc849ee098e99d42 (commit) via ecb099507c7bd4a4236180f8b6ec2725a7d1694e (commit) from af1a0828c327cff27ddd281e6a050ca5d21939d7 (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 e53d1092de6d0be007270ca9e73adb9c8fe39129 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 22 17:01:06 2020 -0600 Add some debug for set_mode stuff (cherry picked from commit 18e9d56b4745097be56ac3899e4237afbf3f1736) diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index c366f3b1..73370375 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -637,7 +637,7 @@ rmode_t kenwood2rmode(unsigned char mode, const rmode_t mode_table[]) char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, rig_strrmode(mode)); if (mode != RIG_MODE_NONE) { @@ -647,6 +647,7 @@ char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) { if (mode_table[i] == mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: returning %d\n", __func__, i); return i; } } @@ -1839,7 +1840,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) struct kenwood_priv_caps *caps = kenwood_caps(rig); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width); if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS950S || RIG_IS_TS950SDX) { @@ -1891,6 +1892,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { c = 'A' + kmode - 10; } + rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c\n", __func__, kmode, c); if (RIG_IS_TS990S) { diff --git a/src/rig.c b/src/rig.c index 0a3a4cc5..6f2771ee 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1727,7 +1727,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) const struct rig_caps *caps; int retcode; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width); if (CHECK_RIG_ARG(rig)) { commit 9d6e0fb73089b4343ecf14fb2da8f454fdb09ec8 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 22 08:34:04 2020 -0600 Fix newcat.c uninitialized var (cherry picked from commit 5d2f5012c0623411be02308167a85cab64a7e328) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 7099384b..7c231116 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -2857,7 +2857,7 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status) struct rig_state *state = &rig->state; struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; int retval; - int i; + int i = 0; int retry_save; char ps; diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index f784d321..bf8b796a 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201219" +#define NEWCAT_VER "20201222" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 3c270f3a2920c592876d4b4849a87fc2cb16172b Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Dec 21 23:50:29 2020 -0600 astyle files (cherry picked from commit 3211e3aea18f0669344d51e74c5a72f1a273f794) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 870a1be4..5bfa1c8b 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1573,18 +1573,18 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, int ack_len = sizeof(ackbuf); rmode_t icom_mode; unsigned char dm_sub_cmd = - rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE; + rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE; int filter_byte = rig->caps->rig_model == RIG_MODEL_IC7100 - || rig->caps->rig_model == RIG_MODEL_IC7200 - || rig->caps->rig_model == RIG_MODEL_IC7300 - || rig->caps->rig_model == RIG_MODEL_IC7600 - || rig->caps->rig_model == RIG_MODEL_IC7610 - || rig->caps->rig_model == RIG_MODEL_IC7700 - || rig->caps->rig_model == RIG_MODEL_IC7800 - || rig->caps->rig_model == RIG_MODEL_IC785x - || rig->caps->rig_model == RIG_MODEL_IC9100 - || rig->caps->rig_model == RIG_MODEL_IC9700 - || rig->caps->rig_model == RIG_MODEL_IC705; + || rig->caps->rig_model == RIG_MODEL_IC7200 + || rig->caps->rig_model == RIG_MODEL_IC7300 + || rig->caps->rig_model == RIG_MODEL_IC7600 + || rig->caps->rig_model == RIG_MODEL_IC7610 + || rig->caps->rig_model == RIG_MODEL_IC7700 + || rig->caps->rig_model == RIG_MODEL_IC7800 + || rig->caps->rig_model == RIG_MODEL_IC785x + || rig->caps->rig_model == RIG_MODEL_IC9100 + || rig->caps->rig_model == RIG_MODEL_IC9700 + || rig->caps->rig_model == RIG_MODEL_IC705; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -1641,6 +1641,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, } rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); + if (filter_byte && width_icom != -1) // then we need the width byte too { // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 153ac092..7099384b 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -7438,7 +7438,8 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { // some rigs now require the bandwidth be turned "on" int on = is_ft891; - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%d%02d;", main_sub_vfo, on, w); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%d%02d;", main_sub_vfo, on, + w); } else { @@ -7627,7 +7628,8 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) char cmd[] = "SH"; char main_sub_vfo = '0'; - rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s\n", __func__, rig_strvfo(vfo), rig_strrmode(mode)); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s\n", __func__, + rig_strvfo(vfo), rig_strrmode(mode)); if (!newcat_valid_command(rig, cmd)) { @@ -7682,12 +7684,14 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) int on; // do we need to pay attention to the Main/Sub here? int n = sscanf(priv->ret_data, "SH%*1d%1d%3d", &on, &w); + if (n != 2) { err = -RIG_EPROTO; } #if 0 // this may apply to another Yaesu rig + if (n == 2) { if (!on) { w = 0; } @@ -7696,6 +7700,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { err = -RIG_EPROTO; } + #endif } else if (strlen(priv->ret_data) == 6) diff --git a/src/rig.c b/src/rig.c index b2397fe4..0a3a4cc5 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1941,12 +1941,15 @@ pbwidth_t HAMLIB_API rig_passband_normal(RIG *rig, rmode_t mode) { if (rs->filters[i].modes & mode) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: return filter#%d, width=%d\n", __func__, i, (int)rs->filters[i].width); + rig_debug(RIG_DEBUG_VERBOSE, "%s: return filter#%d, width=%d\n", __func__, i, + (int)rs->filters[i].width); return rs->filters[i].width; } } - rig_debug(RIG_DEBUG_VERBOSE, "%s: filter not found...return RIG_PASSBAND_NORMAL=%d\n", __func__, (int)RIG_PASSBAND_NORMAL); + rig_debug(RIG_DEBUG_VERBOSE, + "%s: filter not found...return RIG_PASSBAND_NORMAL=%d\n", __func__, + (int)RIG_PASSBAND_NORMAL); return RIG_PASSBAND_NORMAL; } commit 030f0fbe878715c199711f6aec599e4ee742faad Author: Steve Mobley <wb...@mi...> Date: Tue Dec 22 00:13:05 2020 -0500 Add bank select to IC-7100 (cherry picked from commit 61956faeb3bca79f68510e3bda45a95c556073a9) diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c index 4cd27a21..50032220 100644 --- a/rigs/icom/ic7100.c +++ b/rigs/icom/ic7100.c @@ -243,7 +243,7 @@ const struct rig_caps ic7100_caps = .vfo_ops = IC7100_VFO_OPS, .scan_ops = IC7100_SCAN_OPS, .transceive = RIG_TRN_RIG, - .bank_qty = 0, + .bank_qty = 5, .chan_desc_sz = 9, /* TODO */ .chan_list = { /* TBC */ @@ -380,6 +380,7 @@ const struct rig_caps ic7100_caps = .set_ext_func = icom_set_ext_func, .get_ext_func = icom_get_ext_func, .set_mem = icom_set_mem, + .set_bank = icom_set_bank, .vfo_op = icom_vfo_op, .scan = icom_scan, .get_dcd = icom_get_dcd, commit e1d71692d6f6cefd9ce3248fcd02a3c9a3ae96cd Author: Mikael Nousiainen <mik...@ik...> Date: Mon Dec 21 18:15:15 2020 +0200 Fix RIG_PASSBAND_NOCHANGE use with Icom data modes. Allow selecting FIL2 as normal passband when in data mode. Add new Icom rigs to list that determines whether Icom data mode command supports setting filter too. (cherry picked from commit 9e62b2783ff5e60d4d8ab19a8a8beb2f091c6e8a) diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 5d272eea..861347a0 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -414,6 +414,8 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, { case RIG_MODE_AM: icmode = S_AM; break; + case RIG_MODE_PKTAM: icmode = S_AM; break; + case RIG_MODE_AMN: icmode = S_AMN; break; case RIG_MODE_AMS: icmode = S_AMS; break; @@ -440,8 +442,12 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, case RIG_MODE_FM: icmode = S_FM; break; + case RIG_MODE_PKTFM: icmode = S_FM; break; + case RIG_MODE_FMN: icmode = S_FMN; break; + case RIG_MODE_PKTFMN: icmode = S_FMN; break; + case RIG_MODE_WFM: icmode = S_WFM; break; case RIG_MODE_P25: icmode = S_P25; break; @@ -468,15 +474,19 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, { pbwidth_t medium_width = rig_passband_normal(rig, mode); - if (width == medium_width || width == RIG_PASSBAND_NORMAL) + if (width == RIG_PASSBAND_NORMAL) { - icmode_ext = - -1; /* medium, no passband data-> rig default. Is medium always the default? */ + // Use rig default for "normal" passband + icmode_ext = -1; } else if (width < medium_width) { icmode_ext = PD_NARROW_3; } + else if (width == medium_width) + { + icmode_ext = PD_MEDIUM_3; + } else { icmode_ext = PD_WIDE_3; diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 22831206..870a1be4 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1572,10 +1572,19 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, unsigned char ackbuf[MAXFRAMELEN]; int ack_len = sizeof(ackbuf); rmode_t icom_mode; - unsigned char dm_sub_cmd = RIG_MODEL_IC7200 == rig->caps->rig_model ? 0x04 : - S_MEM_DATA_MODE; - int filter_byte = rig->caps->rig_model == RIG_MODEL_IC7300 - || rig->caps->rig_model == RIG_MODEL_IC7610; + unsigned char dm_sub_cmd = + rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE; + int filter_byte = rig->caps->rig_model == RIG_MODEL_IC7100 + || rig->caps->rig_model == RIG_MODEL_IC7200 + || rig->caps->rig_model == RIG_MODEL_IC7300 + || rig->caps->rig_model == RIG_MODEL_IC7600 + || rig->caps->rig_model == RIG_MODEL_IC7610 + || rig->caps->rig_model == RIG_MODEL_IC7700 + || rig->caps->rig_model == RIG_MODEL_IC7800 + || rig->caps->rig_model == RIG_MODEL_IC785x + || rig->caps->rig_model == RIG_MODEL_IC9100 + || rig->caps->rig_model == RIG_MODEL_IC9700 + || rig->caps->rig_model == RIG_MODEL_IC705; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -1611,6 +1620,8 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, if (RIG_OK == retval) { unsigned char datamode[2]; + unsigned char mode_icom; // Not used, we only need the width + signed char width_icom; switch (mode) { @@ -1629,31 +1640,21 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, break; } - if (width != RIG_PASSBAND_NOCHANGE) + rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); + if (filter_byte && width_icom != -1) // then we need the width byte too { - unsigned char mode_icom; // not usb as it will map to USB/LSB - signed char width_icom; - rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); - if (filter_byte && width_icom != -1) // then we need the width byte too - { - // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 - datamode[1] = datamode[0] ? width_icom : 0; - retval = - icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, - ackbuf, - &ack_len); - } - else - { - retval = - icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, - &ack_len); - } + // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 + datamode[1] = datamode[0] ? width_icom : 0; + retval = + icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, + ackbuf, + &ack_len); } else { - rig_debug(RIG_DEBUG_TRACE, "%s RIG_PASSBAND_NOCHANGE\n", __func__); - return RIG_OK; + retval = + icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, + &ack_len); } if (retval != RIG_OK) commit 21dd5f6ce0d999e563e1c67988864d70f17df2d9 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 19 16:48:21 2020 -0600 Do not band select on FT891 as it does not remember bandwidth (cherry picked from commit 1d15625757a8abea22794f2efb00be2ed13b9c8f) diff --git a/rigs/yaesu/ft891.c b/rigs/yaesu/ft891.c index 0740f055..adc5efa4 100644 --- a/rigs/yaesu/ft891.c +++ b/rigs/yaesu/ft891.c @@ -50,7 +50,7 @@ const struct rig_caps ft891_caps = RIG_MODEL(RIG_MODEL_FT891), .model_name = "FT-891", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".2", + .version = NEWCAT_VER ".3", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 1fc323fe..153ac092 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -786,7 +786,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // And only when not in split mode if (newcat_valid_command(rig, "BS") && newcat_band_index(freq) != newcat_band_index(rig->state.current_freq) - && !rig->state.cache.split) + && !rig->state.cache.split + && !is_ft891) // 891 does not remember bandwidth so don't do this { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c", newcat_band_index(freq), cat_term); @@ -7626,7 +7627,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) char cmd[] = "SH"; char main_sub_vfo = '0'; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s\n", __func__, rig_strvfo(vfo), rig_strrmode(mode)); if (!newcat_valid_command(rig, cmd)) { commit 0fe2dd8e0ea9fe14fdb01e68b3573c50522824d3 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 19 14:30:31 2020 -0600 Fix icom default filter settings https://github.com/Hamlib/Hamlib/issues/471 (cherry picked from commit 2b1bce89bf0834c35619442d5623be3c45cb0974) diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index fbff3dda..5d272eea 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -297,6 +297,10 @@ int icom_transaction(RIG *rig, int cmd, int subcmd, { int retval, retry; + rig_debug(RIG_DEBUG_VERBOSE, + "%s: cmd=0x%02x, subcmd=0x%02x, payload_len=%d, data_len=%d\n", __func__, + cmd, subcmd, payload_len, *data_len); + retry = rig->state.rigport.retry; do diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index c83d5a7f..22831206 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1631,11 +1631,11 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, if (width != RIG_PASSBAND_NOCHANGE) { - if (filter_byte) // then we need the width byte too + unsigned char mode_icom; // not usb as it will map to USB/LSB + signed char width_icom; + rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); + if (filter_byte && width_icom != -1) // then we need the width byte too { - unsigned char mode_icom; // not used as it will map to USB/LSB - signed char width_icom; - rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 datamode[1] = datamode[0] ? width_icom : 0; retval = diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 7004bbfd..6b7dadec 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201216" +#define BACKEND_VER "20201219" /* * defines used by comp_cal_str in rig.c diff --git a/src/rig.c b/src/rig.c index c7f48821..b2397fe4 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1941,10 +1941,12 @@ pbwidth_t HAMLIB_API rig_passband_normal(RIG *rig, rmode_t mode) { if (rs->filters[i].modes & mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: return filter#%d, width=%d\n", __func__, i, (int)rs->filters[i].width); return rs->filters[i].width; } } + rig_debug(RIG_DEBUG_VERBOSE, "%s: filter not found...return RIG_PASSBAND_NORMAL=%d\n", __func__, (int)RIG_PASSBAND_NORMAL); return RIG_PASSBAND_NORMAL; } commit 93df854a5b403809dc0fcc41283616eae7cbd1ea Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 18 23:57:38 2020 -0600 Reorder newcat_band_index to return 15 for 2M band instead of 14 https://github.com/Hamlib/Hamlib/issues/470 (cherry picked from commit 5a208a871d115b485b08b17ddcd3a2a23af09ebb) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index fcc4654f..1fc323fe 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -399,10 +399,10 @@ static int newcat_band_index(freq_t freq) // does anybody work LSB or RTTYR at the upper band edge? // what about band 13 -- what is it? if (freq >= MHz(420) && freq < MHz(470)) { band = 16; } + else if (freq >= MHz(144) && freq < MHz(148)) { band = 15; } // band 14 is RX only + // override band 15 with 14 if needed else if (freq >= MHz(118) && freq < MHz(164)) { band = 14; } - // override band 14 with 15 if needed - else if (freq >= MHz(144) && freq < MHz(148)) { band = 15; } else if (freq >= MHz(70) && freq < MHz(70.5)) { band = 17; } else if (freq >= MHz(50) && freq < MHz(55)) { band = 10; } else if (freq >= MHz(28) && freq < MHz(29.7)) { band = 9; } @@ -9051,7 +9051,7 @@ int newcat_get_cmd(RIG *rig) __func__, priv->ret_data); // we were using BUSBUSY but microham devices need retries //rc = -RIG_BUSBUSY; /* don't write command again */ - rc = -RIG_EPROTO; + // rc = -RIG_EPROTO; /* we could decrement retry_count here but there is a danger of infinite looping so we just use up diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 63b80501..f784d321 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201218" +#define NEWCAT_VER "20201219" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit bd6652e7ddbf3ea59dad5aa69a629e766c1681d7 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 18 12:41:25 2020 -0600 Fix gpredict behavior with cross band split Yaesu memory will be ignored for now when in split mode We may want to allow it when we allow for VFOA/B caching https://github.com/Hamlib/Hamlib/issues/470 (cherry picked from commit e5b7a5442d15fba365e6dc760b332c7e36dcabbf) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index e92bca3c..fcc4654f 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -783,8 +783,10 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // // Restore band memory if we can and band is changing -- we do it before we set the frequency + // And only when not in split mode if (newcat_valid_command(rig, "BS") - && newcat_band_index(freq) != newcat_band_index(rig->state.current_freq)) + && newcat_band_index(freq) != newcat_band_index(rig->state.current_freq) + && !rig->state.cache.split) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c", newcat_band_index(freq), cat_term); commit d1a1247cdba10e7647a972eaec7de245c4c45db9 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 18 08:52:38 2020 -0600 Fix FT-891 bandwidth selection -- seems newer rigs now have an "on" value now https://github.com/Hamlib/Hamlib/issues/469 (cherry picked from commit aa58442e18d6ad51dc3914f0ecef149c20c0a2bd) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 858b4039..e92bca3c 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -7433,7 +7433,9 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) if (is_ftdx101 || is_ft891) { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c0%02d;", main_sub_vfo, w); + // some rigs now require the bandwidth be turned "on" + int on = is_ft891; + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%d%02d;", main_sub_vfo, on, w); } else { diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index faa00a1b..63b80501 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201217" +#define NEWCAT_VER "20201218" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 2ad464fe3d16f041b91db8c88a45ce762d64d970 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 23:57:25 2020 -0600 Fix SH command for FT-450 Comment out on/off flag for future possibilities CAT manual doesn't match what rig is returning...7 bytes vs 6 in the manual https://github.com/Hamlib/Hamlib/issues/469 (cherry picked from commit f43e190e0739f142c70d700c00d2c80503b06ce7) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index c2515a76..858b4039 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -7675,8 +7675,14 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) if (strlen(priv->ret_data) == 7) { int on; - int n = sscanf(priv->ret_data, "SH0%1d%3d", &on, &w); + // do we need to pay attention to the Main/Sub here? + int n = sscanf(priv->ret_data, "SH%*1d%1d%3d", &on, &w); + if (n != 2) + { + err = -RIG_EPROTO; + } +#if 0 // this may apply to another Yaesu rig if (n == 2) { if (!on) { w = 0; } @@ -7685,6 +7691,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { err = -RIG_EPROTO; } +#endif } else if (strlen(priv->ret_data) == 6) { diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index bf7b1dcd..faa00a1b 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201216" +#define NEWCAT_VER "20201217" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 42cfa891f3119ab4c5753e4ce8f405b56f789e3b Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:58:21 2020 -0600 Fix default powermeter_scale in flrig.c (cherry picked from commit b263ea1697ec6af19ffae763ec38797555ef72f3) diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 668fd5ef..5dc4f823 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -742,7 +742,7 @@ static int flrig_open(RIG *rig) if (retval != RIG_OK) { return retval; } - priv->powermeter_scale = 100; // default + priv->powermeter_scale = 1; // default if (strlen(value) > 0) { commit d8079adeb44b2ae496240821604cabb265c42a48 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:51:19 2020 -0600 Add powermeter_scale to flrig (cherry picked from commit 29c57bc5a7d8caa2a2c8d2a39f75e98accd34232) diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index a6ce6d93..668fd5ef 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1923,7 +1923,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) char value[MAXARGLEN]; char *cmd; int retval; - //struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv; + struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); @@ -1964,12 +1964,12 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); case RIG_LEVEL_RFPOWER_METER: - val->f = atof(value) / 100.0; + val->f = atof(value) / 100.0 * priv->powermeter_scale; rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f); break; case RIG_LEVEL_RFPOWER_METER_WATTS: - val->f = atof(value); + val->f = atof(value) * priv->powermeter_scale; rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f); break; diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index 5eac365b..ad0e0f74 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201216" +#define BACKEND_VER "20201217" #define EOM "\r" #define TRUE 1 commit e3d74c89e4c1832bdcee1d9b22f599b96cdbd1ed Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:37:53 2020 -0600 Fix RIG_LEVEL_RFPOWER_METER_WATTS for flrig #2 (cherry picked from commit 0242df5098d3e3efc1c00cd4bbe7fa873c887ee2) diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 2934b9c2..a6ce6d93 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1939,6 +1939,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_STRENGTH: cmd = "rig.get_power"; break; + case RIG_LEVEL_RFPOWER_METER_WATTS: case RIG_LEVEL_RFPOWER_METER: cmd = "rig.get_pwrmeter"; break; default: commit c60b9889282a3f77032171866375df0fff928205 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:16:45 2020 -0600 Fix RIG_LEVEL_RFPOWER_METER_WATTS for flrig (cherry picked from commit cb7f5ca120298328a82eff1ac6297a9e7e366258) diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 3b38a0b2..2934b9c2 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -57,7 +57,7 @@ RIG_MODE_SSB | RIG_MODE_LSB | RIG_MODE_USB |\ RIG_MODE_FM | RIG_MODE_WFM | RIG_MODE_FMN |RIG_MODE_PKTFM ) -#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER) +#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER | RIG_LEVEL_RFPOWER_METER_WATTS) #define streq(s1,s2) (strcmp(s1,s2)==0) commit eaeb367af95c6f2408f3071bd8921e3ca5113e71 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 15:07:04 2020 -0600 astyle files (cherry picked from commit 263f1cde72081e4e6bdf1c02eca5253a9445fe99) diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index a34da5ad..3b38a0b2 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1963,7 +1963,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); case RIG_LEVEL_RFPOWER_METER: - val->f = atof(value)/100.0; + val->f = atof(value) / 100.0; rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f); break; diff --git a/rigs/dummy/rot_dummy.c b/rigs/dummy/rot_dummy.c index d5b8b994..974f9caf 100644 --- a/rigs/dummy/rot_dummy.c +++ b/rigs/dummy/rot_dummy.c @@ -165,7 +165,7 @@ static int dummy_rot_init(ROT *rot) static int dummy_rot_cleanup(ROT *rot) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) - rot->state.priv; + rot->state.priv; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -261,7 +261,7 @@ static int dummy_rot_set_position(ROT *rot, azimuth_t az, elevation_t el) static void dummy_rot_simulate_rotation(ROT *rot) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; struct timeval tv; unsigned elapsed; /* ms */ @@ -280,7 +280,8 @@ static void dummy_rot_simulate_rotation(ROT *rot) { /* target reached */ priv->az = priv->target_az; - priv->status &= ~(ROT_STATUS_MOVING_AZ | ROT_STATUS_MOVING_LEFT | ROT_STATUS_MOVING_RIGHT); + priv->status &= ~(ROT_STATUS_MOVING_AZ | ROT_STATUS_MOVING_LEFT | + ROT_STATUS_MOVING_RIGHT); } else { @@ -300,7 +301,8 @@ static void dummy_rot_simulate_rotation(ROT *rot) { /* target reached */ priv->el = priv->target_el; - priv->status &= ~(ROT_STATUS_MOVING_EL | ROT_STATUS_MOVING_UP | ROT_STATUS_MOVING_DOWN); + priv->status &= ~(ROT_STATUS_MOVING_EL | ROT_STATUS_MOVING_UP | + ROT_STATUS_MOVING_DOWN); } else { @@ -316,9 +318,12 @@ static void dummy_rot_simulate_rotation(ROT *rot) } } - if (priv->status & (ROT_STATUS_MOVING_AZ | ROT_STATUS_MOVING_EL)) { + if (priv->status & (ROT_STATUS_MOVING_AZ | ROT_STATUS_MOVING_EL)) + { priv->status |= ROT_STATUS_MOVING; - } else { + } + else + { priv->status &= ~(ROT_STATUS_MOVING); } @@ -427,7 +432,8 @@ static const char *dummy_rot_get_info(ROT *rot) static int dummy_set_func(ROT *rot, setting_t func, int status) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __func__, rot_strfunc(func), status); @@ -447,7 +453,8 @@ static int dummy_set_func(ROT *rot, setting_t func, int status) static int dummy_get_func(ROT *rot, setting_t func, int *status) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; *status = (priv->funcs & func) ? 1 : 0; @@ -460,7 +467,8 @@ static int dummy_get_func(ROT *rot, setting_t func, int *status) static int dummy_set_level(ROT *rot, setting_t level, value_t val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; int idx; char lstr[32]; @@ -491,7 +499,8 @@ static int dummy_set_level(ROT *rot, setting_t level, value_t val) static int dummy_get_level(ROT *rot, setting_t level, value_t *val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; int idx; idx = rig_setting2idx(level); @@ -511,7 +520,8 @@ static int dummy_get_level(ROT *rot, setting_t level, value_t *val) static int dummy_set_ext_level(ROT *rot, token_t token, value_t val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; char lstr[64]; const struct confparams *cfp; struct ext_list *elp; @@ -579,7 +589,8 @@ static int dummy_set_ext_level(ROT *rot, token_t token, value_t val) static int dummy_get_ext_level(ROT *rot, token_t token, value_t *val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; const struct confparams *cfp; struct ext_list *elp; @@ -621,7 +632,8 @@ static int dummy_get_ext_level(ROT *rot, token_t token, value_t *val) static int dummy_set_ext_func(ROT *rot, token_t token, int status) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; const struct confparams *cfp; struct ext_list *elp; @@ -672,7 +684,8 @@ static int dummy_set_ext_func(ROT *rot, token_t token, int status) static int dummy_get_ext_func(ROT *rot, token_t token, int *status) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; const struct confparams *cfp; struct ext_list *elp; @@ -711,7 +724,8 @@ static int dummy_get_ext_func(ROT *rot, token_t token, int *status) static int dummy_set_parm(ROT *rot, setting_t parm, value_t val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; int idx; char pstr[32]; @@ -742,7 +756,8 @@ static int dummy_set_parm(ROT *rot, setting_t parm, value_t val) static int dummy_get_parm(ROT *rot, setting_t parm, value_t *val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; int idx; idx = rig_setting2idx(parm); @@ -762,7 +777,8 @@ static int dummy_get_parm(ROT *rot, setting_t parm, value_t *val) static int dummy_set_ext_parm(ROT *rot, token_t token, value_t val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; char lstr[64]; const struct confparams *cfp; struct ext_list *epp; @@ -827,7 +843,8 @@ static int dummy_set_ext_parm(ROT *rot, token_t token, value_t val) static int dummy_get_ext_parm(ROT *rot, token_t token, value_t *val) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; const struct confparams *cfp; struct ext_list *epp; @@ -866,7 +883,8 @@ static int dummy_get_ext_parm(ROT *rot, token_t token, value_t *val) static int dummy_rot_get_status(ROT *rot, rot_status_t *status) { - struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)rot->state.priv; + struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) + rot->state.priv; dummy_rot_simulate_rotation(rot); diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index e52950ad..fbff3dda 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -490,6 +490,7 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, icmode_ext = PD_WIDE_3; /* default to Wide */ } } + *pd = icmode_ext; } else diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 738738df..c83d5a7f 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1604,7 +1604,8 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, break; } - rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d\n", __func__, (int)icom_mode, (int)width); + rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d\n", __func__, (int)icom_mode, + (int)width); retval = icom_set_mode(rig, vfo, icom_mode, width); if (RIG_OK == retval) @@ -1627,6 +1628,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, datamode[0] = 0x00; break; } + if (width != RIG_PASSBAND_NOCHANGE) { if (filter_byte) // then we need the width byte too @@ -1704,7 +1706,8 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { err = rig2icom_mode(rig, vfo, mode, width, &icmode, &icmode_ext); } - if (width == RIG_PASSBAND_NOCHANGE) icmode_ext = priv_data->filter; + + if (width == RIG_PASSBAND_NOCHANGE) { icmode_ext = priv_data->filter; } if (err < 0) { @@ -1712,7 +1715,9 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return err; } - rig_debug(RIG_DEBUG_VERBOSE, "%s: icmode=%d, icmode_ext=%d\n", __func__, icmode, icmode_ext); + rig_debug(RIG_DEBUG_VERBOSE, "%s: icmode=%d, icmode_ext=%d\n", __func__, icmode, + icmode_ext); + /* IC-731, IC-735, IC-7000 don't support passband data */ /* IC-726 & IC-475A/E also limited support - only on CW */ /* TODO: G4WJS CW wide/narrow are possible with above two radios */ @@ -1724,7 +1729,8 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) icmode_ext = -1; } - rig_debug(RIG_DEBUG_VERBOSE, "%s: #2 icmode=%d, icmode_ext=%d\n", __func__, icmode, icmode_ext); + rig_debug(RIG_DEBUG_VERBOSE, "%s: #2 icmode=%d, icmode_ext=%d\n", __func__, + icmode, icmode_ext); retval = icom_transaction(rig, C_SET_MODE, icmode, (unsigned char *) &icmode_ext, (icmode_ext == -1 ? 0 : 1), ackbuf, &ack_len); @@ -1775,6 +1781,7 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode, retval = icom_get_mode(rig, vfo, mode, width); rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d\n", __func__, (int)*mode); + if (retval != RIG_OK) { return retval; @@ -1820,7 +1827,9 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode, return -RIG_ERJCTED; } - rig_debug(RIG_DEBUG_VERBOSE, "%s databuf[2]=%d, mode=%d\n", __func__, (int)databuf[2], (int)*mode); + rig_debug(RIG_DEBUG_VERBOSE, "%s databuf[2]=%d, mode=%d\n", __func__, + (int)databuf[2], (int)*mode); + if (databuf[2]) /* 0x01/0x02/0x03 -> data mode, 0x00 -> not data mode */ { switch (*mode) @@ -3084,16 +3093,17 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_RFPOWER_METER_WATTS: + // eventually we should change all the Icom tables to watts if (rig->caps->rfpower_meter_cal.size == 0) { val->f = - rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal)*100; + rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal) * 100; } else { val->f = - rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal)*100; + rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal) * 100; } break; diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index 1da17bad..492d5205 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -774,10 +774,13 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_RFPOWER_METER: case RIG_LEVEL_RFPOWER_METER_WATTS: flex6k_get_ptt(rig, vfo, &ptt); - if (!ptt) { + + if (!ptt) + { val->f = 0; return RIG_OK; } + cmd = "ZZRM5"; len = 5; ans = 3; @@ -844,6 +847,7 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_RFPOWER_METER: case RIG_LEVEL_RFPOWER_METER_WATTS: n = sscanf(lvlbuf, "ZZRM%f", &val->f); + if (n != 1) { rig_debug(RIG_DEBUG_ERR, "%s: Error parsing value from lvlbuf='%s'\n", @@ -851,10 +855,12 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) val->f = 0; return -RIG_EPROTO; } + if (level != RIG_LEVEL_RFPOWER_METER_WATTS) { val->f /= 100; } + break; case RIG_LEVEL_RF: diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index e371c1a8..abe1f491 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -1864,10 +1864,12 @@ int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } val->f = pwr; + if (level == RIG_LEVEL_RFPOWER_METER_WATTS) { val->f *= 100; } + break; } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 685aeb3b..c366f3b1 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2398,8 +2398,11 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) // https://github.com/Hamlib/Hamlib/issues/465 kenwood_val = val.f * power_max; - if (kenwood_val < power_min) kenwood_val = power_min; - if (kenwood_val > power_max) kenwood_val = power_max; + + if (kenwood_val < power_min) { kenwood_val = power_min; } + + if (kenwood_val > power_max) { kenwood_val = power_max; } + snprintf(levelbuf, sizeof(levelbuf), "PC%03d", kenwood_val); break; } @@ -3888,8 +3891,8 @@ int kenwood_set_powerstat(RIG *rig, powerstat_t status) sleep(1); retval = rig_get_freq(rig, RIG_VFO_A, &freq); - if (retval == RIG_OK) - { + if (retval == RIG_OK) + { rig->state.rigport.retry = retry_save; return retval; } diff --git a/rigs/yaesu/ft2000.c b/rigs/yaesu/ft2000.c index 03888f71..aeaa6af1 100644 --- a/rigs/yaesu/ft2000.c +++ b/rigs/yaesu/ft2000.c @@ -185,12 +185,12 @@ const struct rig_caps ft2000_caps = /* mode/filter list, .remember = order matters! */ .filters = { - {RIG_MODE_CW|RIG_MODE_CWR, Hz(500)}, /* Normal CW, RTTY, PKT/USER */ - {RIG_MODE_CW|RIG_MODE_CWR, Hz(200)}, /* Narrow CW, RTTY, PKT/USER */ - {RIG_MODE_CW|RIG_MODE_CWR, Hz(2400)}, /* Wide CW, RTTY, PKT/USER */ - {RIG_MODE_RTTY|RIG_MODE_RTTYR, Hz(500)}, /* Normal RTTY */ - {RIG_MODE_RTTY|RIG_MODE_RTTYR, Hz(300)}, /* Narrow RTTY */ - {RIG_MODE_RTTY|RIG_MODE_RTTYR, Hz(2400)}, /* Wide RTTY */ + {RIG_MODE_CW | RIG_MODE_CWR, Hz(500)}, /* Normal CW, RTTY, PKT/USER */ + {RIG_MODE_CW | RIG_MODE_CWR, Hz(200)}, /* Narrow CW, RTTY, PKT/USER */ + {RIG_MODE_CW | RIG_MODE_CWR, Hz(2400)}, /* Wide CW, RTTY, PKT/USER */ + {RIG_MODE_RTTY | RIG_MODE_RTTYR, Hz(500)}, /* Normal RTTY */ + {RIG_MODE_RTTY | RIG_MODE_RTTYR, Hz(300)}, /* Narrow RTTY */ + {RIG_MODE_RTTY | RIG_MODE_RTTYR, Hz(2400)}, /* Wide RTTY */ {RIG_MODE_SSB, Hz(2400)}, /* Normal SSB */ {RIG_MODE_SSB, Hz(1800)}, /* Narrow SSB */ {RIG_MODE_SSB, Hz(3000)}, /* Wide SSB */ diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 1943adde..c2515a76 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -534,11 +534,14 @@ int newcat_open(RIG *rig) (void)newcat_get_rigid(rig); if (priv->rig_id == NC_RIGID_FT2000) - { // then we need to readjust rfpowermeter cal table in half + { + // then we need to readjust rfpowermeter cal table in half int i; - for(i=0;i<rig->caps->rfpower_meter_cal.size; ++i) - { // we may need a table for the FT2000 instead of this - rig->caps->rfpower_meter_cal.table[i].raw/=2; + + for (i = 0; i < rig->caps->rfpower_meter_cal.size; ++i) + { + // we may need a table for the FT2000 instead of this + rig->caps->rfpower_meter_cal.table[i].raw /= 2; } } @@ -2884,7 +2887,7 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PS%c%c", ps, cat_term); retval = write_block(&state->rigport, priv->cmd_str, strlen(priv->cmd_str)); - + retry_save = rig->state.rigport.retry; rig->state.rigport.retry = 0; @@ -2896,10 +2899,11 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status) hl_usleep(1000000); retval = rig_get_freq(rig, RIG_VFO_A, &freq); - if (retval == RIG_OK) { + if (retval == RIG_OK) + { rig->state.rigport.retry = retry_save; - return retval; - } + return retval; + } rig_debug(RIG_DEBUG_TRACE, "%s: Wait #%d for power up\n", __func__, i + 1); } @@ -4182,6 +4186,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM5%c", cat_term); } + break; case RIG_LEVEL_COMP_METER: @@ -4383,26 +4388,36 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_RFPOWER_METER: case RIG_LEVEL_RFPOWER_METER_WATTS: rig_debug(RIG_DEBUG_VERBOSE, "%s: RFPOWER_METER retlvl=%s\n", __func__, retlvl); + if (retlvl_len > 3) { // Some rigs like FTDX101 have 6-byte return so we just truncate - rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl of %s getting truncated\n", __func__, retlvl); + rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl of %s getting truncated\n", __func__, + retlvl); retlvl[3] = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl truncated to %s\n", __func__, retlvl); } if (rig->caps->rfpower_meter_cal.size == 0) { - val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_rfpower_meter_cal)/(level == RIG_LEVEL_RFPOWER_METER_WATTS?1.0:100.0); + val->f = rig_raw2val_float(atoi(retlvl), + &yaesu_default_rfpower_meter_cal) / (level == RIG_LEVEL_RFPOWER_METER_WATTS ? + 1.0 : 100.0); } else { - val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->rfpower_meter_cal)/(level == RIG_LEVEL_RFPOWER_METER_WATTS?1.0:100.0); + val->f = rig_raw2val_float(atoi(retlvl), + &rig->caps->rfpower_meter_cal) / (level == RIG_LEVEL_RFPOWER_METER_WATTS ? 1.0 : + 100.0); } - rig_debug(RIG_DEBUG_VERBOSE, "%s: RFPOWER_METER=%s, converted to %f\n", __func__, retlvl, val->f); - if (level == RIG_LEVEL_RFPOWER_METER && val->f > 1.0) + + rig_debug(RIG_DEBUG_VERBOSE, "%s: RFPOWER_METER=%s, converted to %f\n", + __func__, retlvl, val->f); + + if (level == RIG_LEVEL_RFPOWER_METER && val->f > 1.0) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: val->f(%f) clipped at 1.0\n", __func__, val->f); + rig_debug(RIG_DEBUG_VERBOSE, "%s: val->f(%f) clipped at 1.0\n", __func__, + val->f); val->f = 1.0; } @@ -4417,11 +4432,11 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (rig->caps->comp_meter_cal.size == 0) { - val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_comp_meter_cal)/100; + val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_comp_meter_cal) / 100; } else { - val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->comp_meter_cal)/100; + val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->comp_meter_cal) / 100; } break; @@ -7656,11 +7671,14 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) w = 0; // use default in case of error + if (strlen(priv->ret_data) == 7) { int on; int n = sscanf(priv->ret_data, "SH0%1d%3d", &on, &w); - if (n == 2) { + + if (n == 2) + { if (!on) { w = 0; } } else @@ -7671,14 +7689,15 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) else if (strlen(priv->ret_data) == 6) { int n = sscanf(priv->ret_data, "SH%3d", &w); - if (n != 1) err = -RIG_EPROTO; + + if (n != 1) { err = -RIG_EPROTO; } } else { err = -RIG_EPROTO; } - rig_debug(RIG_DEBUG_TRACE, "%s: w=%d\n", __func__, w); + rig_debug(RIG_DEBUG_TRACE, "%s: w=%d\n", __func__, w); if (err != RIG_OK) { @@ -7878,7 +7897,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) case 17: *width = 3000; break; - default: + default: rig_debug(RIG_DEBUG_ERR, "%s: unknown w=%d\n", __func__, w); return -RIG_EINVAL; } @@ -7933,7 +7952,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) case 21: *width = 3200; break; - default: + default: rig_debug(RIG_DEBUG_ERR, "%s: unknown mode=%s\n", __func__, rig_strrmode(mode)); return -RIG_EINVAL; } @@ -8565,6 +8584,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { *width = 3000; } + break; case RIG_MODE_PKTUSB: @@ -8581,6 +8601,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { *width = 2400; } + break; case RIG_MODE_RTTY: @@ -8597,6 +8618,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { *width = 2400; } + break; case RIG_MODE_LSB: @@ -8617,6 +8639,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { *width = 4000; } + break; case RIG_MODE_AM: @@ -8665,6 +8688,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) { *width = rig_passband_normal(rig, mode); } + break; case RIG_MODE_AM: @@ -9074,7 +9098,7 @@ int newcat_get_cmd(RIG *rig) */ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__, priv->cmd_str); - // return -RIG_ERJCTED; + // return -RIG_ERJCTED; } continue; diff --git a/rotators/easycomm/easycomm.c b/rotators/easycomm/easycomm.c index e2955c11..a75c2763 100644 --- a/rotators/easycomm/easycomm.c +++ b/rotators/easycomm/easycomm.c @@ -259,13 +259,16 @@ static int easycomm_rot_move_velocity(ROT *rot, int direction, int speed) rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - if (speed == ROT_SPEED_NOCHANGE) { + if (speed == ROT_SPEED_NOCHANGE) + { easycomm_speed = rs->current_speed; - } else { + } + else + { if (speed < 1 || speed > 100) { rig_debug(RIG_DEBUG_ERR, "%s: Invalid speed value (1-100)! (%d)\n", __func__, - speed); + speed); return -RIG_EINVAL; } @@ -314,12 +317,14 @@ static int easycomm_rot_get_level(ROT *rot, setting_t level, value_t *val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rot_strlevel(level)); - switch (level) { - case ROT_LEVEL_SPEED: - val->i = rs->current_speed; - break; - default: - return -RIG_ENAVAIL; + switch (level) + { + case ROT_LEVEL_SPEED: + val->i = rs->current_speed; + break; + + default: + return -RIG_ENAVAIL; } return RIG_OK; @@ -332,20 +337,27 @@ static int easycomm_rot_set_level(ROT *rot, setting_t level, value_t val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rot_strlevel(level)); - switch (level) { - case ROT_LEVEL_SPEED: { - int speed = val.i; - if (speed < 0) { - speed = 0; - } else if (speed > 9999) { - speed = 9999; - } - - rs->current_speed = speed; - break; + switch (level) + { + case ROT_LEVEL_SPEED: + { + int speed = val.i; + + if (speed < 0) + { + speed = 0; } - default: - return -RIG_ENAVAIL; + else if (speed > 9999) + { + speed = 9999; + } + + rs->current_speed = speed; + break; + } + + default: + return -RIG_ENAVAIL; } return RIG_OK; diff --git a/rotators/ether6/ether6.c b/rotators/ether6/ether6.c index 2a5c121a..10e65196 100644 --- a/rotators/ether6/ether6.c +++ b/rotators/ether6/ether6.c @@ -274,12 +274,16 @@ static int ether_rot_move(ROT *rot, int direction, int speed) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (speed == ROT_SPEED_NOCHANGE) { + if (speed == ROT_SPEED_NOCHANGE) + { ether_speed = rs->current_speed; - } else { + } + else + { if (speed < 1 || speed > 100) { - rig_debug(RIG_DEBUG_ERR, "%s: Invalid speed value (1-100)! (%d)\n", __func__, speed); + rig_debug(RIG_DEBUG_ERR, "%s: Invalid speed value (1-100)! (%d)\n", __func__, + speed); return -RIG_EINVAL; } @@ -315,12 +319,14 @@ static int ether_rot_get_level(ROT *rot, setting_t level, value_t *val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rot_strlevel(level)); - switch (level) { - case ROT_LEVEL_SPEED: - val->i = rs->current_speed; - break; - default: - return -RIG_ENAVAIL; + switch (level) + { + case ROT_LEVEL_SPEED: + val->i = rs->current_speed; + break; + + default: + return -RIG_ENAVAIL; } return RIG_OK; @@ -333,20 +339,27 @@ static int ether_rot_set_level(ROT *rot, setting_t level, value_t val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rot_strlevel(level)); - switch (level) { - case ROT_LEVEL_SPEED: { - int speed = val.i; - if (speed < 1) { - speed = 1; - } else if (speed > 100) { - speed = 100; - } - - rs->current_spe... [truncated message content] |