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] NeoPixel enabling with SKR E3V3 shows error on compile #165

Closed
1 task done
SrgWhoopsie opened this issue Oct 27, 2024 · 5 comments · Fixed by #166
Closed
1 task done

[BUG] NeoPixel enabling with SKR E3V3 shows error on compile #165

SrgWhoopsie opened this issue Oct 27, 2024 · 5 comments · Fixed by #166

Comments

@SrgWhoopsie
Copy link

SrgWhoopsie commented Oct 27, 2024

Did you test the latest release build?

Yes, and the problem still exists.

Bug Description

Hi,

trying to compile the latest build source for my X2,

ive added 5 Neo pixels and wanted to turn on the feature in Config and with doing so i keep running into this error on compile.

Marlin\src\lcd\e3v2\proui\dwin.cpp: In function 'void ApplyLEDColor()':
Marlin\src\lcd\e3v2\proui\dwin.cpp:2558:49: error: cannot convert 'LEDColor' to 'uint32_t' {aka 'long unsigned int'} in assignment
2558 | void ApplyLEDColor() { HMI_data.Led_Color = LEDColor({ leds.color.r, leds.color.g, leds.color.b OPTARG(HAS_WHITE_LED, leds.color.w) }); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| LEDColor
Compiling .pio\build\STM32G0B1RE_btt\src\src\libs\vector_3.cpp.o
*** [.pio\build\STM32G0B1RE_btt\src\src\lcd\e3v2\proui\dwin.cpp.o] Error 1

any idea why this is happening or how to fix it?
Marlin.zip

removing LED Control Menu fixes this issue, but now i am unable to set startup led colour, and do not have a way to change colour besides submitting gcode, prior to printing

Printer Model

Voxelab Aquila

Model Type

X2

Your Mainboard

BTT SKR MINI E3 v3.0

Other Mainboard Type

No response

Add-ons that could be involved

No response

ProUI-EX | Extra Features?

Yes

Bed Leveling

UBL - Unified Bed Leveling

Did you include your own configuration files?

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

Additional information & file uploads

No response

@SrgWhoopsie SrgWhoopsie added the bug Something isn't working label Oct 27, 2024
@classicrocker883 classicrocker883 changed the title [BUG] NeoPixel enabling with SKR E3V3 shows orror on compile [BUG] NeoPixel enabling with SKR E3V3 shows error on compile Oct 28, 2024
@classicrocker883 classicrocker883 added the work-in-progress Currently focused on this issue label Oct 28, 2024
@classicrocker883
Copy link
Owner

classicrocker883 commented Oct 28, 2024

I ran into a few issues before seeing this error popup. with your configurations, I had to change a few things:

  • add NO_CONTROLLER_CUSTOM_WIRING_WARNING
  • change define MULTIPLE_PROBING 2

but I'm not sure what changed as to why this error came up.
I was able to compile correctly by a few things if you wanted to try it yourself:

  • add LEDColor Led_Color; to the HMI_value_t struct in src/lcd/e3v2/proui/dwin.h

in src/lcd/e3v2/proui/dwin.cpp

  • change void ApplyLEDColor() { HMI_data.Led_Color to void ApplyLEDColor() { HMI_value.Led_Color
  • change the following in void DWIN_CopySettingsFrom
    • basically remove >> 16) & 0xFF - or whatever it may be
  #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
    leds.set_color(
      HMI_value.Led_Color.r,
      HMI_value.Led_Color.g,
      HMI_value.Led_Color.b
      OPTARG(HAS_WHITE_LED, HMI_value.Led_Color.w)
    );
    leds.update();
  #endif

@SrgWhoopsie
Copy link
Author

Awesome cheers mate, I'll give it a go this afternoon when I get home from work and update this comment.

Thank you

@classicrocker883
Copy link
Owner

classicrocker883 commented Oct 29, 2024

also, I edited the dwin.cpp part to include that snippet, but change it a bit

here is the PR for it

and if you want the branch I used to compile and test yourself here it is

@SrgWhoopsie
Copy link
Author

alright so i just copied your dwin.cpp and dwin.h from the PR branch into my current repo,

change add NO_CONTROLLER_CUSTOM_WIRING_WARNING
change define MULTIPLE_PROBING 2
done

and im getting a heap of errors now lol

In file included from Marlin\src\module/stepper/../../feature/../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\module/stepper/../../feature/../lcd/marlinui.h:51, from Marlin\src\module/stepper/../../feature/tmc_util.h:25, from Marlin\src\module/stepper/trinamic.h:35, from Marlin\src\module/stepper/indirection.h:73, from Marlin\src\module/stepper.h:48, from Marlin\src\MarlinCore.cpp:51: Marlin\src\module/stepper/../../feature/../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin_popup.h:23, from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\marlinui.h:51, from Marlin\src\feature\../module/stepper/../../feature/tmc_util.h:25, from Marlin\src\feature\../module/stepper/trinamic.h:35, from Marlin\src\feature\../module/stepper/indirection.h:73, from Marlin\src\feature\../module/stepper.h:48, from Marlin\src\feature\babystep.cpp:31: y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from Marlin\src\feature\bedlevel\ubl\ubl.cpp:43: Marlin\src\feature\bedlevel\ubl\../../../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin_popup.h:23, from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\marlinui.h:51, from Marlin\src\feature\../module/stepper/../../feature/tmc_util.h:25, from Marlin\src\feature\../module/stepper/trinamic.h:35, from Marlin\src\feature\../module/stepper/indirection.h:73, from Marlin\src\feature\../module/stepper.h:48, from Marlin\src\feature\runout.h:31, from Marlin\src\feature\host_actions.cpp:37: y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from Marlin\src\feature\bedlevel\ubl\../../../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\feature\bedlevel\ubl\../../../lcd/marlinui.h:51, from Marlin\src\feature\bedlevel\ubl\ubl_G29.cpp:33: Marlin\src\feature\bedlevel\ubl\../../../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color *** [.pio\build\STM32G0B1RE_btt\src\src\MarlinCore.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\babystep.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\bedlevel\ubl\ubl.cpp.o] Error 1 In file included from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin_popup.h:23, from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\marlinui.h:51, from Marlin\src\feature\../module/stepper/../../feature/tmc_util.h:25, from Marlin\src\feature\../module/stepper/trinamic.h:35, from Marlin\src\feature\../module/stepper/indirection.h:73, from Marlin\src\feature\../module/stepper.h:48, from Marlin\src\feature\controllerfan.cpp:28: y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from Marlin\src\feature\../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\feature\../lcd/marlinui.h:51, from Marlin\src\feature\hotend_idle.cpp:38: Marlin\src\feature\../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color *** [.pio\build\STM32G0B1RE_btt\src\src\feature\host_actions.cpp.o] Error 1 In file included from Marlin\src\feature\../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\feature\../lcd/marlinui.h:51, from Marlin\src\feature\cancel_object.cpp:29: Marlin\src\feature\../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color *** [.pio\build\STM32G0B1RE_btt\src\src\feature\bedlevel\ubl\ubl_G29.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\hotend_idle.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\controllerfan.cpp.o] Error 1 In file included from Marlin\src\feature\../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\feature\../lcd/marlinui.h:51, from Marlin\src\feature\powerloss.cpp:56: Marlin\src\feature\../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color *** [.pio\build\STM32G0B1RE_btt\src\src\feature\cancel_object.cpp.o] Error 1 In file included from Marlin\src\gcode\bedlevel\ubl\M421.cpp:37: Marlin\src\gcode\bedlevel\ubl\../../../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin_popup.h:23, from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\marlinui.h:51, from Marlin\src\feature\../module/stepper/../../feature/tmc_util.h:25, from Marlin\src\feature\../module/stepper/trinamic.h:35, from Marlin\src\feature\../module/stepper/indirection.h:73, from Marlin\src\feature\../module/stepper.h:48, from Marlin\src\feature\runout.h:31, from Marlin\src\feature\runout.cpp:31: y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from Marlin\src\feature\../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\feature\../lcd/marlinui.h:51, from Marlin\src\feature\tmc_util.h:25, from Marlin\src\feature\tmc_util.cpp:27: Marlin\src\feature\../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin_popup.h:23, from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\marlinui.h:51, from Marlin\src\feature\../module/stepper/../../feature/tmc_util.h:25, from Marlin\src\feature\../module/stepper/trinamic.h:35, from Marlin\src\feature\../module/stepper/indirection.h:73, from Marlin\src\feature\../module/stepper.h:48, from Marlin\src\feature\pause.cpp:44: y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color In file included from Marlin\src\gcode\bedlevel\../../lcd/e3v2/proui/dwin_popup.h:23, from Marlin\src\gcode\bedlevel\../../lcd/marlinui.h:51, from Marlin\src\gcode\bedlevel\G26.cpp:113: Marlin\src\gcode\bedlevel\../../lcd/e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color *** [.pio\build\STM32G0B1RE_btt\src\src\feature\powerloss.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\gcode\bedlevel\ubl\M421.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\runout.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\pause.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\gcode\bedlevel\G26.cpp.o] Error 1 *** [.pio\build\STM32G0B1RE_btt\src\src\feature\tmc_util.cpp.o] Error 1 In file included from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin_popup.h:23, from y:\hsoj9\documents\github\marlin_\marlin\src\lcd\marlinui.h:51, from y:\hsoj9\documents\github\marlin_\marlin\src\feature\tmc_util.h:25, from Marlin\src\gcode\calibrate\../../module/stepper/trinamic.h:35, from Marlin\src\gcode\calibrate\../../module/stepper/indirection.h:73, from Marlin\src\gcode\calibrate\../../module/stepper.h:48, from Marlin\src\gcode\calibrate\G28.cpp:29: y:\hsoj9\documents\github\marlin_\marlin\src\lcd\e3v2/proui/dwin.h:108:24: error: 'Def_Leds_Color' was not declared in this scope; did you mean 'Def_Text_Color'? 108 | LEDColor Led_Color = Def_Leds_Color; // Moved from HMI_data | ^~~~~~~~~~~~~~ | Def_Text_Color *** [.pio\build\STM32G0B1RE_btt\src\src\gcode\calibrate\G28.cpp.o] Error 1

downloaded the new branch for the PR, pasted my config and config_a to it, commented out the wiring warning and it works 🙌 so i guess theres something in my files thats wonky

thanks for the bud, greatly appreciate it

@classicrocker883
Copy link
Owner

classicrocker883 commented Oct 29, 2024

in dwin_defines.h where #define Def_Leds_Color change:

- #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) && DISABLED(LED_COLOR_PRESETS)

+ #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)

@github-actions github-actions bot removed bug Something isn't working work-in-progress Currently focused on this issue labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants