kopia lustrzana https://github.com/Hamlib/Hamlib
Force the FT-991 to 100ms along with FT-DX2000, Ft-891, FT950, FTDX3000/D
10ms was seeing timeouts on some rigs using rigctl https://github.com/Hamlib/Hamlib/issues/1163pull/1173/head^2
rodzic
20caf608ac
commit
1e1ed4c9e6
|
@ -587,24 +587,28 @@ int newcat_open(RIG *rig)
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_id=%d\n", __func__, priv->rig_id);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_id=%d\n", __func__, priv->rig_id);
|
||||||
rig->state.rigport.timeout = timeout;
|
rig->state.rigport.timeout = timeout;
|
||||||
|
|
||||||
#if 0 // possible future enhancement?
|
|
||||||
|
|
||||||
// some rigs have a CAT TOT timeout that defaults to 10ms
|
// some rigs have a CAT TOT timeout that defaults to 10ms
|
||||||
// so we'll increase CAT timeout to 100ms
|
// so we'll increase CAT timeout to 100ms
|
||||||
|
// 10ms seemed problematic on some rigs/computers
|
||||||
if (priv->rig_id == NC_RIGID_FT2000
|
if (priv->rig_id == NC_RIGID_FT2000
|
||||||
|| priv->rig_id == NC_RIGID_FT2000D
|
|| priv->rig_id == NC_RIGID_FT2000D
|
||||||
|| priv->rig_id == NC_RIGID_FT891
|
|| priv->rig_id == NC_RIGID_FT891
|
||||||
|| priv->rig_id == NC_RIGID_FT991
|
|| priv->rig_id == NC_RIGID_FT991
|
||||||
|| priv->rig_id == NC_RIGID_FT950)
|
|| priv->rig_id == NC_RIGID_FT950
|
||||||
|
|| priv->rig_id == NC_RIGID_FTDX3000
|
||||||
|
|| priv->rig_id == NC_RIGID_FTDX3000DM)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
char *cmd = "EX0291%c";
|
char *cmd = "EX0291;EX029;"; // FT2000/D
|
||||||
|
|
||||||
if (priv->rig_id == NC_RIGID_FT950) { cmd = "EX0271%c"; }
|
if (priv->rig_id == NC_RIGID_FT950) { cmd = "EX0271;EX027;"; }
|
||||||
else if (priv->rig_id == NC_RIGID_FT891) { cmd = "EX05071c"; }
|
else if (priv->rig_id == NC_RIGID_FT891) { cmd = "EX05071;EX0507;"; }
|
||||||
else if (priv->rig_id == NC_RIGID_FT991) { cmd = "EX0321c"; }
|
else if (priv->rig_id == NC_RIGID_FT991) { cmd = "EX0321;EX032;"; }
|
||||||
|
else if (priv->rig_id == NC_RIGID_FTDX3000) { cmd = "EX0391;EX039;"; }
|
||||||
|
else if (priv->rig_id == NC_RIGID_FTDX3000DM) { cmd = "EX0391;EX039;"; }
|
||||||
|
else if (priv->rig_id == NC_RIGID_FTDX5000) { cmd = "EX0331;EX033"; }
|
||||||
|
|
||||||
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), cmd, cat_term);
|
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "%s", cmd);
|
||||||
|
|
||||||
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
||||||
{
|
{
|
||||||
|
@ -612,40 +616,12 @@ int newcat_open(RIG *rig)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (priv->rig_id == NC_RIGID_FTDX3000 || priv->rig_id == NC_RIGID_FTDX3000DM)
|
if (priv->rig_id == NC_RIGID_FTDX3000 || priv->rig_id == NC_RIGID_FTDX3000DM)
|
||||||
{
|
{
|
||||||
rig->state.disable_yaesu_bandselect = 1;
|
rig->state.disable_yaesu_bandselect = 1;
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: disabling FTDX3000 band select\n", __func__);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: disabling FTDX3000 band select\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->rig_id == NC_RIGID_FTDX5000)
|
|
||||||
{
|
|
||||||
int err;
|
|
||||||
// set the CAT TIME OUT TIMER to 100ms
|
|
||||||
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "EX0331;");
|
|
||||||
|
|
||||||
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
|
||||||
{
|
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: FTDX5000 CAT RATE error: %s\n", __func__,
|
|
||||||
rigerror(err));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->rig_id == NC_RIGID_FTDX3000 || priv->rig_id == NC_RIGID_FTDX3000DM)
|
|
||||||
{
|
|
||||||
int err;
|
|
||||||
// set the CAT TIME OUT TIMER to 100ms
|
|
||||||
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "EX0391;");
|
|
||||||
|
|
||||||
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
|
||||||
{
|
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: FTDX5000 CAT RATE error: %s\n", __func__,
|
|
||||||
rigerror(err));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10677,14 +10653,7 @@ int newcat_set_cmd_validate(RIG *rig)
|
||||||
}
|
}
|
||||||
else if (strncmp(priv->cmd_str, "EX", 2) == 0)
|
else if (strncmp(priv->cmd_str, "EX", 2) == 0)
|
||||||
{
|
{
|
||||||
char *p = strchr(priv->cmd_str, ';');
|
strcpy(valcmd, "");
|
||||||
|
|
||||||
if (p)
|
|
||||||
{
|
|
||||||
strcpy(valcmd, priv->cmd_str); // we query the same number
|
|
||||||
*p = '\0';
|
|
||||||
*(p - 1) = ';';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
typedef char ncboolean;
|
typedef char ncboolean;
|
||||||
|
|
||||||
/* shared function version */
|
/* shared function version */
|
||||||
#define NEWCAT_VER "20221201"
|
#define NEWCAT_VER "20221203"
|
||||||
|
|
||||||
/* 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
|
||||||
|
|
|
@ -216,7 +216,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
printf("%s\n", buf);
|
printf("%s\n", buf);
|
||||||
usleep(50 * 1000);
|
usleep(50 * 1000);
|
||||||
int id = NC_RIGID_FTDX3000DM;
|
int id = NC_RIGID_FT991;
|
||||||
SNPRINTF(buf, sizeof(buf), "ID%03d;", id);
|
SNPRINTF(buf, sizeof(buf), "ID%03d;", id);
|
||||||
n = write(fd, buf, strlen(buf));
|
n = write(fd, buf, strlen(buf));
|
||||||
//printf("n=%d\n", n);
|
//printf("n=%d\n", n);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include <hamlib/config.h>
|
#include <hamlib/config.h>
|
||||||
|
|
||||||
#define SERIAL_PORT "/dev/pts/2"
|
#define SERIAL_PORT "/dev/pts/4"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -77,6 +77,10 @@ int main(int argc, char *argv[])
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char val[256];
|
||||||
|
retcode = rig_get_conf2(my_rig, rig_token_lookup(my_rig, "write_delay"), val, sizeof(val));
|
||||||
|
printf("write_delay=%s\n", val);
|
||||||
|
|
||||||
// printf("Port %s opened ok\n", SERIAL_PORT);
|
// printf("Port %s opened ok\n", SERIAL_PORT);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Ładowanie…
Reference in New Issue