Fix KY message length

Add "AC" recognition with "AC;" validation
pull/1476/head
Mike Black W9MDB 2024-01-13 06:36:59 -06:00
rodzic 32ed2c4d91
commit 8280748ace
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -7228,7 +7228,7 @@ int newcat_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{ {
if (strlen(msg2) > 50) if (strlen(msg2) > 50)
{ {
msg2[50] = 0; // truncate if too long msg2[51] = 0; // truncate if too long
rig_debug(RIG_DEBUG_ERR, "%s: msg length of %d truncated to 50\n", __func__, rig_debug(RIG_DEBUG_ERR, "%s: msg length of %d truncated to 50\n", __func__,
(int)strlen(msg)); (int)strlen(msg));
} }
@ -11266,6 +11266,10 @@ int newcat_set_cmd_validate(RIG *rig)
{ {
strcpy(valcmd, "PC;"); strcpy(valcmd, "PC;");
} }
else if (strncmp(priv->cmd_str, "AC", 2) == 0)
{
strcpy(valcmd, "");
}
else else
{ {
rig_debug(RIG_DEBUG_TRACE, "%s: %s not implemented\n", __func__, priv->cmd_str); rig_debug(RIG_DEBUG_TRACE, "%s: %s not implemented\n", __func__, priv->cmd_str);

Wyświetl plik

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