Skip to content

Read classic and FD frame flags from CANFD ASC records - #2139

Merged
zariiii9003 merged 2 commits into
hardbyte:mainfrom
timothyanderson096-ocdealcheck:fix/asc-canfd-record-flags
Nov 22, 2026
Merged

zariiii9003 merged 2 commits into
hardbyte:mainfrom
timothyanderson096-ocdealcheck:fix/asc-canfd-record-flags

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown
Contributor

The ASC layout tagged CANFD can carry classical CAN data, classical remote requests, and CAN FD data. The reader treated every record as FD and zero payload length as a remote request. An empty FD message therefore failed to round-trip through ASCWriter, and a classical remote request in the existing Vector fixture was returned with incompatible flags.

Read the FDF and RTR bits from the flags word and preserve the requested DLC for remote records. Keep the prior handling for logs without a readable flags field and the existing 64-byte fixture with an unset FD bit. This addresses the mixed-format case discussed in #997.

Five regression cases failed on main. The file-format, logger, message and rotating-logger tests passed locally on Python 3.12 (115 passed, 18 skipped, plus five subtests). An independent check covered 164 records produced by can-utils log2asc -f and 1,312 generated ASC records. Ruff and Black passed. Tests used offline files.

Prepared and tested with OpenAI Codex.

Timothy Anderson · Spotted Ridge Engineering / OC Labs · GDN (Global Decision Network)
timothyanderson096@gmail.com

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T10:41:27.352093Z 694f5a3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zariiii9003

Copy link
Copy Markdown
Collaborator

Looks good, i'll merge once you add the news fragment.

@zariiii9003 zariiii9003 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@zariiii9003
zariiii9003 merged commit 3871d5b into hardbyte:main Nov 22, 2026
28 checks passed
@zariiii9003 zariiii9003 added the file-io about reading & writing to files label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

file-io about reading & writing to files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants