kopia lustrzana https://github.com/Hamlib/Hamlib
Clean up startup messages in newcat.c when power is off
rodzic
ccd832d4cb
commit
81dd39319b
|
@ -1579,6 +1579,11 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
||||||
{
|
{
|
||||||
RETURNFUNC(-RIG_ENAVAIL);
|
RETURNFUNC(-RIG_ENAVAIL);
|
||||||
}
|
}
|
||||||
|
if (rig->state.powerstat == 0)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_WARN, "%s: Cannot get from rig when power is off\n", __func__);
|
||||||
|
return RIG_OK; // to prevent repeats
|
||||||
|
}
|
||||||
|
|
||||||
err = newcat_set_vfo_from_alias(rig, &vfo);
|
err = newcat_set_vfo_from_alias(rig, &vfo);
|
||||||
|
|
||||||
|
@ -10449,6 +10454,11 @@ int newcat_get_vfo_mode(RIG *rig, vfo_t vfo, rmode_t *vfo_mode)
|
||||||
{
|
{
|
||||||
RETURNFUNC(err);
|
RETURNFUNC(err);
|
||||||
}
|
}
|
||||||
|
if (rig->state.powerstat == 0)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_WARN, "%s: Cannot get from rig when power is off\n", __func__);
|
||||||
|
return RIG_OK; // to prevent repeats
|
||||||
|
}
|
||||||
|
|
||||||
/* vfo, mem, P7 ************************** */
|
/* vfo, mem, P7 ************************** */
|
||||||
// e.g. FT450 has 27 byte IF response, FT991 has 28 byte if response (one more byte for P2 VFO A Freq)
|
// e.g. FT450 has 27 byte IF response, FT991 has 28 byte if response (one more byte for P2 VFO A Freq)
|
||||||
|
@ -10537,6 +10547,7 @@ int newcat_get_cmd(RIG *rig)
|
||||||
int is_power_status_cmd = strncmp(priv->cmd_str, "PS", 2) == 0;
|
int is_power_status_cmd = strncmp(priv->cmd_str, "PS", 2) == 0;
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
|
priv->ret_data[0] = 0; // ensure zero-length ret_data by default
|
||||||
|
|
||||||
if (state->powerstat == 0 && !is_power_status_cmd)
|
if (state->powerstat == 0 && !is_power_status_cmd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
typedef char ncboolean;
|
typedef char ncboolean;
|
||||||
|
|
||||||
/* shared function version */
|
/* shared function version */
|
||||||
#define NEWCAT_VER "20230517"
|
#define NEWCAT_VER "20230526"
|
||||||
|
|
||||||
/* 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
|
||||||
|
|
Ładowanie…
Reference in New Issue