kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warnings in rc2800.c
rodzic
0683c199bf
commit
98d7e1b285
13
m2/rc2800.c
13
m2/rc2800.c
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
static int rc2800_parse(char *s, char *device, float *value)
|
static int rc2800_parse(char *s, char *device, float *value)
|
||||||
{
|
{
|
||||||
int i, msgtype = 0, errcode = 0;
|
int msgtype = 0, errcode = 0;
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: device return->%s", __func__, s);
|
rig_debug(RIG_DEBUG_TRACE, "%s: device return->%s", __func__, s);
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ static int rc2800_parse(char *s, char *device, float *value)
|
||||||
{
|
{
|
||||||
if (*s == 'A' || *s == 'E')
|
if (*s == 'A' || *s == 'E')
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
*device = *s;
|
*device = *s;
|
||||||
|
|
||||||
if (!strncmp(s + 2, "ERR=", 4))
|
if (!strncmp(s + 2, "ERR=", 4))
|
||||||
|
@ -324,15 +325,25 @@ rc2800_rot_stop(ROT *rot)
|
||||||
|
|
||||||
/* Stop AZ*/
|
/* Stop AZ*/
|
||||||
retval = rc2800_transaction(rot, "A" CR, NULL, 0); /* select AZ */
|
retval = rc2800_transaction(rot, "A" CR, NULL, 0); /* select AZ */
|
||||||
|
|
||||||
|
if (retval != RIG_OK) { rig_debug(RIG_DEBUG_VERBOSE, "%s: A command failed?\n", __func__); }
|
||||||
|
|
||||||
retval = rc2800_transaction(rot, "S" CR, NULL, 0); /* STOP */
|
retval = rc2800_transaction(rot, "S" CR, NULL, 0); /* STOP */
|
||||||
|
|
||||||
|
if (retval != RIG_OK) { rig_debug(RIG_DEBUG_VERBOSE, "%s: az S command failed?\n", __func__); }
|
||||||
|
|
||||||
/* do not overwhelm the MCU? */
|
/* do not overwhelm the MCU? */
|
||||||
usleep(200 * 1000);
|
usleep(200 * 1000);
|
||||||
|
|
||||||
/* Stop EL*/
|
/* Stop EL*/
|
||||||
retval = rc2800_transaction(rot, "E" CR, NULL, 0); /* select EL */
|
retval = rc2800_transaction(rot, "E" CR, NULL, 0); /* select EL */
|
||||||
|
|
||||||
|
if (retval != RIG_OK) { rig_debug(RIG_DEBUG_VERBOSE, "%s: E command failed?\n", __func__); }
|
||||||
|
|
||||||
retval = rc2800_transaction(rot, "S" CR, NULL, 0); /* STOP */
|
retval = rc2800_transaction(rot, "S" CR, NULL, 0); /* STOP */
|
||||||
|
|
||||||
|
if (retval != RIG_OK) { rig_debug(RIG_DEBUG_VERBOSE, "%s: el S command failed?\n", __func__); }
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue