-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Full Touch support for default Marlin Menus - Touch to Select! #18239
Full Touch support for default Marlin Menus - Touch to Select! #18239
Conversation
…the user can touch DIRECTLY on the menu he wants to select!! a) Touch to select menus. b) In confirmation screen, lelt screen select left btn, right screen select right btn
Nice, this is a very welcome feature. I'm also working on making the native Marlin menu system work on DWIN screens with a standard DWIN_SET, so it will be great to have touch support for that from the start. |
We also can make the status screen act if it has buttons. For example: touch on the cooler icon goes to fan speed control screen; touch on nozzle temperature goes to nozzle temp config screen, and so on.. |
Is this touch button device only able to report touch events and not un-touch events? If the device could tell us that the touch is being sustained, we could use that data to continually jog the edited value, with acceleration, until it is released. |
there is a few small issues, but the idea is good : https://drive.google.com/file/d/1oIJs7qwAxI1L76X1XXeGwSEdX2_y98QZ/view?usp=sharing (gdrive could take a few minutes to process the upload of the vid)
|
Seems the video isnt public. What display are you using? |
ILI9341 (U20 config in marlin samples) video is public but in process, take some time on google drive |
The page asks visitors to provide their email address for an access link. |
clicked Hahahaha wrong button!! "close comment"!!! dammit |
yep, its only 25MB but discord only allow 8... cant share it there rmm.. let me see where i can upload... anyway, Y is reversed in menus, first item select the bottom line... and last one the first... |
The bottom buttons are working correctly, is just the menu touch that is wrong? it's inverted? |
yes... y seems correct else buttons should not work... |
…he current touch assumes the screen is 320x240, not the LCD_FULL*, that can be upscaled.
I have saw. Impressive work. I made it PR trying to change as little as possible, to keep compatibility and get soon to the official branch, because owners of TronxXY will need it together with others PR I have made. |
I have done: row > LCD_HEIGHT / 2 => UP, row < LCD_HEIGHT / 2 => DOWN... I think its easier, because we dont have a UP/DOWN button draw on screen... BUT, we could try put a discreet ^ (up) and / (down) arrows in the corners. But it will change more things. |
I will test and fix offset Y issues, thanks. |
@tpruvot 320x240 UI is functional, except for advanced pause screen (feature is not available on STM32) and UBL screen (lack of knowledge). The most tricky part it to configure build environment for new board to build Marlin with HAL_STM32, but this is something I would be happy to help. |
my config is alfawise U20 sample in marlin, STM32F103VE_longer env. seen good deals for the mks robin nano + tft 3.5 (20€ without drivers) on aliexpress a 103VET6 too |
…p => prev page, half down = next page
Can't compile it :(
BTT SKR 1.4 Turbo with BTT 3.5TFT V3.0 |
@nicedevil007 this code is for STM32 boards with TFT screen connected via FSMC. |
nooooooooooooooooooooooooooooo :D |
This smart screens doest work with default marlin menus? I know sapphire pro tft might work. Maybe just define the TOUCH_BUTTONS pins |
Sapphire pro is based on MKS Robin Nano with means STM32 and dumb TFT screen on FSMC interface. |
@tpruvot take a look in the last commit. I have fixed the Y offset calc. I have tested with a big and small LCD_PIXEL_OFFSET_Y. |
Is it possible to extend this by the following that if you want to change values eg the temperature of the nozzle when I tap the screen on the right for plus and left for minus. And there is also an error at the moment where you can scroll in a menu, for example when changing the Nozzle temperature menu point it goes to the MAX value when I move my finger up and when I go down it is 0 |
Yes, sure. Right now I didnt any handle for the edit screens. I need a way to identify it, but I dint want to make a lot of changes in the code. By now, just works:
I will try to find a way to identify edit screens without changing a lot of places. In my local repo, I even did the the confirmation screen buttons touchable. @thinkyhead what do you think? |
I think I must explain my code decisions in the PR: I could do it a lot better, with more classes and stuff, supporting double-touch, touch on icons, edit screen, and so on. But, my main goal here was: keep changes at minimum, dont break any compatibility, yet supporting the most used touch actions for the users, to get this PR accepted as soon as possible without any risk to Marlin So, with only 3 files and a few lines changed, we get the most action covered:
Why do I want to keep things so minimum now? Because the TFT users that don't have smart screens need it, as the case of tronxy x5sa users - we had working on this about a week or so. I already working in a 2.0 version of this full touch, that each screen could define its touchable actions - icons, menus, edit, support double touch, etc. The code is better, but the change is a lot bigger. If I did the big version first, the tronxy x5sa users (and a lot of others users) will need to wait a long time to use it, because a more complex and big PR isnt so easy to merge without break anything - it needs more review, more tests, and so on... Well, I think I could explain my design/code decisions to help it get accepted as soon as possible :-) Thanks! |
Add a |
changes are good, just a visual/design issue to fix with #18273 edit value touch is not yet really "usable" they tend to only do min/max values, but well, can help too |
Just tested this with my MKS_Robin with Robin_TFT28 and it is working well! The scrolling on the right side is very ingenious! Maybe it could have an icon or scrollbar of some sort? |
Good to know! I'm working on better scroll and "touch space" for smaller screens (to fit the fingers!!). But I just will send a PR when the smaller screen I ordered arrive. Currently I just have one 3.5" 480x320. |
Oops! I meant to say TFT32! Just an upscaled version of TFT28. Not sure why my stepper motors aren’t moving with the bugfix branch. Will have to resolve that before I can continue. |
Hmm steppers are working now. But have a glitchy TMC connection (Some axis saying no connection or all low, randomly). I think something was changed in bugfix that is causing intermittent single wire communication on TMC2209. Switching back to 2.0.5.3 with the same settings shows no problems. I will occasionally flash back to bugfix to test things out if you’d like! |
If a bug report is filed with sufficient information then someone will look into it. |
@thinkyhead I’m really not sure what’s going on. The connection errors are very sporadic and randomly jump between the drivers. There is no set driver that reports connection error but rather random amount return that problem. Is there any way I can provide more info besides the sporadic M122 response? I am more than happy to help diagnose this out. |
Description
Hi,
Using a touch screen with default Marlin menu is a bit annoying because we need to use the buttons bellow the screen.
But it changes now :-)
I'm enabling it with TOUCH_BUTTONS. I can emulate a click too, but seems touch to select is better.
The change could be done just in the xpt2046.cpp file, but I think the "screen_click" function must be part of MarlinUI... Tried to keep the thinks in the right place.
Benefits
It's more easier and user friendly to touch directly where you want, in a TFT display that uses the default marlin menu.
Some users have touch displays that don't have any other UI. Link TronXY users using Marlin. So it helps this users to have a better UI experience.
This videos explains better :-)
I think I must explain my code decisions in the PR:
I could do it a lot better, with more classes and stuff, supporting double-touch, touch on icons, edit screen, and so on.
But, my main goal here was:
keep changes at minimum, dont break any compatibility, yet supporting the most used touch actions for the users, to get this PR accepted as soon as possible without any risk to Marlin
So, with only 3 files and a few lines changed, we get the most action covered:
Why do I want to keep things so minimum now? Because the TFT users that don't have smart screens need it, as the case of tronxy x5sa users - we had working on this about a week or so.
I already working in a 2.0 version of this full touch, that each screen could define its touchable actions - icons, menus, edit, support double touch, etc. The code is better, but the change is a lot bigger. If I did the big version first, the tronxy x5sa users (and a lot of others users) will need to wait a long time to use it, because a more complex and big PR isnt so easy to merge without break anything - it needs more review, more tests, and so on...
Well, I think I could explain my design/code decisions to help it get accepted as soon as possible :-)
I have a few users testing it, and they are enjoying a lot!
Thanks!