Wykres commitów

10400 Commity (42b6fb13f998a8ba5a28ee2457cb70ced954d7a3)

Autor SHA1 Wiadomość Data
Mike Black W9MDB 42b6fb13f9 Remove hamlib/config.h from nobase_include_HEADERS
https://github.com/Hamlib/Hamlib/issues/1373
2023-08-26 10:13:54 -05:00
Mike Black W9MDB c1f24b2f7a Fix TS2000 SA command 2023-08-25 15:36:12 -05:00
Michael Black 897faf00c0
Merge pull request #1349 from torque/spid-logfix
spid: handle a control stream containing log packets
2023-08-22 22:25:48 -05:00
torque d049b90aa9
spid: flush serial input buffer before command send
This seems to take care of the log data pretty much entirely and is
possibly a much simpler alternative solution to the previous two
commits. However, for full robustness, I think it makes sense to keep
all three of these changes together. Also, it's entirely possible that
this approach introduces a performance regression: I haven't
particularly looked at how the buffer flushing is implemented, but if
it ends up doing looped reads with a timeout, this could slow down
command processing for the SPID object significantly. Since I've only
tested this through the command line interface, I have not taken a
close look at performance.
2023-08-22 17:25:53 -07:00
torque ccab50a7df
spid: account for another type of debug message
When the settings are saved via the front panel on the MD-01, the
following debug messages are printed on COM 0:

    thread_motionController: settings changed!\r\n
    thread_protocols: settings changed!\r\n

Notably, because these aren't timestamped the way the other debug
messages are, they were missing the our debug message sieve and causing
protocol errors. Address this by treating anything that doesn't start
with the ROT2PROG start byte ('W') as a log frame.
2023-08-22 17:25:53 -07:00
torque 470c71dd93
spid: handle a control stream containing log packets
I have an MD-01 controller running firmware 2.0.237 that is connected
to the computer via the COM0 DB9 port. When it receives a control
command to move the rotator, it prints debug logs to the serial output
that look like this:

  input:
    W3600\x0A4500\x0A\x2F\x20

  output:
    W\x03\x06\x00\x00\x0A\x04\x05\x01\x00\x0A\x20
    287925671: in motion\r\n
    287925673: Change motion state M0 to mcsStart\r\n
    287925678: GO  A 0.000000 0.000000 t ---\r\n
    287925680: in motion\r\n
    287925683: Change motion state M1 to mcsStart\r\n
    287925686: GO  E 90.000000 91.000000 t ---\r\n
    287925690: distance to go M0 too small. End.\r\n
    287925694: Change motion state M0 to mcsStopped\r\n
    287925698: Stop on motor 0 on angle 0.000000\r\n
    287925703: Change motion state M1 to mcsRunning\r\n
    287926610: distance to go M1 too small. End.\r\n
    287926613: Change motion state M1 to mcsStopped\r\n
    287926617: Stop on motor 1 on angle 90.000000\r\n

Note that the response frame is not necessarily present in an specific
order relative to the log messages: I have seen it come after the logs
as well. Because the current implementation just slurps up response
bytes without checking the framing or anything, as soon as any of this
log data enters the command stream, all subsequent commands will read
completely bogus responses.

Regardless of whether it's due to a misconfiguration, a weird artifact
of the firmware, or something more sinister, the MD-01 is awkwardly
interspersing its normal fixed-size-frame response with these
line-based log messages. As shown above, the log messages appear to be
consistently of the format <timestamp>: <message>\r\n, where
<timestamp> is some kind of integer timestamp (possibly relative to
unit boot) and <message> is an ASCII string.

Due to poor(?) design decisions by the protocol designers, the frame
start and end bytes are both printable ASCII characters ('W' and ' '
respectively) and the MD-01 response frame contains no other
validation information (such as a CRC), which means that a valid log
line could fairly easily contain a character sequence that is
indistinguishable from a valid response frame, without actually being
a valid response frame.

However, since the log messages appear to be reasonably strictly
structured, we can make a small number of assumptions that will allow
us to reliably separate response frames from log lines without having
to fall back on a heuristic-based parsing strategy. These assumptions
are as follows:

1. A log line will always begin with an ASCII character in the range
   [0-9], none of which are the frame start byte.
2. A log line will never contain \r\n in the middle of the line (i.e.
   multi-line log messages do not exist). This means a log "frame" will
   always be of the form [0-9]<anything>\r\n.
3. The controller will not emit a response frame in the middle of a log
   line.
4. The operating system's serial port read buffer is large enough that
   we won't lose data while accumulating log messages between commands.

Provided the above assumptions are true, a simple state machine can be
used to parse the response by treating the log lines as a different
type of frame. This could be made much more robust by applying
additional heuristics for specific packets (e.g. get_position has some
reasonably strict numerical bounds that could be used to sanity check
the contents of the reply frame).
2023-08-22 17:25:53 -07:00
Mike Black W9MDB 46c0649b23 Fix spacing in k3/k4_stop_morse
https://github.com/Hamlib/Hamlib/issues/1366
2023-08-21 16:33:53 -05:00
Mike Black W9MDB 404ceb8c4b Change send_morse, stop_morse, send_voice_mem, and stop_voicemem to not require a VFO argument
https://github.com/Hamlib/Hamlib/issues/1365
2023-08-21 15:16:32 -05:00
Mike Black W9MDB 453a8cc94f Fix K3/K4 stop_morse
https://github.com/Hamlib/Hamlib/issues/1366
2023-08-21 15:10:41 -05:00
Mike Black W9MDB 5113c6a895 Add simqrplabs.c 2023-08-21 10:31:55 -05:00
Mike Black W9MDB 194906b290 For QRPLabs ignore the IF return length as the differenet models can't agree on the length.
QMX adds an extra space on the end with firmware 1_00_09
https://github.com/Hamlib/Hamlib/issues/1372
2023-08-21 10:13:26 -05:00
Mike Black W9MDB 24e407c82c Fix github build 2023-08-20 16:34:35 -05:00
Mike Black W9MDB 7011b48554 Add rigfreqwalk 2023-08-20 16:16:08 -05:00
Mike Black W9MDB cca3891362 Change L METER to allow meter names in addition to numeric
Change l METER to return meter number=name instead of just number
Hopefully doesn't mess up anybody using this function via rigctl/rigctld uf they parsing the number correctly.
It's easier for users with to use/see text names for both set/get
https://github.com/Hamlib/Hamlib/issues/1369
2023-08-20 16:03:25 -05:00
Mike Black W9MDB 1b0f0ec422 Fix K3 stop_morse RPRT return
https://github.com/Hamlib/Hamlib/issues/1365
2023-08-19 15:35:54 -05:00
Mike Black W9MDB b40da0f6b0 Increase send_morse size to use maximum for rigs or 20 chars (if morse_qsize unknown)
This will still allow for up to 1023 characater to queue up.
No guarantees on which rigs allow for this queuing though.
Kenwood rigs can at least find the buffer status to wait for room but not all rigs do.
https://github.com/Hamlib/Hamlib/issues/1368
2023-08-19 12:36:07 -05:00
Mike Black W9MDB 424e8cc04a Reduce KY wait time in kenwood.s to 50ms instead of 500ms
https://github.com/Hamlib/Hamlib/issues/1366
2023-08-19 11:22:31 -05:00
Mike Black W9MDB 1ad43a44ba Fix KEYERTYPE
https://github.com/Hamlib/Hamlib/issues/1363
2023-08-19 08:43:06 -05:00
Mike Black W9MDB 3492be2562 Fix compile warning in flex6xxx.c 2023-08-19 08:29:05 -05:00
Mike Black W9MDB af86f44eac Fix CW morse infinite loop when error occurs RIG_EINVAL 2023-08-18 22:35:21 -05:00
Mike Black W9MDB d57e4ae185 Improve Kenwood send_morse speed 2023-08-18 17:36:19 -05:00
Mike Black W9MDB 3318766a7c Add stop_morse to elecraft rigs
https://github.com/Hamlib/Hamlib/issues/1366
2023-08-18 16:54:19 -05:00
Mike Black W9MDB 3814f2dadf Add set_voice_mem and stop_voice_mem for K3/K3S/K4
https://github.com/Hamlib/Hamlib/issues/1367
2023-08-18 16:49:35 -05:00
Mike Black W9MDB 36dade6e6c Strip CR/LF from 'b' command input
https://github.com/Hamlib/Hamlib/issues/1365
2023-08-18 12:20:41 -05:00
Mike Black W9MDB 57ebd647eb Add split capability to Xiegu G90
https://github.com/Hamlib/Hamlib/issues/1364
2023-08-18 10:56:58 -05:00
Mike Black W9MDB 7bd9cbef83 Fix simxiegug90.c
https://github.com/Hamlib/Hamlib/issues/1364
2023-08-18 09:29:53 -05:00
Mike Black W9MDB 7eefc77f5d Revert "Fix G90 by changing set/get_mode_with_data to set/get_mode and suppress icom_get_dsp_flt"
G90 Firmware 1.80 fixes the x1a x03 command along with x25/x26
This reverts commit 01730082fb.
2023-08-18 09:27:05 -05:00
Mike Black W9MDB 4faef9e031 Add simxiegug90.c 2023-08-18 08:17:39 -05:00
Mike Black W9MDB 01730082fb Fix G90 by changing set/get_mode_with_data to set/get_mode and suppress icom_get_dsp_flt
https://github.com/Hamlib/Hamlib/issues/1364
2023-08-18 08:06:14 -05:00
Mike Black W9MDB 0edd1df223 Add more KEYERTYPE implementaions to Icom rigs 2023-08-18 00:04:59 -05:00
Mike Black W9MDB 147dea7651 Remove get_dsp_flt for G90 as it does not have that command 2023-08-17 22:57:11 -05:00
Mike Black W9MDB ccd6472f03 Fix KEYERTYPE in ic7300.c and add parsing of STRAIGHT, BUG, PADDLE for rigctl(d)
https://xiegu.eu/downloads/
2023-08-17 22:49:20 -05:00
Mike Black W9MDB 8c63fdeafc Add KEYERTYPE for IC-7300, IC-705, IC-9700
https://github.com/Hamlib/Hamlib/issues/1363
2023-08-17 17:52:03 -05:00
Mike Black W9MDB aa338afa1a Fix parm_gran for Kenwood
https://github.com/Hamlib/Hamlib/issues/1357
2023-08-17 17:12:33 -05:00
Mike Black W9MDB 63bb03cb07 Fix Yaesu gran_parm
https://github.com/Hamlib/Hamlib/issues/1357
2023-08-17 16:57:05 -05:00
Mike Black W9MDB e887152407 Fix parm_gran
https://github.com/Hamlib/Hamlib/issues/1357
2023-08-17 16:04:45 -05:00
Mike Black W9MDB beb69f752a Add BACKLIGHT to IC7300
Add get_powerstat to  IC9700 which speeds up start when auto_power_on is detected
2023-08-14 22:22:55 -05:00
Mike Black W9MDB 5062d565a9 Add the ability to parse '1' in parse_vfo for gpredict 'S 1 1' and 'S 0 1' command
https://github.com/Hamlib/Hamlib/issues/1362
2023-08-14 16:15:03 -05:00
Mike Black W9MDB 2bc28f2dea Fix duplicate printout in get_parm
https://github.com/Hamlib/Hamlib/issues/1361
2023-08-14 12:35:28 -05:00
Mike Black W9MDB 003b50bc57 Standardize extended response in rigctld for level, func, and parm
,l VFOA AGC
get_level: VFOA,AGC,0,RPRT 0

,u VFOA RIT
get_func: VFOA,RIT,0,RPRT 0

,p ANN
get_parm: currVFO,ANN,0,RPRT 0

Error example
,p NB
get_parm: currVFO,NB,RPRT -1

https://github.com/Hamlib/Hamlib/issues/1361
2023-08-13 23:23:23 -05:00
Mike Black W9MDB f0765e6c3a Remove more noisy debug from frame.c 2023-08-12 11:32:27 -05:00
Mike Black W9MDB 7392d206a8 Remove noisy debug from frame.c 2023-08-12 11:06:42 -05:00
Mike Black W9MDB fb3d83a19a Add BANDSELECT to PowerSDR
https://github.com/Hamlib/Hamlib/issues/1353
2023-08-11 17:50:42 -05:00
Mike Black W9MDB ac5018a9a3 Update 60M band for BANDSELECT 2023-08-11 13:31:23 -05:00
Mike Black W9MDB 1f50b88320 Fill out BANDSELECT frequency table
https://github.com/Hamlib/Hamlib/issues/1353
2023-08-11 12:12:17 -05:00
Mike Black W9MDB 6014e3142d Another attempt to fix codeql deprecation warning 2023-08-11 11:35:29 -05:00
Mike Black W9MDB f5e30815b7 Fix codeql 2023-08-11 11:32:53 -05:00
Mike Black W9MDB ef3b90a1be Update codeql 2023-08-11 11:31:57 -05:00
Mike Black W9MDB 72870ec26a Update codeql 2023-08-11 11:11:57 -05:00
Mike Black W9MDB afa51b9863 Add simftdx101 2023-08-11 10:53:00 -05:00