-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Switch Ergodox Infinity over to split_common #13481
Conversation
Serial Link is cool and all, but since the Infinity is the only keyboard using it, it gets easily forgotten when new split sync features are added.
Note that the visualizer (not used by default since #13165 was just merged) isn't synced between halves after this. I have some code to fix this, that could be added to this PR if desired. Since the visualizer isn't enabled by default, I left it out for now. |
@@ -54,7 +54,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 18 | |||
#define MATRIX_COLS 5 | |||
#define LOCAL_MATRIX_ROWS 9 | |||
|
|||
// For some reason, the rows are colums in the schematic, and vice versa |
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.
This is probably because it's based on the ergodox (OG), which has it's matrix rotated 90 degrees. So it's probably the same here.
That said... if that's the case, it may be worth using the eager per row debounce algo for the board, if each row can only be used by one finger at a time.
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.
What I referred to here was the fact that the rows (as taken from the old custom matrix.c) are named columns in the schematic, and vice versa. I left it in this state to avoid having to rewrite all the LAYOUT defines.
I've actually tried using the eager_pr debounce algo in the past (I did some work last year to move over the Infinity to the common debounce handling, but ended up not submitting it), mostly for parity with the EZ I use at work, and actually got quite a lot of bouncing keys with that, so I went back to defer_g (which is the main reason I never submitted a PR, it didn't really add any value).
I'm currently using the defer_pk algo on my Infinity, for no particular reason other than having lots of RAM to spare. 😎
@@ -459,7 +459,7 @@ void led_matrix_init(void) { | |||
|
|||
void led_matrix_set_suspend_state(bool state) { | |||
#ifdef LED_DISABLE_WHEN_USB_SUSPENDED | |||
if (state) { | |||
if (state && is_keyboard_master()) { |
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.
Hm, why does LED Matrix need this but RGB Matrix not? Could it be something in the ISSI driver itself?
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.
Not sure. Looking at the code of led_matrix_set_value_all
, it seems it shouldn't make any difference, but it does. 😕
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.
I've done some more testing, and this is really weird.
If I skip the special handling of LED_MATRIX_SPLIT
in either led_matrix_set_value_all
or led_matrix_set_value
, everything works fine, for Ergodox Infinity at least (since its LED pinouts are the same on each half, just mirrored positions). The weird part of this is that the first and second halves of g_is31_leds
are identical, so the only real difference should be that it's writing the led values twice. 😵
Note that the serial comms die after suspend regardless of which side is the master (without any change).
Forgot to mention that this change makes it "impossible" to use the keyboard halves separately (something that works fine with Serial Link), due to several serial read timeouts each scan cycle eating up the matrix scan rate. It's possible to solve this by having the split_common system detect that the slave half is missing and holding off on connection attempts for a while (I'm running a hacky version of this on my keyboard without issues), but I feel that is a bit out of scope for this PR. Edit: Made a PR for this suggested change: #13523 |
Edit: Figured it out myself, see #13525 |
Thanks! |
Hi. Relative newbie here. I use an Ergodox Infinity and switched from kiibohd to QMK in May 2021. At the time, I used QMK firmware 0.12.50 to build/flash my keyboard. The other day I had the bright idea of making some updates/improvements to my configuration and decided to use the new 0.15 firmware to flash. As the story goes, I have noticed a significant reduction in performance and reliability, including:
I would like to debug this issue and have figured this PR might be the best place to drop a note, since the switch to From what I can tell so far, the issue is not with the keyboard configuration itself. I have tested @firetech's lovely configuration using QMK firmware 0.12.50 and 0.15. It works fine with 0.12.50, but experiences the aforementioned issues on 0.15. I have not dug too deeply into the code changes brought about since 0.12.50, but wouldn't be terrified to do so. I just want to get a sense of what contributors/maintainers think about this issue before investing that time. (Also: I just noticed that the little eared cat [?] creature is animated. So cute! I didn't see this on firmware 0.15, but now that I'm back on 0.12.50 the creature is hamming it up. Love that.) |
@roygbyte As you may have noticed in my repository, I haven't updated my build in quite a long while, and my keyboard still runs the exact code in my repository (based on the develop branch back in August)... Life has simply gotten in the way. I have no idea what has been changed in the recent months, and I'm not sure if the maintainers will see your comment here since this PR has been merged and closed. I recommend checking out the (official) QMK Discord, the people there are usually very helpful. :) |
Thanks for the speedy reply! Yes, I did notice your repo was a bit behind... that could be a good thing, though, if it works as you seem to imply. Perhaps I'll start there and see how that version of QMK performs on my keyboard. (Funny enough, I had been saying to myself the other day that I wanted to work with C code more... low-and-behold, it seems like my wish has been granted xD ) ... or I'll just settle for what works (which seems to be my own out-dated repo...). |
@roygbyte I just happened to be browsing GitHub for entirely unrelated reasons and stumbled upon the notification about your post before I noticed the email about it. xD Actually, since I had some time over just now, I tried rebasing my branch onto current master, and I don't have any issues (except for two core bugfix PRs that I just posted). Everything seems to work fine and dandy here*. My main branch has been updated accordingly (including said PRs). *) I've been using a build based on master since shortly after my last post. In other words, for about two hours, including hunting bugs and fixing them. In that time, I haven't noticed any of the problems you described. (Edit: if you want my old version for reference I pushed it here) |
Such happenstance to have you stumbled upon my error :) After a bit of poking around with versions, it seems that between 0.13.38 and 0.14.0 is where my performance degrades. I tested the same layout on both, and while it runs really snappy on the former, it's quite terrible on the later. I should mention that I flashed both using the older instructions for flashing, where the master side is explicitly indicated. I.e.: Is it possible there's some other variable causing the issue? I am using USB 3.0 cables, best I could buy. I have the halves connected together... Not sure what else could be causing different results for me vs. you! Anyways, I don't mean to take up too much of your time. I have made a bit of discovery, which is good. Thanks for pushing your old version. I'll look around... perhaps there are more clues to reveal... |
|
Thanks for the suggestion. I would not have thought to use that command! If I find anything interesting you might hear from me again 😅 |
Which side do you used as the master keyboard? I don't know if/why it would matter, but I seem to get fewer issues when the right side is used as the master. I flashed the keyboards with their respective dfu commands: |
I mainly use the right side as the master. However, while implementing this PR (and some others), I was switching the master role back and forth, as it made the flashing process easier (flash the master, connect it to the slave, then connect the slave as new master and flash it), so I doubt the direction should matter. Have you tried switching your cables around to see if that makes any difference?
I don't have any such issues, weird. Either the hardware, cables or compiler is to blame, I guess. 😛 |
The break point for me is here: 6fe3943. Why that is so I do not know. And, quite frankly, I'm beginning not to care xD
I'm just waiting for something to reveal to me that I am to blame 😂. For my own sanity... Could you confirm for me the revision number of your infinity ergodox? Mine is 1.2b, from 2015 I believe. |
Description
Serial Link is cool and all, but since the Infinity is the only keyboard using it, it gets easily forgotten when new split sync features are added.
I had some weird behaviour in that calling the suspend handler for LED Matrix on the slave killed the serial communication, so I added
is_keyboard_master()
to its if statement (which fixed that issue).Types of Changes
Issues Fixed or Closed by This PR
Checklist