[Hamlib-commits] Hamlib -- Ham radio control libraries branch Hamlib-4.5.2 created. 4.5.1-39-gf12ac
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2022-12-24 17:25: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.5.2 has been created at f12ac6279b421ea12a4440c5b1a3caddfc183916 (commit) - Log ----------------------------------------------------------------- commit f12ac6279b421ea12a4440c5b1a3caddfc183916 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Dec 23 17:04:12 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 38f6f3e7..6eba3a94 100644 --- a/NEWS +++ b/NEWS @@ -14,16 +14,22 @@ Version 5.x -- future Version 4.6 * 2023-11-XX -- Planned for Nov 2023 + * Add --set-conf=tuner_control_pathname=hamlib_tuner_control (default) + If file exists then it will be called with 0/1 (Off/On) argument + with 'U TUNER 0' or 'U TUNER 1" + Default path is for current directory * Add MDS 4710/9710 rigs + * Add FLIR PTU-D48, E46, D100, D300 rotors + * Fix FTDX3000 rig split Version 4.5.2 + * 2022-12-23 * Fix PowerSDR ability to do commands while powered off * Fix TX-500 operations * Fix FTDX5000 to return to MIC input on closing * Fix rig.c calling rig_get_mode when backend does not have get_mode * Fix kenwood_ts890_get_level * Add Prosistel D elevation CBOX az to fix problem with azimuth control - * 2022-12-XX -- Planned for Dec 2022 * Fix FT736R gpredict usage by adding cached get_freq * Fix get_powerstat problem with Log4OM/Flex and others * Fix -R option to not need argument @@ -34,7 +40,7 @@ Version 4.5.2 Version 4.5.1 * 2022-12-08 * FT2000, FTDX3000/D, FT891, FT991, FT950, FTDX5000 now set CAT TOT to 100ms - * Add missing NB2 setting to FT-950, FTDX-1200, FTDX-3000, FTDX-5000, FTDX-9000 + * Add missing NB2 setting to FT-950, FTDX-1200, FT-2000, FTDX-3000, FTDX-5000, FTDX-9000 * Add missing meter reading to TS-890S -- thanks to Geore Baltz N3GB * Fix FT736 VFOB freq and mode set * Added send_raw to rigctl -- see rigctl man page commit ad511c496efd6965052966448f0dcd67c58d43de Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Dec 23 16:53:18 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 82344221..38f6f3e7 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ Version 4.6 Version 4.5.2 * Fix PowerSDR ability to do commands while powered off * Fix TX-500 operations + * Fix FTDX5000 to return to MIC input on closing * Fix rig.c calling rig_get_mode when backend does not have get_mode * Fix kenwood_ts890_get_level * Add Prosistel D elevation CBOX az to fix problem with azimuth control commit ee96efd5bca8b5bda03a98438ad28fed805bfe32 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Dec 23 16:49:45 2022 -0600 Make FTDX5000 return to MIC input on closing https://github.com/Hamlib/Hamlib/issues/1193 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index fda8aa01..9bff762a 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -662,6 +662,14 @@ int newcat_close(RIG *rig) priv->poweron = 0; } + if (is_ftdx5000) + { + // Ensure FT5000 is back to MIC input + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "EX1030;"); + rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); + newcat_set_cmd(rig); // don't care about the return + } + RETURNFUNC(RIG_OK); } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index c45a4d9d..a0be7487 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20221211" +#define NEWCAT_VER "20221223" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 289788bae98f02d81a6afb1fc2fdb683f72302a3 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Dec 20 08:50:32 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 908ad034..82344221 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ Version 4.6 * Add MDS 4710/9710 rigs Version 4.5.2 + * Fix PowerSDR ability to do commands while powered off + * Fix TX-500 operations * Fix rig.c calling rig_get_mode when backend does not have get_mode * Fix kenwood_ts890_get_level * Add Prosistel D elevation CBOX az to fix problem with azimuth control commit 0d2fd757bf91476f98cfe47c61d3785d16b40887 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 19 14:55:14 2022 -0600 Remove powerstat from TX-500 -- was always responding PS0; https://github.com/Hamlib/Hamlib/issues/1188 diff --git a/rigs/kenwood/tx500.c b/rigs/kenwood/tx500.c index 5f2c4f5c..6edeffdc 100644 --- a/rigs/kenwood/tx500.c +++ b/rigs/kenwood/tx500.c @@ -318,8 +318,8 @@ const struct rig_caps tx500_caps = .set_channel = ts2000_set_channel, .set_trn = kenwood_set_trn, .get_trn = kenwood_get_trn, - .set_powerstat = kenwood_set_powerstat, - .get_powerstat = kenwood_get_powerstat, + //.set_powerstat = kenwood_set_powerstat, + //.get_powerstat = kenwood_get_powerstat, .get_info = kenwood_get_info, .reset = kenwood_reset, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS commit fef4c674a10242271c896be61e775a686a96688c Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 19 16:58:44 2022 -0600 Allow POWERSDR to do commands when powered off diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 6cb82915..1b356aac 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -1752,7 +1752,8 @@ readline_repeat: && cmd_entry->cmd != '3' // dump_conf && cmd_entry->cmd != 0x8f // dump_state && cmd_entry->cmd != 0xf0 // chk_vfo - && cmd_entry->cmd != 0x87) // set_powerstat + && cmd_entry->cmd != 0x87 // set_powerstat + && my_rig->caps->rig_model != RIG_MODEL_POWERSDR) // some rigs can do stuff when powered off { rig_debug(RIG_DEBUG_WARN, "%s: command %s not allowed when rig is powered off\n", __func__, commit b041a7f6075cc3c6594800ad78794ab7ed5f8754 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Dec 20 08:29:12 2022 -0600 Change TX-500 to only have 9600 baud available https://github.com/Hamlib/Hamlib/issues/1188 diff --git a/rigs/kenwood/tx500.c b/rigs/kenwood/tx500.c index d5cb6398..5f2c4f5c 100644 --- a/rigs/kenwood/tx500.c +++ b/rigs/kenwood/tx500.c @@ -127,15 +127,15 @@ const struct rig_caps tx500_caps = RIG_MODEL(RIG_MODEL_LAB599_TX500), .model_name = "TX-500", .mfg_name = "Lab599", - .version = BACKEND_VER ".1", + .version = BACKEND_VER ".3", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, .port_type = RIG_PORT_SERIAL, - .serial_rate_min = 1200, - .serial_rate_max = 57600, + .serial_rate_min = 9600, + .serial_rate_max = 9600, .serial_data_bits = 8, .serial_stop_bits = 1, .serial_parity = RIG_PARITY_NONE, commit ac882ee896afff59ebc54e4fafc26dd0466c65b1 Author: Mike Black W9MDB <mdb...@ya...> Date: Sun Dec 18 09:01:27 2022 -0600 Fix unidirectional rig cached frequency (e.g. FT736R) https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 066db187..b9e90cd5 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -3396,6 +3396,7 @@ extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status); extern HAMLIB_EXPORT(int) rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode); extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len); extern HAMLIB_EXPORT(int) rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width); +extern HAMLIB_EXPORT(int) rig_get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq); extern HAMLIB_EXPORT(int) rig_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset); extern HAMLIB_EXPORT(int) rig_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset); diff --git a/rigs/yaesu/ft736.c b/rigs/yaesu/ft736.c index 52cd85fc..8858512f 100644 --- a/rigs/yaesu/ft736.c +++ b/rigs/yaesu/ft736.c @@ -31,6 +31,7 @@ #include "misc.h" #include "yaesu.h" #include "tones.h" +#include "cache.h" @@ -99,7 +100,7 @@ const struct rig_caps ft736_caps = RIG_MODEL(RIG_MODEL_FT736R), .model_name = "FT-736R", .mfg_name = "Yaesu", - .version = "20221214.0", + .version = "20221218.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -270,6 +271,7 @@ int ft736_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0x01}; struct ft736_priv_data *priv = (struct ft736_priv_data *)rig->state.priv; + int retval; // we will assume requesting to set VFOB is split mode if (vfo == RIG_VFO_B) { return rig_set_split_freq(rig, vfo, freq); } @@ -288,8 +290,11 @@ int ft736_set_freq(RIG *rig, vfo_t vfo, freq_t freq) cmd[0] = (cmd[0] & 0x0f) | 0xc0; } - /* Frequency set */ - return write_block(&rig->state.rigport, cmd, YAESU_CMD_LENGTH); + retval = write_block(&rig->state.rigport, cmd, YAESU_CMD_LENGTH); + + if (retval == RIG_OK) { rig_set_cache_freq(rig, vfo, freq); } + + return retval; } int ft736_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) @@ -297,7 +302,7 @@ int ft736_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { *freq = rig->state.cache.freqMainA; } - else { *freq = rig->state.cache.freqMainB; } + else { rig_get_cache_freq(rig, vfo, freq, NULL); } return RIG_OK; } diff --git a/src/cache.c b/src/cache.c index 7bdafbfa..b912bdee 100644 --- a/src/cache.c +++ b/src/cache.c @@ -442,6 +442,41 @@ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, return RIG_OK; } +/** + * \brief get cached values for a VFO + * \param rig The rig handle + * \param vfo The VFO to get information from + * \param freq The frequency is stored here + * \param cache_ms_freq The age of the last frequency update in ms -- NULL if you don't want it + + * Use this to query the frequency cache and then determine to actually fetch data from + * the rig. + * + * \return RIG_OK if the operation has been successful, otherwise + * a negative value if an error occurred (in which case, cause is + * set appropriately). + * + */ +int rig_get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq_p) +{ + rmode_t mode; + int cache_ms_freq; + int cache_ms_mode; + pbwidth_t width; + int cache_ms_width; + int retval; + retval = rig_get_cache(rig, vfo, freq, &cache_ms_freq, &mode, &cache_ms_mode, + &width, &cache_ms_width); + + if (retval == RIG_OK) + { + if (cache_ms_freq_p) { *cache_ms_freq_p = cache_ms_freq; } + } + + return retval; +} + + void rig_cache_show(RIG *rig, const char *func, int line) { rig_debug(RIG_DEBUG_CACHE, diff --git a/src/rig.c b/src/rig.c index 5523ef42..b42cf331 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1808,7 +1808,11 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retcode != RIG_OK) { RETURNFUNC(retcode); } - rig_set_cache_freq(rig, vfo, (freq_t)0); + // Unidirectional rigs do not reset cache + if (rig->caps->rig_model != RIG_MODEL_FT736R) + { + rig_set_cache_freq(rig, vfo, (freq_t)0); + } #if 0 // this verification seems to be causing bad behavior on some rigs commit ce8f50d04ccfb2760482f4e40b8a3f6fb724d4b5 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 17 17:23:52 2022 -0600 Ensure get_powerstat return RIG_OK when rig does not have get_powerstat https://github.com/Hamlib/Hamlib/issues/1189 diff --git a/src/rig.c b/src/rig.c index c50f047a..5523ef42 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6032,7 +6032,7 @@ int HAMLIB_API rig_get_powerstat(RIG *rig, powerstat_t *status) if (rig->caps->get_powerstat == NULL) { *status = RIG_POWER_ON; // default to power if not available - RETURNFUNC(-RIG_ENAVAIL); + RETURNFUNC(RIG_OK); } *status = RIG_POWER_OFF; // default now to power off until proven otherwise in get_powerstat commit 701a53ce2339598744a5a9739d400525610cec11 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 17 10:35:56 2022 -0600 Reset rig->state.cache.split so it can be set again when rigctld reopens the rig https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/src/rig.c b/src/rig.c index 5ffaa221..c50f047a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1520,6 +1520,8 @@ int HAMLIB_API rig_close(RIG *rig) remove_opened_rig(rig); + // zero split so it will allow it to be set again on open for rigctld + rig->state.cache.split = 0; rs->comm_state = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): %p rs->comm_state==0?=%d\n", __func__, __LINE__, &rs->comm_state, commit baaf214f9ca759d267b2f47fa4b92e6e50c6f189 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 17 09:59:04 2022 -0600 FT-736 did not have get_mode so only call get_mode when available https://github.com/Hamlib/Hamlib/issues/1187 commit 777a40216e7ffcb82b206bde626cf0b117547188 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 17 10:19:46 2022 -0600 Do not reset cache for unidirectional rigs https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/src/rig.c b/src/rig.c index b1533efc..5ffaa221 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1897,7 +1897,12 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) #endif ) { - rig_set_cache_freq(rig, RIG_VFO_ALL, (freq_t)0); + // Unidirectional rigs do not reset cache + if (rig->caps->rig_model != RIG_MODEL_FT736R) + { + rig_set_cache_freq(rig, RIG_VFO_ALL, (freq_t)0); + } + HAMLIB_TRACE; retcode = rig_get_freq(rig, vfo, &freq_new); commit 7a3600295f4359d3323332a1a62d72e35abcf604 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 17 09:59:04 2022 -0600 FT-736 did not have get_mode so only call get_mode when available https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/src/rig.c b/src/rig.c index 7c8b326f..b1533efc 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1346,14 +1346,18 @@ int HAMLIB_API rig_open(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): Current split=%d, tx_vfo=%s\n", __func__, __LINE__, split, rig_strvfo(tx_vfo)); rmode_t mode; - pbwidth_t width; - rig_get_mode(rig, RIG_VFO_A, &mode, &width); + pbwidth_t width = 2400; // we'll use 2400Hz as default width - if (split) + if (rig->caps->get_mode) { - rig_debug(RIG_DEBUG_VERBOSE, "xxxsplit=%d\n", split); - HAMLIB_TRACE; - rig_get_mode(rig, RIG_VFO_B, &mode, &width); + rig_get_mode(rig, RIG_VFO_A, &mode, &width); + + if (split) + { + rig_debug(RIG_DEBUG_VERBOSE, "xxxsplit=%d\n", split); + HAMLIB_TRACE; + rig_get_mode(rig, RIG_VFO_B, &mode, &width); + } } } } @@ -2892,8 +2896,9 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) if (cache_ms < rig->state.cache.timeout_ms) { - rig_debug(RIG_DEBUG_TRACE, "%s: cache hit age=%dms\n", __func__, cache_ms); *vfo = rig->state.cache.vfo; + rig_debug(RIG_DEBUG_TRACE, "%s: cache hit age=%dms, vfo=%s\n", __func__, + cache_ms, rig_strvfo(*vfo)); ELAPSED2; RETURNFUNC(RIG_OK); } commit 3b8bc150d12f5f56e3ebb05c588d6aa022528934 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 17 10:00:07 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 6b8bc4fe..908ad034 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Version 4.6 * Add MDS 4710/9710 rigs Version 4.5.2 + * Fix rig.c calling rig_get_mode when backend does not have get_mode * Fix kenwood_ts890_get_level * Add Prosistel D elevation CBOX az to fix problem with azimuth control * 2022-12-XX -- Planned for Dec 2022 commit b35dc746cc728477a3c769ccffb6729e331ee553 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Dec 15 17:14:00 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 026f9410..6b8bc4fe 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Version 4.6 * Add MDS 4710/9710 rigs Version 4.5.2 + * Fix kenwood_ts890_get_level * Add Prosistel D elevation CBOX az to fix problem with azimuth control * 2022-12-XX -- Planned for Dec 2022 * Fix FT736R gpredict usage by adding cached get_freq commit 9f67561d230133dbc7154ae16742e209c69a36e3 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Dec 15 17:11:08 2022 -0600 Fix kenwood_ts890_get_level -- thanks to N3GB George Baltz diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index 9c23b131..dc2781b9 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -305,7 +305,7 @@ int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (rig->caps->swr_cal.size) { - val->f = rig_raw2val_float(val->i, &rig->caps->swr_cal); + val->f = rig_raw2val_float(levelint, &rig->caps->swr_cal); } else { @@ -432,7 +432,7 @@ const struct rig_caps ts890s_caps = RIG_MODEL(RIG_MODEL_TS890S), .model_name = "TS-890S", .mfg_name = "Kenwood", - .version = BACKEND_VER ".9", + .version = BACKEND_VER ".10", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit 2d226f446485b8fc4da22a32fb595d5af47e1fff Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Dec 15 12:04:14 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index c717fd69..026f9410 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Version 4.6 * Add MDS 4710/9710 rigs Version 4.5.2 + * Add Prosistel D elevation CBOX az to fix problem with azimuth control * 2022-12-XX -- Planned for Dec 2022 * Fix FT736R gpredict usage by adding cached get_freq * Fix get_powerstat problem with Log4OM/Flex and others commit d31d651de55797c298a4808ee19f00a57bce604c Author: PianetaRadio <789...@us...> Date: Thu Dec 15 18:24:55 2022 +0100 Update rotlist.h Add Elevation rotator with Control box responding to azimuth logic diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h index 744c716c..62d64ffe 100644 --- a/include/hamlib/rotlist.h +++ b/include/hamlib/rotlist.h @@ -557,6 +557,7 @@ #define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1) #define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) #define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3) +#define ROT_MODEL_PROSISTEL_D_EL_CBOXAZ ROT_MAKE_MODEL(ROT_PROSISTEL, 4) /** commit bc7e88dd9d0f93a8eece5d2c9ea4122114f8ce2f Author: PianetaRadio <789...@us...> Date: Thu Dec 15 18:21:23 2022 +0100 Update prosistel.c Add Elevation rotator with Control box responding to azimuth logic diff --git a/rotators/prosistel/prosistel.c b/rotators/prosistel/prosistel.c index 1ab58602..76a2a37f 100644 --- a/rotators/prosistel/prosistel.c +++ b/rotators/prosistel/prosistel.c @@ -379,6 +379,15 @@ static const struct prosistel_rot_priv_caps prosistel_rot_combitrack_priv_caps = }; +// Elevation rotator with Control box D using azimuth logic +static const struct prosistel_rot_priv_caps prosistel_rot_el_cboxaz = +{ + .angle_multiplier = 1.0f, + .stop_angle = 997, + .elevation_id = 'A', +}; + + /* * Prosistel rotator capabilities */ @@ -487,7 +496,7 @@ const struct rot_caps prosistel_combi_track_azel_rot_caps = }; -//Elevation rotator with ControlBox using azimuth logic +// Elevation rotator with Control box D using azimuth logic const struct rot_caps prosistel_d_el_cboxaz_rot_caps = { ROT_MODEL(ROT_MODEL_PROSISTEL_D_EL_CBOXAZ), commit fcf69dff5e3388caaa5d2d21968c2b83227550fc Author: PianetaRadio <789...@us...> Date: Thu Dec 15 18:12:32 2022 +0100 Update prosistel.h Add Elevation rotator with Control box responding to azimuth logic diff --git a/rotators/prosistel/prosistel.h b/rotators/prosistel/prosistel.h index ee7b3594..2b1b90c8 100644 --- a/rotators/prosistel/prosistel.h +++ b/rotators/prosistel/prosistel.h @@ -25,5 +25,6 @@ extern const struct rot_caps prosistel_d_az_rot_caps; extern const struct rot_caps prosistel_d_el_rot_caps; extern const struct rot_caps prosistel_combi_track_azel_rot_caps; +extern const struct rot_caps prosistel_d_el_cboxaz_rot_caps; #endif /* _ROT_PROSISTEL_H */ commit b1e501a856b8caa2535a7d06853b7979dc87d5eb Author: PianetaRadio <789...@us...> Date: Thu Dec 15 18:09:51 2022 +0100 Update prosistel.c Add Elevation rotator with Control box responding to azimuth logic diff --git a/rotators/prosistel/prosistel.c b/rotators/prosistel/prosistel.c index 511cde4a..1ab58602 100644 --- a/rotators/prosistel/prosistel.c +++ b/rotators/prosistel/prosistel.c @@ -486,6 +486,43 @@ const struct rot_caps prosistel_combi_track_azel_rot_caps = .get_position = prosistel_rot_get_position, }; + +//Elevation rotator with ControlBox using azimuth logic +const struct rot_caps prosistel_d_el_cboxaz_rot_caps = +{ + ROT_MODEL(ROT_MODEL_PROSISTEL_D_EL_CBOXAZ), + .model_name = "D elevation CBOX az", + .mfg_name = "Prosistel", + .version = "20221215.0", + .copyright = "LGPL", + .status = RIG_STATUS_STABLE, + .rot_type = ROT_TYPE_ELEVATION, + .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_NONE, + .write_delay = 0, + .post_write_delay = 0, + .timeout = 3000, + .retry = 3, + + .min_az = 0.0, + .max_az = 0.0, + .min_el = 0.0, + .max_el = 90.0, + + .priv = &prosistel_rot_el_cboxaz, + + .rot_open = prosistel_rot_open, + .stop = prosistel_rot_stop, + .set_position = prosistel_rot_set_position, + .get_position = prosistel_rot_get_position, +}; + + DECLARE_INITROT_BACKEND(prosistel) { rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__); @@ -493,6 +530,7 @@ DECLARE_INITROT_BACKEND(prosistel) rot_register(&prosistel_d_az_rot_caps); rot_register(&prosistel_d_el_rot_caps); rot_register(&prosistel_combi_track_azel_rot_caps); + rot_register(&prosistel_d_el_cboxaz_rot_caps); return RIG_OK; } commit 4e88d847b08cbff97de5c1a7b5ee5ad376d2cb0f Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Dec 14 11:17:17 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 6595b48e..c717fd69 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ Version 4.6 Version 4.5.2 * 2022-12-XX -- Planned for Dec 2022 + * Fix FT736R gpredict usage by adding cached get_freq * Fix get_powerstat problem with Log4OM/Flex and others * Fix -R option to not need argument * Fix -R option to close rig on last rigctld client disconnect commit 80cdb9b953fcdf9b4b027aeed33df6758806492a Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Dec 14 11:04:30 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 08d9411b..6595b48e 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ Version 4.6 Version 4.5.2 * 2022-12-XX -- Planned for Dec 2022 + * Fix get_powerstat problem with Log4OM/Flex and others * Fix -R option to not need argument * Fix -R option to close rig on last rigctld client disconnect * Add FTDX1200 to rigs that need to ensure PTT is off before changing frequency commit f0636bc87590d84ca9b205222854704286a0319c Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Dec 14 11:14:54 2022 -0600 Add get_freq cached for FT736R to allow working with gpredict https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/rigs/yaesu/ft736.c b/rigs/yaesu/ft736.c index eda6cea0..52cd85fc 100644 --- a/rigs/yaesu/ft736.c +++ b/rigs/yaesu/ft736.c @@ -58,6 +58,7 @@ static int ft736_open(RIG *rig); static int ft736_close(RIG *rig); static int ft736_set_freq(RIG *rig, vfo_t vfo, freq_t freq); +static int ft736_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); // cached answer static int ft736_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); static int ft736_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); @@ -98,7 +99,7 @@ const struct rig_caps ft736_caps = RIG_MODEL(RIG_MODEL_FT736R), .model_name = "FT-736R", .mfg_name = "Yaesu", - .version = "20211271.0", + .version = "20221214.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -195,6 +196,7 @@ const struct rig_caps ft736_caps = .rig_close = ft736_close, .set_freq = ft736_set_freq, + .get_freq = ft736_get_freq, .set_mode = ft736_set_mode, .set_ptt = ft736_set_ptt, .get_dcd = ft736_get_dcd, @@ -290,6 +292,17 @@ int ft736_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return write_block(&rig->state.rigport, cmd, YAESU_CMD_LENGTH); } +int ft736_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) +{ + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { *freq = rig->state.cache.freqMainA; } + else { *freq = rig->state.cache.freqMainB; } + + return RIG_OK; +} + + #define MD_LSB 0x00 commit bc45b17ae2d995e05d8bb8d10d4652a65b648d31 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 12 17:38:52 2022 -0600 If get_powerstat fails assume rig is powered on -- should fix sdr++ problem https://github.com/Hamlib/Hamlib/issues/1186 commit 2dd31355fc5fe3dd1a4afdd8843f53132bce7395 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Dec 14 09:05:27 2022 -0600 If get_powerstat fails in any way then always return RIG_POWER_ON https://github.com/Hamlib/Hamlib/issues/1189 diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index eed16b83..cd6a7c63 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -2052,23 +2052,22 @@ static int netrigctl_get_powerstat(RIG *rig, powerstat_t *status) ret = netrigctl_transaction(rig, cmd, strlen(cmd), buf); - if (ret == 1) + if (ret == 0) + { + *status = atoi(buf); + } + else { // was causing problems with sdr++ since it does not have PS command // a return of 1 should indicate there is no powerstat command available // so we fake the ON status + // also a problem with Flex 6xxx and Log4OM not working due to lack of PS command + rig_debug(RIG_DEBUG_VERBOSE, + "%s: PS command failed (ret=%d) so returning RIG_POWER_ON\n", __func__, ret); *status = RIG_POWER_ON; - return RIG_OK; - } - - if (ret <= 0) - { - return (ret < 0) ? ret : -RIG_EPROTO; } - *status = atoi(buf); - - return RIG_OK; + return RIG_OK; // always return RIG_OK } @@ -2735,7 +2734,7 @@ struct rig_caps netrigctl_caps = RIG_MODEL(RIG_MODEL_NETRIGCTL), .model_name = "NET rigctl", .mfg_name = "Hamlib", - .version = "20221212.0", + .version = "20221214.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, commit 9edbc9e4b0a231e835b9c4331821aa955366f272 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Dec 13 08:02:24 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 5a48443e..08d9411b 100644 --- a/NEWS +++ b/NEWS @@ -21,7 +21,7 @@ Version 4.5.2 * Fix -R option to not need argument * Fix -R option to close rig on last rigctld client disconnect * Add FTDX1200 to rigs that need to ensure PTT is off before changing frequency - * Add --disable-parallel configure option for mingw builds + * Add --disable-parallel configure option for mingw builds on Linux Version 4.5.1 * 2022-12-08 commit 23d98c1e5628597a37b68f9b53859ea1ba37e5b2 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 12 23:53:41 2022 -0600 Update NEWS diff --git a/NEWS b/NEWS index 70890f3c..5a48443e 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,13 @@ Version 4.6 * 2023-11-XX -- Planned for Nov 2023 * Add MDS 4710/9710 rigs +Version 4.5.2 + * 2022-12-XX -- Planned for Dec 2022 + * Fix -R option to not need argument + * Fix -R option to close rig on last rigctld client disconnect + * Add FTDX1200 to rigs that need to ensure PTT is off before changing frequency + * Add --disable-parallel configure option for mingw builds + Version 4.5.1 * 2022-12-08 * FT2000, FTDX3000/D, FT891, FT991, FT950, FTDX5000 now set CAT TOT to 100ms commit fd186abcaeb63506bff9c65b7332fb913f64569d Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 12 23:46:53 2022 -0600 -R option will keep rig open as long as 1 or more clients are connected https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/tests/rigctld.c b/tests/rigctld.c index 6b837ae6..9bc906b2 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1197,7 +1197,7 @@ void *handle_socket(void *arg) #ifdef HAVE_PTHREAD mutex_rigctld(1); -// ++client_count; + ++client_count; #if 0 if (!client_count++) @@ -1313,14 +1313,19 @@ void *handle_socket(void *arg) } while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); - if (rigctld_idle) + if (rigctld_idle && client_count == 1) { rig_close(my_rig); if (verbose > RIG_DEBUG_ERR) { printf("Closed rig model %s. Will reopen for new clients\n", my_rig->caps->model_name); } } + #ifdef HAVE_PTHREAD + --client_count; + + if (rigctld_idle && client_count > 0) { printf("%d client%s still connected so rig remains open\n", client_count, client_count > 1 ? "s" : ""); } + #if 0 mutex_rigctld(1); commit 01799cb64f2afa8a8be06a46c0a6f0d4f8a38351 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 12 23:28:22 2022 -0600 Allow rigctld to close the rig with the -R option when client disconnects. This makes it close when any one client disconnects. Should only close when no clients are connected -- that will be the next patch This is for the FT736R and gpredict https://github.com/Hamlib/Hamlib/issues/1187 diff --git a/tests/rigctld.c b/tests/rigctld.c index bd2915dd..6b837ae6 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -83,7 +83,7 @@ * keep up to date SHORT_OPTIONS, usage()'s output and man page. thanks. * TODO: add an option to read from a file */ -#define SHORT_OPTIONS "m:r:R:p:d:P:D:s:S:c:T:t:C:W:w:x:z:lLuovhVZMA:n:" +#define SHORT_OPTIONS "m:r:p:d:P:D:s:S:c:T:t:C:W:w:x:z:lLuovhVZMRA:n:" static struct option long_options[] = { {"model", 1, 0, 'm'}, @@ -154,6 +154,8 @@ extern char rigctld_password[65]; char resp_sep = '\n'; extern int lock_mode; extern powerstat_t rig_powerstat; +static int rigctld_idle = + 0; // if true then rig will close when no clients are connected #define MAXCONFLEN 1024 @@ -262,8 +264,6 @@ int main(int argc, char *argv[]) int twiddle_timeout = 0; int twiddle_rit = 0; int uplink = 0; - int rigctld_idle = - 0; // if true then rig will close when no clients are connected char host[NI_MAXHOST]; char serv[NI_MAXSERV]; char rigstartup[1024]; @@ -1313,6 +1313,13 @@ void *handle_socket(void *arg) } while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + if (rigctld_idle) + { + rig_close(my_rig); + + if (verbose > RIG_DEBUG_ERR) { printf("Closed rig model %s. Will reopen for new clients\n", my_rig->caps->model_name); } + } + #ifdef HAVE_PTHREAD #if 0 mutex_rigctld(1); commit 46f30345b9c57e85f08630fad9b1c3c2b0b98a7c Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Dec 12 17:38:52 2022 -0600 If get_powerstat fails assume rig is powered on -- should fix sdr++ problem https://github.com/Hamlib/Hamlib/issues/1186 diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index 3aba3def..eed16b83 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -2052,6 +2052,15 @@ static int netrigctl_get_powerstat(RIG *rig, powerstat_t *status) ret = netrigctl_transaction(rig, cmd, strlen(cmd), buf); + if (ret == 1) + { + // was causing problems with sdr++ since it does not have PS command + // a return of 1 should indicate there is no powerstat command available + // so we fake the ON status + *status = RIG_POWER_ON; + return RIG_OK; + } + if (ret <= 0) { return (ret < 0) ? ret : -RIG_EPROTO; @@ -2726,7 +2735,7 @@ struct rig_caps netrigctl_caps = RIG_MODEL(RIG_MODEL_NETRIGCTL), .model_name = "NET rigctl", .mfg_name = "Hamlib", - .version = "20221201.0", + .version = "20221212.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, commit 859204026277a3f396a88b5e8f06415fe363cc22 Author: Mike Black W9MDB <mdb...@ya...> Date: Sun Dec 11 14:50:13 2022 -0600 Update simftdx1200.c diff --git a/simulators/simftdx1200.c b/simulators/simftdx1200.c new file mode 100644 index 00000000..2808405a --- /dev/null +++ b/simulators/simftdx1200.c @@ -0,0 +1,309 @@ +// can run this using rigctl/rigctld and socat pty devices +// gcc -o simyaesu simyaesu.c +#define _XOPEN_SOURCE 600 +#include <stdio.h> +#include <stdlib.h> +#include <fcntl.h> +#include <string.h> +#include <unistd.h> +#include "../include/hamlib/rig.h" + +#define BUFSIZE 256 + +float freqA = 14074000; +float freqB = 14074500; +int vfo = 0; +int ft = 0; +int md = 1; +int vs = 0; +int tx = 0; +int ai = 0; +int sh = 25; +int na = 0; +int ex039 = 0; + +// ID 0310 == 310, Must drop leading zero +typedef enum nc_rigid_e +{ + NC_RIGID_NONE = 0, + NC_RIGID_FT450 = 241, + NC_RIGID_FT450D = 244, + NC_RIGID_FT950 = 310, + NC_RIGID_FT891 = 135, + NC_RIGID_FT991 = 135, + NC_RIGID_FT2000 = 251, + NC_RIGID_FT2000D = 252, + NC_RIGID_FTDX1200 = 583, + NC_RIGID_FTDX9000D = 101, + NC_RIGID_FTDX9000Contest = 102, + NC_RIGID_FTDX9000MP = 103, + NC_RIGID_FTDX5000 = 362, + NC_RIGID_FTDX3000 = 460, + NC_RIGID_FTDX101D = 681, + NC_RIGID_FTDX101MP = 682 +} nc_rigid_t; + +int +getmyline(int fd, char *buf) +{ + char c; + int i = 0; + memset(buf, 0, BUFSIZE); + + while (read(fd, &c, 1) > 0) + { + buf[i++] = c; + + if (c == ';') { return strlen(buf); } + } + + return strlen(buf); +} + +#if defined(WIN32) || defined(_WIN32) +int openPort(char *comport) // doesn't matter for using pts devices +{ + int fd; + fd = open(comport, O_RDWR); + + if (fd < 0) + { + perror(comport); + } + + return fd; +} + +#else +int openPort(char *comport) // doesn't matter for using pts devices +{ + int fd = posix_openpt(O_RDWR); + char *name = ptsname(fd); + + if (name == NULL) + { + perror("pstname"); + return -1; + } + + printf("name=%s\n", name); + + if (fd == -1 || grantpt(fd) == -1 || unlockpt(fd) == -1) + { + perror("posix_openpt"); + return -1; + } + + return fd; +} +#endif + + + +int main(int argc, char *argv[]) +{ + char buf[256]; + char *pbuf; + int n; + int fd = openPort(argv[1]); + + while (1) + { + if (getmyline(fd, buf)) + { + printf("Cmd:%s\n", buf); + } + else { continue; } + + if (strcmp(buf, "RM5;") == 0) + { + printf("%s\n", buf); + usleep(50 * 1000); + pbuf = "RM5100000;"; + n = write(fd, pbuf, strlen(pbuf)); + printf("n=%d\n", n); + + if (n <= 0) { perror("RM5"); } + } + + if (strcmp(buf, "AN0;") == 0) + { + printf("%s\n", buf); + usleep(50 * 1000); + pbuf = "AN030;"; + n = write(fd, pbuf, strlen(pbuf)); + printf("n=%d\n", n); + + if (n <= 0) { perror("AN"); } + } + else if (strcmp(buf, "IF;") == 0) + { + printf("%s\n", buf); + usleep(50 * 1000); + pbuf = "IF059014200000+000000700000;"; + n = write(fd, pbuf, strlen(pbuf)); + printf("n=%d\n", n); + + if (n <= 0) { perror("IF"); } + } + else if (strcmp(buf, "ID;") == 0) + { + printf("%s\n", buf); + usleep(50 * 1000); + int id = NC_RIGID_FTDX3000; + SNPRINTF(buf, sizeof(buf), "ID%03d;", id); + n = write(fd, buf, strlen(buf)); + printf("n=%d\n", n); + + if (n <= 0) { perror("ID"); } + } + else if (strcmp(buf, "AI;") == 0) + { + printf("%s\n", buf); + usleep(50 * 1000); + SNPRINTF(buf, sizeof(buf), "AI0;"); + n = write(fd, buf, strlen(buf)); + printf("n=%d\n", n); + + if (n <= 0) { perror("ID"); } + } + +#if 0 + else if (strncmp(buf, "AI", 2) == 0) + { + if (strcmp(buf, "AI;")) + { + printf("%s\n", buf); + usleep(50 * 1000); + n = fprintf(fp, "%s", "AI0;"); + printf("n=%d\n", n); + + if (n <= 0) { perror("AI"); } + } + } + +#endif + else if (strcmp(buf, "VS;") == 0) + { + printf("%s\n", buf); + usleep(50 * 1000); + pbuf = "VS0;"; + n = write(fd, pbuf, strlen(pbuf)); + printf("n=%d\n", n); + + if (n < 0) { perror("VS"); } + } + else if (strcmp(buf, "EX032;") == 0) + { + static int ant = 0; + ant = (ant + 1) % 3; + printf("%s\n", buf); + usleep(50 * 1000); + SNPRINTF(buf, sizeof(buf), "EX032%1d;", ant); + n = write(fd, buf, strlen(buf)); + printf("n=%d\n", n); + + if (n < 0) { perror("EX032"); } + } + + else if (strcmp(buf, "FA;") == 0) + { + SNPRINTF(buf, sizeof(buf), "FA%08.0f;", freqA); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "FA", 2) == 0) + { + sscanf(buf, "FA%f", &freqA); + } + else if (strcmp(buf, "FB;") == 0) + { + SNPRINTF(buf, sizeof(buf), "FB%08.0f;", freqB); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "FB", 2) == 0) + { + sscanf(buf, "FB%f", &freqB); + } + else if (strcmp(buf, "VS;") == 0) + { + SNPRINTF(buf, sizeof(buf), "VS%c;", vfo == 0 ? '0' : '1'); + n = write(fd, buf, strlen(buf)); + } + else if (strcmp(buf, "FT;") == 0) + { + SNPRINTF(buf, sizeof(buf), "FT%d;", ft); + n = write(fd, buf, strlen(buf)); + } + else if (strcmp(buf, "MD0;") == 0) + { + SNPRINTF(buf, sizeof(buf), "MD0%d;", md); + n = write(fd, buf, strlen(buf)); + } + else if (strcmp(buf, "VS;") == 0) + { + SNPRINTF(buf, sizeof(buf), "VS%d;", vs); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "VS", 2) == 0) + { + sscanf(buf, "VS%d", &vs); + } + else if (strcmp(buf, "TX;") == 0) + { + SNPRINTF(buf, sizeof(buf), "TX%d;", tx); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "TX", 2) == 0) + { + sscanf(buf, "TX%d", &tx); + } + else if (strcmp(buf, "AI;") == 0) + { + SNPRINTF(buf, sizeof(buf), "AI%d;", ai); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "AI", 2) == 0) + { + sscanf(buf, "AI%d", &ai); + } + else if (strcmp(buf, "SH0;") == 0) + { + SNPRINTF(buf, sizeof(buf), "SH0%d;", sh); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "SH0", 3) == 0) + { + sscanf(buf, "SH0%d", &sh); + } + else if (strcmp(buf, "NA0;") == 0) + { + SNPRINTF(buf, sizeof(buf), "NA0%d;", na); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "NA0", 3) == 0) + { + sscanf(buf, "NA0%d", &na); + } + else if (strcmp(buf, "EX039;") == 0) + { + SNPRINTF(buf, sizeof(buf), "EX039%d;", ex039); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "EX039", 3) == 0) + { + sscanf(buf, "EX039%d", &ex039); + } + else if (strcmp(buf,"PS;") == 0) + { + SNPRINTF(buf, sizeof(buf), "PS1;"); + n = write(fd, buf, strlen(buf)); + } + else if (strlen(buf) > 0) + { + fprintf(stderr, "Unknown command: %s\n", buf); + } + + } + + return 0; +} commit 0d4f647da3d0510b48a7a04821bccaa67f72c5aa Author: Mike Black W9MDB <mdb...@ya...> Date: Sun Dec 11 11:53:22 2022 -0600 Add FTDX1200 to rigs that need to ensure PTT is off before changing frequency https://github.com/Hamlib/Hamlib/issues/1185 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index c5f987b4..fda8aa01 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -886,7 +886,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != rig->state.tx_vfo) { return -RIG_ENTARGET; } } - if (is_ftdx3000 || is_ftdx3000dm || is_ftdx5000) + if (is_ftdx3000 || is_ftdx3000dm || is_ftdx5000 || is_ftdx1200) { // we have a few rigs that can't set freq while PTT_ON // so we'll try a few times to see if we just need to wait a bit diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 3f35b553..c45a4d9d 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20221204" +#define NEWCAT_VER "20221211" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit ec5dde91c594533cf842a859f61ec45443266dea Author: Mike Black W9MDB <mdb...@ya...> Date: Sun Dec 11 13:56:29 2022 -0600 astyle newcat.c diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 5bdae1f4..c5f987b4 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -604,12 +604,18 @@ int newcat_open(RIG *rig) char *cmd = "EX0291;EX029;"; // FT2000/D if (priv->rig_id == NC_RIGID_FT950 || rig->caps->rig_model == RIG_MODEL_FT950) { cmd = "EX0271;EX027;"; } - else if (priv->rig_id == NC_RIGID_FT891 || rig->caps->rig_model == RIG_MODEL_FT891) { cmd = "EX05071;EX0507;"; } - else if (priv->rig_id == NC_RIGID_FT991 || rig->caps->rig_model == RIG_MODEL_FT991) { cmd = "EX0321;EX032;"; } - else if (priv->rig_id == NC_RIGID_FT991A || rig->caps->rig_model == RIG_MODEL_FT991) { cmd = "EX0321;EX032;"; } - else if (priv->rig_id == NC_RIGID_FTDX3000 || rig->caps->rig_model == RIG_MODEL_FTDX3000) { cmd = "EX0391;EX039;"; } - else if (priv->rig_id == NC_RIGID_FTDX3000DM || rig->caps->rig_model == RIG_MODEL_FTDX3000) { cmd = "EX0391;EX039;"; } - else if (priv->rig_id == NC_RIGID_FTDX5000 || rig->caps->rig_model == RIG_MODEL_FTDX5000) { cmd = "EX0331;EX033"; } + else if (priv->rig_id == NC_RIGID_FT891 + || rig->caps->rig_model == RIG_MODEL_FT891) { cmd = "EX05071;EX0507;"; } + else if (priv->rig_id == NC_RIGID_FT991 + || rig->caps->rig_model == RIG_MODEL_FT991) { cmd = "EX0321;EX032;"; } + else if (priv->rig_id == NC_RIGID_FT991A + || rig->caps->rig_model == RIG_MODEL_FT991) { cmd = "EX0321;EX032;"; } + else if (priv->rig_id == NC_RIGID_FTDX3000 + || rig->caps->rig_model == RIG_MODEL_FTDX3000) { cmd = "EX0391;EX039;"; } + else if (priv->rig_id == NC_RIGID_FTDX3000DM + || rig->caps->rig_model == RIG_MODEL_FTDX3000) { cmd = "EX0391;EX039;"; } + else if (priv->rig_id == NC_RIGID_FTDX5000 + || rig->caps->rig_model == RIG_MODEL_FTDX5000) { cmd = "EX0331;EX033"; } SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "%s", cmd); commit e883918d853043f5d434925ffb945e9f25474860 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Dec 10 11:49:45 2022 -0600 Fix rigctld segfault when using -P RTS https://github.com/Hamlib/Hamlib/issues/1182 diff --git a/Segfault-award b/Segfault-award index 2d02ce1b..e09c6749 100644 --- a/Segfault-award +++ b/Segfault-award @@ -7,6 +7,8 @@ A developer cannot apply for HSHR for segfaults on his/her own code. Here is the list of the brave fellows: +* Saku Nyland OH1KH v4.5.1, 10/2022, rigctld.c using ptt_type=RTS + * David Kjellquist WB5NHL, v1.1.3, 09/2002, kenwood/ts570.c caught on TS570D backend startup. diff --git a/tests/rigctld.c b/tests/rigctld.c index 470534c3..bd2915dd 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -701,7 +701,9 @@ int main(int argc, char *argv[]) { my_rig->state.pttport.type.ptt = ptt_type; my_rig->state.pttport_deprecated.type.ptt = ptt_type; - my_rig->caps->ptt_type = ptt_type; + // This causes segfault since backend rig_caps are const + // rigctld will use the rig->state version of this for clients + //my_rig->caps->ptt_type = ptt_type; } if (dcd_type != RIG_DCD_NONE) commit 5c12619117c959ad7fba4406a7fe8381410ebfcc Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Dec 9 23:32:51 2022 -0600 Add --disable-parallel configure option https://github.com/Hamlib/Hamlib/issues/1181 diff --git a/configure.ac b/configure.ac index 203b640b..7f2a7007 100644 --- a/configure.ac +++ b/configure.ac @@ -694,6 +694,15 @@ AC_ARG_ENABLE([winradio], [cf_with_winradio="yes" AC_DEFINE([HAVE_WINRADIO],[1],[Define if winradio backend is built])]) AC_MSG_RESULT([$cf_with_winradio]) +dnl Parallel port device disable +AC_MSG_CHECKING([whether to build parallel port devices]) +AC_ARG_ENABLE([parallel], + [AS_HELP_STRING([--disable-parallel], + [do not build parallel devices @<:@default=yes@:>@])], + [cf_with_parallel="no"], + [cf_with_parallel="yes" AC_DEFINE([HAVE_PARALLEL],[1],[Define if parallel devices are to be built])]) +AC_MSG_RESULT([$cf_with_parallel]) + DL_LIBS="" AS_IF([test x"${cf_with_winradio}" = "xyes"], @@ -912,6 +921,7 @@ echo \ Enable HTML rig feature matrix ${cf_enable_html_matrix} Enable WinRadio ${cf_with_winradio} + Enable Parallel ${cf_with_parallel} Enable USRP ${cf_with_usrp} Enable USB backends ${cf_with_libusb} Enable shared libs ${enable_shared} diff --git a/rotators/fodtrack/fodtrack.c b/rotators/fodtrack/fodtrack.c index ad9e5850..9f6006ce 100644 --- a/rotators/fodtrack/fodtrack.c +++ b/rotators/fodtrack/fodtrack.c @@ -26,9 +26,11 @@ #include <sys/ioctl.h> #endif +#ifdef HAVE_PARALLEL #ifdef HAVE_LINUX_PARPORT_H #include <linux/parport.h> #endif +#endif #include "hamlib/rotator.h" #include "parallel.h" diff --git a/src/parallel.h b/src/parallel.h index c676ee43..0cdc1f0b 100644 --- a/src/parallel.h +++ b/src/parallel.h @@ -26,9 +26,11 @@ #include <hamlib/rig.h> #include "iofunc.h" +#ifdef HAVE_PARALLEL #ifdef HAVE_LINUX_PARPORT_H # include <linux/parport.h> #endif +#endif #ifndef PARPORT_CONTROL_STROBE # define PARPORT_CONTROL_STROBE 0x1 commit 64b333944a374f4d56b3509cdb1d5b550ce1ac8f Author: Nate Bargmann <n0...@n0...> Date: Fri Dec 9 08:24:36 2022 -0600 Quell groff warning of "font p not found". Font names need to be upper case in nroff. diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index 772173be..73bc1320 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -1289,7 +1289,7 @@ CW Skimmer is started and "set_lock_mode 0" when CW Skimmer is stopped. Returns current lock mode status 1=On, 2=Off (only useful when using rigctld) . .TP -.BR send_raw " \(aq" \fITerminator\fP "\(aq \(aq" \fIString\fp \(aq +.BR send_raw " \(aq" \fITerminator\fP "\(aq \(aq" \fIString\fP \(aq .EX Can send ASCII string or 0xnn values -- there can be no spaces in the command string. Possible terminator values are CR, LF, ;, ICOM, 0-100 (bytes to read), or -1 meaning unknown (will timeout on read) commit 18da3525081c15182760af21f5b8895f5adc96f5 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Dec 9 08:30:02 2022 -0600 Hamlib-4.5.2 bug fixes diff --git a/configure.ac b/configure.ac index c92e77cc..203b640b 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, 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.5.1],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.5.2],[ham...@li...],[hamlib],[http://www.hamlib.org]) AC_CONFIG_SRCDIR([include/hamlib/rig.h]) AC_CONFIG_MACRO_DIR([macros]) commit 71a9976d9fa674410fa1532c5dba022b8a54fcf6 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Dec 8 22:37:10 2022 -0600 Update simftdx3000.c diff --git a/simulators/simftdx3000.c b/simulators/simftdx3000.c index e8c4a31f..33b0cd00 100644 --- a/simulators/simftdx3000.c +++ b/simulators/simftdx3000.c @@ -252,6 +252,11 @@ int main(int argc, char *argv[]) { sscanf(buf, "MD0%d", &md); } + else if (strcmp(buf, "PS;") == 0) + { + SNPRINTF(buf, sizeof(buf), "PS1;"); + n = write(fd, buf, strlen(buf)); + } else if (strcmp(buf, "VS;") == 0) { SNPRINTF(buf, sizeof(buf), "VS%d;", vs); ----------------------------------------------------------------------- hooks/post-receive -- Hamlib -- Ham radio control libraries |