Fix other rotators that try to do I/O before open.

Get rid of possible infinite recursion.
This commit is contained in:
George Baltz N3GB 2024-06-14 16:19:48 -04:00
parent 81a8745fca
commit d1520aa166
3 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -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++)
{

View File

@ -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)