-
-
Notifications
You must be signed in to change notification settings - Fork 40.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
Next set of split_common changes #4974
Conversation
Ooooh, wait, this means that boards with 9+ columns can be posted over?
Woooooo |
The only reason it was restricted was because it sent 1 byte per row. I just made it pay attention to sizeof(matrix_row_t). Of course, as I don't actually have an AVR split kb, all these changes are done essentially blind. Testing needed! |
Well, I can confirm that it works over serial on the Orthodox (9 columns). |
Ha! Serial always worked. |
Not with more than 8 columns. :) But I'd like to see somebody with i2c test this out, before merging it. @nooges ? |
Well, it had absolutely nothing to do with my changes (I've not changed serial at all), it must have been fixed with #4669. |
Ah, it was a couple of changes, actually. But either way... it should work on both i2c and serial now. |
@nooges Would you mind testing this? It affects i2c, and I have no i2c boards to test and verify. |
I just tested this on my i2c redox split and it doesn't work for me. I'm using EE_HANDS and only the side that the USB is plugged into works. As a side note, I flashed back to master (0.6.263) and both sides are working, however I notice that compared to my previous working firmware (based on 0.6.233) RGB underglow animations are now playing on both sides -- when did that happen? It's a bit buggy in terms of the sides getting out of sync and animations cause dropped keypresses. Is there an issue / PR tracking progress on i2c split animations? |
Okay. I'll bite the bullet and set up some hardware to debug this properly. |
To make sure, you flashed both sides when testing? if not, you may need to. |
@drashna yep, I flashed both. |
Hmm. I finally found time to set up a couple of pro-micros on breadboard and flashed them with redox:default, and the slave is working fine. |
@pelrun redox:default uses serial, did you change it to i2c? (Mine is wired/configured for i2c.) |
Whoops, been away from this a bit too long, I think. Adding USE_I2C breaks it, at least now I can debug. |
|
||
# ifdef RGBLIGHT_ENABLE | ||
static uint32_t prev_rgb = ~0; | ||
uint32_t rgb = eeconfig_read_rgblight(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be read out of eeprom rather than directly using the rgblight_config
struct that the master is currently running?
I've recently implemented an inactivity timeout for rgb underglow like this:
https://gist.github.com/Lenbok/603c66903c048f6879ee0860b37f8a7b
Ideally I'd like to use rgblight_toggle_noeeprom()
when the idle timer is responsible for toggling things (both to avoid eeprom writes and also as the inactivity based status probably shouldn't be written to eeprom anyway), but found that I could only get the toggle to get sent to the slave side by using the regular/eeprom version of rgblight_toggle()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's nothing requiring eeprom access, in fact I'd rather there be none. If there's a function to get the config directly (I don't want to be reaching into variables directly) then that can go in without issue... it's just not something I'm concerned with right now.
Yikes. The code expects the matrix to be identically sized on both sides. You'll have to post your configuration. |
@pelrun I made it identically sized by adding 4 fake columns on the left, which I added to the UNUSED_PINS array. I have to compile two different versions because the left and right side don't use the same pins on the microcontroller. Also because I've used Teensy 2 and the master / slave detection doesn't work for teensy. You can check my code there https://github.com/Gimly/qmk_firmware/tree/gimly-split/keyboards/gimly_split I've rebased my branch upon the one used for this pr. |
@Gimly You can use |
Since the Teensy master/slave stuff seems out of the scope of this PR and there similarly wasn't any expectation you could have different MATRIX_COLS size on each side, it sounds like this PR is actually fine with regard to the issues @Gimly had. Perhaps once @nooges has a chance to test and sign off we're good to merge? |
Whoops, one thing I did notice is that the RGB mode does not sync between halves in serial mode. Can't remember if that's a regression or if it hadn't been done before, I'm guessing probably the latter. |
From July 2018 until now, I think that implementation has not been completed for rgblight. |
@mtei You're right. IIRC, we've talked about it elsewhere about it not being implemented fully, and moving to implement it. @nooges Awesome. If serial isn't working, it wasn't working before, and I don't think that this PR changes that behavior. Unless there is any objections, I'd like to merge this PR "as is", and the next set of changes can be worked on, including getting RGB Light working on serial properly, rgb animations over i2c/serial, and ARM support. As well as whatever else. And again, thanks all for all of the work! You all are awesome! |
I'm good with that. |
* 'master' of https://github.com/qmk/qmk_firmware: (48 commits) [Keymap] Added Boy_314's layout for half n half keyboard (qmk#5373) Align use of atmega32a program script (qmk#5259) [Keyboard] new keyboard lovelive9 (qmk#5266) [Keyboard] Inital port of xd96 (qmk#5401) Fix ascii art (qmk#5407) [Keyboard] Georgi Support (qmk#5384) fresh commit for a new fork for PR to upstream/master (qmk#5406) Added info.json for mt980 keyboard and fixes to walker keymap (qmk#5391) Add support for THE60 (qmk#5385) Added 1up60rgb keymap: mdyevimnav (qmk#5386) Fix i2c calls for HotDox keyboard (qmk#5387) Sleep until USB port becomes writable before running avrdude (qmk#5393) [Keymap] Some more improvements to keymap, currency symbols.. (qmk#5395) [Keymap] Add atreus, ergotravel and org60 keymaps (qmk#5381) archetype keymap for jj50 (qmk#5397) Wheat Field Peripherals mt980 (FC980M Layout) PCB Support (qmk#5374) Minor readme fix (qmk#5389) Add new keyboard Plaid and ATMEGA328p support (qmk#5379) Next set of split_common changes (qmk#4974) [Keyboard] Lily58 Add info.json file (qmk#5354) ...
* Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment
* Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment
* Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment
* Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment
Description
Right now this PR does the following things with the split_common code:
Types of changes
Checklist: