Commit Graph
108 Commits
Author SHA1 Message Date
Collin Kidder 39b43ebf38 Switched up the way time stamp formatting is done. Now tracked by an
enum for easier determination. Also changed graphing window to respect
"system clock" style timestamps and display them properly.
2023-03-15 19:50:58 -04:00
Collin Kidder e0fe807c38 Incremented version number, added mode to playback window to make it
start playback only once traffic starts coming in
2023-02-22 19:09:41 -05:00
Collin Kidder 4ecffaa76a Changed text in settings window to more clearly explain what the max
frames / prealloc setting does, some other minor bug fixes and extra
comments in code.
2023-02-13 19:17:44 -05:00
Collin Kidder e1f06be6fd Added a setting that allows for limiting the number of bytes per line.
This is useful if you have a 1920x1080 monitor or smaller resolution
but you want to capture 64 byte payloads. The default is 8 bytes but
usually 16 bytes is fine.
2022-12-08 20:35:33 -05:00
Andy Huska 1b41decd20 Custom sender is no longer crashing
There are a TON of explorations I did here, many may be unnecessary, but this is a stake in the ground.

The main issue was the strange queue logic in canconmanager::sendFrame which puts the tx data in the rx
queue so it will show up in the displayed data.  It caused SIGABRT and SIGSEG to show up everywhere.
It is NOT fixed yet, but TX works over the wire you just can't see it in the tableview.

I thought at first it was only when overwrite data was active, so I put in a a pile of changes to keep
frames and filtered frames as two seperate copies of data where frames was always complete and filtered
was only what was seen in the mainwindow.  It made it so the graphing window would work with overwrite
data active which is an improvement.  I wouldn't roll these changes back.  Because of these changes I
had to update the frame sorting code adjust the refresh function in canframemode.cpp

I also thought it was related to UI updates, but its not, that's been confirmed.

I put a mutex around the custom sender tick timer so that the 1ms timer wouldn't re-enter its callback.
This didn't fix the crash, but it sure seems to make a lot of sense, and the way I did it no elasped
time is lost for tracking purposes, and in reality theres no way 1ms was consistent anyway.

I put a mutex around the shrinking of frames and filteredframes to make sure we weren't deleting at
the same time as accessing, but honestly we acccess those lists in many places without semaphores so
that probably did nothing.

Fixed a bug in FrameSenderWindow:DoModifiers that was improperly parsing and sometimes crashing when
looking for the ~ operator before a symbol.

Also added some minor work to keep row expansion functioning when changing filters or sorting.  Need
to make some tweaks so it stops trying so hard when overwrite is not active

Theres also code in main.c taht makes debugging output super verbose.

Committing now to start cleanup
2022-11-01 15:01:07 -05:00
Andy Huska 3c07785040 Buffer for partially received and/or leftover frame fragments
now working with multiple active busses.

Removed commented out test code and put a fix in for for
the filters list not having its capacity properly reserved
in recalcOverwrite so multiple entries of the same message
show up in the filtered view
2022-10-03 17:02:13 -05:00
Collin Kidder 9da32e97f8 Merge pull request #506 from llange/qt6.3-itemdatarole
replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole (qt6)
2022-09-26 21:24:13 -05:00
Ludovic LANGE c2fc1f179e replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole (qt6)
Since long time ago (12yrs), Qt::BackgroundColorRole/Qt::TextColorRole are aliased by Qt::BackgroundRole/Qt::ForegroundRole
and raise a deprecation warning.

