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

[BUG] Character LCD Menus Misaligned #26148

Closed
1 task done
SparkyDan555 opened this issue Aug 4, 2023 · 5 comments · Fixed by #26154
Closed
1 task done

[BUG] Character LCD Menus Misaligned #26148

SparkyDan555 opened this issue Aug 4, 2023 · 5 comments · Fixed by #26154

Comments

@SparkyDan555
Copy link

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

Yes, and the problem still exists.

Bug Description

Some LCD submenus are displayed with misalignment. See photos below.

Bug Timeline

Started sometime between eca80db and 87231b6

Expected behavior

Menus displayed correctly.

Actual behavior

Alignment of menu items is wrong and some menus just look generally messed up.

Examples:
IMG_9415
IMG_9416
IMG_9417

Steps to Reproduce

  1. Upload latest bugfix
  2. Navigate to submenus on LCD
  3. Observe incorrect display

Version of Marlin Firmware

bugfix-2.1.x

Printer model

Geeetech A10M

Electronics

Stock board, stock LCD

Add-ons

None

Bed Leveling

ABL Bilinear mesh

Your Slicer

Cura

Host Software

None

Don't forget to include

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

Additional information & file uploads

Archive.zip

@thisiskeithb
Copy link
Member

This doesn't show up on all menus, but I can confirm the bug here on a REPRAP_DISCOUNT_SMART_CONTROLLER.

@thisiskeithb
Copy link
Member

This was broken in #26073

d036097bca52b128b421342afcdb908cb1d8d5ab is the first bad commit
commit d036097bca52b128b421342afcdb908cb1d8d5ab
Author: lukasradek <lukasradek@users.noreply.github.com>
Date:   Thu Jul 27 23:08:21 2023 +0200

    🚸 Fix HD44780 EDIT_ITEM position (#26073)

 Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp | 2 +-
 Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 3 ++-
 Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp | 2 +-
 Marlin/src/lcd/dogm/lcdprint_u8g.cpp        | 2 +-
 Marlin/src/lcd/lcdprint.cpp                 | 2 ++
 5 files changed, 7 insertions(+), 4 deletions(-)

@lukasradek
Copy link
Contributor

lukasradek commented Aug 5, 2023

There is a misunderstanding between callers and callees here

https://github.com/MarlinFirmware/Marlin/blob/f66323ecfbe067667234df286e14d43d409bfaea/Marlin/src/lcd/lcdprint.cpp#L47C9-L47C9

I have been pointing it out and solving it in #25619 and #25339 but those are not merged yet.

The underlying lcd_put_u8str_P declares Return the given maxlen minus the number of characters emitted, i.e., the number of unused columns (which is sort of a confusing crutch for some of the drawing code, since it doesn't have to subtract chars printed from LCD_WIDTH itself) while all of its callers just return that value as the output width (in pixels on GLCD) (which should be the proper return value meaning).

I am on it.

@SparkyDan555
Copy link
Author

I have tested #26154 and it fixes this issue. I will close this issue as others confirmed the fix and it looks likely to be merged.

@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 Oct 20, 2023
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.

3 participants