From a4cd6deb9ddcbbf3f259a52937c0b2e1d094009a Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 31 Mar 2024 12:21:55 -0500 Subject: [PATCH] Update simic7000.c --- simulators/simic7000.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/simulators/simic7000.c b/simulators/simic7000.c index 6f4b3ccc0..61808432e 100644 --- a/simulators/simic7000.c +++ b/simulators/simic7000.c @@ -132,6 +132,8 @@ void frameParse(int fd, unsigned char *frame, int len) { case 0x03: + if (frame[5] != 0xfd) + { //from_bcd(frameackbuf[2], (civ_731_mode ? 4 : 5) * 2); if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { @@ -149,6 +151,18 @@ void frameParse(int fd, unsigned char *frame, int len) if (powerstat) { n = write(fd, frame, 11); + dump_hex(frame, 11); + } + else + { + if (current_vfo==RIG_VFO_A) + freqA = from_bcd(&frame[5], (civ_731_mode ? 4 : 5) * 2); + else + freqB = from_bcd(&frame[5], (civ_731_mode ? 4 : 5) * 2); + frame[4] = 0xfb; + frame[5] = 0xfd; + n = write(fd, frame, 6); + } } break; @@ -410,8 +424,8 @@ void frameParse(int fd, unsigned char *frame, int len) { printf("0x05 0x00 0x92 received\n"); transceive = frame[8]; - frame[6] = 0xfb; - frame[7] = 0xfd; + frame[4] = 0xfb; + frame[5] = 0xfd; n = write(fd, frame, 8); } else