mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Fix other rotators that try to do I/O before open.
Get rid of possible infinite recursion.
This commit is contained in:
parent
81a8745fca
commit
d1520aa166
@ -29,6 +29,7 @@
|
||||
#include "serial.h"
|
||||
#include "register.h"
|
||||
#include "idx_builtin.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include "easycomm.h"
|
||||
|
||||
@ -508,6 +509,11 @@ static int easycomm_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: cmdstr = %s, *val = %c\n", __func__, cmdstr,
|
||||
*val);
|
||||
|
||||
if (!ROTSTATE(rot)->comm_state)
|
||||
{
|
||||
return queue_deferred_config(&ROTSTATE(rot)->config_queue, token, val);
|
||||
}
|
||||
|
||||
retval = easycomm_transaction(rot, cmdstr, NULL, 0);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/rig.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include "serial.h"
|
||||
#include "token.h"
|
||||
@ -419,6 +420,11 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val)
|
||||
char req[RSIZE] = {0};
|
||||
char rsp[RSIZE];
|
||||
|
||||
if (!ROTSTATE(rot)->comm_state)
|
||||
{
|
||||
return queue_deferred_config(&ROTSTATE(rot)->config_queue, token, val);
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
|
||||
|
@ -493,9 +493,6 @@ const struct rot_caps meade_caps =
|
||||
.move = meade_move,
|
||||
|
||||
.get_info = meade_get_info,
|
||||
|
||||
.get_conf = rot_get_conf,
|
||||
.set_conf = rot_set_conf,
|
||||
};
|
||||
|
||||
DECLARE_INITROT_BACKEND(meade)
|
||||
|
Loading…
Reference in New Issue
Block a user