Commit Graph
19 Commits
Author SHA1 Message Date
RefuhrandClaude Opus 5 3ae429ae48 feat: add gs_usb support on Windows
candleLight, CANable, CANnectivity and cantact adapters speak gs_usb. On
Linux and macOS the kernel driver exposes them as SocketCAN interfaces, so
SavvyCAN already reached them through Qt SerialBus. Windows has no such
driver, which left those adapters unusable there.

Add a GSUSBConnection that talks to the hardware directly over WinUSB:

- one connection per physical device, one SavvyCAN bus per CAN channel
- CAN FD including BRS, plus RTR, extended IDs and error frames
- known good bit timings for 16/48/80/160/170 MHz device clocks, with a
  generic solver for clocks the tables do not cover
- hardware timestamps, unwrapped across the 32 bit rollover and anchored
  to the host clock so they line up with the rest of SavvyCAN

gs_usb multiplexes every channel over a single USB bulk IN endpoint, so a
single reader thread drains it and hands frames to the connection thread in
batches, coalescing the wakeups. That keeps one producer on the lock free
queue, which the tx echo path already writes to.

Device scans skip adapters that a live connection holds. candle_dev_open()
shares the file handle and queues read URBs immediately, so probing a device
in use would consume frames the open connection is waiting for.

connections/candle_api is an unmodified copy of the candle Windows API, LGPL
3.0 rather than MIT and only compiled into Windows builds. See its README for
provenance.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZnuZJ7zc3e8hk6C8bGDZN
2026-07-29 09:25:32 +02:00
Generoso Cesaro cb2725e6c4 Added canlogserver CAN remote capture 2023-11-17 16:21:38 +01:00
Chris Whiteford c6c2869124 Support for getting live data from a CANserver 2023-01-22 11:31:41 -05:00
Collin Kidder 9ebbaca668 Add a new connection type - Lawicel. It works for some devices, not
all. More development needed but this is a start. Also added ability
to set serial speed and bus speed in the device setup which may be
useful for other connection devices too.
2022-10-04 19:48:11 -04:00
Bertrand c49783a55b adding socketcand support 2021-02-23 09:38:19 +01:00
Collin Kidder 8beb0e31a0 Converted more code to be easier to generalize to larger CAN payloads
for CAN-FD. Improved some code to be faster. Fixed up some compile
time warnings.
2019-12-15 15:02:06 -05:00
Collin Kidder e7e65b7216 Fixed up a bunch of compiler warnings.
There should be no functional difference, just less noise when compiling
2019-08-08 21:15:51 -04:00
Collin Kidder 09b8d64f4a Add a reset connection button. Automatically disconnects and
reconnects to try to heal a broken connection.
2019-05-13 20:50:16 -04:00
Collin Kidder ec49413f61 Major revamp of the connection window. Hopefully it is more clear and
intuitive now.
2019-03-05 21:25:32 -05:00
Collin Kidder 2df7a2a9fc Allow setting CAN baud rate for SerialBus devices 2018-10-21 15:07:16 -04:00
Collin Kidder b7bb37048b Enabled ability to use any QT SerialBus driver in SavvyCAN. Now
PeakCAN, ValueCAN, SocketCAN, and J2534 should all work.
2018-10-21 11:50:24 -04:00
Andre Hartmann 55273a1b85 CanConnection: Convert switches to enumeration and add documentation
And add or remove default labels to silence Clang compiler warnings.
2017-11-26 18:00:28 +01:00
Andre Hartmann cfc024f98a CanConnectionModel: Remove superflous breaks after return
Clang complained about them.
2017-11-26 16:26:25 +01:00
Collin Kidder c398856806 Small fix to make unconnected devices still show up properly in the connection window 2017-11-09 20:07:00 -05:00
Collin Kidder 0519e2d2c9 More work on supporting swcan - it's there now! Untested as of yet. 2017-10-22 20:42:02 -04:00
Collin Kidder ac976643f4 Further work to get more buses working on the GVRET/M2RET devices 2017-10-22 20:15:18 -04:00
Collin Kidder 383ee8fe19 Big changes to connection window to make it more intuitive. Also
brings window closer to supporting M2RET devices better.
2017-10-18 21:48:13 -04:00
Collin Kidder 9cceb4404d Remove some older junk code, add ability for main screen to show the number of connected buses 2016-12-20 20:33:11 -05:00
Collin Kidder b7a1afcd8f Further source file restructuring 2016-12-11 21:36:25 -05:00