kopia lustrzana https://github.com/Hamlib/Hamlib
Deprecate rot_get_conf()
rodzic
48804dc4da
commit
faad247f06
|
@ -73,13 +73,21 @@ void Rotator::setConf(const char *name, const char *val)
|
||||||
CHECK_ROT( rot_set_conf(theRot, tokenLookup(name), val) );
|
CHECK_ROT( rot_set_conf(theRot, tokenLookup(name), val) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rotator::getConf(hamlib_token_t token, char *val)
|
HL_DEPRECATED void Rotator::getConf(hamlib_token_t token, char *val)
|
||||||
{
|
{
|
||||||
CHECK_ROT( rot_get_conf(theRot, token, val) );
|
CHECK_ROT( rot_get_conf2(theRot, token, val, 128) );
|
||||||
}
|
}
|
||||||
void Rotator::getConf(const char *name, char *val)
|
HL_DEPRECATED void Rotator::getConf(const char *name, char *val)
|
||||||
{
|
{
|
||||||
CHECK_ROT( rot_get_conf(theRot, tokenLookup(name), val) );
|
CHECK_ROT( rot_get_conf2(theRot, tokenLookup(name), val, 128) );
|
||||||
|
}
|
||||||
|
void Rotator::getConf2(hamlib_token_t token, char *val, int val_len)
|
||||||
|
{
|
||||||
|
CHECK_ROT( rot_get_conf2(theRot, token, val, val_len) );
|
||||||
|
}
|
||||||
|
void Rotator::getConf2(const char *name, char *val, int val_len)
|
||||||
|
{
|
||||||
|
CHECK_ROT( rot_get_conf2(theRot, tokenLookup(name), val, val_len) );
|
||||||
}
|
}
|
||||||
|
|
||||||
hamlib_token_t Rotator::tokenLookup(const char *name)
|
hamlib_token_t Rotator::tokenLookup(const char *name)
|
||||||
|
|
|
@ -613,7 +613,7 @@ extern HAMLIB_EXPORT(int)
|
||||||
rot_set_conf HAMLIB_PARAMS((ROT *rot,
|
rot_set_conf HAMLIB_PARAMS((ROT *rot,
|
||||||
hamlib_token_t token,
|
hamlib_token_t token,
|
||||||
const char *val));
|
const char *val));
|
||||||
extern HAMLIB_EXPORT(int)
|
HL_DEPRECATED extern HAMLIB_EXPORT(int)
|
||||||
rot_get_conf HAMLIB_PARAMS((ROT *rot,
|
rot_get_conf HAMLIB_PARAMS((ROT *rot,
|
||||||
hamlib_token_t token,
|
hamlib_token_t token,
|
||||||
char *val));
|
char *val));
|
||||||
|
|
|
@ -55,6 +55,8 @@ public:
|
||||||
void setConf(const char *name, const char *val);
|
void setConf(const char *name, const char *val);
|
||||||
void getConf(hamlib_token_t token, char *val);
|
void getConf(hamlib_token_t token, char *val);
|
||||||
void getConf(const char *name, char *val);
|
void getConf(const char *name, char *val);
|
||||||
|
void getConf2(hamlib_token_t token, char *val, int len);
|
||||||
|
void getConf2(const char *name, char *val, int len);
|
||||||
hamlib_token_t tokenLookup(const char *name);
|
hamlib_token_t tokenLookup(const char *name);
|
||||||
|
|
||||||
void setPosition(azimuth_t az, elevation_t el);
|
void setPosition(azimuth_t az, elevation_t el);
|
||||||
|
|
|
@ -488,7 +488,7 @@ grbltrk_rot_open(ROT *rot)
|
||||||
}
|
}
|
||||||
else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET)
|
else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET)
|
||||||
{
|
{
|
||||||
rot_get_conf(rot, TOK_PATHNAME, host);
|
rot_get_conf2(rot, TOK_PATHNAME, host, sizeof(host));
|
||||||
rot_debug(RIG_DEBUG_ERR, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__,
|
rot_debug(RIG_DEBUG_ERR, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__,
|
||||||
host);
|
host);
|
||||||
grbl_net_open(rot, 23);
|
grbl_net_open(rot, 23);
|
||||||
|
|
|
@ -1698,7 +1698,7 @@ declare_proto_rot(get_conf)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char value[4096];
|
char value[4096];
|
||||||
ret = rot_get_conf(rot, rot_token_lookup(rot, arg1), value);
|
ret = rot_get_conf2(rot, rot_token_lookup(rot, arg1), value, sizeof(value));
|
||||||
|
|
||||||
if (ret != RIG_OK)
|
if (ret != RIG_OK)
|
||||||
{
|
{
|
||||||
|
@ -2917,7 +2917,7 @@ int print_conf_list2(const struct confparams *cfp, rig_ptr_t data, FILE *fout)
|
||||||
ROT *rot = (ROT *) data;
|
ROT *rot = (ROT *) data;
|
||||||
char buf[128] = "";
|
char buf[128] = "";
|
||||||
|
|
||||||
rot_get_conf(rot, cfp->token, buf);
|
rot_get_conf2(rot, cfp->token, buf, sizeof(buf));
|
||||||
fprintf(fout, "%s: \"%s\"\n" "\t" "Default: %s, Value: %s\n",
|
fprintf(fout, "%s: \"%s\"\n" "\t" "Default: %s, Value: %s\n",
|
||||||
cfp->name,
|
cfp->name,
|
||||||
cfp->tooltip,
|
cfp->tooltip,
|
||||||
|
|
Ładowanie…
Reference in New Issue