Another step in migration of rigs to separate model numbers for variations in models
We default to using range_list1 now and eventually there will only be 1 range_list per model
We have enough room in the model numbers now to expand...so for example we will have
5 models for the IC-9700
IC-9700 USA
IC-9700 EUR
IC-9700 ITR
IC-9700 TPE
IC-9700 KOR
In the case of gpredict there are times when one has to adjust the
VFO to dial in a frequency while gpredict is tracking.
We now detect this situation and have a 3-second delay every time
VFO twiddling is detected. set_freq and set_vfo calls will be
ignored during this delay.
May make this a settable value if needed.
This logic needs to be overhauled as Icom (and probably others) are putting out
rigs with no way to tell what model you have from CAT control.
So we may end up having to explicitly list all rig models which is more user friendly anyways
and will work with WSJT-X and other user-space programs.
So, e.g., IC-9700 would be listed as 5 models: IC-9700-USA, IC_9700-EUR, IC_9700-ITR, IC-9700-TPE, IC-9700-KOR
Put a looplimit on icom_get_ant_count trying to get autodetect to work
Changes to icom_get_ant_count to try and get this working
Added dummy antenna # args to rigs that don't care i.e. only have 1 antenna
Fix declarations after statements
Remove some !rig checks...we either don't need them or need them everywhere with a new error code
If you pass a NULL rig you get what you deserve :-)
I tried to control my "FUNcube Dongle Pro" SDR with Hamlib. At first it
worked fine, but when I tried to correct the frequency divergence with
the vfo_comp parameter, I found a bug in the software.
Example:
$ ./rigctl -m 2513 -C vfo_comp=0.01
Rig command: F 100000000
Rig command: f
Frequency: 102010000
The correction must toke place when setting the frequency and when it
is read back. But one time the correction must work in on direction,
the other time quite opposite.
I found the code in the file rig.c and could see, that both times the
same calculation is used.
The simplest way to correct this is to go to the “rig_get_freq(“
subroutine and change it in the line 1188 from “+=” to “-=” , even that
is mathematically not correct.
Result:
$ ./rigctl -m 2513 -C vfo_comp=0.01
Rig command: F 100000000
Rig command: f
Frequency: 99990000
$ ./rigctl -m 2513 -C vfo_comp=0.000022
Rig command: F 100000000
Rig command: f
Frequency: 99999999
You can see, that the result is quite good for small divergences of
some ppm, but there is still an error for bigger divergences. So I
changed the line 1188 to the form I hope it is the mathematically
correct one:
*freq = (freq_t)(*freq/(1.0+(double)rig->state.vfo_comp));
Result:
$ ./rigctl -m 2513 -C vfo_comp=0.01
Rig command: F 100000000
Rig command: f
Frequency: 100000000
$ ./rigctl -m 2513 -C vfo_comp=0.000022
Rig command: F 100000000
Rig command: f
Frequency: 100000000
Now the result looks good for small and for bigger divergences.
Best regards
Dieter Röver (DK6OV)
Hi,
I had trouble with CTS serial port squelch (on microHAM USB Interface III).
It seems there is a bug in the hamlib code and I think the similar thing
should be done as has been done for the pttport, i.e. if the dcdport is
the same as the rigport, do not reopen it. Otherwise the serial port will
be reset to its default and it will key the radio PTT forever (because
the RTS line is reset on the port reopen). Patch attached
73! Jaroslav, OK2JRQ
This flag can be used by back ends that need to take special action
while the rig is transmitting e.g. the FT-747GX and similar that do
not process CAT commands while transmitting.
The flag is also used as a default answer to rig_get_ptt if nothing
better is available.
Deal with inaccurate CAT query for Rx/Tx on the Yaesu FT-847
This rig doesn't set the Rx/Tx status flag when PTT is asserted via
the PTT pin on the rear PACKET socket so we need to override which we
can do if we known we have asserted PTT via rig_set_ptt().
Adjust style and fix set PTT defects
Fix a warning from a declaration of a deleted function definition
When the PTT serial port is not the control port the intention is to
free the port when PTT is reset so that other applications can share
it. This logic was faulty with attempts to call port functions on an
unopened port when repeatedly calling the rig_set_ptt API.
Thanks to Christoph van Wullen, DL1YCF, for finding and analyzing this
defect.
When using separate serial port for PTT via RTS pr DTR it is
convienent to close the port when the PTT line is not asserted. This
allows other applications to share the PTT serial port.
This has been achieved by ensuring that file descriptor for the port
is set to -1 when the port is closed, this then allows the invalid FD
to be used as a PTT surrogate for the rig_get_ptt API when the port is
only being used for PTT.