-
-
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
Split Keyboard RGB Matrix Support #5998
Conversation
013b5de
to
b396f87
Compare
Posting more for reference. Works on the Corne when converted to split common (eg with #6001). |
b396f87
to
3d1b4d4
Compare
Tested this quite extensively over the last month on my Zygomorph, and outside of the power related delocks, I ran into no issues. This does appear to cause power related delocks during usb enumeration, or rather more likely to cause that. IE: If the rgb power draw was too high on the zygo during usb enumeration it would fail to fully connect and deadlock (where before this change it wouldn't). Dropping the rgb values down slightly allowed it to connect, then I was able to put them back up to the higher values. Could use someone with more usb enumeration / hardware state debugging experience than I have to track that down. |
3d1b4d4
to
d28dbfa
Compare
Updated the i2c split code as it was wrong. Just need @drashna to wake up and test it. |
i2c split code is in a much better state, however timer sync is not working out as I was hoping. Will implement a new synced_timer that wraps timer in non split keyboard mode so systems that need to be timer driven from the master half can just use that without needing to switch timers based on compile flags. |
Well, typing works over i2c now! |
Ok cool, just need to resolve the sync timer then. |
Just as a data point, I have converted my crkbd to use this PR plus #6001 and have switched my i2c redox (just using rgblight, not rgb_matrix) onto this as well for testing, can confirm that the rgblight syncing is not working. Happy to help test updates. |
Serial works 100%, but i2c has issues. But only with animations. If it's solid color, it works just fine. So it's definitely an issue with timer syncing. Though, it's getting there! @Lenbok awesome! |
Ok, if it is just i2c then that narrows down the issue. should be fixable tonight |
I2C sync timer is fixed |
|
@Lenbok forgot the ref, pushed a fix |
Compiles now, but the slave side is not syncing properly. e.g. for breathing mode, after a short period (sometimes <1s, sometimes several seconds), the slave starts flashing different colors (like it's changing hsv values). For moving modes like knight/snake, the slave side one goes massively fast. Then it might come right for a few seconds, then speed up again. |
Hmm, ok might need more rgblight work then... Can you try rgb matrix? |
I reverted the sync timer changes to rgblight as I'm not sure if they are even necessary. |
that seems to work. |
Yep, the rgblight redox is working fine for me now too. I don't have my crkbd here (it's at work), so to test the rgb_matrix I hacked up a config for my redox. Compiled and flashed the same hex to each side. Both sides are running the animations, but they are not in the same mode?!? When I press RGB_MOD both sides advance through the modes (so they are consistently not in the same mode). Video: https://photos.app.goo.gl/HmqYaxBvaGd6qnKY9 |
@Lenbok ya the halves can get out of sync as there isn't any actual state sync for rgb matrix. I'm relying on them staying in sync by ensuring what keycodes happen on master also happen on the slave. I suspect your slave didn't have the same initial eeprom state as the master causing the two sides to be incorrect. To sync them back up add a custom keycode that you can hit to reset the rgb eeprom to default:
I'll think of a better way to keep the halves in sync with a limited amount of data. |
Can you do something along the lines of what rgblight does to sync across changes to the config? At startup and whenever the config changes it syncs across. The slave is basically running off the version it gets from the master and doesn't care about (or modify) what's in it's eeprom config. |
also, And I agree with @Lenbok, we should sync the rgbmatrix config, the say way that the rgblight config is. Well, not exactly. It should be synced better, since that has bugs. |
Ya, I plan on adding something, just need some free time. |
586589f
to
e2ea750
Compare
081912a
to
ca64bdf
Compare
Thank you for your contribution! |
There are some merge conflicts here. I can resolve them, if needed. |
Co-authored-by: Hoàng Vương <[email protected]>
Sorry if I have overstepped, but I've updated a couple things (repeatedly now). One thing that has been mentioned is that thi is missing the "get_slave_status" stuff, so that the matrix is only updated if there is an actual change. #7732 is an implementation of that, but it would be nice to get in here. Though ... I am not sure if that wil help get this merged. |
I've now successfully merged the current master with this branch and would be ready to implement the state sync. I've actually done that before, got stuck at the timer sync and only later realized, that this pull request exists. As such I've the code from that approach still in my git repo and would be happy to implement it into this one. Edit: I've thought about your approach and wouldn't it be better, when the master side would send the current led config, like it is done with |
I've created a new merge request with my changes. See #9613 |
Closed for the updated version #11055 |
Description
So this is a bit of the ground work to get RGB Matrix split working with Split Common similar to how CRKBD works. There are still some things to debate, so here is an overview of the changes:
Still to do & need input from others:
Known Issues:
Types of Changes
Issues Fixed or Closed by This PR
Checklist