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

Fix LED_CONTROL_MENU based on LED/NEO2_COLOR_PRESETS #20914

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

ellensp
Copy link
Contributor

@ellensp ellensp commented Jan 29, 2021

Description

LED_CONTROL_MENU uses objects that only exists if LED_COLOR_PRESETS or NEO2_COLOR_PRESETS is enabled
This causes compile errors eg

error: 'class LEDLights2' has no member named 'set_default'
  130 |       ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds2.set_default);

Added ifdefs so that LED_CONTROL_MENU only uses LED_COLOR_PRESETS or NEO2_COLOR_PRESETS when they are defined.

Requirements

A LCD with LED_CONTROL_MENU enabled
Either NEOPIXEL_LED enabled with LED_COLOR_PRESETS disabled
or NEOPIXEL_LED and NEOPIXEL2_SEPARATE enabled with NEO2_COLOR_PRESETS disabled

Benefits

Compiles as expected

Related Issues

Issue #20904

@thinkyhead thinkyhead changed the title fixes issue #20904, LED_CONTROL_MENU uses LED_COLOR_PRESETS without checking its enabled Fix LED_CONTROL_MENU based on LED/NEO2_COLOR_PRESETS Jan 29, 2021
@thinkyhead thinkyhead merged commit c65bf64 into MarlinFirmware:bugfix-2.0.x Jan 29, 2021
@ellensp ellensp deleted the bugfix-2.0.x-#20904 branch January 29, 2021 02:50
X-Ryl669 pushed a commit to X-Ryl669/MarlinForMKS that referenced this pull request Jan 31, 2021
Jyers pushed a commit to Jyers/Marlin that referenced this pull request Feb 3, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
thinkyhead pushed a commit that referenced this pull request Apr 30, 2021
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