-
-
Notifications
You must be signed in to change notification settings - Fork 42.4k
Improvements to handling of disconnected split keyboards. #14033
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
Conversation
|
Testing this out, there is about 5 scans dropped according to debug scan rate reporting. But that's 624 --> 619 for the averages. And about 12 bytes more used (but 6 of those are due to "-dirty" tag for the version). So I'd say that this the AVR impact is minimal? (tested on my tractyl manuform using a teensy 2++) |
|
Huh, I'm quite sure it made the firmware smaller on ARM (Ergodox Infinity at least). 🤔 |
Nobody said that AVR was efficient. :D |
|
Running into some issues on AVR with this, and locking up on startup/initialization. |
Not sure why that would happen... 😨 One could try with another way of specifying the length of EDIT: Noticed one issue of unitialization that might be an issue, but probably not. |
|
I tried undoing a minor change I made earlier to keep firmware size down. This, however, made my Ergodox Infinity firmware 8 bytes larger (instead of 8 bytes smaller), and undid the improved scan rate for some reason (back to how it is without this PR now). I tried a couple of different methods and getting that +100 scan rate is very delicate. Probably some weird compiler optimization in play here. Please check if this resolves issues on AVR, without serious effects to firmware size or scan rate. During my testing of different implementations, I did get some initialization failures on my Ergodox Infinity as well. Not sure if it ever happened for the implementation I finally committed, but I only ever experienced it immediately after flashing. Just re-plugging the keyboard afterwards solved it every time, so it at least wasn't obviously broken init code. 🤷♂️ |
|
Yeah, it does seem to resolve the issue |
...and memset to initialize `matrix` and `raw_matrix`. Increased my scan rate (while connected) by ~100 (on Ergodox Infinity). Effect on AVR is unknown. Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
This has the effect of increasing my Ergodox Infinity firmware size by 8 bytes instead of decreasing by 8 bytes, and lowers the scan rate while connected back to the initial value before these changes, but _might_ solve some issues on AVR.
b564407 to
cf14b95
Compare
* Use memcmp and memcpy to compare and copy slave matrix. ...and memset to initialize `matrix` and `raw_matrix`. Increased my scan rate (while connected) by ~100 (on Ergodox Infinity). Effect on AVR is unknown. Co-authored-by: Stefan Kerkmann <karlk90@pm.me> * Fix `matrix_post_scan` signalling change on every scan while disconnected. * Undo removal of initialization of `slave_matrix`. This has the effect of increasing my Ergodox Infinity firmware size by 8 bytes instead of decreasing by 8 bytes, and lowers the scan rate while connected back to the initial value before these changes, but _might_ solve some issues on AVR. Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
* Use memcmp and memcpy to compare and copy slave matrix. ...and memset to initialize `matrix` and `raw_matrix`. Increased my scan rate (while connected) by ~100 (on Ergodox Infinity). Effect on AVR is unknown. Co-authored-by: Stefan Kerkmann <karlk90@pm.me> * Fix `matrix_post_scan` signalling change on every scan while disconnected. * Undo removal of initialization of `slave_matrix`. This has the effect of increasing my Ergodox Infinity firmware size by 8 bytes instead of decreasing by 8 bytes, and lowers the scan rate while connected back to the initial value before these changes, but _might_ solve some issues on AVR. Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Description
Continuing from #13523.
First, a slight cleanup of how the slave matrix is copied to the master matrix. Now using
memcmp,memcpyandmemset, as suggested by @KarlK90 in comments in the above mentioned PR.Secondly, fixes an issue with
matrix_post_scansignalling a matrix change on every scan cycle while disconnected, causing issues with (at least) OLED timeouts.Types of Changes
Checklist