From b9afd75110b1d8c6e7b96f3c2e12069b3f7efa2c Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sat, 6 Mar 2021 08:47:00 -0600 Subject: [PATCH] Expire cache in set_ptt before get_ptt to ensure we read the real ptt status https://github.com/Hamlib/Hamlib/issues/587 --- src/rig.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rig.c b/src/rig.c index b74f6a502..64615b13c 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2546,6 +2546,9 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) if (retcode != RIG_OK) { RETURNFUNC(retcode); } + // don't use the cached value + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_INVALIDATE); + tptt = -1; // IC-9700 is failing on get_ptt right after set_ptt in split mode retcode = rig_get_ptt(rig, vfo, &tptt);