Commit Graph
57 Commits
Author SHA1 Message Date
Andy Huska a7acaac2fb Cleaned out comment blocks from debug and fixed framesender not showing
count until a number is manually entered (it was seeing the null item,
creating the item, but not putting it in the table).
2022-11-02 15:32:39 -05:00
Andy Huska 6ef4c2ddfa Fixed the queue of TX messages. Had to be moved to the worker thread. 2022-11-02 15:26:07 -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 cfe643b390 Merge branch 'master' of github.com:qurrent-llc/SavvyCAN 2022-10-17 12:50:51 -05:00
Andy Huska a36c04e986 Merge branch 'fix_dbc_creation' 2022-10-09 17:24:22 -05:00
Andy Huska f321cb19d3 Merge branch 'master' of github.com:qurrent-llc/SavvyCAN 2022-10-09 17:23:01 -05:00
Andy Huska 0f44cd9cf1 Merge branch 'fix_dbc_creation' of github.com:qurrent-llc/SavvyCAN into fix_dbc_creation 2022-10-09 10:58:04 -05:00
Andy Huska 04f4af1bf9 One lingering thing removed before PR 2022-10-09 10:57:25 -05:00
Andy Huska e86cfb277a Cleaned up all the UI elements and error checking for rebase and duplicate 2022-10-09 10:45:30 -05:00
Andy Huska d154a48aa9 Merge branch 'master' of github.com:qurrent-llc/SavvyCAN 2022-10-05 16:54:36 -05:00
Andy Huska 2644c66b61 Merge branch 'fix_dbc_creation' 2022-10-04 16:33:18 -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
Andy Huska e52a74ac7a Found a bug where complete frames being removed from the buffer were being shorted by 1 character
Committing now with debug comments for future reference
2022-10-03 16:36:30 -05:00
Andy Huska 08953a4004 Improved socketcand input buffer handling to reduce lost data.
No longer tossing partial frames, saving the data to concat with future data.
On startup there can be some data loss, but after it gets rolling there is none.
Added rough provision to ensure the buffer doesn't get filled with bad data, but
the decodeFrames recursive calls do a pretty good job of getting rid of it so I
haven't seen the buffer grow after millions of frames coming over a UDP-based VPN.
2022-10-03 11:26:28 -05:00
Andy Huska dc0b25bee8 Added setting for fixed width vs normal font in the data tables 2022-09-30 16:33:07 -05:00
Andy Huska bd8582b8e3 Added combobox for nodes so msg combobox isnt so long
Added disabled filenames in node combobox so you can understand what is what
Added node column to table
Made table columns sortable so you can sort by node name or message name

Want to make table fixed width font capable
Want to make table rearrangable
Want to make table rows shorter to fix more info in a window
Want to make it possible to have multiple signal viewer windows
Want to add ability to click on signals and add them to graphs like the main window
2022-09-28 20:02:27 -05:00
Andy Huska e8c2bba0c4 Merge branch 'master' into add_nodenameinsignalviewer 2022-09-28 19:16:33 -05:00
Andy Huska 3d9790344c Merge branch 'master' into fix_dbc_creation 2022-09-28 19:15:11 -05:00
Andy Huska 8232d90a73 Merge branch 'add_allowfilterstostayuponclear' 2022-09-28 19:14:02 -05:00
Andy Huska 7b65451874 Merge branch 'add_allowfilterstostayuponclear' 2022-09-23 15:51:02 -05:00
Andy Huska d5c0731366 Merge branch 'collin80-master' into add_allowfilterstostayuponclear 2022-09-23 15:40:09 -05: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 47d63c6296 duplicate works! multiplexed signals are not copied at this time
need to learn more about them first

need to do clean up and corner case handling
2022-09-22 18:04:27 -05:00
Andy Huska 27b58552df rebase working but definitely needs clean up for all the whatifs 2022-09-21 18:04:11 -05:00
Andy Huska 74366d1c6b context menu in place for node rebase/duplicate
need to add menu for rebase options and code for both actions
2022-09-20 17:49:04 -05:00
Andy Huska 0ee9eacbb3 realized that the value list was already supported so reverted
my custom code.  The issue that made me go down this path
is related to the little endian checkbox mysteriously and
inconsistently unchecking and therefore interpreting enum values
wrong...would really like to find this.
2022-09-20 17:08:20 -05:00
Andy Huska d9e371c494 The last commit of the ext ID fix removed need for modal editor 2022-09-20 16:50:04 -05:00
Andy Huska 6accf2e9e7 Fixed bug in extended addressing check
where ID was being AND'ed with 80000000 decimal instead of hex
2022-09-20 16:48:11 -05:00
Andy Huska da7a721494 Changed default signalviewer message matching to be by ID 2022-09-20 16:27:53 -05:00
Andy Huska e6058ead34 Progress!
Masked error caused by saving dbc while editor is open that causes
msg IDs to go crazy by making editor modal, but that affects all
other windows, so might be a better fix.

Added new value type of VALUE_STRING, probably better named
ENUMERATED_STRING, and it uses the table in the editor to define
the enum.

Fixed a bug in the signal viewer load when a signal is not matched
(I found it by renaming a signal and then loading)
2022-09-20 16:23:18 -05:00
Andy Huska 536122f3b5 Merge branch 'fix_dbc_delete' 2022-09-20 14:36:29 -05:00
Andy Huska aea5e9f9c8 Merge branch 'fix_dbc_delete' of github.com:qurrent-llc/SavvyCAN into fix_dbc_delete 2022-09-20 07:51:45 -05:00
Andy Huska 13c920f971 Fixed regression where non-commented node would not delete
Fixed odd crash due to dbcNode being null on refresh
2022-09-20 07:46:30 -05:00
Andy Huska 9e9195b34e changed default data table font to be fixed-width for easier reading 2022-09-19 16:13:30 -05:00
Andy Huska 40dbf253af Saving, loading, clearing, and appending signal lists working!! 2022-09-19 15:28:53 -05:00
Andy Huska afede9573b Merge branch 'fix_addframebadalloc' 2022-09-19 13:51:31 -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 07d1610a63 Merge branch 'fix_addframebadalloc' 2022-09-19 13:11:22 -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 fd657b9b9b Merge branch 'fix_addframebadalloc' 2022-09-19 12:48:43 -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 dfc7b095c8 Added node name as part of the signal name that gets copied into the data table 2022-09-17 13:54:59 -05:00
Andy Huska e06112b14c Merge branch 'fix_dbc_delete' 2022-09-17 13:33:13 -05:00
Andy Huska b9899ee229 Merge branch 'fix_socketcand' 2022-09-17 13:33:00 -05:00
Andy Huska 008ac6b744 Merge branch 'fix_framesenderloadtrailing0x00' 2022-09-17 13:32:47 -05:00
Andy Huska 99640d7239 Fixed data string parsing bug where an empty string created by a trailing space would be interpreted as a 0 and then added as a data byte
This affected editing of the data in the table as well as loading data from a saved file
2022-09-17 13:16:02 -05:00
Andy Huska 6cf404701e Bug was due to treating an empty token as a 0, so fixed the string parsing to ignore empty tokens 2022-09-17 13:04:39 -05:00
Andy Huska 57f506b4dd Merge branch 'fix_socketcand' into fix_addframebadalloc 2022-09-17 12:53:57 -05:00
Andy Huska 60520b5939 Added handing of ok message from RAW mode switch coming in out of order with other messages...
For now I made it its own else statement so it can be detected
2022-09-17 12:52:03 -05:00
Andy Huska 47d07b8bf2 Fixed bug where switching to RAW mode would fail due to the "ok" response being received in the same message as the first data frame
Sometimes when opening socketcand 1 or more busses won't start right and there's a ton of debug data saying "received datagramm: ...."
It seems to happen because the switch to RAW mode is in progress and we receive the OK with a frame in the same datagramm and we don't parse the OK out of the string
but rather expect the whole string to just be OK.  Offending code is in socketcand.cpp SocketCANd::procRXData line 386

Fixed by looking to see if the < ok > message was at index 0 of the incoming message...could also look for it elsewhere (as in index != -1), but not sure if necessary
2022-09-17 12:48:48 -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
Andy Huska 7b966fe4a6 Fixed incorrect handling of partial frame tagged onto the end of a complete frame.
Not sure if my method drops the partial or just sends the buffer back to continue filling.
2022-09-16 15:38:54 -05:00
Andy Huska 7e4ebf2c74 Fixed nonfunctional node delete. Was due to trying to find node by name but
passing in the name and comment concatenated together.  Made a new function to
find by name+comment since extracting only name from the text in the column would
require too much guessing.
2022-09-15 18:59:24 -05:00
Andy Huska b6b73d0e11 Fixed crash when deleting a message that isn't at the bottom of the node 2022-09-15 18:39:56 -05:00