Icom async packets now work when ci-v echo is on.

async packets are handled individually and not flushed anymore
pull/1523/head
Mike Black W9MDB 2024-03-01 16:41:44 -06:00
rodzic bb9b1f1783
commit 7831dfc311
1 zmienionych plików z 10 dodań i 7 usunięć

Wyświetl plik

@ -33,6 +33,7 @@
#include "icom.h"
#include "icom_defs.h"
#include "frame.h"
#include "cache.h"
/*
* Build a CI-V frame.
@ -159,7 +160,7 @@ int icom_one_transaction(RIG *rig, unsigned char cmd, int subcmd,
set_transaction_active(rig);
collision_retry:
rig_flush(rp);
//rig_flush(rp);
if (data_len) { *data_len = 0; }
@ -206,15 +207,16 @@ again1:
RETURNFUNC(-RIG_EPROTO);
}
if (icom_is_async_frame(rig, frm_len, buf))
{
icom_process_async_frame(rig, frm_len, buf);
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",
__func__, retval, frm_len, cmd);
if (buf[1] == 0x00) // then this is a transceive frame so ignore it
{
goto again1;
}
if (retval != frm_len && cmd == C_SET_PWR)
{
rig_debug(RIG_DEBUG_TRACE, "%s: removing 0xfe power up echo, len=%d", __func__,
@ -304,8 +306,9 @@ again2:
priv->serial_USB_echo_off = 0;
}
if (buf[1] == 0x00) // then it's a transceive frame so ignore it
if (icom_is_async_frame(rig, frm_len, buf))
{
icom_process_async_frame(rig, frm_len, buf);
goto again2;
}