kopia lustrzana https://github.com/Hamlib/Hamlib
Implement Amp.get_freq
rodzic
6e8b5d602f
commit
90fbddb9d7
|
@ -126,6 +126,8 @@ typedef struct Amp {
|
|||
return s;
|
||||
}
|
||||
|
||||
AMPMETHOD1GET(get_freq, freq_t)
|
||||
|
||||
const char * get_info(void) {
|
||||
const char *s;
|
||||
s = amp_get_info(self->amp);
|
||||
|
@ -136,10 +138,3 @@ typedef struct Amp {
|
|||
AMPMETHOD1GET(get_powerstat, powerstat_t)
|
||||
|
||||
};
|
||||
%{
|
||||
|
||||
void Amp_get_freq(Amp *self, freq_t *freq)
|
||||
{
|
||||
self->error_status = amp_get_freq(self->amp, freq);
|
||||
}
|
||||
%}
|
||||
|
|
|
@ -46,7 +46,8 @@ class TestClass:
|
|||
assert isinstance(info, str)
|
||||
assert amp.reset(Hamlib.AMP_RESET_FAULT) is None
|
||||
assert amp.set_freq(0) is None
|
||||
# assert amp.get_freq() is None # FIXME: AttributeError: 'Amp' object has no attribute 'get_freq'
|
||||
assert amp.set_freq(123.45) is None
|
||||
assert amp.get_freq() == 123.45
|
||||
assert amp.set_powerstat(Hamlib.RIG_POWER_ON) is None
|
||||
assert amp.get_powerstat() == Hamlib.RIG_POWER_ON
|
||||
assert amp.close() is None
|
||||
|
|
Ładowanie…
Reference in New Issue