Skip to content

Commit

Permalink
For Icom rigs close and reopen rig after set_powerstat=1 -- Linux res…
Browse files Browse the repository at this point in the history
…ets the usb device

#1212
  • Loading branch information
mdblack98 committed Jan 9, 2023
1 parent df2aa87 commit 5f9fc93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions rigs/icom/icom.c
Original file line number Diff line number Diff line change
Expand Up @@ -7977,6 +7977,11 @@ 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
sleep(1); // let serial bus idle for a while
rig_close(rig);
rig_open(rig);

// we'll try 0x18 0x01 now -- should work on STBY rigs too
pwr_sc = S_PWR_ON;
Expand Down
2 changes: 1 addition & 1 deletion rigs/icom/icom.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <sys/time.h>
#endif

#define BACKEND_VER "20230104"
#define BACKEND_VER "20230109"

#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)
Expand Down

0 comments on commit 5f9fc93

Please sign in to comment.