feat: 4-phase stream lifecycle with live preview before recording - #4
Merged
Conversation
…ore recording Squashed from feat/oglo-tactile branch (25 commits).
styu12
force-pushed
the
feat/oglo-tactile
branch
from
April 11, 2026 00:59
bbb6065 to
3d1bd84
Compare
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
start()/stop()lifecycle to a 4-phase SPI:prepare() → connect() → start_recording()/stop_recording() → disconnect(). This lets the viewer show live camera frames and sensor plots before the user presses Record.CONNECTING,CONNECTED, andCOUNTDOWNsession states with a 3/2/1 countdown tick tone before the start chirp.full_rig/example combining Mac webcam + iPhone + dual OAK + OGLO tactile glove (5 streams on one host).Changes
adapters/oak_camera.py: 4-phase lifecycle, XLink enumeration retries for dual-OAK rigs, preview-only capture loopadapters/oglo_tactile.py: 4-phase lifecycle, BLE scan matches bothdevice.nameandadv.local_nametypes.py: NewCONNECTING,CONNECTED,COUNTDOWNsession statestone.py: Countdown tick spec (100ms C6 beep),sounddevicewarning upgraded from INFO → WARNINGviewer/fonts.py: (new) System font loader for non-ASCII viewer glyphs (●, ■, →, —)viewer/app.py: Font loading at startup, session teardown on window closeviewer/state.py: Filter auxiliary channels (timestamps,_-prefixed) from sensor plot Y-axisviewer/demo.py: All synthetic streams converted to 4-phase lifecycle, improved screenshot capturediscovery/_ble.py: Fixed_cache_lock→_scan_lockbug inclear_cache()examples/: Newfull_rig/andmac_iphone_dual_oak/READMEs, updateduv runinstructionstests/: Updated OAK and OGLO tests for 4-phase lifecycle, added preview vs recording counter testsTest Plan
pytest tests/unit/adapters/test_oak_camera.py— 4-phase lifecycle, legacy compat, depth optionpytest tests/unit/adapters/test_oglo_tactile.py— payload decoding, preview sample isolationpytest tests/unit/test_tone.py— countdown tick specexamples/full_rig/record.pywith full hardware rigexamples/mac_iphone_dual_oak/record.pyand verify live preview → record → stop → re-record cycle🤖 Generated with Claude Code