forked from Hamlib/Hamlib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rig.swg: New properly formatted macro
I made a patch, you can see in that there is the solution, which describe the error: if a function in hamlib looks 3 argument (rig, vfo, any 3rd arg), the order of the 2nd and 3rd argument were reversed, because the macro METHOD1 reversed them. I've collected these functions, compared its arguments with hamlib docs (http://hamlib.sourceforge.net/manuals/1.2.15/), and where 1st arg is rig, 2nd arg is vfo, and 3rd is any kind of type, changed to METHOD3, which is a new macro, and keeps the correct order of original function - see the patch. (I didn't find any info about the expected diff format, so I just created the `diff -uprN ORIG NEW'.) To check my theory, I've tested with another function, which uses vfo type at 2nd argument, eg. rig_set_freq; here is the Python code: my_rig.set_freq(Hamlib.RIG_VFO_A, 7013200.0) and the original code drop the exception: my_rig.set_freq(Hamlib.RIG_VFO_A, 7012500.0) File "/usr/local/lib/python2.7/dist-packages/Hamlib.py", line 2513, in set_freq def set_freq(self, *args): return _Hamlib.Rig_set_freq(self, *args) TypeError: in method 'Rig_set_freq', argument 3 of type 'vfo_t' As you can see, it's same as my original error above. So, after I patched the source and recompiled it again, these two function works correctly - I will test it at soon, but I think _this_ is good and stable. Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
- Loading branch information
Showing
3 changed files
with
30 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters