Open SparkyDan555 opened 8 months ago
User seems a little confused The Temperature Menu shown is Configuration | Advanced Settings | Temperature
User seems a little confused
The Temperature Menu shown is Configuration | Advanced Settings | Temperature
Yes, the "temperature configuration" menu in Configuration > Advanced Settings > Temperature as opposed to the Temperature page on the main menu. No confusion here.
Tracking the last line issue in Advanced Temperature...
What ive found so far
In Marlin/src/lcd/HD44780/marlinui_HD44780.cpp I added some serial echos to see what was going on
diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
index 2564d4f96e..d27960d42c 100644
--- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
+++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
@@ -1223,9 +1223,15 @@ void MarlinUI::draw_status_screen() {
// Draw a menu item with a (potentially) editable value
void MenuEditItemBase::draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char * const inStr, const bool pgm) {
const uint8_t vlen = inStr ? (pgm ? utf8_strlen_P(inStr) : utf8_strlen(inStr)) : 0;
+ SERIAL_ECHOLN("vlen:",vlen);
lcd_put_lchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
uint8_t n = LCD_WIDTH - 2 - vlen;
- n -= lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n);
+ SERIAL_ECHOLN("n:",n);
+ uint8_t myn = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n);
+ SERIAL_ECHOLN("myn:",myn);
+ n -= myn;
+ SERIAL_ECHOLN("new n:",n);
+
if (vlen) {
lcd_put_u8str(F(":"));
for (; n; --n) lcd_put_u8str(F(" "));
On displaying the last line on the menu you get vlen: 3 n: 15 myn: 16 new n: 255 (rollover from 15-16)
lcd_put_u8str is returning 16, which results in 255 spaces being incorrectly added.
Issue is related to size of string LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
reducing it to LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotun *");
everything works as expected.. but this is just a clue...
Just noting this down, since I dont know when ill get back to this...
Partial fix
diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp
index c84a695c78..aeaf9c27cc 100644
--- a/Marlin/src/lcd/lcdprint.cpp
+++ b/Marlin/src/lcd/lcdprint.cpp
@@ -116,8 +116,8 @@ lcd_uint_t expand_u8str_P(char * const outstr, PGM_P const ptpl, const int8_t in
*/
lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/*=nullptr*/, FSTR_P const fstr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) {
char estr[maxlen + 2];
- const lcd_uint_t outlen = expand_u8str_P(estr, ptpl, ind, cstr, fstr, maxlen);
- lcd_put_u8str_max(estr, maxlen * (MENU_FONT_WIDTH));
+ expand_u8str_P(estr, ptpl, ind, cstr, fstr, maxlen);
+ const lcd_uint_t outlen = lcd_put_u8str_max(estr, maxlen * (MENU_FONT_WIDTH));
return outlen;
}
but when you go into the edit screen
Thanks for the report! This is now patched in bugfix-2.1.x
.
Thanks for the report! This is now patched in
bugfix-2.1.x
.
I just did a quick build of bugfix-2.1.x and checked this commit is included and the issue still exists in the steps/mm menu. I will test some more later.
Steps/mm menu looks ok, but the value editing screen is down one line, is that what your referring to?
Hopefully a video might demonstrate this better: https://drive.google.com/file/d/1cFCz0oyNODbwqhyPhQ28HUI1FluS-dBT/view
I do also experience the value on the editing screens being one line down, but that is not the main point I'm trying to raise. The problem tends to exist when you scroll right to the bottom of the menu, the last menu item disappears, showing only the value at some random position on the screen. When you scroll back up, it becomes generally scrambled/misaligned and doesn't navigate as it should.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Some LCD menus are misaligned after scrolling to the bottom. See below photos.
Filament Change Menu![IMG_9884](https://github.com/MarlinFirmware/Marlin/assets/38540799/8dbc2af5-432d-45d1-905a-8ec4654c3e21)
Temperature Configuration Menu (notice random characters next to Ambient Co.)![IMG_9887](https://github.com/MarlinFirmware/Marlin/assets/38540799/9d9b9f1c-4c31-4c7d-a0b7-08eaacbaf741)
Bottom of Temperature Configuration Menu. 50 is from Autotune Heated Bed option.![IMG_9888](https://github.com/MarlinFirmware/Marlin/assets/38540799/9abd424a-17da-4ab5-a777-fc1235efbbf3)
This is similar to an issue I previously reported #26148
Only some menus are affected, others work fine so I have ruled out any interference in the electronics.
Bug Timeline
First noticed in bug fix approx 2-3 weeks ago.
Expected behavior
LCD Menus properly aligned and formatted
Actual behavior
When scrolling towards the bottom of LCD menus, the menu structure becomes misaligned and generally scrambled.
Steps to Reproduce
Version of Marlin Firmware
Marlin bugfix-2.1.x (Nov 13 2023 20:12:25)
Printer model
Geeetech A10M
Electronics
Stock GT2560 V1.4
LCD/Controller
Stock Character LCD
Other add-ons
No response
Bed Leveling
ABL Bilinear mesh
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Archive.zip