Fix auto_power_on from rigctl invocation with --set-conf=auto_power_on=1

https://github.com/Hamlib/Hamlib/issues/1220
pull/1265/head
Mike Black W9MDB 2023-03-28 10:43:07 -05:00
rodzic 79db09c201
commit 403ec07b6b
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1280,7 +1280,7 @@ int HAMLIB_API rig_open(RIG *rig)
powerstat_t powerflag;
status = rig_get_powerstat(rig, &powerflag);
if (status == RIG_OK && powerflag == RIG_POWER_OFF) { return (-RIG_EPOWER); }
if (status == RIG_OK && powerflag == RIG_POWER_OFF && rig->state.auto_power_on == 0) { return (-RIG_EPOWER); }
// don't need auto_power_on if power is already on
if (status == RIG_OK && powerflag == RIG_POWER_ON) { rig->state.auto_power_on = 0; }