From cee10db2cd81b6afcb35ff395216c3a02f209e42 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Wed, 22 Dec 2021 08:22:24 -0600 Subject: [PATCH] Ensure power on 0xfe's are flushed for Icom rigs https://github.com/Hamlib/Hamlib/issues/900 --- rigs/icom/icom.c | 2 ++ rigs/icom/icom.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index cb93e631e..ac7b0484f 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -7762,6 +7762,8 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) memset(fe_buf, 0xfe, fe_max); // sending more than enough 0xfe's to wake up the rs232 write_block(&rs->rigport, fe_buf, fe_max); + hl_usleep(200*1000); // short sleep + rig_flush(&rs->rigport); // flush any echo of 0xFE // we'll try 0x18 0x01 now -- should work on STBY rigs too pwr_sc = S_PWR_ON; diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 5b7d48d99..7adef4724 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include #endif -#define BACKEND_VER "20211214" +#define BACKEND_VER "20211222" #define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B)) #define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)