Fix bogus sscanf in kpa_get_powerstat -- function would not work

pull/788/head
Mike Black W9MDB 2021-09-01 09:11:00 -05:00
rodzic acac64c116
commit 7a5834a9a3
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -505,7 +505,7 @@ int kpa_get_powerstat(AMP *amp, powerstat_t *status)
int retval;
int operate;
int ampon;
int nargs = sscanf(responsebuf, "^ON%d", &ampon);
int nargs;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@ -518,6 +518,8 @@ int kpa_get_powerstat(AMP *amp, powerstat_t *status)
if (retval != RIG_OK) { return retval; }
nargs = sscanf(responsebuf, "^ON%d", &ampon);
if (nargs != 1)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s Error: ^ON response='%s'\n", __func__,

Wyświetl plik

@ -65,7 +65,7 @@ const struct amp_caps kpa1500_amp_caps =
AMP_MODEL(AMP_MODEL_ELECRAFT_KPA1500),
.model_name = "KPA1500",
.mfg_name = "Elecraft",
.version = "20200112.0",
.version = "20210901.0",
.copyright = "LGPL",
.status = RIG_STATUS_ALPHA,
.amp_type = AMP_TYPE_OTHER,