-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSC (Open Sound Control) integration for Heartrate intergration #96
Merged
Conversation
This file contains 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
Introduced heart rate OSC integration, allowing heart rate data to be sent over OSC. Added new methods in `OSCSender.cs` for sending OSC parameters. Updated `PulsoidModule.cs` to handle heart rate data smoothing and OSC updates, including new properties, methods, and refactoring the heart rate monitoring loop. Corrected a typo in a log message. Updated trend symbol and statistics time range functionalities. Modified `MainWindow.xaml` to include new UI elements for heart rate smoothing and OSC settings. Added new property and bindings in `ViewModel.cs` to support the new UI elements.
Modified the key name in the dictionary within `DataController.cs` to remove the leading underscore for consistency. Updated the project version in `MagicChatbox.csproj` from `0.9.060` to `0.9.065`.
Added a new `disableLegacySupport` property to the `PulsoidModule` class to toggle legacy OSC support. Updated `SendHRToOSC` method to conditionally send additional OSC parameters based on this property. Introduced a new checkbox in `MainWindow.xaml` to allow users to enable or disable legacy OSC support through the UI.
Updated MagicChatbox.csproj to increment the project version from 0.9.065 to 0.9.066, reflecting recent changes and improvements.
Removed StatisticsTimeRange enum and PulsoidOAuthHandler class. Added fields for state change debouncing in PulsoidModule. Refactored ProcessData method for better state management: - Removed initial heart rate check and logic. - Added thread safety and debounce mechanism. - Improved logging and early exit for offline state. - Reorganized code for online state processing. Updated heart rate icons and temperature text logic. Ensured HeartRate property updates only on change. Added OSC update check and ResetIntervalFlag method. Updated MainWindow checkbox text for clarity.
Updated the version number in `MagicChatbox.csproj` from `0.9.066` to `0.9.067` to reflect the latest release or update.
Improved readability and functionality of PulsoidModule.cs by adding XML documentation, new methods for heart rate data and WebSocket handling, and modern C# features. Refactored PulsoidOAuthHandler for better formatting, removed unnecessary code, and simplified encoding. Updated MainWindow.xaml to include a new section for OSC support with various UI elements like TextBlocks, CheckBoxes, and StackPanels. Added functionality to enable/disable OSC support and smooth heart rate updates, and removed the old section related to smooth heart rate checkbox.
Added observable properties `sentMCBHeartrateInfo` and `sentMCBHeartrateInfoLegacy` to `PulsoidModule`. Removed redundant methods and comments related to heart rate monitoring and data processing. Implemented clamping for heart rate statistics values within 0-255 range. Enhanced error handling for WebSocket connections. Refactored `ProcessData` method and added new methods for updating heart rate trend indicators and icons. Updated `SendHRToOSC` to send additional heart rate info if enabled. Improved `ValidateTokenAsync` with logging and exception handling. Updated XAML for new settings and better user guidance.
Updated the version number in `MagicChatbox.csproj` from `0.9.067` to `0.9.069`, indicating a minor update or patch.
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.
PR Classification
New feature: OSC (Open Sound Control) integration and UI updates.
PR Summary
This pull request introduces OSC integration and updates the UI to support this new feature.
DataController.cs
: Added a new integration toggle for "IntgrHeartRate_OSC".OSCSender.cs
: Introduced three new static methodsSendOscParam
for sending OSC parameters with different data types.MainWindow.xaml
: Added a new section to the UI for OSC integration, including variousCheckBox
elements and aToggleButton
.ViewModel.cs
: Added a new boolean property_IntgrHeartRate_OSC
with corresponding getter and setter methods.