Fix missing and mislabeled received CAN frames#1082
Open
minoseigenheer wants to merge 3 commits into
Open
Conversation
Agent-Logs-Url: https://github.com/minoseigenheer/SavvyCAN/sessions/d7d7edf6-08b8-406e-afff-b9fc41ceceb1 Co-authored-by: minoseigenheer <34364368+minoseigenheer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/minoseigenheer/SavvyCAN/sessions/0f9623c1-fb6d-41ae-afcb-8c74deeb28cd Co-authored-by: minoseigenheer <34364368+minoseigenheer@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three fixes that together ensure received CAN frames are correctly captured and displayed, targeting the QT6WIP branch.
Changes
Fix Rx/Tx mislabeling for SerialBus received frames (0d70306)
All frames arriving through
framesReceived()are genuinely received frames. The previous code usedQCanBusFrame::hasLocalEcho()to determine direction, but several backends (notably PeakCAN/PCAN) report local echo unreliably, causing received frames to appear as Tx in the main view.setReceived(true)is now called unconditionally for every frame from this path.Restore
connectDevice()inpiSetBusSettings()to fix missing RX frames (5b60674)A previous refactor removed the
connectDevice()call frompiSetBusSettings(). Without it, applying bus settings (speed, FD mode, listen-only) did not reconnect the device, so no frames were received until the user manually reconnected. The call is restored, guarded with a state check so it is only attempted when the device is inUnconnectedState.Fix JS
gotCANFrame→gotCommFramerename compatibility (276c470)The JS callback was renamed from
gotCANFrametogotCommFramein a prior commit, silently breaking all existing user scripts.compileScript()now first looks forgotCommFrame; if not found, it falls back togotCANFramefor backward compatibility (with a debug log message).Files changed
connections/serialbusconnection.cppscriptcontainer.cpp