Improve Yaesu poweron detection speed in default condition of already powered on

https://github.com/Hamlib/Hamlib/issues/1282
pull/1289/head^2
Mike Black W9MDB 2023-05-10 17:24:41 -05:00
rodzic e9cc1881dc
commit 131f8443a3
2 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -3633,11 +3633,18 @@ int newcat_get_powerstat(RIG *rig, powerstat_t *status)
// when not powered on need a dummy byte to wake it up
// then sleep from 1 to 2 seconds so we'll do 1.5 secs
write_block(&state->rigport, (unsigned char *) "PS;", 3);
hl_usleep(1200000);
// write_block(&state->rigport, (unsigned char *) "PS;", 3);
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", command, cat_term);
newcat_get_cmd(rig); // don't care about the return
if (priv->ret_data[2] == '1')
{
*status = 1;
return RIG_OK;
}
hl_usleep(1200000); // then we must be waking up
rig_flush(&rig->state.rigport); /* discard any unsolicited data */
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", command, cat_term);
/* Get Power status */
if (RIG_OK != (err = newcat_get_cmd(rig)))

Wyświetl plik

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