Skip to content
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

Touchscreen keypad not debounced? #76

Closed
MrDix opened this issue Apr 14, 2024 · 20 comments
Closed

Touchscreen keypad not debounced? #76

MrDix opened this issue Apr 14, 2024 · 20 comments

Comments

@MrDix
Copy link

MrDix commented Apr 14, 2024

When I try to enter a temperature using the on-screen keypad of my K1, each number appears 2-3 times. I'm unable to enter a single digit quickly enough. For instance, I can't set the bed temperature to exactly 100°C; I can only reach 99°C or 111°C. However, the regular menu buttons and the file chooser touchscreen work flawlessly. I have installed the latest version of the guppy screen, which was updated via the on-screen update feature.

I assume this issue isn't common, otherwise, I believe others would have mentioned it. Is there a debouncing option for the keypad that I might not be aware of, or could there be another problem?

Thank you for your hard work and all the fantastic tools you've developed for the K1!

Best regards,
Th0mas

@ballaswag
Copy link
Owner

Please share a short video showing the behavior. Will take a look.

@MrDix
Copy link
Author

MrDix commented Apr 14, 2024

Currently its printing but as soon as it is done I'll shoot the video. Thank you for the quick reply!

@MrDix
Copy link
Author

MrDix commented Apr 14, 2024

Here is a short video which shows the problem on my Creality K1 with guppy screen 0.0.22-beta (and previous versions):
https://youtu.be/K0vR7zI4lQ8?si=K-fFl_c5kAdxBMX3

@ballaswag
Copy link
Owner

This is new to me. This happens even before 0.0.22-beta? Give latest 0.0.23-beta a try (nothing specific was added to handle this behavior though).

@MrDix
Copy link
Author

MrDix commented Apr 15, 2024

It was happening with my previous version as well but I can not tell you if it worked in an (much) earlier version as I have never typed temperatures on the screen before. I've updated to 0.0.23-beta an the problem persisted.

@ajs123
Copy link
Contributor

ajs123 commented Apr 15, 2024

I'm chiming in because I helped with a pulldown menu issue that could be related. @MrDix - If you go to Options (the gear) then System, do the switches for the last two options seem to work properly? When you tap once as you would on the numeric keypad, does a switch ever go off then immediately back on?

I have no experience with lvgl, but I'm wondering whether some of these resistive touchpads are bouncier than others. Looking through lvgl, I'm seeing its tick timer being used only to detect long presses, i.e., not to debounce. If this is the case, the culprit could be the Creality /dev/input/event0 touchpad driver but debounce should be possible.

@MrDix
Copy link
Author

MrDix commented Apr 16, 2024

@ajs123 Thank you for joining in. The two switches in the System menu work flawless and have no bouncing problem on my screen like the keypad has. Have clicked several times on each of them and they always switched like expected.

@chiksum
Copy link

chiksum commented Apr 16, 2024

Yes this happened to me too, I am on 0.0.23-beta.
The keyboard is unable to use.

@mxfi
Copy link

mxfi commented Apr 16, 2024

Adding in a +1 in terms of having the same multi tap, normal taps come out as 2-4 items (ie selecting 1 give 1111). When touch tapping it as fast as I can, I can make it give a single digit. This is new after updating guppy screen and helper script. I think when running last firmware (or whatever it was 2 weeks ago, I never had this issue, only after updating recently). I also noticed a bit of a burn in on the screen which I never experienced before, don't know if it's related.

Running 1.3.3.8 Creality and most recent guppy + helper script

@ajs123
Copy link
Contributor

ajs123 commented Apr 16, 2024

@ballaswag this might be the kernel module behind /dev/input/event0. If so, it's simply reading the current state every 30 ms. If you think that a debounce in lv_tc_indev_drv_read_cb.c is appropriate, I don't mind writing one. I do not have this problem on my Nebula pad but it should be testable by setting a long debounce interval.

@ballaswag
Copy link
Owner

@ballaswag this might be the kernel module behind /dev/input/event0. If so, it's simply reading the current state every 30 ms. If you think that a debounce in lv_tc_indev_drv_read_cb.c is appropriate, I don't mind writing one. I do not have this problem on my Nebula pad but it should be testable by setting a long debounce interval.

I'm not sure debouncing is the actual issue. I'm running the latest on my K1 as well, but I can't reproduce the problem. The K1 path doesn't get wrapped by the lv_tc* stuff because it's calibrated as is. It directly interacts with evdev_read. The only thing that has changed was removing the coordinate clamping.

If anyone with this issue, please install 0.0.21-beta and see if the issue was present before.

@MrDix
Copy link
Author

MrDix commented Apr 17, 2024

How can I downgrade guppyscreen? I've downloaded guppyscreen.tar.gz from assets list of release 0.0.21-beta, copied it to the printer, extracted it an run the guppyscreen/installer.sh but this installer uses curl to download and install the latest version.

@ballaswag
Copy link
Owner

Download guppyscreen.tar.gz here https://github.com/ballaswag/guppyscreen/releases/tag/0.0.21-beta

Stop guppyscreen:
/etc/init.d/S99guppyscreen stop

tar xf guppyscreen.tar.gz
Copy and replace guppyscreen with the new one. The restart it:

/etc/init.d/S99guppyscreen restart

@MrDix
Copy link
Author

MrDix commented Apr 17, 2024

In version 0.0.21-beta the keypad is working flawless: Single click on any number buttons result in singe digits.

@ballaswag
Copy link
Owner

Nightly https://github.com/ballaswag/guppyscreen/releases/tag/nightly fixes the keyboard issue.

@mxfi
Copy link

mxfi commented Apr 19, 2024

https://github.com/ballaswag/guppyscreen/releases/tag/nightly

can confirm, nightly build fixes it. Had .23 beta before, uninstalled it through terminal and reinstalled it via nightly build command

"sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer.sh)" -s nightly"

touch screen all working as it should. Did you figure out what the issue ended up being? And what is the nightly build? Just the most recent developments with test fixes?

@ballaswag
Copy link
Owner

Nightly is the latest development build. The fix is simple, I accidentally removed the indev driver initialization for the non-calibrated path:

97de810

@mxfi
Copy link

mxfi commented Apr 20, 2024

Nightly is the latest development build. The fix is simple, I accidentally removed the indev driver initialization for the non-calibrated path:

97de810

Ah, still new to git and code, thanks for the fix and explaining it :)

downloaded newest beta 0.0.24 and it's working great!

Cheers

@MrDix
Copy link
Author

MrDix commented Apr 22, 2024

Thank you very much and sorry for the late reply! I was away from home for three days due to an injury.

@MrDix MrDix closed this as completed Apr 22, 2024
@MrDix
Copy link
Author

MrDix commented Apr 22, 2024

It works perfectly again <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants