-
Notifications
You must be signed in to change notification settings - Fork 274
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
Keyboard locks and outputs repeating sequence of same key about 100 times #23
Comments
Actually, no, this happens much more often, I want to say every 3-5 minutes. Most of the time the lock up does not output a repeated key, just sometimes. |
FYI this might be related to the DebounceThrottleDiv, I've got it set to 20 at the moment. |
So, using 20 for DebounceThrottleDiv is a 2^20. That's one scan every 1 048 576 loops, which is a little excessive. Thanks for testing this though. Something like 2^15 would probably be much more reasonable. |
Thanks for the feeedback; mandarine:~$ dc -e "1 k 48 1000 1000 * * p 2 15 ^ p / p" On Sat, Mar 7, 2015 at 1:49 PM, Jacob Alexander notifications@github.com
|
Just tested... appears to be worse: (I wish I had time to hack on tthis, but I'm buried by my open source On Sat, Mar 7, 2015 at 7:05 PM, Martin Blais blais@furius.ca wrote:
|
Here's theee right way to solve this: Furthermoreeee, these types of increeedibly fast rrepeeats should be On Sat, Mar 7, 2015 at 7:07 PM, Martin Blais blais@furius.ca wrote:
|
So, I'm interested, would you mind taking a picture of the soldering? (I'm The algorithm itself should be quite solid, so I'm curious to what the heck On Sat, Mar 7, 2015 at 4:11 PM, Martin Blais notifications@github.com
|
So, I just assembled another infinity keyboard. And I noticed it had some bouncy switches (Matias Linears). I didn't use my normal soldering iron (MFR-2200) and did it rather quickly. |
I have no idea how to tell if it's off. I can make a higher res photo later on. I'll check if the repeating is switch-specific by doing some tests, if On Sun, Mar 8, 2015 at 4:53 PM, Jacob Alexander notifications@github.com
|
Yeah, I'm definitely not just trying to get out of fixing this in code :package :P Visually, it's often pretty hard to tell. Sometimes you can if the soldering is extremely bad. Yours isn't in that category :) A bad joint may have higher than expected resistance which may cause miss-reads or slow down the current propagation. |
Alright, more observations after fiddling a fair bit: However, and most importantly, I have fixed the problem with software. Alright, my change is a kludge, albeit a working one (inspecting the code It would be interesting to add statistics regarding how often the debounce My changes are here: Merge it if desired, I'll be maintaining my branch for a little while. I Cheers, On Sun, Mar 8, 2015 at 8:02 PM, Jacob Alexander notifications@github.com
|
Finally got a chance to look at your code. Neat idea, I hope it's working out for you :D So, I did some basic scan rate testing the other day (hadn't done this originally, oops) and I discovered that debounce algorithm scans each key every ~300 us. Using the cherry defined min debounce time of 5 ms (http://cherrycorp.com/product/mx-series/ Technical Data section): 5000 us / 300 us = 16.66667 This means, at minimum I should be scanning ~17 times per transition. My original calculations show a perfect cycle requiring 13 scans for a decision in the algorithm... So, yep I need to rework some stuff. |
On Mon, Mar 16, 2015 at 1:05 AM, Jacob Alexander notifications@github.com
Why wouldn't this work?
|
Any news on this? I'm having some rather bad repeated characters with yours (blais) firmware, I'm just now flashing HaaTa's back to see if it's better. |
Have you tried the latest? The thing to do is to look at the histogram and On Sat, May 9, 2015, 19:51 Mikkel Jeppesen notifications@github.com wrote:
|
(I'm very picky in general, had repeated character issues with V60 for example, occurred during slow clicking the Enter, their improved firmware improved things, but only a switch replacement fixed the issue) I started using the latest state of the controller firmware, I luckily had no keypress issues with the infinity keyboard, and I'm using clears (They seem to be more prone to keypress issues, since the bump makes the leafs bounce), so I can soft-vouch for the latest state of the firmware It's also a good idea to replace the problematic switch, some switches have rare issues with activation Offtopic, I'm wondering whether the bootloader ever needs to be updated // whether it affects the functionality in general? |
@blais I seem to have misplaced my previous folder (so I'm not making a point of placing it somewhere sensible) Which latest one do you mean? The latest from HaaTa or your latest one? @kaansoral Hmm now that you mention it, it does seem to be t that does it the most, so I will just try and throw a new switch in there. I'm using blues btw. Wondering if I should try my Gateron blue :P Eh maybe later. |
I'm putting the finishing touches on the backend for the new configurator right now (it's not as full featured as compiling/editing kll files yourself...yet). @kaansoral The bootloader code doesn't affect general functionality. I have some minor updates I've done to the bootloader (not included on any of the shipping IC60 rev 1 or rev 2 of the infinity though) for some text fields in the descriptors. Perhaps if I, or someone else makes a different style of bootloader it might be useful to flash it (e.g. mass storage instead of dfu). |
@kaansoral Thanks for the tip. Swapping the switch fixed the bounce issue on my T. Hooked it up like this: with the output there going to my logic analyzer. And this is a new, good switch: Pretty signifficant difference! The good switch bounces for ~50uS while the bad one bounces for almost 1ms! EDIT: It would also be interesting to see how fast people type (how quickly can a very fast typist get two keypresses in after each other on a switch?) |
Well, thank you for the analysis, I should upgrade my keyboard debugging skills, I would really appreciate some debugging/graphing advice at this point I tested my switches with a multimeter before soldering, some of them (5-6) were non-deterministic just after the activation point, which was concerning, they are just not too reliable if you don't bottom out and hang around the activation point for long, but when soldered, they all seem to work without issues, no double clicking at any activation styles I tested Up until now I only had one really faulty switch, it was the Enter/clear switch on my V60, it activated when you touched it, when you pressed it slowly, it activated twice |
@kaansoral I used one of these: http://www.ebay.com/itm/New-USB-Logic-Analyzer-Device-Set-USB-Cable-24MHz-8CH-24MHz-for-ARM-FPGA-/111540669744?pt=LH_DefaultDomain_2&hash=item19f8578d30 Which is a clone of the Saleae logic 8: https://www.saleae.com/logic/ and uses their software Also keep in mind that this is a cheap china clone, and it does have some issues. I've noticed that there's crosstalk between channels, but have yet to bother to see if it's internal, or just the cables, but beware! I also can't select 24MHz sampling rate in the software (only 16). If that's a linux bug or not, I dunno. (Using the 1.1.34 beta, as it's the version I can actually get to work) |
https://github.com/blais/controller Type on your [faulty] keyboard a lot. (Ideally this should be adjusted automatically; there's no reason the On Sat, May 9, 2015 at 8:16 PM, Mikkel Jeppesen notifications@github.com
|
I have a key (happens to be my L key) that has started to "degrade" over the last day or so where I've started to use this keyboard quite a bit. Anyone else ever experience this gradual increase in the tendency to output repeated keystrokes? l had a similar issue with my C key and I allllready used up my one spare keyswitch that I got (Fixed the C key...). Hoping to get some more sent to me, but in the meantime could someone explain which exactly is the place the debounce parameter is that I can tweak? (BTW the soldering is pretty good on this L key) |
Hmm, could be the slow corrosion of the metal contacts. I'm probably going to work on debounce (today/tomorrow). I have some ideas On Sun, Jun 14, 2015 at 2:02 PM Steven Lu notifications@github.com wrote:
|
So I did find this
This seems like it's set to 0. So I can play with this up till values near 15 or 16? |
And of course, increasing this valllue from 0 to 2 makes the probllem significantly worse, now l repeats a lllot more than just once most of the time now. Interestingly, the rest of the keys seem to be functioning fine, welll except for the spacebar up there like you just saw. Well, now i set it to 10, seems like after It reloads, and I start spamming and alternating L a lot, it seems to enter a regime of repeating it a lot, and then it dies back down and I guess now overall it is back to being more reliable than before. So that almost seems like some sort of self-calibration period that's happening in there. |
I've added timing code to the debounce algorithm 98f796d You can use the MinDebounceTime kll define to control how long to wait before allowing another state transition. By default this is set to 5 ms (which is the usual). For extremely bouncy switches there is still a chance that there could be bouncing issues. But I would have to increase initial keypress latency to fix this (also re-write the algorithm). So far I've had good results with the code. Sorry this has taken so long. |
Nice, I had set the old debounce number to 17 and it was working fairly well, but there were occasional pauses where it would spit out a repeated character like 12 times. New code seems to work well so far here. |
I haven't noticed any issues since I added the new code, closing. |
This bug occurs rarely maybe a few times per day or so.
The keyboards appears to lock up - typing keys won't outtput them - and either just ssits frozen or repeats the last key pressed about 100 times over 2-3 seconds. Then it resumes as normal.
The text was updated successfully, but these errors were encountered: