Skip to content

feat: update NimBLE-Arduino dependency - #18

Merged
ww24 merged 1 commit into
masterfrom
feat/nimble-v2
Oct 17, 2026
Merged

ww24 merged 1 commit into
masterfrom
feat/nimble-v2

Conversation

@ww24

@ww24 ww24 commented Oct 15, 2026

Copy link
Copy Markdown
Owner

This pull request updates the BLE keyboard dependency, improves initialization of member variables in the RemoteShutter class, and refines connection state handling to ensure accurate timing and state tracking. The main changes are grouped below:

Dependency Updates:

  • Upgraded the NimBLE-Arduino library from version ~1.4.2 to ^2.5.1 in platformio.ini to ensure compatibility with newer features and bug fixes.
  • Updated the ESP32-BLE-Keyboard submodule to a newer commit, likely pulling in upstream improvements and fixes.

Code Quality and Initialization:

  • Explicitly initialized last_sent_ms to 0 and conn_state to false in the RemoteShutter class to prevent uninitialized variable issues. Also added the missing #include <Arduino.h> for clarity and compatibility. (include/RemoteShutter.hpp) [1] [2]

Connection State and Timing Logic:

  • Updated lastSentDuration to reset last_sent_ms when not connected, ensuring duration calculations are accurate and preventing stale values. (src/RemoteShutter.cpp)
  • Modified wasConnected and wasDisconnected to update last_sent_ms with the current millis() value upon connection and disconnection events, improving the accuracy of connection state timing. (src/RemoteShutter.cpp)

@ww24 ww24 self-assigned this Oct 15, 2026
@ww24 ww24 changed the title feat: update NimBLE-Arduino dependency and initialize member variables feat: update NimBLE-Arduino dependency Oct 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Compatibility with NimBLE 2.x remains unverified because the reported keyboard submodule update was unavailable for inspection.

No open issues 🎉

What changed in this PR

Updates the BLE dependency and improves RemoteShutter initialization and connection timing.

Changes:

  • Upgrades NimBLE-Arduino from ~1.4.2 to ^2.5.1.
  • Initializes timestamp and connection-state members.
  • Resets timing while disconnected and on connection transitions.
File Description
src/​RemoteShutter.cpp Updates timestamp handling around connection state.
platformio.ini Upgrades NimBLE-Arduino.
include/​RemoteShutter.hpp Initializes members and includes Arduino definitions.

Review effort: Balanced

@ww24
ww24 merged commit 240ec46 into master Oct 17, 2026
2 checks passed
@ww24
ww24 deleted the feat/nimble-v2 branch October 17, 2026 15:50
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.

2 participants