[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 4faef9e0316fd118e114c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2023-08-18 13:58:00
|
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 4faef9e0316fd118e114c2794baff5b19cadfbf3 (commit) via 01730082fbfd029e1df789df47f21eaeb524d510 (commit) via 0edd1df223bef5a2814e06c004c480e4d5593ddf (commit) via 147dea76514d072598197d44eb6ce29ad997214d (commit) via ccd6472f031aec1f38f4ae4453be602712b8e71d (commit) via 8c63fdeafc3c0011202a692cc29c64151df4d1b9 (commit) via aa338afa1ad2a70e2e06507f092e478c1b47cd9c (commit) via 63bb03cb07809fb8ee865a65351317e353d11085 (commit) via e88715240774db70a4e41d872cf4aa5f17e5b8a9 (commit) via beb69f752ae7ec58be753059557a06ae59841ab2 (commit) via 5062d565a951bdd3863a1b2c6e1dde8d2ddbca42 (commit) via 2bc28f2deaf3fb9d5fe406e86079afb4c06b39b4 (commit) via 003b50bc57a376556c96fbc8e60e6ed1c66a7bb1 (commit) via f0765e6c3a4ed0b0b7956f6137b380253a02b7ea (commit) via 7392d206a8f379c81399d2b55e2dc988aabe1784 (commit) via fb3d83a19ab5f6fc4692dfc4b5aee31764a84c86 (commit) via ac5018a9a39d26c005a926ceaf8bdeb3afedc62b (commit) via 1f50b88320bfcc229e6eb354e461638adea0879a (commit) via 6014e3142d421a6a4236bd5a755a5961a86cafc9 (commit) via f5e30815b7a31dd9cf8a67dcc326ce5f6118b23a (commit) via ef3b90a1bed12b040de6aeab67257a12d177ca98 (commit) via 72870ec26a6802de4b8f15e220ea977d56ad0721 (commit) via afa51b9863706018c47ba5168c0e8ccd163de901 (commit) via d7d450df493dd47c913bfc3c5272be4ba32eaf4b (commit) from 11d2f34ec8f2ac2d972f33e497ff10b0a837ab2b (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 4faef9e0316fd118e114c2794baff5b19cadfbf3 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Aug 18 08:17:39 2023 -0500 Add simxiegug90.c diff --git a/simulators/simxiegug90.c b/simulators/simxiegug90.c new file mode 100644 index 000000000..0378d88c7 --- /dev/null +++ b/simulators/simxiegug90.c @@ -0,0 +1,510 @@ +// simicom will show the pts port to use for rigctl on Unix +// using virtual serial ports on Windows is to be developed yet +// Needs a lot of improvement to work on all Icoms +// gcc -g -Wall -o simicom simicom.c -lhamlib +// On mingw in the hamlib src directory +// gcc -static -I../include -g -Wall -o simicom simicom.c -L../../build/src/.libs -lhamlib -lwsock32 -lws2_32 +#define _XOPEN_SOURCE 700 +// since we are POSIX here we need this +struct ip_mreq +{ + int dummy; +}; + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <fcntl.h> +#include <sys/time.h> +#include <hamlib/rig.h> +#include "../src/misc.h" + +#define BUFSIZE 256 +//#define X25 + +int civ_731_mode = 0; +vfo_t current_vfo = RIG_VFO_A; +int split = 0; + +// we make B different from A to ensure we see a difference at startup +float freqA = 14074000; +float freqB = 14074500; +mode_t modeA = RIG_MODE_CW; +mode_t modeB = RIG_MODE_USB; +int datamodeA = 0; +int datamodeB = 0; +pbwidth_t widthA = 0; +pbwidth_t widthB = 1; +ant_t ant_curr = 0; +int ant_option = 0; +int ptt = 0; +int keyspd = 20; + +void dumphex(unsigned char *buf, int n) +{ + for (int i = 0; i < n; ++i) { printf("%02x ", buf[i]); } + + printf("\n"); +} + +int +frameGet(int fd, unsigned char *buf) +{ + int i = 0; + memset(buf, 0, BUFSIZE); + unsigned char c; + + while (read(fd, &c, 1) > 0) + { + buf[i++] = c; + //printf("i=%d, c=0x%02x\n",i,c); + + if (c == 0xfd) + { + dumphex(buf, i); + return i; + } + } + + printf("Error???\n"); + + return 0; +} + +void frameParse(int fd, unsigned char *frame, int len) +{ + double freq; + int n; + + dumphex(frame, len); + + if (frame[0] != 0xfe && frame[1] != 0xfe) + { + printf("expected fe fe, got "); + dumphex(frame, len); + return; + } + + switch (frame[4]) + { + case 0x03: + + //from_bcd(frameackbuf[2], (civ_731_mode ? 4 : 5) * 2); + if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) + { + printf("get_freqA\n"); + to_bcd(&frame[5], (long long)freqA, (civ_731_mode ? 4 : 5) * 2); + } + else + { + printf("get_freqB\n"); + to_bcd(&frame[5], (long long)freqB, (civ_731_mode ? 4 : 5) * 2); + } + + frame[10] = 0xfd; + n = write(fd, frame, 11); + + if (n != 11) {printf("Error!\n"); exit(1);} + + break; + + case 0x04: + if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) + { + printf("get_modeA\n"); + frame[5] = modeA; + frame[6] = widthA; + } + else + { + printf("get_modeB\n"); + frame[5] = modeB; + frame[6] = widthB; + } + + frame[7] = 0xfd; + n = write(fd, frame, 8); + break; + + case 0x05: + freq = from_bcd(&frame[5], (civ_731_mode ? 4 : 5) * 2); + printf("set_freq to %.0f\n", freq); + + if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { freqA = freq; } + else { freqB = freq; } + + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + break; + + case 0x06: + if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { modeA = frame[6]; } + else { modeB = frame[6]; } + + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + break; + + case 0x07: + + switch (frame[5]) + { + case 0x00: current_vfo = RIG_VFO_A; break; + + case 0x01: current_vfo = RIG_VFO_B; break; + + case 0xb0: freq = freqA; freqA = freqB; freqB = freq; break; + + } + + printf("set_vfo to %s\n", rig_strvfo(current_vfo)); + + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + break; + + case 0x0f: + if (frame[5] == 0) { split = 0; } + else { split = 1; } + + printf("set split %d\n", 1); + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + break; + +#if 0 + case 0x12: // we're simulating the 3-byte version -- not the 2-byte + if (frame[5] != 0xfd) + { + printf("Set ant %d\n", -1); + ant_curr = frame[5]; + ant_option = frame[6]; + dump_hex(frame, 8); + } + else + { + printf("Get ant\n"); + } + + frame[5] = ant_curr; + frame[6] = ant_option; + frame[7] = 0xfd; + printf("n=write 8 bytes\n"); + dump_hex(frame, 8); + n = write(fd, frame, 8); + break; +#endif + + case 0x14: + switch (frame[5]) + { + static int power_level = 0; + static int level = 0; + + case 0x01: + level = 255; + printf("Using AF level %d\n", level); + to_bcd(&frame[6], (long long) level, 2); + frame[8] = 0xfd; + n = write(fd, frame, 9); + break; + + case 0x0a: + printf("Using power level %d\n", power_level); + power_level += 10; + + if (power_level > 250) { power_level = 0; } + + to_bcd(&frame[6], (long long)power_level, 2); + frame[8] = 0xfd; + n = write(fd, frame, 9); + break; + + case 0x0c: + dumphex(frame, 10); + printf("subcmd=0x0c #1\n"); + + if (frame[6] != 0xfd) // then we have data + { + printf("subcmd=0x0c #1\n"); + keyspd = from_bcd(&frame[6], 2); + frame[6] = 0xfb; + n = write(fd, frame, 7); + } + else + { + printf("subcmd=0x0c #1\n"); + to_bcd(&frame[6], keyspd, 2); + frame[8] = 0xfd; + n = write(fd, frame, 9); + } + + break; + } + + + break; + + case 0x15: + switch (frame[5]) + { + static int meter_level = 0; + + case 0x11: + printf("Using meter level %d\n", meter_level); + meter_level += 10; + + if (meter_level > 250) { meter_level = 0; } + + to_bcd(&frame[6], (long long)meter_level, 2); + frame[8] = 0xfd; + n = write(fd, frame, 9); + break; + } + + break; + +#if 0 + case 0x18: // miscellaneous things + frame[5] = 1; + frame[6] = 0xfd; + n = write(fd, frame, 7); + break; + + case 0x1a: // miscellaneous things + switch (frame[5]) + { + case 0x03: // width + if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { frame[6] = widthA; } + else { frame[6] = widthB; } + + frame[7] = 0xfd; + n = write(fd, frame, 8); + break; + + case 0x04: // IC7200 data mode + frame[6] = 0; + frame[7] = 0; + frame[8] = 0xfd; + n = write(fd, frame, 9); + break; + + case 0x07: // satmode + frame[6] = 0; + frame[7] = 0xfd; + n = write(fd, frame, 8); + break; + + } + + break; +#endif + case 0x1c: + switch (frame[5]) + { + case 0: + if (frame[6] == 0xfd) + { + frame[6] = ptt; + frame[7] = 0xfd; + n = write(fd, frame, 8); + } + else + { + ptt = frame[6]; + frame[7] = 0xfb; + frame[8] = 0xfd; + n = write(fd, frame, 9); + } + + break; + + } + + break; + + +#ifdef X25 + + case 0x25: + if (frame[6] == 0xfd) + { + if (frame[5] == 0x00) + { + to_bcd(&frame[6], (long long)freqA, (civ_731_mode ? 4 : 5) * 2); + printf("get_freqA=%.0f\n", freqA); + } + else + { + to_bcd(&frame[6], (long long)freqB, (civ_731_mode ? 4 : 5) * 2); + printf("get_freqB=%.0f\n", freqB); + } + + frame[11] = 0xfd; + n = write(fd, frame, 12); + } + else + { + freq = from_bcd(&frame[6], (civ_731_mode ? 4 : 5) * 2); + printf("set_freq to %.0f\n", freq); + + if (frame[5] == 0x00) { freqA = freq; } + else { freqB = freq; } + + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + } + + break; + + case 0x26: + for (int i = 0; i < 6; ++i) { printf("%02x:", frame[i]); } + + if (frame[6] == 0xfd) // then a query + { + for (int i = 0; i < 6; ++i) { printf("%02x:", frame[i]); } + + frame[6] = frame[5] == 0 ? modeA : modeB; + frame[7] = frame[5] == 0 ? datamodeA : datamodeB; + frame[8] = 0xfb; + frame[9] = 0xfd; + n = write(fd, frame, 10); + } + else + { + for (int i = 0; i < 12; ++i) { printf("%02x:", frame[i]); } + + if (frame[5] == 0) + { + modeA = frame[6]; + datamodeA = frame[7]; + } + else + { + modeB = frame[6]; + datamodeB = frame[7]; + } + + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + } + + printf("\n"); + break; +#else + + case 0x25: + frame[4] = 0xfa; + frame[5] = 0xfd; + break; + + case 0x26: + frame[4] = 0xfa; + frame[5] = 0xfd; + break; +#endif + + default: printf("cmd 0x%02x unknown\n", frame[4]); + } + + // don't care about the rig type yet + +} + +#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 + +void rigStatus() +{ + char vfoa = current_vfo == RIG_VFO_A ? '*' : ' '; + char vfob = current_vfo == RIG_VFO_B ? '*' : ' '; + printf("%cVFOA: mode=%d datamode=%d width=%ld freq=%.0f\n", vfoa, modeA, + datamodeA, + widthA, + freqA); + printf("%cVFOB: mode=%d datamode=%d width=%ld freq=%.0f\n", vfob, modeB, + datamodeB, + widthB, + freqB); +} + +int main(int argc, char **argv) +{ + unsigned char buf[256]; + int fd = openPort(argv[1]); + + printf("%s: %s\n", argv[0], rig_version()); +#ifdef X25 + printf("x25/x26 command recognized\n"); +#else + printf("x25/x26 command rejected\n"); +#endif +#if defined(WIN32) || defined(_WIN32) + + if (argc != 2) + { + printf("Missing comport argument\n"); + printf("%s [comport]\n", argv[0]); + exit(1); + } + +#endif + + while (1) + { + int len = frameGet(fd, buf); + + if (len <= 0) + { + close(fd); + fd = openPort(argv[1]); + } + + frameParse(fd, buf, len); + rigStatus(); + } + + return 0; +} commit 01730082fbfd029e1df789df47f21eaeb524d510 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Aug 18 08:06:14 2023 -0500 Fix G90 by changing set/get_mode_with_data to set/get_mode and suppress icom_get_dsp_flt https://github.com/Hamlib/Hamlib/issues/1364 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index daecdbf03..6d5ae1c25 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1951,7 +1951,6 @@ int filtericom[] = { 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 600, 700, pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode) { - int retval, res_len = 0, rfstatus; unsigned char resbuf[MAXFRAMELEN]; value_t rfwidth; @@ -1984,7 +1983,8 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode) } if (RIG_MODEL_X108G == rig->caps->rig_model - || RIG_MODEL_X5105 == rig->caps->rig_model) + || RIG_MODEL_X5105 == rig->caps->rig_model + || RIG_MODEL_G90 == rig->caps->rig_model) { priv->no_1a_03_cmd = ENUM_1A_03_NO; } @@ -2761,12 +2761,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) rig_set_vfo(rig, vfo); // force VFO } - retval = 0; - // G90 does have dsp_flt command - if (rig->caps->rig_model != RIG_MODEL_G90) - { - retval = icom_get_dsp_flt(rig, *mode); - } + retval = icom_get_dsp_flt(rig, *mode); *width = retval; if (retval == 0) @@ -2789,12 +2784,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) // we need to figure out how to read VFOB without swapping VFOs //HAMLIB_TRACE; //rig_set_vfo(rig, RIG_VFO_B); - retval = 0; - - if (rig->caps->rig_model != RIG_MODEL_G90) - { - retval = icom_get_dsp_flt(rig, *mode); - } + retval = icom_get_dsp_flt(rig, *mode); *width = retval; if (*width == 0) { *width = rig->state.cache.widthMainA; } // we'll use VFOA's width diff --git a/rigs/icom/xiegu.c b/rigs/icom/xiegu.c index 697b6950a..91e5b5f09 100644 --- a/rigs/icom/xiegu.c +++ b/rigs/icom/xiegu.c @@ -632,8 +632,8 @@ const struct rig_caps g90_caps = .set_freq = icom_set_freq, .get_freq = icom_get_freq, - .set_mode = icom_set_mode_with_data, - .get_mode = icom_get_mode_with_data, + .set_mode = icom_set_mode, + .get_mode = icom_get_mode, .set_vfo = icom_set_vfo, .set_ant = NULL, /*automatically set by rig depending band */ .get_ant = NULL, diff --git a/simulators/Makefile.am b/simulators/Makefile.am index 3583ba822..7b794947c 100644 --- a/simulators/Makefile.am +++ b/simulators/Makefile.am @@ -8,7 +8,7 @@ DISTCLEANFILES = bin_PROGRAMS = -check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101 +check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101 simxiegug90 simelecraft_SOURCES = simelecraft.c simkenwood_SOURCES = simkenwood.c diff --git a/simulators/simxiegug90 b/simulators/simxiegug90 new file mode 100755 index 000000000..46a19d615 Binary files /dev/null and b/simulators/simxiegug90 differ commit 0edd1df223bef5a2814e06c004c480e4d5593ddf Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Aug 18 00:04:59 2023 -0500 Add more KEYERTYPE implementaions to Icom rigs diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b8a065797..85396a2d8 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1154,7 +1154,7 @@ enum multicast_item_e { //! @cond Doxygen_Suppress #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT) -#define RIG_PARM_STRING_LIST (RIG_PARM_BANDSELECT) +#define RIG_PARM_STRING_LIST (RIG_PARM_BANDSELECT|RIG_PARM_KEYERTYPE) #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT) #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST) diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index 76e74c46c..59acc14d5 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -727,7 +727,8 @@ const struct rig_caps ic7300_caps = [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, - [PARM_KEYERTYPE] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, + }, .ext_tokens = ic7300_ext_tokens, .extlevels = icom_ext_levels, @@ -969,7 +970,7 @@ struct rig_caps ic9700_caps = [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM"}}, [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, - [PARM_KEYERTYPE] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ext_tokens = ic9700_ext_tokens, .extlevels = icom_ext_levels, @@ -1561,7 +1562,7 @@ const struct rig_caps ic905_caps = [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM,BAND23CM,BAND13CM,BAND3CM"}}, [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, - [PARM_KEYERTYPE] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ext_tokens = ic705_ext_tokens, .extlevels = icom_ext_levels, diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c index 937b87bac..33a786af9 100644 --- a/rigs/icom/ic7410.c +++ b/rigs/icom/ic7410.c @@ -92,6 +92,7 @@ struct cmdparams ic7410_extcmds[] = { { {.s = RIG_LEVEL_VOXDELAY}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 1, {0x75 }, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x75}, CMD_DAT_INT, 1 }, { {0} } }; @@ -157,6 +158,7 @@ const struct rig_caps ic7410_caps = .parm_gran = { [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ctcss_list = common_ctcss_list, diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c index fc0ba365f..97b8c4139 100644 --- a/rigs/icom/ic7600.c +++ b/rigs/icom/ic7600.c @@ -133,6 +133,7 @@ struct cmdparams ic7600_extcmds[] = { {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x38}, CMD_DAT_LVL, 2 }, { {.s = RIG_PARM_TIME}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x54}, CMD_DAT_TIM, 2 }, { {.s = RIG_LEVEL_VOXDELAY}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x67}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x37}, CMD_DAT_INT, 1 }, { { 0 } } }; @@ -315,6 +316,7 @@ struct rig_caps ic7600_caps = [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, [PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} }, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ext_tokens = ic7600_ext_tokens, diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c index 77dee9d20..4c8cfa6bd 100644 --- a/rigs/icom/ic7610.c +++ b/rigs/icom/ic7610.c @@ -137,6 +137,7 @@ struct cmdparams ic7610_extcmds[] = { {.s = RIG_FUNC_TRANSCEIVE}, CMD_PARAM_TYPE_FUNC, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x12}, CMD_DAT_BOL, 1 }, { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x70}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x82}, CMD_DAT_LVL, 2 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x02, 0x31}, CMD_DAT_INT, 1 }, { { 0 } } }; @@ -398,6 +399,7 @@ struct rig_caps ic7610_caps = [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ext_tokens = ic7610_ext_tokens, diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c index 93f587faf..ec814a0be 100644 --- a/rigs/icom/ic785x.c +++ b/rigs/icom/ic785x.c @@ -42,7 +42,7 @@ #define IC785x_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_BALANCE|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_APF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SPECTRUM_AVG|RIG_LEVEL_SPECTRUM_EDGE_LOW|RIG_LEVEL_SPECTRUM_EDGE_HIGH|RIG_LEVEL_SPECTRUM_ATT|RIG_LEVEL_AGC_TIME) #define IC785x_VFOS (RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MEM) -#define IC785x_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP) +#define IC785x_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_KEYERTYPE) #define IC785x_VFO_OPS (RIG_OP_CPY|RIG_OP_XCHG|RIG_OP_FROM_VFO|RIG_OP_TO_VFO|RIG_OP_MCL|RIG_OP_TUNE) #define IC785x_SCAN_OPS (RIG_SCAN_MEM|RIG_SCAN_VFO|RIG_SCAN_PROG|RIG_SCAN_DELTA|RIG_SCAN_PRIO) @@ -128,6 +128,7 @@ struct cmdparams ic785x_extcmds[] = { {.s = RIG_FUNC_TRANSCEIVE}, CMD_PARAM_TYPE_FUNC, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x55}, CMD_DAT_BOL, 1 }, { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x87}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x52}, CMD_DAT_LVL, 2 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x02, 0x54}, CMD_DAT_INT, 1 }, { { 0 } } }; @@ -282,6 +283,7 @@ const struct rig_caps ic785x_caps = [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ext_tokens = ic785x_ext_tokens, diff --git a/rigs/icom/ic9100.c b/rigs/icom/ic9100.c index 15cc1a03c..2a8ef9dcc 100644 --- a/rigs/icom/ic9100.c +++ b/rigs/icom/ic9100.c @@ -89,6 +89,7 @@ struct cmdparams ic9100_extcmds[] = { { {.s = RIG_LEVEL_VOXDELAY}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x27}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x02}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; @@ -142,6 +143,7 @@ const struct rig_caps ic9100_caps = [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}}, [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT, BUG, PADDLE"}}, }, .ctcss_list = common_ctcss_list, diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 2ba99cb1e..49f5ab9ed 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -3734,7 +3734,14 @@ declare_proto_rig(get_parm) fprintf(fout, "%s: ", cmd->arg2); } - if (RIG_PARM_IS_FLOAT(parm)) + if (parm == RIG_PARM_KEYERTYPE) + { + char *s = "STRAIGHT"; + if (val.i == 1) s = "BUG"; + else if (val.i == 2) s = "PADDLE"; + fprintf(fout, "%s%cv", s, resp_sep); + } + else if (RIG_PARM_IS_FLOAT(parm)) { rig_debug(RIG_DEBUG_ERR, "%s: float\n", __func__); fprintf(fout, "%f%c", val.f, resp_sep); commit 147dea76514d072598197d44eb6ce29ad997214d Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Aug 17 22:57:11 2023 -0500 Remove get_dsp_flt for G90 as it does not have that command diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index b1a1ca83a..daecdbf03 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2761,7 +2761,12 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) rig_set_vfo(rig, vfo); // force VFO } - retval = icom_get_dsp_flt(rig, *mode); + retval = 0; + // G90 does have dsp_flt command + if (rig->caps->rig_model != RIG_MODEL_G90) + { + retval = icom_get_dsp_flt(rig, *mode); + } *width = retval; if (retval == 0) @@ -2784,7 +2789,12 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) // we need to figure out how to read VFOB without swapping VFOs //HAMLIB_TRACE; //rig_set_vfo(rig, RIG_VFO_B); - retval = icom_get_dsp_flt(rig, *mode); + retval = 0; + + if (rig->caps->rig_model != RIG_MODEL_G90) + { + retval = icom_get_dsp_flt(rig, *mode); + } *width = retval; if (*width == 0) { *width = rig->state.cache.widthMainA; } // we'll use VFOA's width commit ccd6472f031aec1f38f4ae4453be602712b8e71d Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Aug 17 22:49:20 2023 -0500 Fix KEYERTYPE in ic7300.c and add parsing of STRAIGHT, BUG, PADDLE for rigctl(d) https://xiegu.eu/downloads/ diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index e8d0efafc..584bc43c7 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -1022,7 +1022,7 @@ and .RI \(aq "Parm Value" \(aq. .IP Parm is a token: \(oqANN\(cq, \(oqAPO\(cq, \(oqBACKLIGHT\(cq, \(oqBEEP\(cq, -\(oqTIME\(cq, \(oqBAT\(cq, \(oqKEYLIGHT\(cq, \(oqSCREENSAVER\(cq, \(oqAFIF\(cq, \(oqBANDSELECT\(cq. +\(oqTIME\(cq, \(oqBAT\(cq, \(oqKEYLIGHT\(cq, \(oqSCREENSAVER\(cq, \(oqAFIF\(cq, \(oqBANDSELECT\(cq, \(oqKEYERTYPE\(cq. .IP .BR Note : Passing a \(oq?\(cq (query) as the first argument instead of a Parm token will @@ -1039,6 +1039,7 @@ Use this to determine the supported parameters of a given radio backend. SCREENSAVER -- rig specific timeouts AFIF -- 0=AF audio, 1=IF audio -- see IC-7300/9700/705 BANDSELECT -- band name, e.g. BAND160M, BAND80M.... a ? instead of band will show band possibilities + KEYERTYPE -- Icom keyer type 0,1,2 or STRAIGHT,BUG,PADDLE . .TP diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 9913ea1f4..190556d16 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -922,7 +922,7 @@ and .RI \(aq "Parm Value" \(aq. .IP Parm is a token: \(oqANN\(cq, \(oqAPO\(cq, \(oqBACKLIGHT\(cq, \(oqBEEP\(cq, -\(oqTIME\(cq, \(oqBAT\(cq, \(oqKEYLIGHT\(cq, \(oqBANDSELECT\(cq. +\(oqTIME\(cq, \(oqBAT\(cq, \(oqKEYLIGHT\(cq, \(oqBANDSELECT\(cq, \(oqKEYERTYPE\(cq. .IP .BR Note : Passing a \(oq?\(cq (query) as the first argument instead of a Parm token will diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index 66efe1085..76e74c46c 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -234,7 +234,7 @@ struct cmdparams ic7300_extcmds[] = { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x02}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x60}, CMD_DAT_LVL, 2 }, { {.s = RIG_PARM_BANDSELECT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 0, {0x00}, CMD_DAT_INT, 1 }, - { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 2, {0x01, 0x64}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x64}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; @@ -250,7 +250,7 @@ struct cmdparams ic9700_extcmds[] = { {.s = RIG_FUNC_TRANSCEIVE}, CMD_PARAM_TYPE_FUNC, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x27}, CMD_DAT_BOL, 1 }, { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x92}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x06}, CMD_DAT_LVL, 2 }, - { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 2, {0x02, 0x27}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x02, 0x27}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; @@ -266,7 +266,7 @@ struct cmdparams ic705_extcmds[] = { {.s = RIG_FUNC_TRANSCEIVE}, CMD_PARAM_TYPE_FUNC, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x31}, CMD_DAT_BOL, 1 }, { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x78}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x13}, CMD_DAT_LVL, 2 }, - { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 2, {0x02, 0x55}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x02, 0x55}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index e446ad700..2ba99cb1e 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -3562,6 +3562,13 @@ declare_proto_rig(set_parm) else RETURNFUNC2(-RIG_EINTERNAL); } + if (strcmp(arg1,"KEYERTYPE")==0 && strcmp(arg2,"?") != 0) + { + if (strcmp(arg2,"STRAIGHT")==0) arg2 = "0"; + else if (strcmp(arg2,"BUG")==0) arg2 = "1"; + else if (strcmp(arg2,"PADDLE")==0) arg2 = "2"; + } + parm = rig_parse_parm(arg1); if (!rig_has_set_parm(rig, parm)) commit 8c63fdeafc3c0011202a692cc29c64151df4d1b9 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Aug 17 17:52:03 2023 -0500 Add KEYERTYPE for IC-7300, IC-705, IC-9700 https://github.com/Hamlib/Hamlib/issues/1363 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 374735446..b8a065797 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1118,7 +1118,14 @@ enum rig_parm_e { RIG_PARM_KEYLIGHT = (1 << 7), /*!< \c KEYLIGHT -- Button backlight, on/off */ RIG_PARM_SCREENSAVER = (1 << 8), /*!< \c SCREENSAVER -- rig specific timeouts */ RIG_PARM_AFIF = (1 << 9), /*!< \c AFIF -- 0=AF audio, 1=IF audio -- see IC-7300/9700/705 */ - RIG_PARM_BANDSELECT = (1 << 10) /*!< \c BANDSELECT -- e.g. BAND160M, BAND80M, BAND70CM, BAND2CM */ + RIG_PARM_BANDSELECT = (1 << 10), /*!< \c BANDSELECT -- e.g. BAND160M, BAND80M, BAND70CM, BAND2CM */ + RIG_PARM_KEYERTYPE = (1 << 11) /*!< \c KEYERTYPE -- 0,1,2 or STRAIGHT PADDLE BUG */ +}; + +enum rig_keyertype_e { + RIG_KEYERTYPE_STRAIGHT = 0, + RIG_KEYERTYPE_BUG = (1 << 0), + RIG_KEYERTYPE_PADDLE = (2 << 0) }; /** diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index 879bed0c9..66efe1085 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -59,7 +59,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo); #define IC7300_VFOS (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM) // RIG_PARM_BANDSELECT disabled until Icom can describe the return from 0x1a 0x01 //#define IC7300_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_BANDSELECT) -#define IC7300_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_SCREENSAVER|RIG_PARM_TIME|RIG_PARM_BEEP) +#define IC7300_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_SCREENSAVER|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_KEYERTYPE) #define IC7300_VFO_OPS (RIG_OP_CPY|RIG_OP_XCHG|RIG_OP_FROM_VFO|RIG_OP_TO_VFO|RIG_OP_MCL|RIG_OP_TUNE) #define IC7300_SCAN_OPS (RIG_SCAN_STOP|RIG_SCAN_MEM|RIG_SCAN_PROG|RIG_SCAN_SLCT) @@ -149,7 +149,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo); #define IC9700_VFOS (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MEM|RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B) // RIG_PARM_BANDSELECT disabled until Icom can describe the return from 0x1a 0x01 //#define IC9700_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_SCREENSAVER|RIG_PARM_BANDSELECT) -#define IC9700_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_SCREENSAVER) +#define IC9700_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_SCREENSAVER|RIG_PARM_KEYERTYPE) #define IC9700_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_SCOPE|RIG_FUNC_SATMODE|RIG_FUNC_DUAL_WATCH|RIG_FUNC_AFC|RIG_FUNC_TRANSCEIVE|RIG_FUNC_SPECTRUM|RIG_FUNC_SPECTRUM_HOLD|RIG_FUNC_SEND_MORSE|RIG_FUNC_SEND_VOICE_MEM|RIG_FUNC_OVF_STATUS) #define IC9700_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SPECTRUM_AVG|RIG_LEVEL_SPECTRUM_EDGE_LOW|RIG_LEVEL_SPECTRUM_EDGE_HIGH|RIG_LEVEL_USB_AF|RIG_LEVEL_AGC_TIME) #define IC9700_VFO_OPS (RIG_OP_CPY|RIG_OP_XCHG|RIG_OP_FROM_VFO|RIG_OP_TO_VFO|RIG_OP_MCL) @@ -234,6 +234,7 @@ struct cmdparams ic7300_extcmds[] = { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x02}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x60}, CMD_DAT_LVL, 2 }, { {.s = RIG_PARM_BANDSELECT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 0, {0x00}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 2, {0x01, 0x64}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; @@ -249,6 +250,7 @@ struct cmdparams ic9700_extcmds[] = { {.s = RIG_FUNC_TRANSCEIVE}, CMD_PARAM_TYPE_FUNC, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x27}, CMD_DAT_BOL, 1 }, { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x92}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x06}, CMD_DAT_LVL, 2 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 2, {0x02, 0x27}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; @@ -264,6 +266,7 @@ struct cmdparams ic705_extcmds[] = { {.s = RIG_FUNC_TRANSCEIVE}, CMD_PARAM_TYPE_FUNC, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x31}, CMD_DAT_BOL, 1 }, { {.s = RIG_LEVEL_SPECTRUM_AVG}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x78}, CMD_DAT_INT, 1 }, { {.s = RIG_LEVEL_USB_AF}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x13}, CMD_DAT_LVL, 2 }, + { {.s = RIG_PARM_KEYERTYPE}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_BAND_REG, SC_MOD_RW, 2, {0x02, 0x55}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_NONE} } }; @@ -724,6 +727,7 @@ const struct rig_caps ic7300_caps = [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, }, .ext_tokens = ic7300_ext_tokens, .extlevels = icom_ext_levels, @@ -964,7 +968,8 @@ struct rig_caps ic9700_caps = [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM"}}, [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, - [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}} + [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, }, .ext_tokens = ic9700_ext_tokens, .extlevels = icom_ext_levels, @@ -1556,6 +1561,7 @@ const struct rig_caps ic905_caps = [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM,BAND23CM,BAND13CM,BAND3CM"}}, [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, + [PARM_KEYERTYPE] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, }, .ext_tokens = ic705_ext_tokens, .extlevels = icom_ext_levels, diff --git a/src/idx_builtin.h b/src/idx_builtin.h index c0fafe62d..4a607189c 100644 --- a/src/idx_builtin.h +++ b/src/idx_builtin.h @@ -189,6 +189,7 @@ #define PARM_KEYLIGHT setting2idx_builtin(RIG_PARM_KEYLIGHT) #define PARM_BANDSELECT setting2idx_builtin(RIG_PARM_BANDSELECT) #define PARM_SCREENSAVER setting2idx_builtin(RIG_PARM_SCREENSAVER) +#define PARM_KEYERTYPE setting2idx_builtin(RIG_PARM_KEYERTYPE) /* Rotator levels */ diff --git a/src/misc.c b/src/misc.c index eff013560..c4304f89b 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1270,6 +1270,7 @@ static const struct { RIG_PARM_KEYLIGHT, "KEYLIGHT"}, { RIG_PARM_SCREENSAVER, "SCREENSAVER"}, { RIG_PARM_BANDSELECT, "BANDSELECT"}, + { RIG_PARM_KEYERTYPE, "KEYERTYPE"}, { RIG_PARM_NONE, "" }, }; commit aa338afa1ad2a70e2e06507f092e478c1b47cd9c Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Aug 17 17:12:33 2023 -0500 Fix parm_gran for Kenwood https://github.com/Hamlib/Hamlib/issues/1357 diff --git a/rigs/kenwood/r5000.c b/rigs/kenwood/r5000.c index d9be871c8..b9041db2c 100644 --- a/rigs/kenwood/r5000.c +++ b/rigs/kenwood/r5000.c @@ -82,7 +82,10 @@ const struct rig_caps r5000_caps = .has_set_level = RIG_LEVEL_SET(R5000_LEVEL_ALL), .has_get_parm = R5000_PARM_ALL, .has_set_parm = RIG_PARM_SET(R5000_PARM_ALL), - .parm_gran = {}, + .parm_gran = { + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + }, + .ctcss_list = NULL, .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, diff --git a/rigs/kenwood/thd7.c b/rigs/kenwood/thd7.c index fbd871ad1..4a6cb48ba 100644 --- a/rigs/kenwood/thd7.c +++ b/rigs/kenwood/thd7.c @@ -110,7 +110,9 @@ const struct rig_caps thd7a_caps = { #include "level_gran_kenwood.h" }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + }, .ctcss_list = kenwood38_ctcss_list, .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c index 9ee9f3280..b939b26d1 100644 --- a/rigs/kenwood/thd72.c +++ b/rigs/kenwood/thd72.c @@ -1651,7 +1651,10 @@ const struct rig_caps thd72a_caps = { #include "level_gran_kenwood.h" }, - .parm_gran = {}, + .parm_gran = { + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} }, + }, .ctcss_list = kenwood42_ctcss_list, .dcs_list = thd72dcs_list, .preamp = { RIG_DBLST_END, }, diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c index 07ba4660a..a46a892aa 100644 --- a/rigs/kenwood/thd74.c +++ b/rigs/kenwood/thd74.c @@ -1677,7 +1677,12 @@ const struct rig_caps thd74_caps = { #include "level_gran_kenwood.h" }, - .parm_gran = {}, + .parm_gran = { + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + }, + + + .ctcss_list = kenwood38_ctcss_list, .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, commit 63bb03cb07809fb8ee865a65351317e353d11085 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Aug 17 16:57:05 2023 -0500 Fix Yaesu gran_parm https://github.com/Hamlib/Hamlib/issues/1357 diff --git a/rigs/yaesu/frg100.c b/rigs/yaesu/frg100.c index 2dc155cec..975cd097d 100644 --- a/rigs/yaesu/frg100.c +++ b/rigs/yaesu/frg100.c @@ -174,7 +174,7 @@ const struct rig_caps frg100_caps = .has_get_level = RIG_LEVEL_RAWSTR, .has_set_level = RIG_LEVEL_BAND_SELECT, .has_get_parm = RIG_PARM_NONE, - .has_set_parm = RIG_PARM_BACKLIGHT, + .has_set_parm = RIG_PARM_NONE, .level_gran = { #include "level_gran_yaesu.h" diff --git a/rigs/yaesu/ft1000d.c b/rigs/yaesu/ft1000d.c index 8891d62df..9cd013f6a 100644 --- a/rigs/yaesu/ft1000d.c +++ b/rigs/yaesu/ft1000d.c @@ -296,6 +296,9 @@ const struct rig_caps ft1000d_caps = { #include "level_gran_yaesu.h" }, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 13.0f}}, + }, .ctcss_list = NULL, .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, diff --git a/rigs/yaesu/ft990.c b/rigs/yaesu/ft990.c index 8d059cb7e..5a2c9c5ce 100755 --- a/rigs/yaesu/ft990.c +++ b/rigs/yaesu/ft990.c @@ -263,6 +263,10 @@ const struct rig_caps ft990_caps = { #include "level_gran_yaesu.h" }, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + }, + .ctcss_list = NULL, .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, diff --git a/rigs/yaesu/ft990v12.c b/rigs/yaesu/ft990v12.c index b7f9f0656..eb445fad2 100644 --- a/rigs/yaesu/ft990v12.c +++ b/rigs/yaesu/ft990v12.c @@ -278,6 +278,10 @@ const struct rig_caps ft990uni_caps = .has_set_level = RIG_LEVEL_BAND_SELECT, .has_get_parm = RIG_PARM_NONE, .has_set_parm = RIG_PARM_BACKLIGHT, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 13.0f}}, + }, + .ctcss_list = NULL, .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, commit e88715240774db70a4e41d872cf4aa5f17e5b8a9 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Aug 17 16:04:45 2023 -0500 Fix parm_gran https://github.com/Hamlib/Hamlib/issues/1357 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 09a563638..374735446 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1146,7 +1146,7 @@ enum multicast_item_e { }; //! @cond Doxygen_Suppress -#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT) +#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT) #define RIG_PARM_STRING_LIST (RIG_PARM_BANDSELECT) #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT) diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c index f6aaefdf2..f8e0d0546 100644 --- a/rigs/icom/ic7000.c +++ b/rigs/icom/ic7000.c @@ -137,6 +137,7 @@ struct cmdparams ic7000_extcmds[] = { { {.s = RIG_LEVEL_VOXDELAY}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x17}, CMD_DAT_INT, 1 }, + { {.s = RIG_PARM_TIME}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x41}, CMD_DAT_TIM, 2 }, { {.s = RIG_PARM_NONE} } }; @@ -226,7 +227,14 @@ const struct rig_caps ic7000_caps = [LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } }, [LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } }, }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_APO] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + }, + .ctcss_list = common_ctcss_list, .dcs_list = common_dcs_list, .preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess */ @@ -345,8 +353,8 @@ const struct rig_caps ic7000_caps = .get_level = icom_get_level, .set_func = icom_set_func, .get_func = icom_get_func, - .set_parm = NULL, - .get_parm = NULL, + .set_parm = icom_set_parm, + .get_parm = icom_get_parm, .set_mem = icom_set_mem, .set_bank = icom_set_bank, .vfo_op = icom_vfo_op, diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c index b33d44038..d626c6810 100644 --- a/rigs/icom/ic7100.c +++ b/rigs/icom/ic7100.c @@ -98,7 +98,9 @@ RIG_LEVEL_NB | \ RIG_LEVEL_AGC_TIME) -#define IC7100_PARM_ALL (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_KEYLIGHT|RIG_PARM_BEEP|RIG_PARM_TIME|RIG_PARM_BANDSELECT) +//#define IC7100_PARM_ALL (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_KEYLIGHT|RIG_PARM_BEEP|RIG_PARM_TIME|RIG_PARM_BANDSELECT) +// BANDSELECT disabled unti we figure out Icom's ability +#define IC7100_PARM_ALL (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_KEYLIGHT|RIG_PARM_BEEP|RIG_PARM_TIME) int ic7100_tokens[] = { TOK_DSTAR_CODE, TOK_DSTAR_DSQL, TOK_DSTAR_CALL_SIGN, TOK_DSTAR_MESSAGE, TOK_DSTAR_STATUS, TOK_DSTAR_MY_CS, TOK_DSTAR_TX_CS, TOK_DSTAR_TX_MESS, @@ -347,8 +349,16 @@ const struct rig_caps ic7100_caps = .extfuncs = icom_ext_funcs, .extparms = icom_ext_parms, .parm_gran = { - [PARM_BANDSELECT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.s = "BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BAND2M,BAND70CM,BANDGEN"}} - }, + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_KEYLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} }, + }, + .ctcss_list = common_ctcss_list, .dcs_list = common_dcs_list, .preamp = { 1, 2, RIG_DBLST_END, }, diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c index 9b964552a..01a451827 100644 --- a/rigs/icom/ic7200.c +++ b/rigs/icom/ic7200.c @@ -155,7 +155,15 @@ const struct rig_caps ic7200_caps = [LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } }, [LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } }, }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} }, + }, + .ctcss_list = NULL, .dcs_list = NULL, .preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess */ diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index ba92742e2..879bed0c9 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -223,6 +223,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo); struct cmdparams ic7300_extcmds[] = { + { {.s = RIG_PARM_ANN}, CMD_PARAM_TYPE_PARM, C_CTL_ANN, 0, SC_MOD_WR, 0, {0x00}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_BEEP}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x23}, CMD_DAT_BOL, 1 }, { {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x81}, CMD_DAT_LVL, 2 }, { {.s = RIG_PARM_SCREENSAVER}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x89}, CMD_DAT_INT, 1 }, @@ -238,6 +239,7 @@ struct cmdparams ic7300_extcmds[] = struct cmdparams ic9700_extcmds[] = { + { {.s = RIG_PARM_ANN}, CMD_PARAM_TYPE_PARM, C_CTL_ANN, 0, SC_MOD_WR, 0, {0x00}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_BEEP}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x29}, CMD_DAT_BOL, 1 }, { {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x52}, CMD_DAT_LVL, 2 }, { {.s = RIG_PARM_SCREENSAVER}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x67}, CMD_DAT_INT, 1 }, @@ -252,6 +254,7 @@ struct cmdparams ic9700_extcmds[] = struct cmdparams ic705_extcmds[] = { + { {.s = RIG_PARM_ANN}, CMD_PARAM_TYPE_PARM, C_CTL_ANN, 0, SC_MOD_WR, 0, {0x00}, CMD_DAT_INT, 1 }, { {.s = RIG_PARM_BEEP}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x31}, CMD_DAT_BOL, 1 }, { {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x36}, CMD_DAT_LVL, 2 }, { {.s = RIG_PARM_SCREENSAVER}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x38}, CMD_DAT_INT, 1 }, @@ -715,7 +718,12 @@ const struct rig_caps ic7300_caps = [LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }}, }, .parm_gran = { - [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}} + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, }, .ext_tokens = ic7300_ext_tokens, .extlevels = icom_ext_levels, @@ -953,7 +961,10 @@ struct rig_caps ic9700_caps = [LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }}, }, .parm_gran = { - [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM"}} + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM"}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, + [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}} }, .ext_tokens = ic9700_ext_tokens, .extlevels = icom_ext_levels, @@ -1269,7 +1280,10 @@ const struct rig_caps ic705_caps = [LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }}, }, .parm_gran = { - [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDWFM,BANDAIR,BAND70CM,BAND33CM,BANDGEN"}} + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDWFM,BANDAIR,BAND70CM,BAND33CM,BANDGEN"}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, + [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, }, .ext_tokens = ic705_ext_tokens, .extlevels = icom_ext_levels, @@ -1538,7 +1552,10 @@ const struct rig_caps ic905_caps = [LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }}, }, .parm_gran = { - [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM,BAND23CM,BAND13CM,BAND3CM"}} + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM,BAND23CM,BAND13CM,BAND3CM"}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}}, + [PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}, }, .ext_tokens = ic705_ext_tokens, .extlevels = icom_ext_levels, @@ -1857,8 +1874,10 @@ int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val) switch (parm) { +#if 0 case RIG_PARM_ANN: return -RIG_ENIMPL; // How can we implement this? +#endif default: rig_debug(RIG_DEBUG_TRACE, "%s: using icom routine for PARM=%s\n", __func__, @@ -1887,9 +1906,11 @@ int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val) switch (parm) { +#if 0 case RIG_PARM_ANN: rig_debug(RIG_DEBUG_WARN, "%s: not implemented\n", __func__); return -RIG_ENIMPL; +#endif default: return icom_get_parm(rig, parm, val); diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c index 3100397dc..937b87bac 100644 --- a/rigs/icom/ic7410.c +++ b/rigs/icom/ic7410.c @@ -154,7 +154,11 @@ const struct rig_caps ic7410_caps = [LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } }, [LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } }, }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + }, + .ctcss_list = common_ctcss_list, .dcs_list = NULL, .preamp = { 10, 20, RIG_DBLST_END, }, /* FIXME: TBC */ diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c index 95787dcb9..81c092b6f 100644 --- a/rigs/icom/ic746.c +++ b/rigs/icom/ic746.c @@ -446,7 +446,12 @@ const struct rig_caps ic746pro_caps = #include "level_gran_icom.h" [LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } }, }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + }, + .extparms = ic746pro_ext_parms, .ctcss_list = common_ctcss_list, .dcs_list = full_dcs_list, diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c index 25cf15f56..afeda348a 100644 --- a/rigs/icom/ic756.c +++ b/rigs/icom/ic756.c @@ -1014,7 +1014,13 @@ const struct rig_caps ic756pro3_caps = [LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } }, [LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } }, }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + }, + .extparms = ic756pro2_ext_parms, .ctcss_list = common_ctcss_list, .dcs_list = NULL, diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c index faeb11e5e..fc0ba365f 100644 --- a/rigs/icom/ic7600.c +++ b/rigs/icom/ic7600.c @@ -308,7 +308,15 @@ struct rig_caps ic7600_caps = [LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } }, [LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } }, }, - .parm_gran = {}, + .parm_gran = { + [PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_KEYLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}}, + [PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}}, + [PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}}, + [PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}}, + [PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} }, + }, + .ext_tokens = ic7600_ext_tokens, .extfuncs = icom_e... [truncated message content] |