Merge branch 'master' into upstream-817

pull/1590/head
chrbayer84 2024-07-29 11:57:27 -04:00 zatwierdzone przez GitHub
commit 1a37c569fa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
4 zmienionych plików z 21 dodań i 9 usunięć

Wyświetl plik

@ -2256,7 +2256,7 @@ static int icom_get_mode_x26(RIG *rig, vfo_t vfo, int *mode_len,
const struct icom_priv_caps *priv_caps = rig->caps->priv; const struct icom_priv_caps *priv_caps = rig->caps->priv;
int retval; int retval;
if (priv->x26cmdfails != 0 && priv_caps->x25x26_always==0) if (priv->x26cmdfails > 0 && priv_caps->x25x26_always==0)
{ {
rig_debug(RIG_DEBUG_WARN, "%s: x26cmdfails=%d, x25x26_always=%d\n", __func__, priv->x26cmdfails, priv_caps->x25x26_always); rig_debug(RIG_DEBUG_WARN, "%s: x26cmdfails=%d, x25x26_always=%d\n", __func__, priv->x26cmdfails, priv_caps->x25x26_always);
return -RIG_ENAVAIL; return -RIG_ENAVAIL;

Wyświetl plik

@ -35,7 +35,7 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#define BACKEND_VER "20240725" #define BACKEND_VER "20240726"
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)

Wyświetl plik

@ -310,7 +310,7 @@ struct rig_caps ft817_caps =
RIG_MODEL(RIG_MODEL_FT817), RIG_MODEL(RIG_MODEL_FT817),
.model_name = "FT-817", .model_name = "FT-817",
.mfg_name = "Yaesu", .mfg_name = "Yaesu",
.version = "20240728.1", .version = "20240728.3",
.copyright = "LGPL", .copyright = "LGPL",
.status = RIG_STATUS_STABLE, .status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER, .rig_type = RIG_TYPE_TRANSCEIVER,
@ -1202,6 +1202,7 @@ static int ft817_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
*ptt = p->tx_status != 0xff; *ptt = p->tx_status != 0xff;
return RIG_OK; return RIG_OK;
} }
@ -1234,6 +1235,7 @@ static int ft817_get_tx_level(RIG *rig, value_t *val, unsigned char *tx_level,
if (ptt == RIG_PTT_OFF) if (ptt == RIG_PTT_OFF)
{ {
val->f = p->swr; val->f = p->swr;
return RIG_OK; return RIG_OK;
} }
@ -1247,6 +1249,7 @@ static int ft817_get_tx_level(RIG *rig, value_t *val, unsigned char *tx_level,
} }
p->swr = val->f = rig_raw2val_float(*tx_level, cal); p->swr = val->f = rig_raw2val_float(*tx_level, cal);
rig_debug(RIG_DEBUG_VERBOSE, "%s: level %f\n", __func__, val->f); rig_debug(RIG_DEBUG_VERBOSE, "%s: level %f\n", __func__, val->f);
return RIG_OK; return RIG_OK;

Wyświetl plik

@ -25,6 +25,7 @@ struct ip_mreq
#include <termios.h> #include <termios.h>
#include <unistd.h> #include <unistd.h>
#undef ECHO
#define BUFSIZE 256 #define BUFSIZE 256
#define X25 #define X25
@ -61,7 +62,7 @@ void dumphex(const unsigned char *buf, int n)
int int
frameGet(int fd, unsigned char *buf) frameGet(int fd, unsigned char *buf)
{ {
int i = 0, n; int i = 0;
memset(buf, 0, BUFSIZE); memset(buf, 0, BUFSIZE);
unsigned char c; unsigned char c;
@ -77,10 +78,10 @@ again:
char mytime[256]; char mytime[256];
date_strget(mytime, sizeof(mytime), 1); date_strget(mytime, sizeof(mytime), 1);
printf("%s:", mytime); dumphex(buf, i); printf("%s:", mytime); dumphex(buf, i);
#ifdef ECHO
// echo // echo
n = write(fd, buf, i); n = write(fd, buf, i);
#endif
if (n != i) { printf("%s: error on write: %s\n", __func__, strerror(errno)); }
return i; return i;
} }
@ -146,6 +147,13 @@ void frameParse(int fd, unsigned char *frame, int len)
if (powerstat) if (powerstat)
{ {
unsigned char frame2[11];
memcpy(frame2,frame,11);
frame2[2] = 0xe1;
frame2[3] = 0x88;
dump_hex(frame2,11);
n = write(fd, frame2, 11);
dump_hex(frame,11);
n = write(fd, frame, 11); n = write(fd, frame, 11);
} }
@ -223,8 +231,9 @@ void frameParse(int fd, unsigned char *frame, int len)
if (frame[5] == 0xfd) if (frame[5] == 0xfd)
{ {
printf("get split %d\n", 1); printf("get split %d\n", 1);
frame[7] = 0xfd; frame[5] = split;
n = write(fd, frame, 8); frame[6] = 0xfd;
n = write(fd, frame, 7);
} }
else else
{ {