diff --git a/amplifiers/elecraft/kpa1500.c b/amplifiers/elecraft/kpa1500.c index 8a494a513..a10d27b86 100644 --- a/amplifiers/elecraft/kpa1500.c +++ b/amplifiers/elecraft/kpa1500.c @@ -62,10 +62,10 @@ struct kpa_priv_data *kpa1500_priv; const struct amp_caps kpa1500_amp_caps = { - .amp_model = AMP_MODEL_ELECRAFT_KPA1500, + AMP_MODEL(AMP_MODEL_ELECRAFT_KPA1500), .model_name = "KPA1500", .mfg_name = "Elecraft", - .version = "2020-01-12", + .version = "20200112", .copyright = "LGPL", .status = RIG_STATUS_ALPHA, .amp_type = AMP_TYPE_OTHER, diff --git a/dummy/amp_dummy.c b/dummy/amp_dummy.c index 07b168348..2dd09a308 100644 --- a/dummy/amp_dummy.c +++ b/dummy/amp_dummy.c @@ -334,7 +334,7 @@ static int dummy_amp_get_ext_level(AMP *amp, token_t token, value_t *val) const struct amp_caps dummy_amp_caps = { - .amp_model = AMP_MODEL_DUMMY, + AMP_MODEL(AMP_MODEL_DUMMY), .model_name = "Dummy", .mfg_name = "Hamlib", .version = "0.1", diff --git a/dummy/netampctl.c b/dummy/netampctl.c index 87419e2f3..5b4c21fa9 100644 --- a/dummy/netampctl.c +++ b/dummy/netampctl.c @@ -195,7 +195,7 @@ static const char *netampctl_get_info(AMP *amp) const struct amp_caps netampctl_caps = { - .amp_model = AMP_MODEL_NETAMPCTL, + AMP_MODEL(AMP_MODEL_NETAMPCTL), .model_name = "NET ampctl", .mfg_name = "Hamlib", .version = "0.1", diff --git a/dummy/netrotctl.c b/dummy/netrotctl.c index bb459dd2d..e8e944663 100644 --- a/dummy/netrotctl.c +++ b/dummy/netrotctl.c @@ -325,7 +325,7 @@ static const char *netrotctl_get_info(ROT *rot) const struct rot_caps netrotctl_caps = { - .rot_model = ROT_MODEL_NETROTCTL, + ROT_MODEL(ROT_MODEL_NETROTCTL), .model_name = "NET rotctl", .mfg_name = "Hamlib", .version = "0.3", diff --git a/dummy/rot_dummy.c b/dummy/rot_dummy.c index a50b7261a..9815f8afd 100644 --- a/dummy/rot_dummy.c +++ b/dummy/rot_dummy.c @@ -272,7 +272,7 @@ static const char *dummy_rot_get_info(ROT *rot) const struct rot_caps dummy_rot_caps = { - .rot_model = ROT_MODEL_DUMMY, + ROT_MODEL(ROT_MODEL_DUMMY), .model_name = "Dummy", .mfg_name = "Hamlib", .version = "0.2", diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 4d7f70a33..f47a5f72e 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -148,11 +148,12 @@ enum amp_level_e * n.b.: Don't move fields around, as the backends depend on it when * initializing their caps. */ -#define AMP_MODEL(arg) .amp_model=arg,.amp_model_macro_name=#arg +#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg struct amp_caps { amp_model_t amp_model; /*!< Amplifier model. */ const char *model_name; /*!< Model name. */ + const char *macro_name; /*!< Macro name. */ const char *mfg_name; /*!< Manufacturer. */ const char *version; /*!< Driver version. */ const char *copyright; /*!< Copyright info. */ diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 4226fa1ff..c188af91f 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1385,10 +1385,10 @@ typedef int (* confval_cb_t)(RIG *, * mdblack: Don't move fields around without bumping the version numbers * DLL or shared library replacement would break the interface */ -#define RIG_MODEL(arg) .rig_model=arg,.rig_model_macro_name=#arg +#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg struct rig_caps { rig_model_t rig_model; /*!< Rig model. */ - const char *rig_model_macro_name; /*!< Rig model macro name */ + const char *macro_name; /*!< Rig model macro name */ const char *model_name; /*!< Model name. */ const char *mfg_name; /*!< Manufacturer. */ const char *version; /*!< Driver version. */ diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index b4ccd01c1..78fe7d45c 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -213,13 +213,14 @@ typedef enum { * sharing the struct rot_caps of the backend, while keeping their own * customized data. * - * n.b.: Don't move fields around, as the backends depend on it when - * initializing their caps. + * mdblack: Careful movinf fields around, as the backends depend on it when + * initializing their caps in shared libraries and dlls. */ -#define ROT_MODEL(arg) .rot_model=arg,.rot_model_macro_name=#arg +#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg struct rot_caps { rot_model_t rot_model; /*!< Rotator model. */ const char *model_name; /*!< Model name. */ + const char *macro_name; /*!< Macro name. */ const char *mfg_name; /*!< Manufacturer. */ const char *version; /*!< Driver version. */ const char *copyright; /*!< Copyright info. */ diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 948a0ec69..721035874 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1772,8 +1772,10 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) case RIG_VFO_SUB: icvfo = S_SUB; + // If split is on these rigs can only split on Main/VFOB - if (VFO_HAS_MAIN_SUB_A_B_ONLY && priv->split_on) icvfo = S_VFOB; + if (VFO_HAS_MAIN_SUB_A_B_ONLY && priv->split_on) { icvfo = S_VFOB; } + break; case RIG_VFO_TX: @@ -3610,8 +3612,9 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) if (VFO_HAS_MAIN_SUB_A_B_ONLY) { - // Then we return the VFO to where it was - if (save_vfo == RIG_VFO_MAIN && priv->split_on) save_vfo = RIG_VFO_A; + // Then we return the VFO to where it was + if (save_vfo == RIG_VFO_MAIN && priv->split_on) { save_vfo = RIG_VFO_A; } + rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so setting vfo to %s\n", __func__, rig_strvfo(save_vfo)); diff --git a/rigs/kenwood/ic10.h b/rigs/kenwood/ic10.h index b45c31854..bb1902880 100644 --- a/rigs/kenwood/ic10.h +++ b/rigs/kenwood/ic10.h @@ -22,7 +22,7 @@ #ifndef _IC10_H #define _IC10_H 1 -#define IC10_VER "0.6.1" +#define IC10_VER ".1" int ic10_cmd_trim (char *data, int data_len); int ic10_transaction (RIG *rig, const char *cmd, int cmd_len, char *data, int *data_len); diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 48f5e2def..870656a0d 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -3344,7 +3344,8 @@ int kenwood_get_trn(RIG *rig, int *trn) */ int kenwood_set_powerstat(RIG *rig, powerstat_t status) { - int retval = kenwood_transaction(rig, (status == RIG_POWER_ON) ? ";;;;PS1;" : "PS0", + int retval = kenwood_transaction(rig, + (status == RIG_POWER_ON) ? ";;;;PS1;" : "PS0", NULL, 0); int i = 0; int retry = 3 / rig->state.rigport.retry; diff --git a/rigs/kenwood/r5000.c b/rigs/kenwood/r5000.c index 324f7cfab..4d0b3e084 100644 --- a/rigs/kenwood/r5000.c +++ b/rigs/kenwood/r5000.c @@ -62,7 +62,7 @@ const struct rig_caps r5000_caps = RIG_MODEL(RIG_MODEL_R5000), .model_name = "R-5000", .mfg_name = "Kenwood", - .version = IC10_VER, + .version = BACKEND_VER IC10_VER, .copyright = "LGPL", .status = RIG_STATUS_ALPHA, .rig_type = RIG_TYPE_RECEIVER, diff --git a/rigs/kenwood/ts440.c b/rigs/kenwood/ts440.c index 2082bc98e..8e70b5a48 100644 --- a/rigs/kenwood/ts440.c +++ b/rigs/kenwood/ts440.c @@ -64,7 +64,7 @@ const struct rig_caps ts440_caps = RIG_MODEL(RIG_MODEL_TS440), .model_name = "TS-440", .mfg_name = "Kenwood", - .version = BACKEND_VER "." IC10_VER, + .version = BACKEND_VER IC10_VER, .copyright = "LGPL", .status = RIG_STATUS_ALPHA, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/kit/pcrotor.c b/rigs/kit/pcrotor.c index 125d63917..250436f43 100644 --- a/rigs/kit/pcrotor.c +++ b/rigs/kit/pcrotor.c @@ -113,7 +113,7 @@ pcrotor_move(ROT *rot, int direction, int speed) */ const struct rot_caps pcrotor_caps = { - .rot_model = ROT_MODEL_PCROTOR, + ROT_MODEL(ROT_MODEL_PCROTOR), .model_name = "PcRotor", .mfg_name = "WA6UFQ", .version = "0.1", diff --git a/rigs/yaesu/ft920.c b/rigs/yaesu/ft920.c index 863fd546e..989f9e833 100644 --- a/rigs/yaesu/ft920.c +++ b/rigs/yaesu/ft920.c @@ -151,7 +151,7 @@ const struct rig_caps ft920_caps = RIG_MODEL(RIG_MODEL_FT920), .model_name = "FT-920", .mfg_name = "Yaesu", - .version = "2010-08-23", /* YYYY-MM-DD */ + .version = "20100823", /* YYYYMMDD */ .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rotators/amsat/if100.c b/rotators/amsat/if100.c index 40cd032bd..ad265c771 100644 --- a/rotators/amsat/if100.c +++ b/rotators/amsat/if100.c @@ -102,7 +102,7 @@ if100_set_position(ROT *rot, azimuth_t az, elevation_t el) */ const struct rot_caps if100_rot_caps = { - .rot_model = ROT_MODEL_IF100, + ROT_MODEL(ROT_MODEL_IF100), .model_name = "IF-100", .mfg_name = "AMSAT", .version = "0.1", diff --git a/rotators/ars/ars.c b/rotators/ars/ars.c index 27864f9e1..614c49355 100644 --- a/rotators/ars/ars.c +++ b/rotators/ars/ars.c @@ -711,7 +711,7 @@ ars_get_position(ROT *rot, azimuth_t *az, elevation_t *el) */ const struct rot_caps rci_azel_rot_caps = { - .rot_model = ROT_MODEL_RCI_AZEL, + ROT_MODEL(ROT_MODEL_RCI_AZEL), .model_name = "ARS RCI AZ&EL", .mfg_name = "EA4TX", .version = "0.2", @@ -745,7 +745,7 @@ const struct rot_caps rci_azel_rot_caps = */ const struct rot_caps rci_az_rot_caps = { - .rot_model = ROT_MODEL_RCI_AZ, + ROT_MODEL(ROT_MODEL_RCI_AZ), .model_name = "ARS RCI AZ", .mfg_name = "EA4TX", .version = "0.1", diff --git a/rotators/celestron/celestron.c b/rotators/celestron/celestron.c index da84bad79..8c6b70bd0 100644 --- a/rotators/celestron/celestron.c +++ b/rotators/celestron/celestron.c @@ -227,7 +227,7 @@ celestron_get_info(ROT *rot) const struct rot_caps nexstar_rot_caps = { - .rot_model = ROT_MODEL_NEXSTAR, + ROT_MODEL(ROT_MODEL_NEXSTAR), .model_name = "NexStar", // Any Celestron starting with version 1.2 .mfg_name = "Celestron", .version = "0.1", diff --git a/rotators/cnctrk/cnctrk.c b/rotators/cnctrk/cnctrk.c index eae599f7e..49298bcdf 100644 --- a/rotators/cnctrk/cnctrk.c +++ b/rotators/cnctrk/cnctrk.c @@ -59,7 +59,7 @@ cnctrk_set_position(ROT *rot, azimuth_t az, elevation_t el) it assumes there is a LinuxCNC running with the Axis GUI */ const struct rot_caps cnctrk_rot_caps = { - .rot_model = ROT_MODEL_CNCTRK, + ROT_MODEL(ROT_MODEL_CNCTRK), .model_name = "CNCTRK", .mfg_name = "CNCTRK", .version = "0.1", diff --git a/rotators/easycomm/easycomm.c b/rotators/easycomm/easycomm.c index 2c9313b5e..a38a9700c 100644 --- a/rotators/easycomm/easycomm.c +++ b/rotators/easycomm/easycomm.c @@ -442,7 +442,7 @@ static int easycomm_rot_set_conf(ROT *rot, token_t token, const char *val) */ const struct rot_caps easycomm1_rot_caps = { - .rot_model = ROT_MODEL_EASYCOMM1, + ROT_MODEL(ROT_MODEL_EASYCOMM1), .model_name = "EasycommI", .mfg_name = "Hamlib", .version = "0.4", @@ -478,7 +478,7 @@ const struct rot_caps easycomm1_rot_caps = */ const struct rot_caps easycomm2_rot_caps = { - .rot_model = ROT_MODEL_EASYCOMM2, + ROT_MODEL(ROT_MODEL_EASYCOMM2), .model_name = "EasycommII", .mfg_name = "Hamlib", .version = "0.4", @@ -524,7 +524,7 @@ const struct rot_caps easycomm2_rot_caps = */ const struct rot_caps easycomm3_rot_caps = { - .rot_model = ROT_MODEL_EASYCOMM3, + ROT_MODEL(ROT_MODEL_EASYCOMM3), .model_name = "EasycommIII", .mfg_name = "Hamlib", .version = "0.4", diff --git a/rotators/ether6/ether6.c b/rotators/ether6/ether6.c index 4a3f43684..21d837815 100644 --- a/rotators/ether6/ether6.c +++ b/rotators/ether6/ether6.c @@ -306,7 +306,7 @@ static const char *ether_rot_get_info(ROT *rot) const struct rot_caps ether6_rot_caps = { - .rot_model = ROT_MODEL_ETHER6, + ROT_MODEL(ROT_MODEL_ETHER6), .model_name = "Ether6 (via ethernet)", .mfg_name = "DG9OAA", .version = "0.1", diff --git a/rotators/fodtrack/fodtrack.c b/rotators/fodtrack/fodtrack.c index 8e278b573..e8245bfe1 100644 --- a/rotators/fodtrack/fodtrack.c +++ b/rotators/fodtrack/fodtrack.c @@ -138,7 +138,7 @@ fodtrack_set_position(ROT *rot, azimuth_t az, elevation_t el) */ const struct rot_caps fodtrack_rot_caps = { - .rot_model = ROT_MODEL_FODTRACK, + ROT_MODEL(ROT_MODEL_FODTRACK), .model_name = "Fodtrack", .mfg_name = "XQ2FOD", .version = "0.2", diff --git a/rotators/gs232a/gs232.c b/rotators/gs232a/gs232.c index c93b4c215..19d2ad613 100644 --- a/rotators/gs232a/gs232.c +++ b/rotators/gs232a/gs232.c @@ -241,7 +241,7 @@ gs232_rot_stop(ROT *rot) const struct rot_caps gs232_generic_rot_caps = { - .rot_model = ROT_MODEL_GS232_GENERIC, + ROT_MODEL(ROT_MODEL_GS232_GENERIC), .model_name = "GS-232 Generic", .mfg_name = "Various", .version = "0.3", @@ -277,7 +277,7 @@ const struct rot_caps gs232_generic_rot_caps = const struct rot_caps amsat_lvb_rot_caps = { - .rot_model = ROT_MODEL_LVB, + ROT_MODEL(ROT_MODEL_LVB), .model_name = "LVB Tracker", .mfg_name = "AMSAT", .version = "0.1", @@ -314,7 +314,7 @@ const struct rot_caps amsat_lvb_rot_caps = const struct rot_caps st2_rot_caps = { - .rot_model = ROT_MODEL_ST2, + ROT_MODEL(ROT_MODEL_ST2), .model_name = "GS232/ST2", .mfg_name = "FoxDelta", .version = "0.1", @@ -352,7 +352,7 @@ const struct rot_caps st2_rot_caps = const struct rot_caps f1tetracker_rot_caps = { - .rot_model = ROT_MODEL_F1TETRACKER, + ROT_MODEL(ROT_MODEL_F1TETRACKER), .model_name = "GS232/F1TE Tracker", .mfg_name = "F1TE", .version = "0.1", diff --git a/rotators/gs232a/gs232a.c b/rotators/gs232a/gs232a.c index 13ea3b7b5..12024ab45 100644 --- a/rotators/gs232a/gs232a.c +++ b/rotators/gs232a/gs232a.c @@ -291,7 +291,7 @@ gs232a_rot_move(ROT *rot, int direction, int speed) const struct rot_caps gs23_rot_caps = { - .rot_model = ROT_MODEL_GS23, + ROT_MODEL(ROT_MODEL_GS23), .model_name = "GS-23", .mfg_name = "Yaesu/Kenpro", .version = "0.2", @@ -327,7 +327,7 @@ const struct rot_caps gs23_rot_caps = const struct rot_caps gs232_rot_caps = { - .rot_model = ROT_MODEL_GS232, + ROT_MODEL(ROT_MODEL_GS232), .model_name = "GS-232", .mfg_name = "Yaesu/Kenpro", .version = "0.1", @@ -363,7 +363,7 @@ const struct rot_caps gs232_rot_caps = const struct rot_caps gs232a_rot_caps = { - .rot_model = ROT_MODEL_GS232A, + ROT_MODEL(ROT_MODEL_GS232A), .model_name = "GS-232A", .mfg_name = "Yaesu", .version = "0.5", diff --git a/rotators/gs232a/gs232b.c b/rotators/gs232a/gs232b.c index b99af687a..483f5c9a8 100644 --- a/rotators/gs232a/gs232b.c +++ b/rotators/gs232a/gs232b.c @@ -310,7 +310,7 @@ gs232b_rot_move(ROT *rot, int direction, int speed) const struct rot_caps gs232b_rot_caps = { - .rot_model = ROT_MODEL_GS232B, + ROT_MODEL(ROT_MODEL_GS232B), .model_name = "GS-232B", .mfg_name = "Yaesu", .version = "0.5", diff --git a/rotators/heathkit/hd1780.c b/rotators/heathkit/hd1780.c index ab2df2073..6b40c37eb 100644 --- a/rotators/heathkit/hd1780.c +++ b/rotators/heathkit/hd1780.c @@ -64,7 +64,7 @@ static int hd1780_send_priv_cmd(ROT *rot, const char *cmd); const struct rot_caps hd1780_rot_caps = { - .rot_model = ROT_MODEL_HD1780, + ROT_MODEL(ROT_MODEL_HD1780), .model_name = "HD 1780 Intellirotor", .mfg_name = "Heathkit", .version = "0.1", diff --git a/rotators/ioptron/rot_ioptron.c b/rotators/ioptron/rot_ioptron.c index e451adacb..7a5387279 100644 --- a/rotators/ioptron/rot_ioptron.c +++ b/rotators/ioptron/rot_ioptron.c @@ -303,7 +303,7 @@ ioptron_get_info(ROT *rot) const struct rot_caps ioptron_rot_caps = { - .rot_model = ROT_MODEL_IOPTRON, + ROT_MODEL(ROT_MODEL_IOPTRON), .model_name = "iOptron", .mfg_name = "iOptron", .version = "0.1", diff --git a/rotators/m2/rc2800.c b/rotators/m2/rc2800.c index 131ef6671..7bc8eeafc 100644 --- a/rotators/m2/rc2800.c +++ b/rotators/m2/rc2800.c @@ -362,7 +362,7 @@ rc2800_rot_stop(ROT *rot) const struct rot_caps rc2800_rot_caps = { - .rot_model = ROT_MODEL_RC2800, + ROT_MODEL(ROT_MODEL_RC2800), .model_name = "RC2800", .mfg_name = "M2", .version = "0.1.1", diff --git a/rotators/meade/meade.c b/rotators/meade/meade.c index 4a4fe0f13..042d8de64 100644 --- a/rotators/meade/meade.c +++ b/rotators/meade/meade.c @@ -448,7 +448,7 @@ static const char *meade_get_info(ROT *rot) const struct rot_caps meade_caps = { - .rot_model = ROT_MODEL_MEADE, + ROT_MODEL(ROT_MODEL_MEADE), .model_name = "LX200/Autostar", .mfg_name = "Meade", .version = "0.2", diff --git a/rotators/prosistel/prosistel.c b/rotators/prosistel/prosistel.c index 4ca323deb..57dc674a7 100644 --- a/rotators/prosistel/prosistel.c +++ b/rotators/prosistel/prosistel.c @@ -256,7 +256,7 @@ static int prosistel_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) const struct rot_caps prosistel_rot_caps = { - .rot_model = ROT_MODEL_PROSISTEL, + ROT_MODEL(ROT_MODEL_PROSISTEL), .model_name = "Prosistel D", .mfg_name = "Prosistel", .version = "0.5", diff --git a/rotators/rotorez/rotorez.c b/rotators/rotorez/rotorez.c index 1f9e38602..682abda7e 100644 --- a/rotators/rotorez/rotorez.c +++ b/rotators/rotorez/rotorez.c @@ -131,7 +131,7 @@ static const struct confparams rotorez_cfg_params[] = const struct rot_caps rotorez_rot_caps = { - .rot_model = ROT_MODEL_ROTOREZ, + ROT_MODEL(ROT_MODEL_ROTOREZ), .model_name = "Rotor-EZ", .mfg_name = "Idiom Press", .version = "2010-02-14", @@ -176,7 +176,7 @@ const struct rot_caps rotorez_rot_caps = const struct rot_caps rotorcard_rot_caps = { - .rot_model = ROT_MODEL_ROTORCARD, + ROT_MODEL(ROT_MODEL_ROTORCARD), .model_name = "RotorCard", .mfg_name = "Idiom Press", .version = "2010-02-14", @@ -220,7 +220,7 @@ const struct rot_caps rotorcard_rot_caps = const struct rot_caps dcu_rot_caps = { - .rot_model = ROT_MODEL_DCU, + ROT_MODEL(ROT_MODEL_DCU), .model_name = "DCU-1/DCU-1X", .mfg_name = "Hy-Gain", .version = "2010-08-23", @@ -264,7 +264,7 @@ const struct rot_caps dcu_rot_caps = const struct rot_caps erc_rot_caps = { - .rot_model = ROT_MODEL_ERC, + ROT_MODEL(ROT_MODEL_ERC), .model_name = "ERC", .mfg_name = "DF9GR", .version = "2010-08-23b", /* second revision on 23 Aug 2010 */ @@ -306,7 +306,7 @@ const struct rot_caps erc_rot_caps = const struct rot_caps rt21_rot_caps = { - .rot_model = ROT_MODEL_RT21, + ROT_MODEL(ROT_MODEL_RT21), .model_name = "RT-21", .mfg_name = "Green Heron", .version = "2014-09-14", diff --git a/rotators/sartek/sartek.c b/rotators/sartek/sartek.c index 9aa683078..50023a448 100644 --- a/rotators/sartek/sartek.c +++ b/rotators/sartek/sartek.c @@ -53,7 +53,7 @@ const struct rot_caps sartek_rot_caps = { - .rot_model = ROT_MODEL_SARTEK1, + ROT_MODEL(ROT_MODEL_SARTEK1), .model_name = "SARtek-1", .mfg_name = "SARtek", .version = "0.2", diff --git a/rotators/spid/spid.c b/rotators/spid/spid.c index 7948397a9..a528639e2 100644 --- a/rotators/spid/spid.c +++ b/rotators/spid/spid.c @@ -450,7 +450,7 @@ const struct confparams spid_cfg_params[] = const struct rot_caps spid_rot1prog_rot_caps = { - .rot_model = ROT_MODEL_SPID_ROT1PROG, + ROT_MODEL(ROT_MODEL_SPID_ROT1PROG), .model_name = "Rot1Prog", .mfg_name = "SPID", .version = "1.0", @@ -487,7 +487,7 @@ const struct rot_caps spid_rot1prog_rot_caps = const struct rot_caps spid_rot2prog_rot_caps = { - .rot_model = ROT_MODEL_SPID_ROT2PROG, + ROT_MODEL(ROT_MODEL_SPID_ROT2PROG), .model_name = "Rot2Prog", .mfg_name = "SPID", .version = "1.0", @@ -524,7 +524,7 @@ const struct rot_caps spid_rot2prog_rot_caps = const struct rot_caps spid_md01_rot2prog_rot_caps = { - .rot_model = ROT_MODEL_SPID_MD01_ROT2PROG, + ROT_MODEL(ROT_MODEL_SPID_MD01_ROT2PROG), .model_name = "MD-01/02 (ROT2 mode)", .mfg_name = "SPID", .version = "1.0", diff --git a/rotators/ts7400/ts7400.c b/rotators/ts7400/ts7400.c index 786b5c60c..408786851 100644 --- a/rotators/ts7400/ts7400.c +++ b/rotators/ts7400/ts7400.c @@ -272,7 +272,7 @@ static const char *ts7400_rot_get_info(ROT *rot) const struct rot_caps ts7400_rot_caps = { - .rot_model = ROT_MODEL_TS7400, + ROT_MODEL(ROT_MODEL_TS7400), .model_name = "ts7400", .mfg_name = "LA7LKA", .version = "0.1", diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index e33acc384..5f2c2a49c 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -214,6 +214,7 @@ struct mod_lst char model_name[32]; /* caps->model_name */ char version[32]; /* caps->version */ char status[32]; /* caps->status */ + char macro_name[32]; /* caps->macro_name */ UT_hash_handle hh; /* makes this structure hashable */ }; @@ -226,7 +227,8 @@ void hash_add_model(int id, const char *mfg_name, const char *model_name, const char *version, - const char *status) + const char *status, + const char *macro_name) { struct mod_lst *s; @@ -237,6 +239,7 @@ void hash_add_model(int id, snprintf(s->model_name, sizeof(s->model_name), "%s", model_name); snprintf(s->version, sizeof(s->version), "%s", version); snprintf(s->status, sizeof(s->status), "%s", status); + snprintf(s->macro_name, sizeof(s->macro_name), "%s", macro_name); HASH_ADD_INT(models, id, s); /* id: name of key field */ } @@ -1540,7 +1543,8 @@ static int hash_model_list(const struct amp_caps *caps, void *data) caps->mfg_name, caps->model_name, caps->version, - rig_strstatus(caps->status)); + rig_strstatus(caps->status), + caps->macro_name); return 1; /* !=0, we want them all ! */ } @@ -1551,12 +1555,13 @@ void print_model_list() for (s = models; s != NULL; s = (struct mod_lst *)(s->hh.next)) { - printf("%6u %-23s%-24s%-16s%s\n", + printf("%6u %-23s%-24s%-16s%-14s%s\n", s->id, s->mfg_name, s->model_name, s->version, - s->status); + s->status, + s->macro_name); } } @@ -1567,7 +1572,7 @@ void list_models() amp_load_all_backends(); - printf(" Amp # Mfg Model Version Status\n"); + printf(" Amp # Mfg Model Version Status Macro\n"); status = amp_list_foreach(hash_model_list, NULL); if (status != RIG_OK) diff --git a/tests/listrigs.c b/tests/listrigs.c index 48b390b2d..93dbd3b91 100644 --- a/tests/listrigs.c +++ b/tests/listrigs.c @@ -29,57 +29,58 @@ int print_caps_sum(const struct rig_caps *caps, void *data) { - - printf("%d\t%-10s\t%-14s\t%-8s\t", + char *fmt1 = "%-13s"; + printf("%6d \t%-22s \t%-23s\t%-8s \t", caps->rig_model, caps->mfg_name, caps->model_name, caps->version); - printf("%.10s\t", rig_strstatus(caps->status)); + printf("%-8s \t", rig_strstatus(caps->status)); switch (caps->rig_type & RIG_TYPE_MASK) { case RIG_TYPE_TRANSCEIVER: - printf("%.16s\t","Transceiver"); + printf(fmt1, "Transceiver"); break; case RIG_TYPE_HANDHELD: - printf("%.16s\t","Handheld"); + printf(fmt1, "Handheld"); break; case RIG_TYPE_MOBILE: - printf("%.16s\t","Mobile"); + printf(fmt1, "Mobile"); break; case RIG_TYPE_RECEIVER: - printf("%.16s\t","Receiver"); + printf(fmt1, "Receiver"); break; case RIG_TYPE_PCRECEIVER: - printf("%.16s\t","PC Receiver"); + printf(fmt1, "PC Receiver"); break; case RIG_TYPE_SCANNER: - printf("%.16s\t","Scanner"); + printf(fmt1, "Scanner"); break; case RIG_TYPE_TRUNKSCANNER: - printf("%.16s\t","Trunking scanner"); + printf(fmt1, "Trunk scanner"); break; case RIG_TYPE_COMPUTER: - printf("%.16s\t","Computer"); + printf(fmt1, "Computer"); break; case RIG_TYPE_OTHER: - printf("%.16s\t","Other"); + printf(fmt1, "Other"); break; default: - printf("%.16s\t","Unknown"); + printf(fmt1, "Unknown"); } - printf("%s\n",caps->rig_model_macro_name==NULL?"Unknown":caps->rig_model_macro_name); + + printf("\t%s\n", caps->macro_name == NULL ? "Unknown" : caps->macro_name); return -1; /* !=0, we want them all ! */ } @@ -90,7 +91,7 @@ int main(int argc, char *argv[]) rig_load_all_backends(); - printf("Rig#\tMfg \tModel \tVers. \tStatus \tType \tMacro\n"); + printf(" Rig# \tMfg \tModel \tVersion \tStatus \tType \tMacro\n"); status = rig_list_foreach(print_caps_sum, NULL); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 6dbeba043..71b1306e1 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -348,6 +348,7 @@ struct mod_lst char model_name[32]; /* caps->model_name */ char version[32]; /* caps->version */ char status[32]; /* caps->status */ + char macro_name[32]; /* caps->status */ UT_hash_handle hh; /* makes this structure hashable */ }; @@ -361,7 +362,8 @@ void hash_add_model(int id, const char *mfg_name, const char *model_name, const char *version, - const char *status) + const char *status, + const char *macro_name) { struct mod_lst *s; @@ -372,6 +374,7 @@ void hash_add_model(int id, snprintf(s->model_name, sizeof(s->model_name), "%s", model_name); snprintf(s->version, sizeof(s->version), "%s", version); snprintf(s->status, sizeof(s->status), "%s", status); + snprintf(s->macro_name, sizeof(s->macro_name), "%s", macro_name); HASH_ADD_INT(models, id, s); /* id: name of key field */ } @@ -1771,6 +1774,7 @@ static int hash_model_list(const struct rig_caps *caps, void *data) caps->mfg_name, caps->model_name, caps->version, + caps->macro_name, rig_strstatus(caps->status)); return 1; /* !=0, we want them all ! */ @@ -1783,11 +1787,12 @@ void print_model_list() for (s = models; s != NULL; s = (struct mod_lst *)(s->hh.next)) { - printf("%6d %-23s%-24s%-16s%s\n", + printf("%6d %-23s%-24s%-16s%-12s%s\n", s->id, s->mfg_name, s->model_name, s->version, + s->macro_name, s->status); } } @@ -1799,7 +1804,7 @@ void list_models() rig_load_all_backends(); - printf(" Rig # Mfg Model Version Status\n"); + printf(" Rig # Mfg Model Version Status Macro\n"); status = rig_list_foreach(hash_model_list, NULL); if (status != RIG_OK) diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 9dee1390c..84947426b 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -258,6 +258,7 @@ struct mod_lst char model_name[32]; /* caps->model_name */ char version[32]; /* caps->version */ char status[32]; /* caps->status */ + char macro_name[32]; /* caps->macro_name */ UT_hash_handle hh; /* makes this structure hashable */ }; @@ -270,7 +271,8 @@ void hash_add_model(int id, const char *mfg_name, const char *model_name, const char *version, - const char *status) + const char *status, + const char *macro_name) { struct mod_lst *s; @@ -281,6 +283,7 @@ void hash_add_model(int id, snprintf(s->model_name, sizeof(s->model_name), "%s", model_name); snprintf(s->version, sizeof(s->version), "%s", version); snprintf(s->status, sizeof(s->status), "%s", status); + snprintf(s->macro_name, sizeof(s->macro_name), "%s", macro_name); HASH_ADD_INT(models, id, s); /* id: name of key field */ } @@ -1589,7 +1592,8 @@ static int hash_model_list(const struct rot_caps *caps, void *data) caps->mfg_name, caps->model_name, caps->version, - rig_strstatus(caps->status)); + rig_strstatus(caps->status), + caps->macro_name); return 1; /* !=0, we want them all ! */ } @@ -1600,12 +1604,13 @@ void print_model_list() for (s = models; s != NULL; s = (struct mod_lst *)(s->hh.next)) { - printf("%6d %-23s%-24s%-16s%s\n", + printf("%6d %-23s%-24s%-16s%-14s%s\n", s->id, s->mfg_name, s->model_name, s->version, - s->status); + s->status, + s->macro_name); } } @@ -1616,7 +1621,7 @@ void list_models() rot_load_all_backends(); - printf(" Rot # Mfg Model Version Status\n"); + printf(" Rot # Mfg Model Version Status Macro\n"); status = rot_list_foreach(hash_model_list, NULL); if (status != RIG_OK)