Fix c++ amplifier compilation

pull/137/head
Michael Black 2019-10-15 09:07:19 -05:00
rodzic f0a6fa7ff9
commit b017750fe6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
2 zmienionych plików z 14 dodań i 14 usunięć

Wyświetl plik

@ -33,7 +33,7 @@
#include "config.h"
#endif
#include <hamlib/ampator.h>
//#include <hamlib/ampator.h>
#include <hamlib/ampclass.h>
#include <hamlib/rigclass.h>
@ -55,34 +55,34 @@ Amplifier::Amplifier(amp_model_t amp_model)
Amplifier::~Amplifier()
{
theAmp->state.obj = NULL;
CHECK_ROT( amp_cleanup(theAmp) );
CHECK_AMP( amp_cleanup(theAmp) );
caps = NULL;
}
void Amplifier::open(void) {
CHECK_ROT( amp_open(theAmp) );
CHECK_AMP( amp_open(theAmp) );
}
void Amplifier::close(void) {
CHECK_ROT( amp_close(theAmp) );
CHECK_AMP( amp_close(theAmp) );
}
void Amplifier::setConf(token_t token, const char *val)
{
CHECK_ROT( amp_set_conf(theAmp, token, val) );
CHECK_AMP( amp_set_conf(theAmp, token, val) );
}
void Amplifier::setConf(const char *name, const char *val)
{
CHECK_ROT( amp_set_conf(theAmp, tokenLookup(name), val) );
CHECK_AMP( amp_set_conf(theAmp, tokenLookup(name), val) );
}
void Amplifier::getConf(token_t token, char *val)
{
CHECK_ROT( amp_get_conf(theAmp, token, val) );
CHECK_AMP( amp_get_conf(theAmp, token, val) );
}
void Amplifier::getConf(const char *name, char *val)
{
CHECK_ROT( amp_get_conf(theAmp, tokenLookup(name), val) );
CHECK_AMP( amp_get_conf(theAmp, tokenLookup(name), val) );
}
token_t Amplifier::tokenLookup(const char *name)
@ -92,18 +92,18 @@ token_t Amplifier::tokenLookup(const char *name)
void Amplifier::reset (amp_reset_t reset)
{
CHECK_ROT( amp_reset(theAmp, reset) );
CHECK_AMP( amp_reset(theAmp, reset) );
}
void Amplifier::setFreq(freq_t freq, vfo_t vfo) {
CHECK_RIG( amp_set_freq(theAmp, vfo, freq) );
void Amplifier::setFreq(freq_t freq) {
CHECK_AMP( amp_set_freq(theAmp, freq) );
}
freq_t Amplifier::getFreq(vfo_t vfo)
freq_t Amplifier::getFreq()
{
freq_t freq;
CHECK_RIG( amp_get_freq(theAmp, vfo, &freq) );
CHECK_AMP( amp_get_freq(theAmp, &freq) );
return freq;
}

Wyświetl plik

@ -52,7 +52,7 @@ public:
token_t tokenLookup(const char *name);
void setFreq(freq_t freq);
freq_t getFreq(freq_t freq);
freq_t getFreq();
void reset(amp_reset_t reset);
};