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

Clean-up touch screen code #1

Closed
Sebazzz opened this issue Sep 25, 2020 · 7 comments
Closed

Clean-up touch screen code #1

Sebazzz opened this issue Sep 25, 2020 · 7 comments

Comments

@Sebazzz
Copy link
Collaborator

Sebazzz commented Sep 25, 2020

The touch screen code is a mess currently:

  • Switching between languages is sprinkled throughout the source
  • There is one big switch to handle events from the touch UI
@Sebazzz Sebazzz reopened this Sep 25, 2020
@Sebazzz
Copy link
Collaborator Author

Sebazzz commented Sep 26, 2020

Support for Chinese is dropped. The giant switch for event handling still needs love.

@Sebazzz
Copy link
Collaborator Author

Sebazzz commented Sep 26, 2020

@JonBradbury @njoythegame I've been looking though the Marlin sources and there is already stuff in place to communicate with DGUS displays:

https://github.com/Sebazzz/Marlin/tree/creality-cr6-merge-attempt/Marlin/src/lcd/extui/lib/dgus
https://github.com/Sebazzz/Marlin/blob/creality-cr6-merge-attempt/Marlin/src/lcd/extui/dgus_lcd.cpp

I think this can be basis for re-implementing the Creality LCD interfacing code. It is essentially many event handlers for all things that happen in Marlin.

This is the API: https://github.com/Sebazzz/Marlin/blob/creality-cr6-merge-attempt/Marlin/src/lcd/extui/ui_api.h

@Sebazzz
Copy link
Collaborator Author

Sebazzz commented Sep 27, 2020

I've been looking into using this as a basis, but the ExtUI implementation for DGUS is quite opinionated:

  • In the SD file list you should scroll
  • Only one file list instead of five fixed pages
  • No separate print status screen for paused / running print

We can adapt the touch screen to use this, but I think for now this is a bridge too far as that would need non-trivial changes to the touch screen. I would rather not do that at the moment because we're also still trying to get basic functions working, the touch screen configuration is all binary and unmergable, so it is best not to deviate too much from mainline.

Sebazzz added a commit that referenced this issue Sep 27, 2020
I had to jump through some hoops because Marlin is
quit opinionated about the menu structure. We can't
make these just yet because then we will stall the project.

However, the general structure of the Marlin EXTUI
implementation is sound in my opinion, so we just
work around it for now so we can at least get the
spaghetti cleaned up what it is now.

This branch does currently build - but I would not run it yet.
@Sebazzz
Copy link
Collaborator Author

Sebazzz commented Sep 27, 2020

@JonBradbury: I did a write-up here: https://discord.com/channels/759603746270609428/759605549305692170/759870235838251008

I think this might be a viable way to continue.

@chriskoups
Copy link

Can you share the discord link?

@Sebazzz Sebazzz added this to the Community Release 4 alpha milestone Oct 29, 2020
@Sebazzz
Copy link
Collaborator Author

Sebazzz commented Nov 1, 2020

Clean up happened in extui.

Ready for next release.

@Sebazzz Sebazzz closed this as completed Nov 1, 2020
@Sebazzz
Copy link
Collaborator Author

Sebazzz commented Nov 1, 2020

@chriskoups Sorry - this: https://discord.gg/zzrBay73

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

2 participants