Fix FT-991 Fake It failing to retrun to receive frequency

Yaesu rigs will no return from set_ptt until TX0 is achieved
Restrict 300ms wait just to FTDX3000 due to antenna switching
This speeds up set_ptt off for other Yaeus rigs
https://github.com/Hamlib/Hamlib/issues/1326
pull/1330/head^2
Mike Black W9MDB 2023-07-02 17:50:38 -05:00
rodzic 58e5e260a5
commit ad1e63efa1
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -1943,6 +1943,7 @@ int newcat_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
if (rig->state.current_mode != RIG_MODE_CW
&& rig->state.current_mode != RIG_MODE_CWR
&& rig->state.current_mode != RIG_MODE_CWN
&& (is_ftdx3000 || is_ftdx3000dm)
)
{
// DX3000 with seperate rx/tx antennas was failing frequency change
@ -10908,6 +10909,7 @@ int newcat_set_cmd_validate(RIG *rig)
{
int bytes;
char cmd[256]; // big enough
repeat:
rig_flush(&state->rigport); /* discard any unsolicited data */
SNPRINTF(cmd, sizeof(cmd), "%s", priv->cmd_str);
rc = write_block(&state->rigport, (unsigned char *) cmd, strlen(cmd));
@ -10942,6 +10944,7 @@ int newcat_set_cmd_validate(RIG *rig)
if (strncmp(priv->cmd_str, "TX", 2) == 0
&& strncmp(priv->ret_data, "TX", 2) == 0)
{
if (strstr(priv->ret_data,"TX2")) goto repeat;
// TX command does not echo what's sent so we just check the basic command
RETURNFUNC(RIG_OK);
}

Wyświetl plik

@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
#define NEWCAT_VER "20230531"
#define NEWCAT_VER "20230702"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129