Qt6 remove those values, thus we need to use Qt::BackgroundRole/Qt::ForegroundRole.
2022-09-24 22:06:09 +02:00
Andy Huska 9312cadd88 Merge branch 'master' of https://github.com/collin80/SavvyCAN into collin80-master 2022-09-23 15:39:45 -05:00
Andy Huska 5ffe161210 more clean up 2022-09-23 15:30:58 -05:00
Andy Huska f38e0b0bfa Took out unnecessary exception recover code
Cuz app is going to crash anyway, no need to make a mess
2022-09-23 15:28:41 -05:00
Andy Huska cb94cac205 Fixed issue where filteredFrames was having its capacity changed
when adjusting filters due to appending a QVector of frames which
appears to change the capacity to the number of items appended.
Also fixed bug where preallocsize was being locally defined and
therefore the global version wasn't being updated with unknown
effets.
2022-09-19 13:47:57 -05:00
Andy Huska 6fa84df7e0 Added ability to maintain bus and msg filters when clearing frames 2022-09-19 13:31:00 -05:00
Andy Huska d56b35ea91 Made max # of frames an option in preferences, restart to take effect 2022-09-19 13:10:33 -05:00
Andy Huska 195c90c415 change the max amount of the reserved space for the frames and filteredFrames vectors
to be 99% of the capacity instead of 95%.
Reset initial capacity to be 10M frames for 64-bit machines now that testing is done.
Want to make the capacity adjustable by user, too.
2022-09-18 13:01:34 -05:00
Andy Huska 742956d46c Working on finding a way to prevent bad_alloc crash, temp stuff in place like prealloc size, and frames list resize (prob need to keep list below size limit to prevent chaos...10M msgs or so mabe) 2022-09-17 12:33:15 -05:00
Collin Kidder fadd5a6878 Merge pull request #458 from CSS-Electronics/feature_support_fd_in_comparison
Avoid undefined behavior if FD frame datalengths are present in sorting
2022-05-05 20:08:23 -04:00
Collin Kidder b37af8d948 Fix time formatting for "system clock" mode, fix a few small bugs
elsewhere, add ability to send/receive CAN-FD frames in GVRET.
2022-05-05 20:04:44 -04:00
Magnus Aagaard Sørensen a17e9ee8db Limit the comparison to 8 bytes or the length of the CAN frame, whatever is shorter, to avoid negative bitshifts 2022-02-21 08:23:46 +01:00
Collin Kidder c4a9f99445 Added two modes - millisecond timestamps for frames and a way to
ignore colors set in DBC files
2022-01-19 21:34:49 -05:00
Collin Kidder 344cc5b36b Update canframemodel.cpp
Fix normalize timing when there are no frames (fix suggested by @joee-co)
2021-08-18 18:46:28 -04:00
Collin Kidder e64e84d6fa Bug fixes for extended IDs in DBC files, fix one off error in a few
places (Corrects fuzzing window ID range), re-enabled overwrite mode
showing all signals in a message
2021-04-28 21:41:33 -04:00
Collin Kidder af0194c5a5 Fixes to make extended multiplexing code work properly, implementation
of nested multiplexing in main screen for interpretation.

