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

add ui_api.h include, fixes proui FILAMENT_RUNOUT_SENSOR issue #26977

Merged

Conversation

ellensp
Copy link
Contributor

@ellensp ellensp commented Apr 17, 2024

Description

Since #26563 Several ExtUI calls where added to Marlin/src/lcd/e3v2/proui/dwin.cpp

In the current code the required extui/ui_api.h is only included if FILAMENT_RUNOUT_SENSOR is enabled
via an indirect route of #include "../../../feature/runout.h" which then #include "../lcd/extui/ui_api.h"

However the code now always requires ui_api.h
If #define FILAMENT_RUNOUT_SENSOR is disabled in the Configuration.h it results in numerous compile errors

Compiling .pio/build/STM32F103RE_creality/src/src/lcd/extui/ui_api.cpp.o
Marlin/src/lcd/e3v2/proui/dwin.cpp: In function 'void hmiSDCardUpdate()':
Marlin/src/lcd/e3v2/proui/dwin.cpp:1045:46: error: 'ExtUI' has not been declared
 1045 |     if (!DWIN_lcd_sd_status && sdPrinting()) ExtUI::stopPrint();  // Media removed while printing
      |                                              ^~~~~
Marlin/src/lcd/e3v2/proui/dwin.cpp: In function 'void onClickPauseOrStop()':
Marlin/src/lcd/e3v2/proui/dwin.cpp:1169:55: error: 'ExtUI' has not been declared
 1169 |     case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ExtUI::pausePrint(); break; // Confirm pause
      |                                                       ^~~~~
Marlin/src/lcd/e3v2/proui/dwin.cpp:1170:47: error: 'ExtUI' has not been declared
 1170 |     case PRINT_STOP: if (hmiFlag.select_flag) ExtUI::stopPrint(); break; // Stop confirmed then abort print
      |                                               ^~~~~
Marlin/src/lcd/e3v2/proui/dwin.cpp: In function 'void hmiPrinting()':
Marlin/src/lcd/e3v2/proui/dwin.cpp:1204:11: error: 'ExtUI' has not been declared
 1204 |           ExtUI::resumePrint();
      |           ^~~~~
Marlin/src/lcd/e3v2/proui/dwin.cpp: At global scope:
Marlin/src/lcd/e3v2/proui/dwin.cpp:1854:15: error: 'ExtUI' has not been declared
 1854 | static_assert(ExtUI::eeprom_data_size >= sizeof(hmi_data_t), "Insufficient space in EEPROM for UI parameters");
      |               ^~~~~
*

Requirements

PROUI

Benefits

builds as expected

Configurations

My example configs that trigger the error
Configuration.zip

Related Issues

  • Follow up to "🚸 Update ProUI Plot graph (#26539)" #26563
  • #26917 (comment)

    @sjasonsmith sjasonsmith merged commit 58d4494 into MarlinFirmware:bugfix-2.1.x Apr 20, 2024
    62 checks passed
    @ellensp ellensp deleted the fix-proui-runout-sensor-issue branch April 21, 2024 03:14
    RPGFabi pushed a commit to RPGFabi/Marlin that referenced this pull request Jun 15, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants