This found tons of errors in rig_debug statements
So this patch cleans up all the files that were producing warnings or errors
This should fix a few segfaults when running with debug turned on
RX/TX will show correct answers at startup based on rig current status
This sequence is for the dummy device
Rig command: F RX
Frequency: 14500000
Rig command: F TX
Frequency: 14500000
Rig command: V VFOB
Rig command: F 16000000
Rig command: V VFOA
Rig command: S 1 VFOB
Rig command: V TX
Rig command: f
Frequency: 16000000
Rig command: S 0 VFOA
Rig command: f
Frequency: 145000000
What should this behavior be? Return VFOA or VFOB or error?
Rig command: S 0 VFOB
Rig command: f
Frequency: 16000000
netrigctl_transaction() returns either an error code (-ve int),
RIG_OK, or the number of characters read from the protocol stream. +ve
return values indicate successful parsing of stream data, not an
error.
on the real rig. In rigctl_parse.c, we make sure that invalid attempts to
so so are mapped on a safe variant.
Second change to netrigctl: drain the input line before sending a new
command, to reach sync again after a timeout.
Separate FT-891 features
Fix rigctl and rigctld to not abort on function not available
Change Yaesu detection of FA length to automatic method instead of rig specific
The rig frontend may be able to emulate RIG_LEVEL_STRENGTH by using
RIG_LEVEL_RAWSTR and an S-meter calibration curve. The netrig client
doesn't know this so it must pass STRENGTH queries regardless if it
knows a RIG_LEVEL_RAWSTR query is allowed. If the server cannot oblige
it will return a -RIG_EINVAL error which should be fine.
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.
This change allows the set_mode functions to leave the rig passband
unchanged if required. For the few rigs that do not have explcit
passband width control either current state is read and rewritten or a
"normal" width is chosen e.g. select a normal width when there is a
choice like CW and CW-NARROW.
Because the dummy rig provides a get_ptt function it must look at the
hardware PTT if that is being used and or that state into its result.
This issimilar to a real rig that would be in tx because of the
control line.
Moved all backend *.h files into the SOURCES primary as Automake
documentation states all source file types should be listed. This
causes Automake to include *.h files in rebuild rules for the targets.
Removed the '-DIN_HAMLIB' assignment from the CFLAGS primary in each
backend and assigned it to AM_CPPFLAGS in configure.ac. The effect is
the same and it simplifies the backend Makefile.am files.
Removed all commented lines.
Android makefile fragments are distributed as extra distribution files
by the GNU build system but are otherwise ignored. The Android build
support is independent and does not rely on the GNU build system.
See android/README.android for more info.
Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
In response to a long standing request from Tor, N4OGW, and others, RIT
and XIT are added as members for the rig_set/get_func() members.
"RIT"/"XIT" have been added as tokens. The dummy rig backend and
testrig.c have been updated for these new functions.
Applications should test a backend with the rig_has_set/get_func() and
test for RIG_FUNC_RIT or RIG_FUNC_XIT. A non-zero result indicates
these functions are implemented by a given rig backend. It will take
some time for all backends to migrate to this new implementation. Once
implemented, RIT or XIT should be set to '0' to 'clear' the value
without deactivating the rig's RIT/XIT function. The dummy/dummy.c file
can be used as a simple guide for backend authors implementing this
behavior.
From the SourceForge tracker:
I am using version hamlib-1.2.15.2~rc3. Start rigctl and specify rig 2
(rigctld). The command "s" (get_split_vfo) will return two parameters,
the spilt state (0 or 1) and the TX VFO name. The command "S"
(set_split_vfo) will send one parameter, the TX VFO name, but will not
send the split state (0 or 1). This is incorrect. In the file
dummy/netrigctl.c change netrigctl_set_split_vfo() line 782:
len = sprintf(cmd, "S %s\n", rig_strvfo(tx_vfo));
to include the "split" paramater; perhaps:
len = sprintf(cmd, "S %d %s\n", split, rig_strvfo(tx_vfo));
Thanks to Jim, N2ADR for reporting this.
* fix bug in set/get_func
* better range checking of memory channel number
* implemented RIG_OP_TOGGLE
* frequency dependent LEVEL_STRENGTH
* some caps update
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2911 7ae35d74-ebe9-4afe-98af-79ac388436b8
to set_split_vfo/get_split_vfo, and take an extra transmit vfo arg.
Ascending compatibility is retained at the API frontend level.
NOTE: only function name has changed. The backends do not implement
necessarily the new semantic (the extra tx vfo is just ignored).
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1425 7ae35d74-ebe9-4afe-98af-79ac388436b8