Overall, it's ugly but mostly functional at this point.
2021-02-25 21:24:21 -05:00
Bertrand ba63a25fe3 added bus filter to main window 2021-02-23 08:10:39 +01:00
Collin Kidder 5a3e5636f6 Changes to hopefully handle error frames better over the socketcan
interface
2020-10-13 20:09:46 -04:00
Kanstantsin Shautsou 56571dd92a Align data 2020-10-07 03:21:49 +03:00
Collin Kidder 18e20a2ee2 Fix UDS interpretation of read by ID, Fix up display issues with
interpreted messages on main screen.
2020-09-21 22:04:28 -04:00
Collin Kidder d550fa79a0 Changed a lot of pointer references to const (it's more correct and
fixes a weird problem), fixed a problem with JSON to DBC, a few other
fixes
2020-02-13 22:01:06 -05: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 ef24036d1c Finished switching over everything to the new can format (I hope). It
seems to function now but much more testing is needed.
2019-12-13 21:06:48 -05:00
Collin Kidder b6a15a28cd More fixes for compiler warnings - cleaning up code and making assumptions more clear 2019-08-12 22:02:07 -04:00
mjuhanne 428b19c5c4 - Save DBC file configuration when changed, and restore it when restarting the application (no need for manual entry everytime app is launched)
- Add GMLAN 29bit filtering feature. In addition to J1939 matching, it is now possible to match DBC messages using only the Arbitration Id (bits 14-26 of CAN Address), since  Priority id (higher bits) and Sender Id (lowest 13 bits) are not relevant when interpreting the CAN message content. This allows to use the excellent GM Global A DBC files on https://github.com/commaai/opendbc. Just remember to select the "GMLAN" matching criteria on DBC File manager.
- Add "Filter labeling" feature. Using loaded DBC files, it matches the filter Ids with DBC messages and shows them in filter windows. Labeling works in the main window (no need to set "Frame interpret" on, since this is a separate feature), as well as in Flow view, Frame data analysis, Playback and Fuzzzing windows. This makes it so much easier to concentrate on those CAN messages that matter. To use this feature, select global "Label filters using messages from DBC files" on Main Configuration page, and then enable the feature on individual DBC files (on DBC file manager) as needed. This is needed if there's overlap in CAN addresses between DBC files, and because the filter labeler cannot tell apart anymore which Filter ID is associated to which bus, it might label them incorrectly. But usually it's ok to just enable the labeling with all the DBC files.
- In Frame data analysis window, in addition to J1939 decoding show also GMLAN (Priority bits, Arbitration Id, Sender Id) decoding.
- FilterUtility static class used for centralized ListWidgetItem creation and for other helper functions
- DBC handler: To allow setting bus numbers even before connection is configured, do not enforce "valid" bus numbers
2019-08-11 23:16:02 +03: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 e3a47fb42f Merge pull request #195 from nkirkby/194_new_filters_default_to_false_if_any_existing_filters_are_false
#194: new filters default to false if any existing filters are false
2019-06-11 21:58:14 -04:00
Collin Kidder 3c262693ac Overwrite mode now respects the bus number and will only overwrite frames with the same ID and bus number. Overwrite now also shows time delta instead of timestamp. 2019-06-11 21:54:47 -04:00
Nick Kirkby 828733340f #194: new filters default to false if any existing filters are false 2019-06-11 00:22:36 -07:00
Collin Kidder c363059951 Now doing custom sorting for main display. It now actually sorts the
frame list itself which will sort for all windows. Much faster, and
sorts properly for all columns. Also re-added custom display for
timestamp. Still needs to be fixed in Windows.
2019-05-01 20:23:32 -04:00
Collin Kidder a716eb8a30 Merge branch 'WIP' of github.com:collin80/SavvyCAN into WIP 2019-04-10 20:29:52 -04:00
Collin Kidder 67b7de48a6 Add frame count so that overwrite mode can show it. Frame count
replaces remote frame indicator when in overwrite mode.
2019-04-10 20:29:13 -04:00
Collin Kidder 44287793b4 Revert change in timestamp formatting as the new code would sometimes malfunction on Windows. 2019-03-30 23:46:09 -07:00
Collin Kidder 2e5de7a37d Reformat timestamps to look a bit nicer 2019-03-17 18:29:44 -04:00
Collin Kidder c9880be2c5 Add caching to the DBC signal system so that we can show all the
signals in overwrite mode.
2019-03-11 20:53:45 -04:00
Collin Kidder 118034b003 Fix the just added fun checkerboard pattern in the main frame view 2019-02-26 20:33:34 -05:00
Collin Kidder 31961361dd Make the main view model use the system colors and alternate row
background
2019-02-26 20:28:19 -05:00
Collin Kidder 6c633f8720 Overwrite mode now has a warning message before you can really enable
it. Also, it alters the main frame list to show just the one frame per
ID so it is extremely obvious that you're in overwrite mode.
2019-02-19 20:53:46 -05:00
Collin Kidder 9f20906df3 Fixes to formatting of main frame display. Fixes issue #164 2019-02-19 19:30:25 -05:00
Collin Kidder 693e29141c Fix for a warning that was happening 2018-07-24 22:12:10 -04:00
Fabián Inostroza b8896d76b6 Make SavvyCAN aware of remote frames. 2018-04-29 18:52:31 -03:00
Collin Kidder 028a108169 Added ability to decode MARK frames from the CAN stream. These are used just to mark
where you've done something. M2RET devices currently support this, more support to come later on.
2018-02-04 18:10:37 -05:00
Collin Kidder 842f5fe0bc Add ASCII representation to main window 2017-12-10 17:11:39 -05:00