Skip to content

fix: emit NFC config packets last so firmware keeps flash/data_extended (M4)#105

Merged
g4bri3lDev merged 1 commit into
OpenDisplay:mainfrom
balloob:fix/nfc-packet-ordering
Jul 5, 2026
Merged

fix: emit NFC config packets last so firmware keeps flash/data_extended (M4)#105
g4bri3lDev merged 1 commit into
OpenDisplay:mainfrom
balloob:fix/nfc-packet-ordering

Conversation

@balloob

@balloob balloob commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

M4 — NFC packet 0x2A aborts firmware's config parse (🟠)

Python emitted the NFC packet (0x2A) before flash_config (0x2B) and data_extended (0x2C). Firmware has no case 0x2A, and its default: skips straight to the CRC — so any config containing NFC entries silently lost flash_config and data_extended on device load.

Fix

Emit NFC after every packet type the firmware understands (i.e. last, after flash_config and data_extended), so an unknown-to-firmware NFC entry no longer truncates the parse of packets that follow it.

Test plan

  • uv run pytest -q → 444 passed (new test parses the serialized TLV stream and asserts the 0x2A packet appears after 0x2B and 0x2C)
  • ruff, mypy clean

🤖 Generated with Claude Code

@balloob balloob requested a review from g4bri3lDev as a code owner July 4, 2026 07:15
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/opendisplay/protocol/config_serializer.py 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

…ed (M4)

Python emitted the NFC packet (0x2A) before flash_config (0x2B) and
data_extended (0x2C). Firmware has no case 0x2A and its default case skips
straight to the CRC, so any config containing NFC entries silently lost
flash_config and data_extended on device load. Emit NFC after every packet
type the firmware understands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JRrm95f1qNZzDM9r2SB6KW
@balloob balloob force-pushed the fix/nfc-packet-ordering branch from 00bc90f to 294f47b Compare July 4, 2026 11:42
@g4bri3lDev g4bri3lDev merged commit f22dae1 into OpenDisplay:main Jul 5, 2026
6 checks passed
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