kopia lustrzana https://github.com/Hamlib/Hamlib
enumaration of backend tokens
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2595 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.9
rodzic
6afeac39d2
commit
66da5f2dc4
|
@ -14,7 +14,7 @@
|
|||
* Tested on a HAM-IV with the Rotor-EZ V1.4S interface installed.
|
||||
*
|
||||
*
|
||||
* $Id: rotorez.c,v 1.13 2009-01-17 14:47:12 n0nb Exp $
|
||||
* $Id: rotorez.c,v 1.14 2009-01-25 16:14:39 fillods Exp $
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -66,6 +66,25 @@ struct rotorez_rot_priv_data {
|
|||
static int rotorez_send_priv_cmd(ROT *rot, const char *cmd);
|
||||
static int rotorez_flush_buffer(ROT *rot);
|
||||
|
||||
/*
|
||||
* local configuration parameters
|
||||
*/
|
||||
static const struct confparams rotorez_cfg_params[] = {
|
||||
{ TOK_ENDPT, "endpt", "Endpoint option", "Endpoint option",
|
||||
NULL, RIG_CONF_CHECKBUTTON, { }
|
||||
},
|
||||
{ TOK_JAM, "jam", "Jam protection", "Jam protection",
|
||||
NULL, RIG_CONF_CHECKBUTTON, { }
|
||||
},
|
||||
{ TOK_OVRSHT, "oversht", "Overshoot option", "Overshoot option",
|
||||
NULL, RIG_CONF_CHECKBUTTON, { }
|
||||
},
|
||||
{ TOK_UNSTICK, "unstick", "Unstick option", "Unstick option",
|
||||
NULL, RIG_CONF_CHECKBUTTON, { }
|
||||
},
|
||||
{ RIG_CONF_END, NULL, }
|
||||
};
|
||||
|
||||
/* *************************************
|
||||
*
|
||||
* Seperate model capabilities
|
||||
|
@ -105,6 +124,7 @@ const struct rot_caps rotorez_rot_caps = {
|
|||
.max_el = 0,
|
||||
|
||||
.priv = NULL, /* priv */
|
||||
.cfgparams = rotorez_cfg_params,
|
||||
|
||||
.rot_init = rotorez_rot_init,
|
||||
.rot_cleanup = rotorez_rot_cleanup,
|
||||
|
@ -147,6 +167,7 @@ const struct rot_caps rotorcard_rot_caps = {
|
|||
.max_el = 0,
|
||||
|
||||
.priv = NULL, /* priv */
|
||||
.cfgparams = rotorez_cfg_params,
|
||||
|
||||
.rot_init = rotorez_rot_init,
|
||||
.rot_cleanup = rotorez_rot_cleanup,
|
||||
|
@ -406,25 +427,25 @@ static int rotorez_rot_set_conf(ROT *rot, token_t token, const char *val) {
|
|||
return -RIG_EINVAL;
|
||||
|
||||
switch(token) {
|
||||
case ENDPT: /* Endpoint option */
|
||||
case TOK_ENDPT: /* Endpoint option */
|
||||
if (*val == '1')
|
||||
c = 'E';
|
||||
else
|
||||
c = 'e';
|
||||
break;
|
||||
case JAM: /* Jam protection */
|
||||
case TOK_JAM: /* Jam protection */
|
||||
if (*val == '1')
|
||||
c = 'J';
|
||||
else
|
||||
c = 'j';
|
||||
break;
|
||||
case OVRSHT: /* Overshoot option */
|
||||
case TOK_OVRSHT: /* Overshoot option */
|
||||
if (*val == '1')
|
||||
c = 'O';
|
||||
else
|
||||
c = 'o';
|
||||
break;
|
||||
case UNSTICK: /* Unstick option */
|
||||
case TOK_UNSTICK: /* Unstick option */
|
||||
if (*val == '1')
|
||||
c = 'S';
|
||||
else
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* supports the Hy-Gain DCU-1.
|
||||
*
|
||||
*
|
||||
* $Id: rotorez.h,v 1.7 2009-01-17 14:47:12 n0nb Exp $
|
||||
* $Id: rotorez.h,v 1.8 2009-01-25 16:14:39 fillods Exp $
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -31,6 +31,8 @@
|
|||
#ifndef _ROT_ROTOREZ_H
|
||||
#define _ROT_ROTOREZ_H 1
|
||||
|
||||
#include "token.h"
|
||||
|
||||
#define AZ_READ_LEN 4
|
||||
|
||||
extern const struct rot_caps rotorez_rot_caps;
|
||||
|
@ -42,13 +44,10 @@ extern const struct rot_caps dcu_rot_caps;
|
|||
* and rotctld followed by a value of '0' to disable a Rotor-EZ option
|
||||
* and '1' to enable it.
|
||||
*/
|
||||
enum {
|
||||
NONE = 0,
|
||||
ENDPT,
|
||||
JAM,
|
||||
OVRSHT,
|
||||
UNSTICK
|
||||
};
|
||||
#define TOK_ENDPT TOKEN_BACKEND(1)
|
||||
#define TOK_JAM TOKEN_BACKEND(2)
|
||||
#define TOK_OVRSHT TOKEN_BACKEND(3)
|
||||
#define TOK_UNSTICK TOKEN_BACKEND(4)
|
||||
|
||||
/*
|
||||
* API local implementation
|
||||
|
|
Ładowanie…
Reference in New Issue