[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. cf44a1a4e5fa5bfc900fd
Library to control radio transceivers and receivers
Brought to you by:
n0nb
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 |