Browse Source

🩹 Fix ProUI LED compile (#24473)

FB4S_WIFI
GHGiampy 2 years ago
committed by Scott Lahteine
parent
commit
4a6ad1c98b
  1. 14
      Marlin/src/lcd/e3v2/proui/dwin.cpp
  2. 9
      Marlin/src/lcd/e3v2/proui/dwin_defines.h

14
Marlin/src/lcd/e3v2/proui/dwin.cpp

@ -1843,10 +1843,10 @@ void DWIN_CopySettingsFrom(const char * const buff) {
TERN_(BAUD_RATE_GCODE, HMI_SetBaudRate());
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
leds.set_color(
(HMI_data.LED_Color >> 16) & 0xFF,
(HMI_data.LED_Color >> 8) & 0xFF,
(HMI_data.LED_Color >> 0) & 0xFF
OPTARG(HAS_WHITE_LED, (HMI_data.LED_Color >> 24) & 0xFF)
HMI_data.Led_Color.r,
HMI_data.Led_Color.g,
HMI_data.Led_Color.b
OPTARG(HAS_WHITE_LED, HMI_data.Led_Color.w)
);
leds.update();
#endif
@ -2267,7 +2267,11 @@ void SetPID(celsius_t t, heater_id_t h) {
}
#endif
#if HAS_COLOR_LEDS
void ApplyLEDColor() { HMI_data.LED_Color = TERN0(HAS_WHITE_LED, (leds.color.w << 24)) | (leds.color.r << 16) | (leds.color.g << 8) | leds.color.b; }
void ApplyLEDColor() {
HMI_data.Led_Color = LEDColor(
TERN(HAS_WHITE_LED, { 0, 0, 0, leds.color.w }, { leds.color.r, leds.color.g, leds.color.b })
);
}
void LiveLEDColor(uint8_t *color) { *color = MenuData.Value; leds.update(); }
void LiveLEDColorR() { LiveLEDColor(&leds.color.r); }
void LiveLEDColorG() { LiveLEDColor(&leds.color.g); }

9
Marlin/src/lcd/e3v2/proui/dwin_defines.h

@ -64,10 +64,7 @@
#define Def_Coordinate_Color Color_White
#define Def_Button_Color RGB( 0, 23, 16)
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#define Def_Leds_Color 0xFFFFFFFF
#endif
#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
#define Def_CaseLight_Brightness 255
#define Def_Leds_Color LEDColorWhite()
#endif
typedef struct {
@ -110,12 +107,12 @@ typedef struct {
bool Baud115K = false;
#endif
bool FullManualTramming = false;
// Led
#if ENABLED(MESH_BED_LEVELING)
float ManualZOffset = 0;
#endif
// Led
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
uint32_t LED_Color = Def_Leds_Color;
LEDColor Led_Color = Def_Leds_Color;
#endif
} HMI_data_t;

Loading…
Cancel
Save