Allow Icom rigs to skip packets that do not match the cmd/subcmd sent.

This should allow some sharing between controllers
pull/1584/head
Mike Black W9MDB 2024-07-07 12:53:22 -05:00
rodzic 6ed7cfe73d
commit 5814f745b9
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -211,6 +211,16 @@ again1:
icom_process_async_frame(rig, frm_len, buf);
goto again1;
}
// if we get a reply that is not our cmd/subcmd we should just ignore it and retry the read.
// this should somewhat allow splitting the COM port between two controllers
if (cmd != buf[4]) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd x%02d != buf x%02x so retry read\n", __func__, cmd, buf[4]);
goto again1;
}
if (subcmd != -1 && subcmd != buf[5]) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: subcmd x%02d != buf x%02x so retry read\n", __func__, subcmd, buf[5]);
goto again1;
}
// we might have 0xfe string during rig wakeup
rig_debug(RIG_DEBUG_TRACE, "%s: DEBUG retval=%d, frm_len=%d, cmd=0x%02x\n",

Wyświetl plik

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