From fdf1c3cdab6c931bf1d4ad6ad2ef4d2250997cb9 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 29 Apr 2023 16:13:48 -0500 Subject: [PATCH] Fix auto_power_on with netrigctl when powered off but still responding to PS; command https://github.com/Hamlib/Hamlib/issues/1282 --- src/rig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rig.c b/src/rig.c index 1c536ecee..fd04014b2 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6132,6 +6132,8 @@ int HAMLIB_API rig_get_powerstat(RIG *rig, powerstat_t *status) if (retcode != RIG_OK) { *status = RIG_POWER_ON; } // if failed assume power is on + if (*status == RIG_POWER_OFF && rig->state.auto_power_on) rig->caps->set_powerstat(rig, RIG_POWER_ON); + RETURNFUNC(retcode); }