George Baltz N3GB
d3769bf948
Don't forget the noise
2025-10-03 11:56:04 -04:00
Nate Bargmann
584eddbb6e
Merge GitHub PR #1921
2025-09-23 08:15:05 -05:00
Daniele Forsi IU5HKX
54bd989e72
Add various get and set methods for amplifiers to the bindings
...
Adds get_ext_level, has_get_level, has_set_level, set_ext_level,
set_level.
Brings function coverage of amplifier.c above 90%.
2025-09-21 16:27:12 +02:00
Daniele Forsi IU5HKX
8b9e271ce1
Add various get and set methods for rotators to the bindings
...
Adds has_get_func, has_get_level, has_get_parm, has_set_func,
has_set_level, has_set_parm.
Brings tests coverage of rot_settings.c to 100%.
2025-09-21 16:27:12 +02:00
Daniele Forsi IU5HKX
b48ff58895
Add rig_has_get_func() and rig_has_get_parm() to the bindings
...
Brings tests coverage of settings.c above 80%.
2025-09-21 11:27:27 +02:00
Daniele Forsi IU5HKX
0a30ba6dc7
Add rig_get_debug() and rig_set_debug_time_stamp() to the bindings
...
Brings test coverage of debug.c over 55%.
2025-09-21 11:27:27 +02:00
Daniele Forsi IU5HKX
194f9d3a62
Add tests for dmmm2dec() dec2dmmm() azimuth_long_path()
...
Brings function coverage of locator.c to 100%.
2025-09-21 11:27:27 +02:00
George Baltz N3GB
4e6bcb11c9
Yet another variation on the name
2025-09-15 18:08:44 -04:00
George Baltz N3GB
8cb93e4b9c
Generate required noise
2025-09-15 17:12:25 -04:00
Daniele Forsi IU5HKX
a9afa8d4d9
Handle --rot-file and --serial_speed in bindings tests
...
This allow to run the tests for a specific model, eg.
PYTHONPATH=bindings/:bindings/.libs bindings/python/test_rot.py --model 2
2025-09-09 20:36:58 +02:00
Daniele Forsi IU5HKX
911169d794
Handle --amp-file and --serial_speed in bindings tests
...
This allow to run the tests for a specific model, eg.
PYTHONPATH=bindings/:bindings/.libs bindings/python/test_amp.py --model 2
2025-09-09 20:36:58 +02:00
Daniele Forsi IU5HKX
e1761827d9
Fix handling of command line parameters for pytests
2025-09-09 20:36:58 +02:00
Nate Bargmann
c51357388c
Merge GitHub PR #1841
2025-08-12 07:04:50 -05:00
Daniele Forsi IU5HKX
3b79b13f6d
Make the tests for set_conf() and get_conf() more meaningful
2025-08-11 23:41:39 +02:00
Daniele Forsi IU5HKX
19dce9dc32
Remove deprecated functions and methods from the bindings
2025-08-11 15:50:10 +02:00
Daniele Forsi IU5HKX
e16f4077e7
Implement the Python bindings and the tests for rig_send_raw()
...
Allows to send either string or bytes and to receive a response
converted to the same datatype. Also the "term" argument can be
of either type (but it can't contain NULs, it's a single char
or byte anyway).
Closes #1624 .
2025-08-11 12:33:49 +02:00
Daniele Forsi IU5HKX
10303d5803
Fix function signature of spectrum_callback()
2025-08-09 18:09:17 +02:00
Daniele Forsi IU5HKX
81cb260670
Fix ptt_callback()
2025-08-09 17:57:18 +02:00
Daniele Forsi IU5HKX
2890da9d79
Split the tests
...
It makes it easier in future to conditionally run some tests(eg.
to not test PTT for receiver-only rigs), or to run tests in
isolation (after renaming them).
It makes it easier to look at failing tests because pytest prints
the code of the failing test up to the failure including any
function that called the failed test (in this case would print
everything from def test_with_open() up to the line with the
failed assert.
2025-08-09 15:57:45 +02:00
Daniele Forsi IU5HKX
3bc1cc8744
Implement remaining event callbacks
...
Implements:
rig_set_dcd_callback(), rig_set_freq_callback(), rig_set_mode_callback(),
rig_pltune_callback(), rig_set_ptt_callback(), rig_set_spectrum_callback(),
rig_set_vfo_callback()
2025-08-09 10:33:51 +02:00
Daniele Forsi IU5HKX
8324c85487
Implement the Python callback for freq_event
...
Fixes #481 .
2025-08-09 10:33:17 +02:00
Daniele Forsi IU5HKX
fbe9803777
Fix initialization of comm_status
...
The function rig_init() doesn't touch the hardware, it's rig_open()
that initiates the connection and in fact the first use of comm_status
in rig_open() is when it gets the value RIG_COMM_STATUS_CONNECTING and
rig_close() sets it to RIG_COMM_STATUS_DISCONNECTED.
2025-08-03 13:34:36 +02:00
Nate Bargmann
48804dc4da
Merge GitHub PR #1819
2025-07-27 18:45:52 -05:00
Daniele Forsi IU5HKX
c0ec84ca4b
Add default values for make (dist)check
2025-07-27 20:13:07 +02:00
dforsi
96d5abab47
Merge branch 'master' into fix/pytest
2025-07-27 18:22:26 +02:00
Nate Bargmann
0d543f9483
Merge GitHub PR #1815
2025-07-27 10:54:55 -05:00
Daniele Forsi IU5HKX
0df9d1767e
Allow to execute some tests with a simulator or with a real amplifier
...
To execute the tests with the installed Hamlib use the same long arguments
as ampctl, eg:
bindings/python/test_amp.py --model {MODEL_NUMBER} --amp-file /dev/ttyUSB0 --serial-speed {BAUD}
To execute the tests from the build tree, add the path to the libraries
that you built, eg. from the root of the build tree:
PYTHONPATH=bindings/:bindings/.libs/ ...your command...
2025-07-27 12:57:35 +02:00
Daniele Forsi IU5HKX
6088445635
Allow to execute some tests with a simulator or with a real rotator
...
To execute the tests with the installed Hamlib use the same long arguments
as rotctl, eg:
bindings/python/test_rot.py --model {MODEL_NUMBER} --rot-file /dev/ttyUSB0 --serial-speed {BAUD}
To execute the tests from the build tree, add the path to the libraries
that you built, eg. from the root of the build tree:
PYTHONPATH=bindings/:bindings/.libs/ ...your command...
2025-07-27 12:53:23 +02:00
Daniele Forsi IU5HKX
c3ec11e5f7
Allow to execute some tests with a simulator or with a real rig
...
To execute the tests with the installed Hamlib use the same long arguments
as rigctl, eg:
bindings/python/test_rig.py --model {MODEL_NUMBER} --rig-file /dev/ttyUSB0 --serial-speed {BAUD}
To execute the tests from the build tree, add the path to the libraries
that you built, eg. from the root of the build tree:
PYTHONPATH=bindings/:bindings/.libs/ ...your command...
2025-07-27 10:47:46 +02:00
Daniele Forsi IU5HKX
eb5a838f30
Check datatype before actual value
2025-07-27 10:22:54 +02:00
Daniele Forsi IU5HKX
fae77e4c02
Do the tests for set_vfo() and get_vfo() when the rig is open
...
Hamlib returns -RIG_EINVAL if the rig is not open.
2025-07-27 10:22:54 +02:00
Daniele Forsi IU5HKX
389155fcdf
Do the tests for RIT and XIT when the rig is open
...
Hamlib returns -RIG_EINVAL if the rig is not open.
2025-07-27 10:22:54 +02:00
Daniele Forsi IU5HKX
c4ee44b135
Swap arguments of Rig.set_dcs_sql() and make both mandatory
...
Makes the signature of Rig.set_dcs_sql() similar to those of
set_ctcss_sql() set_ctcss_tone() set_dcs_code()
2025-07-27 10:22:54 +02:00
Daniele Forsi IU5HKX
62e42eb4b3
Do the tests for tones when the rig is open
...
Hamlib returns -RIG_EINVAL if the rig is not open.
2025-07-27 10:22:54 +02:00
Daniele Forsi IU5HKX
5c06c7b942
Add tests for Rig.set_freq() and Rig.get_freq()
2025-07-27 10:22:54 +02:00
Daniele Forsi IU5HKX
e54c38c522
Add comments to group tests
2025-07-27 10:22:49 +02:00
Daniele Forsi IU5HKX
9574e761ff
Add meaningful arguments
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
e83d72608b
Fix the tests
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
36576f8e40
Revert "Fix Rig.send_morse()"
...
This reverts commit 656cf536524197c56d0523d424ba4eacfdbbc278.
Conflicts:
bindings/python/test_rig.py
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
43193681b0
Revert "Fix Rig.send_dtmf()"
...
This reverts commit 0e3a90bb351f9a412c5920981ea7cdc18855c4cc.
Conflicts:
bindings/python/test_rig.py
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
5319f8b31b
Revert "Fix Rig.set_freq()"
...
This reverts commit 070efb7b4127f0b5626596d071d6c68fcee1d3de.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
a617863a23
Revert "Fix Rig.set_mem()"
...
This reverts commit 663612051c7fcc455c978c9f82889e2a9ab4836d.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
2199ff2bde
Revert "Fix Rig.set_ctcss_sql() Rig.set_ctcss_tone() Rig.set_dcs_code()"
...
This reverts commit ed7e5b2344ccabe0abf5d4f215345acf86aa834f.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
3240d2f8d3
Revert "Fix various methods"
...
This reverts commit 623b93db3dfb5c80aa89f67eb2eb2eff4c044faa.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
292da12566
Fix various methods
...
Fixes: set_ptt set_rit set_rptr_offs set_rptr_shift
set_split_freq set_ts set_xit vfo_op
This is also swapping the arguments to make the vfo optional
like in other methods.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
160c941e9e
Fix Rig.set_ctcss_sql() Rig.set_ctcss_tone() Rig.set_dcs_code()
...
This is also swapping the arguments to make the vfo optional
like in other methods.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
25aae7d8e2
Fix Rig.set_mem()
...
This is also swapping the arguments to make the vfo optional
like in other methods.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
90c56f3e1f
Fix Rig.set_freq()
...
This is also swapping the arguments to make the vfo optional
like in other methods.
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
2b1428fd3e
Add meaningful arguments
2025-07-27 10:22:04 +02:00
Daniele Forsi IU5HKX
8901b210ee
Fix Rig.send_dtmf()
2025-07-27 10:22:04 +02:00