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

Selecting Move Z Selects/Moves X #24396

Closed
1 task done
thisiskeithb opened this issue Jun 25, 2022 · 7 comments · Fixed by #24404
Closed
1 task done

Selecting Move Z Selects/Moves X #24396

thisiskeithb opened this issue Jun 25, 2022 · 7 comments · Fixed by #24404

Comments

@thisiskeithb
Copy link
Member

thisiskeithb commented Jun 25, 2022

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

Selecting Move Z now Selects/Moves X Instead in TFT_COLOR_UI

Bug Timeline

"Simplify move menus with substitution" 975c8f4 is the source of this bug.

Expected behavior

Selecting Move Z will move Z, not X.

Actual behavior

Selecting Move Z will move/select X instead of Z.

Steps to Reproduce

Test with any TFT_COLOR_UI config (Biqu B1 SE Plus or Biqu BX as examples) and and try to move Z through the LCD.

Version of Marlin Firmware

bugfix-2.1.x (0aebcc4)

Printer model

Any TFT_COLOR_UI config

Electronics

No response

Add-ons

No response

Bed Leveling

No response

Your Slicer

No response

Host Software

No response

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Use Biqu B1 SE Plus or Biqu BX as examples.

Move.Z.axis.Moves.X.Instead.mp4
@rhapsodyv
Copy link
Member

I didn’t see that code, but I suspect that is similar to another menu issues I fixed in the past: the itemIndex variable being used for two different purpose.

@thinkyhead
Copy link
Member

I also suspect it is this. Looking for the culprit and a way to catch this kind of lost value in future.

@rhapsodyv
Copy link
Member

The issue, if I remember right, is triggered only when a redraw is needed.
The redraw call will re render the top menu, overwriting the itemIndex variable.
If there’s no redraw, the call keep inside the context that is using itemIndex for distance.

To fix it, I think a new way to hold the second state is needed. For example a parameter for the nested calls that is not dependent of itemIdex.

menus for multi index and mixing extruders have this same issue, already fixed in the past.

@thisiskeithb thisiskeithb changed the title Selecting Move Z now Selects/Moves X Instead in TFT_COLOR_UI Selecting Move Z Selects/Moves X in TFT_COLOR_UI Jun 25, 2022
@Farva42
Copy link
Contributor

Farva42 commented Jun 25, 2022

This issue also shows up with #define DWIN_MARLINUI_PORTRAIT same symptom and you can see the Axis label flip from Z to X as soon as you scroll down to a distance option.

@thisiskeithb
Copy link
Member Author

thisiskeithb commented Jun 25, 2022

This issue also shows up with #define DWIN_MARLINUI_PORTRAIT same symptom and you can see the Axis label flip from Z to X as soon as you scroll down to a distance option.

I'm going to guess that this bug affects anything not using the standard 12864/full graphic or 2004/character UIs.

This affects everything using MarlinUI.

@thisiskeithb thisiskeithb changed the title Selecting Move Z Selects/Moves X in TFT_COLOR_UI Selecting Move Z Selects/Moves X in TFT_COLOR_UI & DWIN Jun 25, 2022
@thisiskeithb thisiskeithb changed the title Selecting Move Z Selects/Moves X in TFT_COLOR_UI & DWIN Selecting Move Z Selects/Moves X Jun 26, 2022
@thisiskeithb
Copy link
Member Author

Closing since there’s now a PR to fix this: #24404

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants