kopia lustrzana https://github.com/Hamlib/Hamlib
Deprecate amp_get_conf(), too
rodzic
faad247f06
commit
e172d34381
|
@ -74,13 +74,21 @@ void Amplifier::setConf(const char *name, const char *val)
|
||||||
CHECK_AMP( amp_set_conf(theAmp, tokenLookup(name), val) );
|
CHECK_AMP( amp_set_conf(theAmp, tokenLookup(name), val) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Amplifier::getConf(hamlib_token_t token, char *val)
|
HL_DEPRECATED void Amplifier::getConf(hamlib_token_t token, char *val)
|
||||||
{
|
{
|
||||||
CHECK_AMP( amp_get_conf(theAmp, token, val) );
|
CHECK_AMP( amp_get_conf2(theAmp, token, val, 128) );
|
||||||
}
|
}
|
||||||
void Amplifier::getConf(const char *name, char *val)
|
HL_DEPRECATED void Amplifier::getConf(const char *name, char *val)
|
||||||
{
|
{
|
||||||
CHECK_AMP( amp_get_conf(theAmp, tokenLookup(name), val) );
|
CHECK_AMP( amp_get_conf2(theAmp, tokenLookup(name), val, 128) );
|
||||||
|
}
|
||||||
|
void Amplifier::getConf2(hamlib_token_t token, char *val, int val_len)
|
||||||
|
{
|
||||||
|
CHECK_AMP( amp_get_conf2(theAmp, token, val, val_len) );
|
||||||
|
}
|
||||||
|
void Amplifier::getConf2(const char *name, char *val, int val_len)
|
||||||
|
{
|
||||||
|
CHECK_AMP( amp_get_conf2(theAmp, tokenLookup(name), val, val_len) );
|
||||||
}
|
}
|
||||||
|
|
||||||
hamlib_token_t Amplifier::tokenLookup(const char *name)
|
hamlib_token_t Amplifier::tokenLookup(const char *name)
|
||||||
|
|
|
@ -57,6 +57,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 val_len);
|
||||||
|
void getConf2(const char *name, char *val, int val_len);
|
||||||
hamlib_token_t tokenLookup(const char *name);
|
hamlib_token_t tokenLookup(const char *name);
|
||||||
|
|
||||||
void setFreq(freq_t freq);
|
void setFreq(freq_t freq);
|
||||||
|
|
|
@ -232,7 +232,7 @@ struct amp_caps
|
||||||
int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of amp_get_freq(). */
|
int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of amp_get_freq(). */
|
||||||
|
|
||||||
int (*set_conf)(AMP *amp, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of amp_set_conf(). */
|
int (*set_conf)(AMP *amp, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of amp_set_conf(). */
|
||||||
int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of amp_get_conf(). */
|
int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of amp_get_conf2(). */
|
||||||
int (*get_conf)(AMP *amp, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of amp_get_conf(). */
|
int (*get_conf)(AMP *amp, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of amp_get_conf(). */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -310,11 +310,16 @@ extern HAMLIB_EXPORT(int)
|
||||||
amp_set_conf HAMLIB_PARAMS((AMP *amp,
|
amp_set_conf HAMLIB_PARAMS((AMP *amp,
|
||||||
hamlib_token_t token,
|
hamlib_token_t token,
|
||||||
const char *val));
|
const char *val));
|
||||||
extern HAMLIB_EXPORT(int)
|
HL_DEPRECATED extern HAMLIB_EXPORT(int)
|
||||||
amp_get_conf HAMLIB_PARAMS((AMP *amp,
|
amp_get_conf HAMLIB_PARAMS((AMP *amp,
|
||||||
hamlib_token_t token,
|
hamlib_token_t token,
|
||||||
char *val));
|
char *val));
|
||||||
extern HAMLIB_EXPORT(int)
|
extern HAMLIB_EXPORT(int)
|
||||||
|
amp_get_conf2 HAMLIB_PARAMS((AMP *amp,
|
||||||
|
hamlib_token_t token,
|
||||||
|
char *val,
|
||||||
|
int val_len));
|
||||||
|
extern HAMLIB_EXPORT(int)
|
||||||
amp_set_powerstat HAMLIB_PARAMS((AMP *amp,
|
amp_set_powerstat HAMLIB_PARAMS((AMP *amp,
|
||||||
powerstat_t status));
|
powerstat_t status));
|
||||||
extern HAMLIB_EXPORT(int)
|
extern HAMLIB_EXPORT(int)
|
||||||
|
|
|
@ -1501,7 +1501,7 @@ int print_conf_list(const struct confparams *cfp, rig_ptr_t data)
|
||||||
int i;
|
int i;
|
||||||
char buf[128] = "";
|
char buf[128] = "";
|
||||||
|
|
||||||
amp_get_conf(amp, cfp->token, buf);
|
amp_get_conf2(amp, cfp->token, buf, sizeof(buf));
|
||||||
printf("%s: \"%s\"\n" "\tDefault: %s, Value: %s\n",
|
printf("%s: \"%s\"\n" "\tDefault: %s, Value: %s\n",
|
||||||
cfp->name,
|
cfp->name,
|
||||||
cfp->tooltip,
|
cfp->tooltip,
|
||||||
|
|
Ładowanie…
Reference in New Issue