Porównaj commity

...

10 Commity

Autor SHA1 Wiadomość Data
Mike Black W9MDB 1de9a5cede Fix compile warning on rig_debug messages
https://github.com/Hamlib/Hamlib/issues/1525
2024-03-17 09:01:58 -05:00
Mike Black W9MDB 0e572f631b Update simft897.c 2024-03-17 08:53:53 -05:00
Mike Black W9MDB 84d5f367f6 Fix compile warning on testrig.c 2024-03-15 22:51:19 -05:00
Mike Black W9MDB 6d257841a6 Fix some memory leaks in rigctl_parse.c 2024-03-15 16:46:14 -05:00
Mike Black W9MDB 8449ac3c43 Update simulators 2024-03-15 07:29:03 -05:00
Mike Black W9MDB 1045620313 Return error on bad read_icom_frame 2024-03-15 07:27:19 -05:00
Mike Black W9MDB b9e59f205e Fix compile error
https://github.com/Hamlib/Hamlib/issues/1524
2024-03-14 22:43:10 -05:00
Mike Black W9MDB 6220da1eaf Merge branch 'master' of https://github.com/Hamlib/Hamlib 2024-03-14 17:10:39 -05:00
Mike Black W9MDB f119f5976a Fix build warning
https://github.com/Hamlib/Hamlib/issues/1524
2024-03-14 17:10:23 -05:00
Mike Black W9MDB 96ec37a276 Fix build warning 2024-03-14 17:09:36 -05:00
12 zmienionych plików z 495 dodań i 16 usunięć

Wyświetl plik

@ -301,6 +301,12 @@ again2:
buf[0] = 0;
frm_len = read_icom_frame(rp, buf, sizeof(buf));
if (frm_len <= 0)
{
set_transaction_inactive(rig);
return frm_len;
}
if (frm_len > 4 && memcmp(buf, sendbuf, frm_len) == 0)
{
priv->serial_USB_echo_off = 0;

Wyświetl plik

@ -457,12 +457,12 @@ int verify_kenwood_id(RIG *rig, char *id)
if (strcmp("017", idptr) != 0)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig (%s) is not a K2 or K3\n", __func__, id);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig (%.4095s) is not a K2 or K3\n", __func__, id);
// return -RIG_EPROTO;
}
else
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s\n", __func__, id);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %.4095s\n", __func__, id);
}
return RIG_OK;

Wyświetl plik

@ -270,7 +270,7 @@ int kenwood_transaction(RIG *rig, const char *cmdstr, char *data,
if (datasize > 0 && datasize < (cmdstr ? strlen(cmdstr) : 0))
{
rig_debug(RIG_DEBUG_WARN,
"%s called cmd=%s datasize=%d, datasize < cmd length?\n", __func__,
"%s called cmd=%.4095s datasize=%d, datasize < cmd length?\n", __func__,
cmdstr ? cmdstr : "(NULL)",
(int)datasize);
}

Wyświetl plik

@ -553,7 +553,7 @@ int g313_set_conf(RIG *rig, hamlib_token_t token, const char *val)
case TOK_SHM_AUDIO:
if (len > (FIFO_PATHNAME_SIZE - 1))
{
rig_debug(RIG_DEBUG_WARN, "%s: set audio_path %s is too long\n", __func__, val);
rig_debug(RIG_DEBUG_WARN, "%s: set audio_path %.4095s is too long\n", __func__, val);
return -RIG_EINVAL;
}
@ -566,7 +566,7 @@ int g313_set_conf(RIG *rig, hamlib_token_t token, const char *val)
case TOK_SHM_IF:
if (len > (FIFO_PATHNAME_SIZE - 1))
{
rig_debug(RIG_DEBUG_WARN, "%s: set if_path %s is too long\n", __func__, val);
rig_debug(RIG_DEBUG_WARN, "%s: set if_path %.4095s is too long\n", __func__, val);
return -RIG_EINVAL;
}
@ -579,7 +579,7 @@ int g313_set_conf(RIG *rig, hamlib_token_t token, const char *val)
case TOK_SHM_SPECTRUM:
if (len > (FIFO_PATHNAME_SIZE - 1))
{
rig_debug(RIG_DEBUG_WARN, "%s: set spectrum_path %s is too long\n", __func__,
rig_debug(RIG_DEBUG_WARN, "%s: set spectrum_path %.4095s is too long\n", __func__,
val);
return -RIG_EINVAL;
}

Wyświetl plik

@ -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 simxiegug90 simqrplabs simft818 simic275 simtrusdx simft1000 simtmd710 simts890 simxiegux108g simxiegux6100 simic910 simft450
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 simqrplabs simft818 simic275 simtrusdx simft1000 simtmd710 simts890 simxiegux108g simxiegux6100 simic910 simft450 simelecraftk4
simelecraft_SOURCES = simelecraft.c
simkenwood_SOURCES = simkenwood.c

Wyświetl plik

@ -35,6 +35,8 @@ int rxattenuatorB = 0;
int keyspd = 20;
int ai = 0;
int dt = 0;
int modea = 2;
int modeb = 2;
// ID 0310 == 310, Must drop leading zero
typedef enum nc_rigid_e
@ -122,14 +124,13 @@ int main(int argc, char *argv[])
char *pbuf;
int n;
int fd = openPort(argv[1]);
int modea = 3, modeb = 3;
int freqa = 14074000, freqb = 14073500;
while (1)
{
buf[0] = 0;
if ((n = getmyline(fd, buf)) > 0) { printf("Cmd:%s, len=%d\n", buf, n); }
if ((n = getmyline(fd, buf)) > 0) { if (strstr(buf,"BW")) printf("Cmd:%s, len=%d\n", buf, n); }
else {continue; }
if (strcmp(buf, "RM5;") == 0)

Wyświetl plik

@ -0,0 +1,440 @@
// can run this using rigctl/rigctld and socat pty devices
// gcc -o simyaesu simyaesu.c
#define _XOPEN_SOURCE 700
// since we are POSIX here we need this
#if 0
struct ip_mreq
{
int dummy;
};
#endif
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <hamlib/rig.h>
#include "sim.h"
#define BUFSIZE 256
int freqA = 14074000;
int freqB = 14074500;
int afgain = 180;
int rfgain = 190;
int micgain = 30;
int noiseblanker = 0;
int bandwidthA = 200;
int bandwidthB = 200;
int ifshift = 0;
int preampA = 0;
int preampB = 0;
int rxattenuatorA = 0;
int rxattenuatorB = 0;
int keyspd = 20;
int ai = 0;
int dt = 0;
int modeA = 2;
int modeB = 2;
// int freqa = 14074000, freqb = 14073500;
// 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); }
}
if (strlen(buf) == 0) { hl_usleep(10 * 1000); }
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)
{
buf[0] = 0;
if ((n = getmyline(fd, buf)) > 0) { if (strstr(buf,"BW0")) printf("Cmd:%s, len=%d\n", buf, n); }
else {continue; }
if (strcmp(buf, "RM5;") == 0)
{
printf("%s\n", buf);
hl_usleep(50 * 1000);
pbuf = "RM5100000;";
WRITE(fd, pbuf, strlen(pbuf));
}
else if (strcmp(buf, "AI;") == 0)
{
SNPRINTF(buf, sizeof(buf), "AI%d;", ai);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "AI", 2) == 0)
{
sscanf(buf, "AI%d", &ai);
}
else if (strcmp(buf, "AN0;") == 0)
{
printf("%s\n", buf);
hl_usleep(50 * 1000);
pbuf = "AN030;";
WRITE(fd, pbuf, strlen(pbuf));
}
else if (strcmp(buf, "IF;") == 0)
{
printf("%s\n", buf);
hl_usleep(50 * 1000);
//pbuf = "IF059014200000+000000700000;";
pbuf = "IF00007230000 -000000 0001000001 ;" ;
WRITE(fd, pbuf, strlen(pbuf));
}
else if (strcmp(buf, "ID;") == 0)
{
printf("%s\n", buf);
hl_usleep(50 * 1000);
int id = 24;
SNPRINTF(buf, sizeof(buf), "ID%03d;", id);
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "PS;") == 0)
{
SNPRINTF(buf, sizeof(buf), "PS1;");
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "BW$;") == 0)
{
fprintf(stderr, "***** %d\n", __LINE__);
SNPRINTF(buf, sizeof(buf), "BW$%04d;", bandwidthB);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "BW$", 3) == 0)
{
sscanf(buf, "BW$%d", &bandwidthB);
}
else if (strcmp(buf, "BW;") == 0)
{
SNPRINTF(buf, sizeof(buf), "BW%04d;", bandwidthA);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "BW", 2) == 0)
{
sscanf(buf, "BW%d", &bandwidthA);
}
else if (strcmp(buf, "DT;") == 0)
{
SNPRINTF(buf, sizeof(buf), "DT%d;", dt);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "DT", 2) == 0)
{
sscanf(buf, "DT%d", &dt);
}
else if (strcmp(buf, "BN;") == 0)
{
SNPRINTF(buf, sizeof(buf), "BN03;");
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "SM;") == 0)
{
static int meter = 0;
SNPRINTF(buf, sizeof(buf), "SM%04d;", meter++);
if (meter > 15) { meter = 0; }
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "RG;") == 0)
{
SNPRINTF(buf, sizeof(buf), "RG%03d;", rfgain);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "RG", 2) == 0)
{
sscanf(buf, "RG%d", &rfgain);
}
else if (strcmp(buf, "MG;") == 0)
{
SNPRINTF(buf, sizeof(buf), "MG%03d;", micgain);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "MG", 2) == 0)
{
sscanf(buf, "MG%d", &micgain);
}
else if (strcmp(buf, "AG;") == 0)
{
SNPRINTF(buf, sizeof(buf), "MG%03d;", afgain);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "AG", 2) == 0)
{
sscanf(buf, "AG%d", &afgain);
}
else if (strcmp(buf, "NB;") == 0)
{
SNPRINTF(buf, sizeof(buf), "NB%d;", noiseblanker);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "NB", 2) == 0)
{
sscanf(buf, "NB%d", &noiseblanker);
}
else if (strcmp(buf, "IS;") == 0)
{
SNPRINTF(buf, sizeof(buf), "IS %04d;", ifshift);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "IS", 2) == 0)
{
sscanf(buf, "IS %d", &ifshift);
}
#if 0
else if (strncmp(buf, "AI", 2) == 0)
{
if (strcmp(buf, "AI;"))
{
printf("%s\n", buf);
hl_usleep(50 * 1000);
n = fprintf(fp, "%s", "AI0;");
if (n <= 0) { perror("AI"); }
}
}
#endif
else if (strcmp(buf, "VS;") == 0)
{
printf("%s\n", buf);
hl_usleep(50 * 1000);
pbuf = "VS0;";
WRITE(fd, pbuf, strlen(pbuf));
}
else if (strcmp(buf, "EX032;") == 0)
{
static int ant = 0;
ant = (ant + 1) % 3;
printf("%s\n", buf);
hl_usleep(50 * 1000);
SNPRINTF(buf, sizeof(buf), "EX032%1d;", ant);
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "OM;") == 0)
{
// KPA3 SNPRINTF(buf, sizeof(buf), "OM AP----L-----;");
// K4+KPA3
SNPRINTF(buf, sizeof(buf), "OM AP-S----4---;");
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "K2;") == 0)
{
WRITE(fd, "K20;", 4);
}
else if (strcmp(buf, "K3;") == 0)
{
WRITE(fd, "K30;", 4);
}
else if (strcmp(buf, "RVM;") == 0)
{
WRITE(fd, "RV02.37;", 8);
}
else if (strcmp(buf, "MD;") == 0)
{
SNPRINTF(buf, sizeof(buf), "MD%d;", modeA);
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "MD$;") == 0)
{
SNPRINTF(buf, sizeof(buf), "MD$%d;", modeB);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "MD", 2) == 0)
{
if (buf[2] == '$') { sscanf(buf, "MD$%d;", &modeB); }
else { sscanf(buf, "MD%d;", &modeA); }
}
else if (strcmp(buf, "FA;") == 0)
{
SNPRINTF(buf, sizeof(buf), "FA%011d;", freqA);
WRITE(fd, buf, strlen(buf));
}
else if (strcmp(buf, "FB;") == 0)
{
SNPRINTF(buf, sizeof(buf), "FB%011d;", freqB);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "FA", 2) == 0)
{
sscanf(buf, "FA%d", &freqA);
}
else if (strncmp(buf, "FB", 2) == 0)
{
sscanf(buf, "FB%d", &freqB);
}
else if (strncmp(buf, "FR;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "FR0;");
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "FR", 2) == 0)
{
// we ignore FR for the K3
}
else if (strncmp(buf, "FT;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "FT0;");
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "KS;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "KS%03d;", keyspd);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "KS", 2) == 0)
{
sscanf(buf, "KS%d", &keyspd);
}
else if (strncmp(buf, "TQ;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "TQ0;");
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "PC;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "PC0980;");
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "PA;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "PA%d;", preampA);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "PA$;", 4) == 0)
{
SNPRINTF(buf, sizeof(buf), "PA$%d;", preampB);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "PA", 2) == 0)
{
sscanf(buf, "PA%d;", &preampA);
}
else if (strncmp(buf, "PA$", 3) == 0)
{
sscanf(buf, "PA$%d;", &preampB);
}
else if (strncmp(buf, "RA;", 3) == 0)
{
SNPRINTF(buf, sizeof(buf), "RA%02d;", rxattenuatorA);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "RA$;", 4) == 0)
{
SNPRINTF(buf, sizeof(buf), "RA$%02d;", rxattenuatorA);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "RA", 2) == 0)
{
sscanf(buf, "RA%d;", &rxattenuatorB);
}
else if (strncmp(buf, "RA$", 3) == 0)
{
sscanf(buf, "RA$%d;", &rxattenuatorB);
}
else if (strncmp(buf, "KY;", 3) == 0)
{
int status = 0;
printf("KY query\n");
SNPRINTF(buf, sizeof(buf), "KY%d;", status);
WRITE(fd, buf, strlen(buf));
}
else if (strncmp(buf, "KY", 2) == 0)
{
printf("Morse: %s\n", buf);
}
else if (strlen(buf) > 0)
{
fprintf(stderr, "Unknown command: %s\n", buf);
}
}
return 0;
}

Wyświetl plik

@ -129,7 +129,11 @@ again:
case 0xF5: printf("FREQ\n"); break;
case 0x81: printf("VFO TOGGLE\n"); break;
case 0x81:
rx_vfo = rx_vfo == 0? 1: 0;
printf("VFO TOGGLE to %dE\n", rx_vfo);
break;
case 0x02: printf("SPLIT ON\n"); break;
@ -147,7 +151,14 @@ again:
case 0xE7: printf("READ RX STATUS\n"); break;
case 0xF7: printf("READ TX STATUS\n"); break;
case 0xF7:
printf("READ TX STATUS\n");
buf[0] = 0x01;
buf[1] = 0x40;
buf[2] = 0x74;
buf[3] = 0x00;
buf[4] = 0x03; n = write(fd, buf, 5);
break;
case 0x03:
printf("READ RX STATUS\n");

Wyświetl plik

@ -28,7 +28,7 @@ struct ip_mreq
#define BUFSIZE 256
#define X25
//#define X25
int civ_731_mode = 0;
vfo_t current_vfo = RIG_VFO_A;

Wyświetl plik

@ -999,10 +999,10 @@ int HAMLIB_API rig_open(RIG *rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: cwd=%s\n", __func__, cwd);
char *path = calloc(1, 4096);
extern char *settings_file;
extern char settings_file[4096];
const char *xdgpath = getenv("XDG_CONFIG_HOME");
settings_file = "hamlib_settings";
strcpy(settings_file,"hamlib_settings");
if (xdgpath)
{

Wyświetl plik

@ -101,7 +101,7 @@ extern int read_history();
#define ARG_OUT (ARG_OUT1|ARG_OUT2|ARG_OUT3|ARG_OUT4|ARG_OUT5)
static int chk_vfo_executed;
char rigctld_password[64];
char rigctld_password[65];
int is_passwordOK;
int is_rigctld;
extern int lock_mode; // used by rigctld
@ -1175,12 +1175,14 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
if (!input_line)
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
/* Q or q to quit */
if (!(strncasecmp(input_line, "q", 1)))
{
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
@ -1189,12 +1191,14 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
{
usage_rig(fout);
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
/* '#' for comment */
if (!(strncmp(input_line, "#", 1)))
{
free(rp_hist_buf);
return (RIG_OK);
}
@ -1203,6 +1207,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
{
fprintf(fout, "? for help, q to quit.\n");
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
@ -1227,6 +1232,7 @@ readline_repeat:
{
/* Oops! Invoke GDB!! */
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
@ -1286,6 +1292,7 @@ readline_repeat:
{
fprintf(stderr,
"Valid multiple character command names contain alphanumeric characters plus '_'\n");
free(rp_hist_buf);
return (RIG_OK);
}
}
@ -1295,12 +1302,14 @@ readline_repeat:
/* Single '\' entered, prompt again */
else if ((*parsed_input[0] == '\\') && (strlen(parsed_input[0]) == 1))
{
free(rp_hist_buf);
return (RIG_OK);
}
/* Multiple characters but no leading '\' */
else
{
fprintf(stderr, "Precede multiple character command names with '\\'\n");
free(rp_hist_buf);
return (RIG_OK);
}
@ -1317,6 +1326,7 @@ readline_repeat:
fprintf(stderr, "Command '%c' not found!\n", cmd);
}
free(rp_hist_buf);
return (RIG_OK);
}
@ -1342,6 +1352,7 @@ readline_repeat:
if (!input_line)
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
@ -1350,6 +1361,7 @@ readline_repeat:
{
fprintf(fout, "? for help, q to quit.\n");
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
@ -1365,6 +1377,7 @@ readline_repeat:
else
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
}
@ -1444,6 +1457,7 @@ readline_repeat:
{
fprintf(fout, "? for help, q to quit.\n");
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
@ -1454,6 +1468,7 @@ readline_repeat:
else
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
}
@ -1506,6 +1521,7 @@ readline_repeat:
{
fprintf(fout, "? for help, q to quit.\n");
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
@ -1518,6 +1534,7 @@ readline_repeat:
else
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
}
@ -1572,6 +1589,7 @@ readline_repeat:
{
fprintf(fout, "? for help, q to quit.\n");
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
@ -1584,6 +1602,7 @@ readline_repeat:
else
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
}
@ -1638,6 +1657,7 @@ readline_repeat:
{
fprintf(fout, "? for help, q to quit.\n");
fflush(fout);
free(rp_hist_buf);
return (RIG_OK);
}
@ -1650,6 +1670,7 @@ readline_repeat:
else
{
fprintf_flush(fout, "\n");
free(rp_hist_buf);
return (RIGCTL_PARSE_END);
}
}

Wyświetl plik

@ -80,7 +80,7 @@ int main(int argc, const char *argv[])
uint64_t levels = rig_get_caps_int(my_rig->caps->rig_model,
RIG_CAPS_HAS_GET_LEVEL);
printf("HAS_GET_LEVEL=0x%8llx, SWR=%8llx,true=%d\n", levels,
printf("HAS_GET_LEVEL=0x%8lx, SWR=%8llx,true=%d\n", levels,
levels & RIG_LEVEL_SWR, (levels & RIG_LEVEL_SWR) == RIG_LEVEL_SWR);
char val[256];