kopia lustrzana https://github.com/Hamlib/Hamlib
Add error message when rig is not turned on that mentions auto_power_on
rodzic
3053263c52
commit
99170c1025
|
@ -1280,7 +1280,12 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
powerstat_t powerflag;
|
||||
status = rig_get_powerstat(rig, &powerflag);
|
||||
|
||||
if (status == RIG_OK && powerflag == RIG_POWER_OFF && rig->state.auto_power_on == 0) { return (-RIG_EPOWER); }
|
||||
if (status == RIG_OK && powerflag == RIG_POWER_OFF && rig->state.auto_power_on == 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: rig power is off, use --set-conf=auto_power_on if power on is wanted\n", __func__);
|
||||
|
||||
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; }
|
||||
|
|
Ładowanie…
Reference in New Issue