kopia lustrzana https://github.com/Hamlib/Hamlib
Allow rigctl/rigctld to timeout faster on startup
https://github.com/Hamlib/Hamlib/issues/1087pull/1091/head
rodzic
67248edfb8
commit
f4f7bc9081
21
src/rig.c
21
src/rig.c
|
@ -1316,13 +1316,22 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
|
||||
// prime the freq and mode settings
|
||||
// don't care about the return here -- if it doesn't work so be it
|
||||
int retry_save = rs->rigport.retry;
|
||||
rs->rigport.retry = rs->rigport.retry;
|
||||
freq_t freq;
|
||||
rig_get_freq(rig, RIG_VFO_A, &freq);
|
||||
rig_get_freq(rig, RIG_VFO_B, &freq);
|
||||
rmode_t mode;
|
||||
pbwidth_t width;
|
||||
rig_get_mode(rig, RIG_VFO_A, &mode, &width);
|
||||
rig_get_mode(rig, RIG_VFO_B, &mode, &width);
|
||||
if (rig->caps->get_freq)
|
||||
{
|
||||
int retval = rig_get_freq(rig, RIG_VFO_A, &freq);
|
||||
if (retval == RIG_OK)
|
||||
{
|
||||
rig_get_freq(rig, RIG_VFO_B, &freq);
|
||||
rmode_t mode;
|
||||
pbwidth_t width;
|
||||
rig_get_mode(rig, RIG_VFO_A, &mode, &width);
|
||||
rig_get_mode(rig, RIG_VFO_B, &mode, &width);
|
||||
}
|
||||
}
|
||||
rs->rigport.retry = retry_save;
|
||||
|
||||
memcpy(&rs->rigport_deprecated, &rs->rigport, sizeof(hamlib_port_t_deprecated));
|
||||
memcpy(&rs->pttport_deprecated, &rs->pttport, sizeof(hamlib_port_t_deprecated));
|
||||
|
|
|
@ -1245,6 +1245,7 @@ void *handle_socket(void *arg)
|
|||
{
|
||||
rig_get_powerstat(my_rig, &powerstat);
|
||||
rig_powerstat = powerstat;
|
||||
if (powerstat == RIG_POWER_OFF) retcode = -RIG_EPOWER;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Ładowanie…
Reference in New Issue