Yet another failed attempt to test code via simulator; x25/x26 commands
gave bogus answers. So, another round of general cleanups for a
couple of simulated rigs.
Fix detection of bad headers
Always send well-formed ACK/NAK frames
Add missing values to 0x26 messages
Fix bad responses when VFOB is active
Remove duplicate debug messages
Add some vendor-specific data and definitions to sim.h
Partial removal of rig.h dependencies/definitions
Per Yaesu Tech support, treat all FTDX-3000 models the same. See comments
in PR #2039.
While removing references to FTDX-3000DM, I happened across simft818.c.
It set a new low for simulators. It is completely wrong - it uses
new CAT protocol, while the rig uses the old 5-byte binary version.
If you want to simulate the FT-818, start over with simft817.c as
the basis, because this one is gone.
Allow simftdx1200.c and simftdx3000.c to at least start, go
through the initial setup/open, have mode and width do something.
Fix field lengths, missing commands, incorrect data, etc.
simftdx3000.c shows an interesting problem - the FTDX3000 CAT manual
says the rig should return 0462 for the ID command - hamlib thinks
that is a FTDX-3000DM, the low power version. Maybe they're backwards??
Does anybody have a real one to find out?
As usual, trying to use a simulator for debugging/development testing
is not helpful.
Fix ID command so it at least can say it is a FTDX-101
Get rig of includes of rig.h and misc.h
Fix the SH command so it agrees with the FTDX101MP/FTDX101D CAT OpsRef
TODO: Roofing filters, Main/Sub vfo commands, and lots more.
Fixes:
make[1]: *** No rule to make target '../lib/libmisc.la', needed by 'simatd578'. Stop.
Steps to reproduce:
make clean
make -j12 -C simulators check
Include string.h to declare strerror
Remove rig.h from simic705.c
From first principles, none of the simulators should use *ANY* of the
code from Hamlib. Using the same code on both sides of a simulation gives
the equivalent of a math "X = X" proof; guaranteed to work, but useless
for proving anything else.
Fixes:
simic905.c:108:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
simic910.c:112:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
When the software on the other side of the pty closes the device,
the simulator would close and reopen its side but it is unneeded
because it can continue to call read() without doing anything special.
Fixes an infinite stream of debug output because it erroneously
appeared to have read 1 byte instead of 0:
n=1
00
Not 8 bytes? bytes=1
Unknown cmd=00
Tested with:
tests/rigctl -m 37001 -r /dev/pts/6 f
(however it doesn't read the frequency because it looks like the
protocol is different or incomplete, rigs/anytone/d578.c is still
in beta)
The following command work from rigctl: get_freq get_ctcss_tone get_rig_info.
Uses the information from the manual linked at the top of rig/kenwood/tmd710.c.
Fixes:
simtmd710.c:64:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
simtmd710.c:68:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]