Skip to content

Conversation

Joseph-Jacobson
Copy link
Contributor

@Joseph-Jacobson Joseph-Jacobson commented Jul 23, 2025

Description

This PR lets XPlat enable bluetooth functionality. This change is:

  • adding Mode Bluetooth (MB) as a Type Tag

In depth review can be found in PR #331 on the featherwing branch.

Requirements

  • PR #331 on Featherwing

Issues Referenced

None

Documentation update

None

Notes for Reviewer

  • Add detailed notes explaining code changes, algorithms or any other information that can help the reviewer understand the PR better.

Testing

Results

All tests will be displayed on the Featherwing PR

Feature Tests

Shared files

  • Firmware binary: [Link to firmware binary]
  • Other files.

Checklist to allow merge

  • All dependent repositories used were on branch master
  • Software
    • Get approval from the reviewer
    • Passed testing on Windows
    • Passed testing on macOS (for major changes/GUI changes/ PRs adding files distributed with the EmotiBit software)
    • Passed testing on linux (ubuntu) (for major changes/GUI changes/ PRs adding files distributed with the EmotiBit software)
    • Update software bundle version in ofxEmotiBitVersion.h
  • Firmware
    • Set testingMode to TestingMode::NONE
    • Set const bool DIGITAL_WRITE_DEBUG = false (if set true while testing)
    • Update version in EmotiBit.h
    • Update library.properties to the correct version (should match EmotiBit.h)
  • doxygen style comments included for new code snippets
  • Required documentation updated

Screenshots:

Summary by CodeRabbit

  • New Features

    • Added a Bluetooth mode tag to packet labeling, expanding the available mode indicators and enabling clearer identification of Bluetooth operation in data streams. No other behavior changes.
  • Chores

    • Bumped version to 1.7.3 for the updated mode support.

Copy link

coderabbitai bot commented Sep 13, 2025

Walkthrough

Added a new MODE_BLUETOOTH type tag to EmotiBitPacket’s TypeTag (declaration in header, definition in source). Bumped library version from 1.7.2 to 1.7.3. No control flow or logic changes.

Changes

Cohort / File(s) Summary
Version bump
library.properties
Version updated from 1.7.2 to 1.7.3.
TypeTag constant addition
src/EmotiBitPacket.h, src/EmotiBitPacket.cpp
Added public static constant MODE_BLUETOOTH to EmotiBitPacket::TypeTag; defined with value "MB\0".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at version three,
A Bluetooth tag, as light as tea.
Packets hop with “MB\0” flair,
Headers, sources—tidy pair.
I nibble code, content and spry,
Then thump approval, hopping by.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Ble prototype example" is directly related to the changeset—adding BLE support via a MODE_BLUETOOTH TypeTag—and is concise without listing files or using noisy language. It communicates the PR's primary purpose (a BLE prototype/example) to reviewers. For clarity and consistency, "BLE" should be capitalized.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch blePrototype-Example

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Joseph-Jacobson Joseph-Jacobson marked this pull request as ready for review September 15, 2025 16:01
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
library.properties (1)

5-5: Fix typo in user-facing sentence.

Change “successfull” → “successful”.

- sentence=A Utilities Library required for the successfull operation of EmotiBit FeatherWing and EmotiBit Oscilloscope Library
+ sentence=A Utilities Library required for the successful operation of EmotiBit FeatherWing and EmotiBit Oscilloscope Library
src/EmotiBitPacket.h (2)

200-200: New tag declaration is consistent with existing MODE_ constants.*

No API/ABI surface change beyond the symbol; good placement near other mode tags. Add a brief comment describing when MB is emitted/consumed.


36-43: typeTag in packed header is 2 bytes (no terminator).

Constants are C-strings like "MB\0", but Structure::typeTag holds 2 raw bytes. Consider clarifying with a comment to avoid accidental string use.

-            char typeTag[2];
+            char typeTag[2]; // 2 raw bytes; not null-terminated
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6a080a and 0702603.

📒 Files selected for processing (3)
  • library.properties (1 hunks)
  • src/EmotiBitPacket.cpp (1 hunks)
  • src/EmotiBitPacket.h (1 hunks)
🔇 Additional comments (3)
library.properties (1)

2-2: Version bump to 1.7.3 — LGTM.

Please coordinate tagging/release notes and ensure dependent repos (e.g., FeatherWing PR #331) reference this version before merge.

src/EmotiBitPacket.cpp (2)

70-70: Definition of MODE_BLUETOOTH — LGTM.

Matches header; tag "MB" follows existing two‑char convention with explicit terminator.


63-71: Double‑check downstream handling for new mode.

If any state machines, filters, or UI rely on a whitelist of MODE_* tags, ensure "MB" is recognized or safely ignored until BLE feature lands everywhere.

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