Wykres commitów

183 Commity (3bb4befc8d9029a8f770077a04e96051964e2623)

Autor SHA1 Wiadomość Data
Michael Black c489f97624 More cppcheck changes 2020-03-20 07:51:32 -05:00
Michael Black 35fffc4f38 astyle files 2020-03-15 15:32:46 -05:00
Michael Black 8ef027c676 Fixes the default initialization of ranges by defaulting to range_list1.
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
2020-03-06 08:49:21 -06:00
Michael Black d856248178 Add RIG_MODEL macro and change all rigs to support it 2020-03-05 08:44:18 -06:00
Michael Black 8b462a0242 Add set_twiddle and get_twiddle functions
Add -W switch to rigctld to set twiddle timeout..don't need switch for rigctl since it can set from there with \set_twiddle
2020-02-24 09:34:02 -06:00
Michael Black bceba85205 Temporarily disable twiddling detection in order to debug other stuff
Need to make this a switch
2020-02-24 00:03:42 -06:00
Michael Black 74b7900a52 Add get_freq to get_vfo to track freq for internal use
Move twiddling detection before set_vfo in set_freq
2020-02-23 23:20:33 -06:00
Michael Black ff8ddf018c astyle all C files 2020-02-23 11:26:09 -06:00
Michael Black 414b557b71 Add SCREENSAVER off to rig_open 2020-02-23 10:50:26 -06:00
Michael Black 81ea1efba2 Need to update rig->state.current_freq when twiddling 2020-02-23 08:45:25 -06:00
Michael Black 95986b9685 Add detection of VFO twiddling
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.
2020-02-23 08:28:19 -06:00
Michael Black e315f5e3ac Added skeleton for new get_ant function that will return ant_tx and ant_rx if known
Every rig will need to be reviewed to fill these in as appropriate
2020-02-18 23:10:14 -06:00
Michael Black c40ff7fce6 Re-enable -u modes and vfo lists using *_range_list1 entries for the moment
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
2020-02-17 08:46:01 -06:00
Michael Black 8089e2c9d2 Remove region logic from rig.c 2020-02-17 06:43:41 -06:00
Michael Black fdef21f068
Merge pull request #193 from mdblack98/master
2020-02-05 Patches
2020-02-05 23:24:48 -06:00
Dawid Szymanski c6e06bfb01 ICOM Voice Keyer implemented. 2020-02-06 01:00:34 +01:00
Michael Black 7e8938ae65 Changed y command to now use mandatory antenna argument
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
2020-02-02 08:38:10 -06:00
Bill Somerville e1e6969e9e
Simplify closing of device files
By treating PTT/DCD devices differently from rig control devices.
2020-01-26 19:06:27 +00:00
Bill Somerville be0f371bde
Remove duplication across GPIO and GPION handling of PTT and DCD 2020-01-26 14:46:21 +00:00
Bill Somerville 6573a283a8
Fixed erroneous messages in rig_close with GPIO(N) PTT or DCD types 2020-01-26 12:50:07 +00:00
Michael Black d853c36fb3
Change get_ant to add another option for icom rigs (and others if needed) 2020-01-21 17:53:12 -06:00
Michael Black b7e8f01701 Fix mingw32 DLL linkage of hl_sleep 2020-01-10 15:58:16 -06:00
Michael Black 6fe29ad942
Fix cppcheck warnings in rig.c 2019-12-24 15:47:06 -06:00
Michael Black ef5d2b7838
Fix cppcheck warnings in rig.c 2019-12-19 10:57:17 -06:00
Michael Black 8ff9a682cc
Add set_powerstat to icom.c and debug msg to rig.c 2019-12-16 10:51:36 -06:00
Michael Black fb73e5abd7
Fix some cppcheck warnings
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 :-)
2019-12-09 17:12:13 -06:00
Michael Black 6c0f101900
Fix cppcheck warnings in rig.c 2019-12-08 22:45:29 -06:00
Michael Black dddf63ca16
Fix cppcheck warnings in rig.c 2019-12-08 22:37:56 -06:00
Michael Black 0ec255366f
Fix gpio file descriptor leak in gpio.c 2019-12-08 16:54:15 -06:00
Michael Black 6bf3b00c4f
astyle all files 2019-11-30 10:19:08 -06:00
Michael Black 73c1ecd165
Change freq & chan struct start/end to avoid colliding with LUA SWIG start/end 2019-08-17 23:20:48 -05:00
Michael Black cf2a551524
Fixup some amplifier code 2019-06-26 06:39:42 -05:00
Michael Black 7e9c566944
Add first cut at amplifier control 2019-06-12 15:52:35 -05:00
Michael Black 25736acd4b
Fix CM108 ptt_bitnum for pttport 2019-05-27 23:18:43 -05:00
C-Elegans d8f010cfa3
Add ability to have rigctld display transverter frequency
Use -C lo_freq=xxxxx to have rigctld add x to your vfo frequency
internally
2018-11-07 11:49:06 -05:00
Jeroen Vreeken bfa948ebc5 Add GPIO and GPION options for DCD.
Also bump abi version since the config params struct needed resizing.
2018-03-29 23:55:25 +02:00
Dieter Röver 1a272f5b0e Fix bug in vfo_comp calculation in Hamlib
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)
2018-02-23 12:34:28 -06:00
Nate Bargmann ab3e6bb5a5 Formatted src/ to final coding guidelines 2017-10-04 21:32:08 -05:00
Jaroslav Skarvada 9693cce0b3 Fix serial_port DCD squelch
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
2017-09-10 21:04:55 -05:00
Bill Somerville 80a4097aba Add best guess transmit status to rig state structure
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
2017-08-09 21:54:50 -05:00
Nate Bargmann f76b354588 Reformatted src directory 2017-08-09 06:14:31 -05:00
c vw fc6d87addf Do not set DTR/RTS on dedicated PTT port if it is already closed. 2017-05-29 09:37:32 +02:00
Bill Somerville 62fb76019f Fix a state machine defect with repeated PTT reset calls
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.
2017-02-27 13:02:04 +00:00
Michael Black 199111bcc4 Changed some modules to LGPL in lieu of GPL 2016-10-31 11:05:24 -05:00
Nate Bargmann 234122bb50 Merge pull request #25 from mdblack98/master
Expose version and licensing via function calls
2016-08-31 20:46:18 -05:00
Bill Somerville e44566e8a7 Release the serial port used for PTT when possible
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.
2016-08-31 22:34:09 +01:00
Michael Black da40941d7f Merge branch 'master' of https://github.com/N0NB/hamlib 2016-08-31 09:22:13 -05:00
Michael Black 15b3e73e7f Exposed constants via function calls 2016-08-31 09:05:47 -05:00
Jeroen Vreeken 3ee7b68d42 Add missing breaks and improve error messages 2016-05-30 14:12:01 +02:00
Jeroen Vreeken 1bf736d650 Add support for GPIO PTT. 2016-05-28 16:00:03 +02:00