Skip to content

[BUG] Compile crashing on enable CUSTOM_STATUS_SCREEN_IMAGE #18405

@drackp2m

Description

@drackp2m

Bug Description

When try to activate option CUSTOM_STATUS_SCREEN_IMAGE the compilation of the error indicated at the end of the issue

My Configurations

Marlin.zip

Steps to Reproduce

  1. Uncomment option CUSTOM_STATUS_SCREEN_IMAGE
  2. Add _Statusscreen.h to your Marlin folder
  3. Try to compile

Expected behavior: Compile successfully

Actual behavior: The error inserted bellow

Additional Information

Compiling .pio/build/LPC1769/src/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp.o
Marlin/src/lcd/dogm/status_screen_DOGM.cpp: In static member function 'static void MarlinUI::draw_status_screen()':
Marlin/src/lcd/dogm/status_screen_DOGM.cpp:519:78: error: expected ')' before 'u8g'
  519 |     if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1))
      |                                                                              ^
      |                                                                              )
  520 |       u8g.drawBitmapP(STATUS_LOGO_X, STATUS_LOGO_Y, STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT, status_logo_bmp);
      |       ~~~                                                                     
In file included from Marlin/src/lcd/dogm/dogm_Statusscreen.h:32,
                 from Marlin/src/lcd/dogm/status_screen_DOGM.cpp:32:
Marlin/src/lcd/dogm/ultralcd_DOGM.h:219:31: note: to match this '('
  219 | #define PAGE_CONTAINS(ya, yb) ((yb) >= u8g.getU8g()->current_page.y0 && (ya) <= u8g.getU8g()->current_page.y1) // Do two vertical regions overlap?
      |                               ^
Marlin/src/lcd/dogm/status_screen_DOGM.cpp:519:9: note: in expansion of macro 'PAGE_CONTAINS'
  519 |     if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1))
      |         ^~~~~~~~~~~~~
Marlin/src/lcd/dogm/status_screen_DOGM.cpp:520:112: error: expected ')' before ';' token
  520 |       u8g.drawBitmapP(STATUS_LOGO_X, STATUS_LOGO_Y, STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT, status_logo_bmp);
      |                                                                                                                ^
      |                                                                                                                )
Marlin/src/lcd/dogm/status_screen_DOGM.cpp:519:8: note: to match this '('
  519 |     if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1))
      |        ^
*** [.pio/build/LPC1769/src/src/lcd/dogm/status_screen_DOGM.cpp.o] Error 1

Extra additional Information

When using the Bitmap to C/C++ Converter tool, there is an option to align the status screen to the right, however this option never worked for me.

Should I open another issue to see if anyone knows how to fix that problem?

BTW, because my current computer is a bit grungy and slow, I can't test every firmware version, but I'd say it's been a thing of the last week (or short time ago).
Before the last changes, the status screen compiled correctly, however, as I mentioned before, I never managed to get it aligned right.

As always, thanks for everything.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions