Fix set_powerstat on/off/on for Icom rigs using rigctld power_on=0

https://github.com/Hamlib/Hamlib/issues/1212
pull/1215/head
Mike Black W9MDB 2023-01-10 08:46:10 -06:00
rodzic 00dce998ae
commit dc131cba7f
3 zmienionych plików z 8 dodań i 6 usunięć

1
NEWS
Wyświetl plik

@ -27,6 +27,7 @@ Version 4.6
Version 4.5.5
* Really fix CM108 ptt_bitnum usage
* Fix Elecraft power2mW precision/accuracy
* Fix power on/off/on for Icom rigs with rigctld power_on=0
Version 4.5.4
* 2023-XX-XX

Wyświetl plik

@ -7977,11 +7977,6 @@ 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);
// close and re-open the rig
// on linux the USB gets reset during power on
rig_close(rig);
sleep(1); // let serial bus idle for a while
rig_open(rig);
// we'll try 0x18 0x01 now -- should work on STBY rigs too
pwr_sc = S_PWR_ON;
@ -8043,6 +8038,12 @@ int icom_set_powerstat(RIG *rig, powerstat_t status)
{
rig_debug(RIG_DEBUG_TRACE, "%s: Wait failed for get_powerstat\n",
__func__);
// close and re-open the rig
// on linux the USB gets reset during power on
rig_close(rig);
sleep(1);
rig_open(rig);
retval = -RIG_ETIMEOUT;
}

Wyświetl plik

@ -31,7 +31,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20230109"
#define BACKEND_VER "20230110"
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)