From df2aa87a19b9d9dd9581a9f11f94f5ec444891d5 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 8 Jan 2023 16:48:35 -0600 Subject: [PATCH] Close rig on set_powerstat 0 -- Linux was unable to reconnect to IC-7300 https://github.com/Hamlib/Hamlib/issues/1212 --- NEWS | 1 + src/rig.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 6c17f323f..dec67ca59 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,7 @@ Version 4.6 Version 4.5.4 * 2023-XX-XX + * Fix set_powerstat 0 to reopen with IC-7300 (and others?) on Linux * Fix FT-710 usage on 60M * Fix timing on NRD-535D * Fix AGC levels with rigctld diff --git a/src/rig.c b/src/rig.c index be9ca6d6f..5b872eaa4 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6010,6 +6010,9 @@ int HAMLIB_API rig_set_powerstat(RIG *rig, powerstat_t status) HAMLIB_TRACE; retcode = rig->caps->set_powerstat(rig, status); rig_flush(&rig->state.rigport); // if anything is queued up flush it + + if (status == RIG_POWER_OFF) { rig_close(rig); } + RETURNFUNC(retcode); }