Skip to content

Fix missing and mislabeled received CAN frames#1082

Open
minoseigenheer wants to merge 3 commits into
collin80:QT6WIPfrom
minoseigenheer:pr/fix-rx-frames
Open

Fix missing and mislabeled received CAN frames#1082
minoseigenheer wants to merge 3 commits into
collin80:QT6WIPfrom
minoseigenheer:pr/fix-rx-frames

Conversation

@minoseigenheer

Copy link
Copy Markdown

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 used QCanBusFrame::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() in piSetBusSettings() to fix missing RX frames (5b60674)

A previous refactor removed the connectDevice() call from piSetBusSettings(). 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 in UnconnectedState.

Fix JS gotCANFramegotCommFrame rename compatibility (276c470)

The JS callback was renamed from gotCANFrame to gotCommFrame in a prior commit, silently breaking all existing user scripts. compileScript() now first looks for gotCommFrame; if not found, it falls back to gotCANFrame for backward compatibility (with a debug log message).

Files changed

  • connections/serialbusconnection.cpp
  • scriptcontainer.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants