-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Improvements to handling of disconnected split keyboards. #14033
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
* qmk/develop: (24 commits) [Keyboard] Fix BT rules for dosa40rgb (qmk#14497) [Keyboard] Add Gentleman65 (qmk#12971) [Keyboard] Add new keyboard quick17 (qmk#13703) [Keyboard] Add superuser keyboard (qmk#13840) [Keyboard] Add dyz60 (qmk#13864) [Keymap] GMMK Pro keymap (qmk#14389) [Keyboard] Add support for Coarse60 (qmk#14416) [Keymap] Added Brazilian keymap for BM40RGB (qmk#14431) [Keyboard] Fix dosa40rgb compilation issues (qmk#14491) Improvements to handling of disconnected split keyboards. (qmk#14033) Add RGBW support to PWM and SPI drivers for ChibiOS (qmk#14327) [Keymap] Add 'j4ckofalltrades' keymap for sofle/rev1 (qmk#14446) [Keyboard] Add Dosa40RGB + dtisaac01 (qmk#14476) [Keymap] Major Updates to Personal Kyria Keymap (qmk#14485) fix link error for helix/rev3_5rows:five_rows (qmk#14466) Nix Studio OXALYS80 Refactor (qmk#14473) [Keyboard] Move Planck EZ off 'Proton C' board (qmk#14479) [Keyboard] Move Moonlander off 'Proton C' board (qmk#14478) Update rules.mk for xbows keyboard (qmk#14477) [Keymap] Adding personal keymap (qmk#14326) ...
* 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
,memcpy
andmemset
, as suggested by @KarlK90 in comments in the above mentioned PR.Secondly, fixes an issue with
matrix_post_scan
signalling a matrix change on every scan cycle while disconnected, causing issues with (at least) OLED timeouts.Types of Changes
Checklist