Skip to content

Add callback interface for frame-driven data and use UTF-8 for long description#1

Open
starwey604 wants to merge 2 commits into
jborbik:mainfrom
starwey604:dev
Open

Add callback interface for frame-driven data and use UTF-8 for long description#1
starwey604 wants to merge 2 commits into
jborbik:mainfrom
starwey604:dev

Conversation

@starwey604

Copy link
Copy Markdown

This pull request introduces a callback mechanism for handling frame updates in the OculusReader class, improves the main execution flow, and makes a minor fix to setup.py. The main changes focus on making it easier to process frame data in real-time with higher frame rate and improving code robustness.

Callback integration and API improvements:

  • Added an optional callback parameter to the OculusReader constructor, stored it as an instance variable, and modified the read_logcat_by_line method to call this callback with the latest transforms and buttons data after each frame is processed.
    Main function and execution flow:

  • Refactored the main function to use the new callback mechanism for printing frame data, added proper cleanup using atexit to stop the reader, and improved handling of keyboard interrupts.

Bug fixes and minor improvements:

  • Updated setup.py to explicitly specify UTF-8 encoding when reading README.md, preventing encoding issues in Windows platform

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.

1 participant