Fix SH command for FT-450

Comment out on/off flag for future possibilities
CAT manual doesn't match what rig is returning...7 bytes vs 6 in the manual
https://github.com/Hamlib/Hamlib/issues/469
pull/474/head
Michael Black W9MDB 2020-12-17 23:57:25 -06:00
rodzic b263ea1697
commit f43e190e07
2 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -7675,8 +7675,14 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
if (strlen(priv->ret_data) == 7) if (strlen(priv->ret_data) == 7)
{ {
int on; int on;
int n = sscanf(priv->ret_data, "SH0%1d%3d", &on, &w); // do we need to pay attention to the Main/Sub here?
int n = sscanf(priv->ret_data, "SH%*1d%1d%3d", &on, &w);
if (n != 2)
{
err = -RIG_EPROTO;
}
#if 0 // this may apply to another Yaesu rig
if (n == 2) if (n == 2)
{ {
if (!on) { w = 0; } if (!on) { w = 0; }
@ -7685,6 +7691,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{ {
err = -RIG_EPROTO; err = -RIG_EPROTO;
} }
#endif
} }
else if (strlen(priv->ret_data) == 6) else if (strlen(priv->ret_data) == 6)
{ {

Wyświetl plik

@ -50,7 +50,7 @@
typedef char ncboolean; typedef char ncboolean;
/* shared function version */ /* shared function version */
#define NEWCAT_VER "20201216" #define NEWCAT_VER "20201217"
/* 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