Skip to content

New support for the Keyboardio Preonic and other nRF52-based keyboards #1476

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

Merged
merged 6 commits into from
Jul 1, 2025

Conversation

obra
Copy link
Member

@obra obra commented Feb 12, 2025

This draft pull request is the temporary home for what's going to become a set of smaller pull requests.

It is not yet ready for merge to master, although some subcomponents of it are.

@obra obra force-pushed the f/preonic branch 3 times, most recently from 577e599 to d26e241 Compare March 11, 2025 19:49
@obra obra force-pushed the f/preonic branch 2 times, most recently from 09f3f02 to 4005054 Compare March 29, 2025 00:11
@obra obra force-pushed the f/preonic branch 7 times, most recently from e52f819 to 6dc9657 Compare May 5, 2025 21:49
@obra obra force-pushed the f/preonic branch 2 times, most recently from e50e1f7 to 6956d40 Compare July 1, 2025 19:28
obra and others added 5 commits July 1, 2025 14:34
- Added quickHealthCheck() method for lightweight filesystem integrity scanning
- Enhanced initFilesystem() with automatic low-level erase/format fallback after mount or health-check failure
- Added proper handling for failed deletion of legacy /eeprom.dat file, treating it as corruption requiring reformat
- Improved error handling and debug tracing throughout initialization process

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…leep

- Added sleep duration tracking with sleep_start_time variable
- Implemented intelligent connection validation after sleep periods > 15 minutes
- Added multi-method validation: RSSI checks, connection interval validation, connection object accessibility
- Force disconnect and restart advertising only when connection is actually stale
- Added robust advertising restart logic with fallback attempts
- Prevents false disconnects while reliably detecting stale connections after extended mutual sleep

Root cause: Nordic Bluefruit library reports stale 'connected' state after extended sleep,
preventing advertising restart needed for reconnection when host wakes up.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Removed "problematic-device" heuristic and its delays - now uses simpler approach based on remote termination count
- Deleted automatic calls to dumpBondTable, listBondFiles, listAllFiles and the helper functions themselves to silence log spam
- Simplified pair-request back-off to fixed 2-second delay instead of complex exponential backoff
- Retained bond-write safety (bond_write_pending) with scheduleSafeDisconnect() method
- Added more detailed connection logging for debugging purposes
- Improved disconnect reason logging with human-readable descriptions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…for the Preonic (and keyboards like it) that have LEDs that don't map 1-to-1 to the keys on the keyboard.

Eventually, we may either generalize this plugin and move it out of the Preonic plugin or fold these features into the 'regular' Colormap plugin.
@obra obra marked this pull request as ready for review July 1, 2025 21:41
@obra obra merged commit ce946d0 into master Jul 1, 2025
15 checks passed
@obra obra deleted the f/preonic branch July 1, 2025 22:30
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