kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
6aa7f9e9bc
commit
41eb23bb26
|
@ -3156,6 +3156,7 @@ extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
|
|||
extern HAMLIB_EXPORT(const char *) rig_stragclevel(enum agc_level_e level);
|
||||
extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcstr (char *agcString);
|
||||
extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcvalue (int agcValue);
|
||||
extern HAMLIB_EXPORT(value_t) rig_valueagclevel (enum agc_level_e agcLevel);
|
||||
extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
|
||||
extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
|
||||
extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
|
||||
|
|
|
@ -66,7 +66,7 @@ const struct rig_caps jst145_caps =
|
|||
RIG_MODEL(RIG_MODEL_JST145),
|
||||
.model_name = "JST-145",
|
||||
.mfg_name = "JRC",
|
||||
.version = BACKEND_VER ".0",
|
||||
.version = BACKEND_VER ".1",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_RECEIVER,
|
||||
|
@ -162,7 +162,7 @@ const struct rig_caps jst245_caps =
|
|||
RIG_MODEL(RIG_MODEL_JST245),
|
||||
.model_name = "JST-245",
|
||||
.mfg_name = "JRC",
|
||||
.version = BACKEND_VER ".0",
|
||||
.version = BACKEND_VER ".1",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_RECEIVER,
|
||||
|
@ -255,12 +255,12 @@ const struct rig_caps jst245_caps =
|
|||
|
||||
static int jst145_open(RIG *rig)
|
||||
{
|
||||
return write_block(&rig->state.rigport, "H1\r", 2);
|
||||
return write_block(&rig->state.rigport, "H1\r", 3);
|
||||
}
|
||||
|
||||
static int jst145_close(RIG *rig)
|
||||
{
|
||||
return write_block(&rig->state.rigport, "H0\r", 2);
|
||||
return write_block(&rig->state.rigport, "H0\r", 3);
|
||||
}
|
||||
|
||||
static int jst145_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||
|
@ -367,8 +367,8 @@ static int jst145_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
|
||||
case RIG_LEVEL_AGC:
|
||||
return write_block(&rig->state.rigport,
|
||||
val.i == RIG_AGC_SLOW ? "G0" :
|
||||
(val.i == RIG_AGC_FAST ? "G1" : "G2"), 2);
|
||||
val.i == RIG_AGC_SLOW ? "G0\r" :
|
||||
(val.i == RIG_AGC_FAST ? "G1\r" : "G2\r"), 3);
|
||||
|
||||
default:
|
||||
return -RIG_EINVAL;
|
||||
|
@ -381,7 +381,7 @@ static int jst145_set_mem(RIG *rig, vfo_t vfo, int ch)
|
|||
{
|
||||
char membuf[12];
|
||||
|
||||
sprintf(membuf, "C%03d", ch);
|
||||
sprintf(membuf, "C%03d\r", ch);
|
||||
|
||||
return write_block(&rig->state.rigport, membuf, strlen(membuf));
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ static int jst145_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
|
|||
switch (op)
|
||||
{
|
||||
case RIG_OP_FROM_VFO:
|
||||
return write_block(&rig->state.rigport, "E1", 2);
|
||||
return write_block(&rig->state.rigport, "E1\r", 3);
|
||||
|
||||
default:
|
||||
return -RIG_EINVAL;
|
||||
|
|
24
src/misc.c
24
src/misc.c
|
@ -1266,12 +1266,32 @@ const char *HAMLIB_API rig_stragclevel(enum agc_level_e level)
|
|||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Convert a enum agc_level_e to value
|
||||
* \param integer...
|
||||
* \return agc_level_e value
|
||||
*/
|
||||
value_t rig_valueagclevel (enum agc_level_e agcLevel)
|
||||
{
|
||||
value_t value;
|
||||
|
||||
if (agcLevel == RIG_AGC_OFF) value.i = 0;
|
||||
else if (agcLevel == RIG_AGC_SUPERFAST) value.i = 1;
|
||||
else if (agcLevel == RIG_AGC_FAST) value.i = 2;
|
||||
else if (agcLevel == RIG_AGC_SLOW) value.i = 3;
|
||||
else if (agcLevel == RIG_AGC_USER) value.i = 4;
|
||||
else if (agcLevel == RIG_AGC_MEDIUM) value.i = 5;
|
||||
else value.i = 6; //RIG_AGC_AUTO
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Convert a value to agc_level_e -- constrains the range
|
||||
* \param integer...
|
||||
* \return agc_level_e
|
||||
*/
|
||||
enum agc_level_e levelagcvalue(int agcValue)
|
||||
enum agc_level_e rig_levelagcvalue(int agcValue)
|
||||
{
|
||||
enum agc_level_e agcLevel;
|
||||
|
||||
|
@ -1302,7 +1322,7 @@ enum agc_level_e levelagcvalue(int agcValue)
|
|||
* \param mode AGC string...
|
||||
* \return agc_level_e
|
||||
*/
|
||||
enum agc_level_e levelagcstr(char *agcString)
|
||||
enum agc_level_e rig_levelagcstr(char *agcString)
|
||||
{
|
||||
enum agc_level_e agcLevel;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue