Change powerstat to wait for get_freq as this is generic to all

pull/97/head
Michael Black 2019-03-27 14:25:46 -05:00
rodzic aa055a23be
commit fbdc494c5b
2 zmienionych plików z 7 dodań i 6 usunięć

Wyświetl plik

@ -3299,8 +3299,9 @@ int icom_set_powerstat(RIG *rig, powerstat_t status)
if (status==RIG_POWER_ON) { // wait for wakeup only
for(i=0;i<15;++i) { // up to 15 seconds
sleep(1);
powerstat_t status;
retval = rig_get_powerstat(rig, &status);
freq_t freq = 0;
// Use get_freq as all rigs should repond to this
retval = rig_get_freq(rig, RIG_VFO_A, &freq);
if (retval == RIG_OK) return retval;
rig_debug(RIG_DEBUG_TRACE,"%s: Wait %d of 15 for get_powerstat\n",__func__,i+1);
}

Wyświetl plik

@ -2802,14 +2802,14 @@ int kenwood_set_powerstat(RIG *rig, powerstat_t status)
if (status==RIG_POWER_ON) { // wait for wakeup only
for(i=0;i<15;++i) { // up to 15 seconds
sleep(1);
powerstat_t status;
retval = kenwood_get_powerstat(rig, &status);
freq_t freq;
retval = rig_get_freq(rig, RIG_VFO_A, &freq);
if (retval == RIG_OK) return retval;
rig_debug(RIG_DEBUG_TRACE,"%s: Wait %d of 15 for get_powerstat\n",__func__,i+1);
rig_debug(RIG_DEBUG_TRACE,"%s: Wait %d of 15 for power up\n",__func__,i+1);
}
}
if (i==15) {
rig_debug(RIG_DEBUG_TRACE,"%s: Wait for get_powerstat\n",__func__,i+1);
rig_debug(RIG_DEBUG_TRACE,"%s: timeout waiting for powerup\n",__func__,i+1);
retval = -RIG_ETIMEOUT;
}
return retval;