Repository navigation
cyberpunkunicorn-os 0.1.3: one owner for the hat bus, reader poll stats - #16
Merged
Merged
Conversation
- The UI task and the remote command task could both drive pins 22/27: a menu's rescan (probeHat) ended the I2C bus under a tag being read for the website, and readerOpen saw 'no reader'. A recursive hat-bus mutex now covers readerOpen..readerClose and every probe; a probe from the other task returns the last result instead of touching the bus, and readerOpen waits up to 600 ms for a running probe. - A tap that times out now says how the reader's selects ended (no ack, no answer, no card, seen) in the reply and on serial, so the website's device log tells a dead reader from an empty field. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U
…(patch 0020) With the Bluetooth API on (Daniel's board has it on at boot), serialDevice is the BLE serial except while a USB command runs, so the screen stream went to the phone and reached the website only in torn pieces during commands: the garbled mirror and the binary in the device log. The stream now keeps the device that sent 'display start'. cli.run refuses 'display' so that device is never a capture that dies with the call. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U
hellofrequencylab
marked this pull request as ready for review
October 21, 2026 02:54
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.
This follows up 0.1.2 (#15). Daniel's Device log showed two problems on 0.1.2. The write opened the reader, then polled for 30 s with "No card", even with the sticker on the read area. Screen packets also showed up as binary in the text log, only while commands were running. One project:
cyberpunkunicorn-os/.One owner for pins 22/27. The UI task and the remote command task could both drive the hat bus. For example, a menu's
hw::rescan()calledprobeHat(), which ends the I2C bus, and it could do that while the remote task was polling the PN532. The fix is a recursive hat-bus mutex:readerOpen()toreaderClose(), and during every probe.readerOpen()waits up to 600 ms for a probe that is already running.Poll stats on a timeout. A remote tap that times out now says how the selects ended (
no ack,no answer,no card,seen), in the reply and on serial.Patch 0020: the screen stream stays on its link. With the Bluetooth API on,
serialDeviceis the BLE serial except while a USB command runs. So the stream went to the phone, and reached the cable only in torn pieces during commands. The stream now keeps the device that sentdisplay start, andcli.runrefusesdisplay.OS_VERSION is 0.1.3. CI is green. Nothing has been tested on hardware yet.
🤖 Generated with Claude Code
https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U