pull/1024/head
Mike Black W9MDB 2022-05-08 06:37:32 -05:00
commit 1dd915a706
4 zmienionych plików z 39 dodań i 12 usunięć

Wyświetl plik

@ -3274,9 +3274,10 @@ rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
extern HAMLIB_EXPORT(void)add2debugmsgsave(const char *s);
// this need to be fairly big to avoid compiler warnings
#define DEBUGMSGSAVE_SIZE 16512
#define DEBUGMSGSAVE_SIZE 24000
extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg
extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg
// debugmsgsave3 is deprecated
extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg
#ifndef __cplusplus
#ifdef __GNUC__

Wyświetl plik

@ -522,11 +522,12 @@ int elecraft_get_vfo_tq(RIG *rig, vfo_t *vfo)
rig_debug(RIG_DEBUG_ERR, "%s: unable to parse TQ '%s'\n", __func__, splitbuf);
}
*vfo = RIG_VFO_A;
*vfo = rig->state.tx_vfo = RIG_VFO_A;
if (tq && ft == 1) { *vfo = RIG_VFO_B; }
if (tq && ft == 1) { *vfo = rig->state.tx_vfo = RIG_VFO_B; }
else if (tq && ft == 0) { *vfo = rig->state.tx_vfo = RIG_VFO_A; }
if (!tq && fr == 1) { *vfo = RIG_VFO_B; }
if (!tq && fr == 1) { *vfo = rig->state.rx_vfo = rig->state.tx_vfo = RIG_VFO_B; }
RETURNFUNC2(RIG_OK);
}

Wyświetl plik

@ -488,7 +488,7 @@ const struct rig_caps k4_caps =
RIG_MODEL(RIG_MODEL_K4),
.model_name = "K4",
.mfg_name = "Elecraft",
.version = BACKEND_VER ".22",
.version = BACKEND_VER ".23",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -2753,7 +2753,7 @@ int k4_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
}
}
// had one report of Fake It not returning to RX freq after TX -- so a little more time for the K4
if (ptt = RIG_PTT_OFF) hl_usleep(100 * 1000);
if (ptt == RIG_PTT_OFF) hl_usleep(100 * 1000);
return RIG_OK;
}

Wyświetl plik

@ -19,6 +19,7 @@ char modeA='1';
char modeB='1';
int width=0;
int ptt;
int power=1;
// ID 0310 == 310, Must drop leading zero
typedef enum nc_rigid_e
@ -115,7 +116,21 @@ int main(int argc, char *argv[])
}
else { return 0; }
if (strcmp(buf, "RM5;") == 0)
if (buf[0] == 0x0a)
{
continue;
}
if (strcmp(buf, "PS;") == 0)
{
sprintf(resp, "PS%d;", power);
n = write(fd, resp, strlen(resp));
if (n <= 0) { perror("PS"); }
}
else if (strncmp(buf, "PS", 2) == 0)
{
sscanf(buf,"PS%d", &power);
}
else if (strcmp(buf, "RM5;") == 0)
{
printf("%s\n", buf);
usleep(50 * 1000);
@ -125,18 +140,28 @@ int main(int argc, char *argv[])
if (n <= 0) { perror("RM5"); }
}
if (strcmp(buf, "RM9;") == 0)
else if (strcmp(buf, "RM8;") == 0)
{
printf("%s\n", buf);
usleep(50 * 1000);
pbuf = "RM5100000;";
pbuf = "RM8197000;";
n = write(fd, pbuf, strlen(pbuf));
//printf("n=%d\n", n);
if (n <= 0) { perror("RM5"); }
if (n <= 0) { perror("RM8"); }
}
else if (strcmp(buf, "RM9;") == 0)
{
printf("%s\n", buf);
usleep(50 * 1000);
pbuf = "RM9089000;";
n = write(fd, pbuf, strlen(pbuf));
//printf("n=%d\n", n);
if (n <= 0) { perror("RM9"); }
}
if (strcmp(buf, "AN0;") == 0)
else if (strcmp(buf, "AN0;") == 0)
{
printf("%s\n", buf);
usleep(50 * 1000);
@ -342,7 +367,7 @@ int main(int argc, char *argv[])
else if (strlen(buf) > 0)
{
fprintf(stderr, "Unknown command: %s\n", buf);
fprintf(stderr, "Unknown command: '%s'\n", buf);
}
}