Browse Source

🚸 Case Light, LED menus for E3V2 DWIN Enhanced UI (#23590)

GHGiampy 2 years ago
parent
commit
f07fc7e96f
No account linked to committer's email address

+ 3
- 2
Marlin/Configuration.h View File

@@ -371,8 +371,9 @@
371 371
   //#define PS_OFF_SOUND            // Beep 1s when power off
372 372
   #define PSU_ACTIVE_STATE LOW      // Set 'LOW' for ATX, 'HIGH' for X-Box
373 373
 
374
-  //#define PSU_DEFAULT_OFF         // Keep power off until enabled directly with M80
375
-  //#define PSU_POWERUP_DELAY 250   // (ms) Delay for the PSU to warm up to full power
374
+  //#define PSU_DEFAULT_OFF               // Keep power off until enabled directly with M80
375
+  //#define PSU_POWERUP_DELAY      250    // (ms) Delay for the PSU to warm up to full power
376
+  //#define LED_POWEROFF_TIMEOUT 10000    // (ms) Turn off LEDs after power-off, with this amount of delay
376 377
 
377 378
   //#define POWER_OFF_TIMER               // Enable M81 D<seconds> to power off after a delay
378 379
   //#define POWER_OFF_WAIT_FOR_COOLDOWN   // Enable M81 S to power off only after cooldown

+ 27
- 27
Marlin/Configuration_adv.h View File

@@ -1297,7 +1297,6 @@
1297 1297
 
1298 1298
 #if HAS_MARLINUI_MENU
1299 1299
 
1300
-  // Add Probe Z Offset calibration to the Z Probe Offsets menu
1301 1300
   #if BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_BILINEAR)
1302 1301
     // Add calibration in the Probe Offsets menu to compensate for X-axis twist.
1303 1302
     //#define X_AXIS_TWIST_COMPENSATION
@@ -1322,32 +1321,6 @@
1322 1321
   // BACK menu items keep the highlight at the top
1323 1322
   //#define TURBO_BACK_MENU_ITEM
1324 1323
 
1325
-  /**
1326
-   * LED Control Menu
1327
-   * Add LED Control to the LCD menu
1328
-   */
1329
-  //#define LED_CONTROL_MENU
1330
-  #if ENABLED(LED_CONTROL_MENU)
1331
-    #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
1332
-    //#define NEO2_COLOR_PRESETS              // Enable a second NeoPixel Preset Color menu option
1333
-    #if ENABLED(LED_COLOR_PRESETS)
1334
-      #define LED_USER_PRESET_RED        255  // User defined RED value
1335
-      #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
1336
-      #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
1337
-      #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
1338
-      #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
1339
-      //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
1340
-    #endif
1341
-    #if ENABLED(NEO2_COLOR_PRESETS)
1342
-      #define NEO2_USER_PRESET_RED        255  // User defined RED value
1343
-      #define NEO2_USER_PRESET_GREEN      128  // User defined GREEN value
1344
-      #define NEO2_USER_PRESET_BLUE         0  // User defined BLUE value
1345
-      #define NEO2_USER_PRESET_WHITE      255  // User defined WHITE value
1346
-      #define NEO2_USER_PRESET_BRIGHTNESS 255  // User defined intensity
1347
-      //#define NEO2_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup for the second strip
1348
-    #endif
1349
-  #endif
1350
-
1351 1324
   // Insert a menu for preheating at the top level to allow for quick access
1352 1325
   //#define PREHEAT_SHORTCUT_MENU_ITEM
1353 1326
 
@@ -1379,6 +1352,33 @@
1379 1352
 
1380 1353
   // Show the E position (filament used) during printing
1381 1354
   //#define LCD_SHOW_E_TOTAL
1355
+
1356
+  /**
1357
+   * LED Control Menu
1358
+   * Add LED Control to the LCD menu
1359
+   */
1360
+  //#define LED_CONTROL_MENU
1361
+  #if ENABLED(LED_CONTROL_MENU)
1362
+    #define LED_COLOR_PRESETS                 // Enable the Preset Color menu option
1363
+    //#define NEO2_COLOR_PRESETS              // Enable a second NeoPixel Preset Color menu option
1364
+    #if ENABLED(LED_COLOR_PRESETS)
1365
+      #define LED_USER_PRESET_RED        255  // User defined RED value
1366
+      #define LED_USER_PRESET_GREEN      128  // User defined GREEN value
1367
+      #define LED_USER_PRESET_BLUE         0  // User defined BLUE value
1368
+      #define LED_USER_PRESET_WHITE      255  // User defined WHITE value
1369
+      #define LED_USER_PRESET_BRIGHTNESS 255  // User defined intensity
1370
+      //#define LED_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup
1371
+    #endif
1372
+    #if ENABLED(NEO2_COLOR_PRESETS)
1373
+      #define NEO2_USER_PRESET_RED        255  // User defined RED value
1374
+      #define NEO2_USER_PRESET_GREEN      128  // User defined GREEN value
1375
+      #define NEO2_USER_PRESET_BLUE         0  // User defined BLUE value
1376
+      #define NEO2_USER_PRESET_WHITE      255  // User defined WHITE value
1377
+      #define NEO2_USER_PRESET_BRIGHTNESS 255  // User defined intensity
1378
+      //#define NEO2_USER_PRESET_STARTUP       // Have the printer display the user preset color on startup for the second strip
1379
+    #endif
1380
+  #endif
1381
+
1382 1382
 #endif
1383 1383
 
1384 1384
 // LCD Print Progress options

+ 11
- 1
Marlin/src/feature/caselight.cpp View File

@@ -64,7 +64,17 @@ void CaseLight::update(const bool sflag) {
64 64
   #endif
65 65
 
66 66
   #if CASE_LIGHT_IS_COLOR_LED
67
-    leds.set_color(LEDColor(color.r, color.g, color.b OPTARG(HAS_WHITE_LED, color.w) OPTARG(NEOPIXEL_LED, n10ct)));
67
+    #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
68
+      if (on)
69
+        // Use current color of (NeoPixel) leds and new brightness level
70
+        leds.set_color(LEDColor(leds.color.r, leds.color.g, leds.color.b OPTARG(HAS_WHITE_LED, leds.color.w) OPTARG(NEOPIXEL_LED, n10ct)));
71
+      else
72
+        // Switch off leds
73
+        leds.set_off();
74
+    #else
75
+      // Use CaseLight color (CASE_LIGHT_DEFAULT_COLOR) and new brightness level
76
+      leds.set_color(LEDColor(color.r, color.g, color.b OPTARG(HAS_WHITE_LED, color.w) OPTARG(NEOPIXEL_LED, n10ct)));
77
+    #endif
68 78
   #else // !CASE_LIGHT_IS_COLOR_LED
69 79
 
70 80
     #if CASELIGHT_USES_BRIGHTNESS

+ 0
- 4
Marlin/src/feature/caselight.h View File

@@ -27,10 +27,6 @@
27 27
   #include "leds/leds.h" // for LEDColor
28 28
 #endif
29 29
 
30
-#if NONE(CASE_LIGHT_NO_BRIGHTNESS, CASE_LIGHT_IS_COLOR_LED) || ENABLED(CASE_LIGHT_USE_NEOPIXEL)
31
-  #define CASELIGHT_USES_BRIGHTNESS 1
32
-#endif
33
-
34 30
 class CaseLight {
35 31
 public:
36 32
   static bool on;

+ 10
- 2
Marlin/src/feature/leds/leds.cpp View File

@@ -42,7 +42,7 @@
42 42
   #include "pca9533.h"
43 43
 #endif
44 44
 
45
-#if ENABLED(CASE_LIGHT_USE_RGB_LED)
45
+#if EITHER(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL)
46 46
   #include "../../feature/caselight.h"
47 47
 #endif
48 48
 
@@ -95,6 +95,10 @@ void LEDLights::set_color(const LEDColor &incol
95 95
       #endif
96 96
     #endif
97 97
 
98
+    #if BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
99
+      // Update brightness only if caselight is ON or switching leds off
100
+      if (caselight.on || incol.is_off())
101
+    #endif
98 102
     neo.set_brightness(incol.i);
99 103
 
100 104
     #if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
@@ -106,6 +110,10 @@ void LEDLights::set_color(const LEDColor &incol
106 110
       }
107 111
     #endif
108 112
 
113
+    #if BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
114
+      // Update color only if caselight is ON or switching leds off
115
+      if (caselight.on || incol.is_off())
116
+    #endif
109 117
     neo.set_color(neocolor);
110 118
 
111 119
   #endif
@@ -150,7 +158,7 @@ void LEDLights::set_color(const LEDColor &incol
150 158
   void LEDLights::toggle() { if (lights_on) set_off(); else update(); }
151 159
 #endif
152 160
 
153
-#ifdef LED_BACKLIGHT_TIMEOUT
161
+#if LED_POWEROFF_TIMEOUT > 0
154 162
 
155 163
   millis_t LEDLights::led_off_time; // = 0
156 164
 

+ 2
- 2
Marlin/src/feature/leds/leds.h View File

@@ -157,12 +157,12 @@ public:
157 157
     static void update() { set_color(color); }
158 158
   #endif
159 159
 
160
-  #ifdef LED_BACKLIGHT_TIMEOUT
160
+  #if LED_POWEROFF_TIMEOUT > 0
161 161
     private:
162 162
       static millis_t led_off_time;
163 163
     public:
164 164
       static void reset_timeout(const millis_t &ms) {
165
-        led_off_time = ms + LED_BACKLIGHT_TIMEOUT;
165
+        led_off_time = ms + LED_POWEROFF_TIMEOUT;
166 166
         if (!lights_on) update();
167 167
       }
168 168
       static void update_timeout(const bool power_on);

+ 1
- 3
Marlin/src/feature/leds/neopixel.h View File

@@ -25,8 +25,6 @@
25 25
  * NeoPixel support
26 26
  */
27 27
 
28
-#define MAX_NEOPIXELS 127
29
-
30 28
 #ifndef _NEOPIXEL_INCLUDE_
31 29
   #error "Always include 'leds.h' and not 'neopixel.h' directly."
32 30
 #endif
@@ -68,7 +66,7 @@
68 66
 // Types
69 67
 // ------------------------
70 68
 
71
-typedef IF<(MAX_NEOPIXELS > 127), int16_t, int8_t>::type pixel_index_t;
69
+typedef IF<(TERN0(NEOPIXEL_LED, NEOPIXEL_PIXELS > 127)), int16_t, int8_t>::type pixel_index_t;
72 70
 
73 71
 // ------------------------
74 72
 // Classes

+ 8
- 33
Marlin/src/inc/Conditionals_LCD.h View File

@@ -78,8 +78,8 @@
78 78
 
79 79
   // This helps to implement HAS_ADC_BUTTONS menus
80 80
   #define REVERSE_MENU_DIRECTION
81
-  #define ENCODER_PULSES_PER_STEP 1
82
-  #define ENCODER_STEPS_PER_MENU_ITEM 1
81
+  #define STD_ENCODER_PULSES_PER_STEP 1
82
+  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
83 83
   #define ENCODER_FEEDRATE_DEADZONE 2
84 84
 
85 85
 #elif ENABLED(ZONESTAR_12864LCD)
@@ -97,7 +97,7 @@
97 97
 
98 98
 #elif ENABLED(RADDS_DISPLAY)
99 99
   #define IS_ULTIPANEL 1
100
-  #define ENCODER_PULSES_PER_STEP 2
100
+  #define STD_ENCODER_PULSES_PER_STEP 2
101 101
 
102 102
 #elif ANY(miniVIKI, VIKI2, WYH_L12864, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
103 103
 
@@ -158,44 +158,19 @@
158 158
   #define IS_RRD_SC 1
159 159
   #define U8GLIB_SH1106
160 160
 
161
-  #define LED_CONTROL_MENU
162
-  #define NEOPIXEL_LED
163
-  #undef NEOPIXEL_TYPE
164
-  #define NEOPIXEL_TYPE       NEO_RGB
165
-  #if NEOPIXEL_PIXELS < 3
166
-    #undef NEOPIXELS_PIXELS
167
-    #define NEOPIXEL_PIXELS     3
168
-  #endif
169 161
   #ifndef NEOPIXEL_BRIGHTNESS
170 162
     #define NEOPIXEL_BRIGHTNESS 127
171 163
   #endif
172 164
 
173
-  #if ENABLED(PSU_CONTROL)
174
-    #define LED_BACKLIGHT_TIMEOUT 10000
175
-  #endif
176
-
177 165
 #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
178 166
 
179 167
   #define FYSETC_MINI_12864
180 168
   #define DOGLCD
181 169
   #define IS_ULTIPANEL 1
182 170
   #define LED_COLORS_REDUCE_GREEN
183
-  #if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
184
-    #define LED_BACKLIGHT_TIMEOUT 10000
185
-  #endif
186 171
 
187 172
   // Require LED backlighting enabled
188
-  #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
189
-    #define RGB_LED
190
-  #elif ENABLED(FYSETC_MINI_12864_2_1)
191
-    #define LED_CONTROL_MENU
192
-    #define NEOPIXEL_LED
193
-    #undef NEOPIXEL_TYPE
194
-    #define NEOPIXEL_TYPE       NEO_RGB
195
-    #if NEOPIXEL_PIXELS < 3
196
-      #undef NEOPIXELS_PIXELS
197
-      #define NEOPIXEL_PIXELS     3
198
-    #endif
173
+  #if ENABLED(FYSETC_MINI_12864_2_1)
199 174
     #ifndef NEOPIXEL_BRIGHTNESS
200 175
       #define NEOPIXEL_BRIGHTNESS 127
201 176
     #endif
@@ -207,8 +182,8 @@
207 182
   #define IS_ULTIPANEL 1
208 183
   #define U8GLIB_SSD1309
209 184
   #define LCD_RESET_PIN LCD_PINS_D6 //  This controller need a reset pin
210
-  #define ENCODER_PULSES_PER_STEP 4
211
-  #define ENCODER_STEPS_PER_MENU_ITEM 1
185
+  #define STD_ENCODER_PULSES_PER_STEP 4
186
+  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
212 187
   #ifndef PCA9632
213 188
     #define PCA9632
214 189
   #endif
@@ -305,8 +280,8 @@
305 280
   #define PCA9632_BUZZER
306 281
   #define PCA9632_BUZZER_DATA { 0x09, 0x02 }
307 282
 
308
-  #define ENCODER_PULSES_PER_STEP     1 // Overlord uses buttons
309
-  #define ENCODER_STEPS_PER_MENU_ITEM 1
283
+  #define STD_ENCODER_PULSES_PER_STEP     1 // Overlord uses buttons
284
+  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
310 285
 #endif
311 286
 
312 287
 // 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106

+ 7
- 3
Marlin/src/inc/Conditionals_adv.h View File

@@ -618,6 +618,8 @@
618 618
 
619 619
 #if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
620 620
   #define HAS_COLOR_LEDS 1
621
+#else
622
+  #undef LED_POWEROFF_TIMEOUT
621 623
 #endif
622 624
 #if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, SDSUPPORT)
623 625
   #define HAS_LEDS_OFF_FLAG 1
@@ -738,9 +740,6 @@
738 740
 #endif
739 741
 
740 742
 #if EITHER(FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864)
741
-  #define LED_CONTROL_MENU
742
-  #define LED_USER_PRESET_STARTUP
743
-  #define LED_COLOR_PRESETS
744 743
   #ifndef LED_USER_PRESET_GREEN
745 744
     #define LED_USER_PRESET_GREEN      128
746 745
   #endif
@@ -981,6 +980,11 @@
981 980
   #endif
982 981
 #endif
983 982
 
983
+// Flags for Case Light having a brightness property
984
+#if ENABLED(CASE_LIGHT_ENABLE) && (NONE(CASE_LIGHT_NO_BRIGHTNESS, CASE_LIGHT_IS_COLOR_LED) || ENABLED(CASE_LIGHT_USE_NEOPIXEL))
985
+  #define CASELIGHT_USES_BRIGHTNESS 1
986
+#endif
987
+
984 988
 // Flag whether least_squares_fit.cpp is used
985 989
 #if ANY(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_LINEAR, Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
986 990
   #define NEED_LSF 1

+ 22
- 17
Marlin/src/inc/SanityCheck.h View File

@@ -2334,17 +2334,31 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2334 2334
 #endif
2335 2335
 
2336 2336
 /**
2337
- * LED Control Menu
2337
+ * FYSETC LCD Requirements
2338 2338
  */
2339
-#if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
2340
-  #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
2339
+#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1)
2340
+  #ifndef NEO_RGB
2341
+    #define NEO_RGB 123
2342
+    #define FAUX_RGB 1
2343
+  #endif
2344
+  #if defined(NEOPIXEL_TYPE) && NEOPIXEL_TYPE != NEO_RGB
2345
+    #error "Your FYSETC Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB."
2346
+  #elif defined(NEOPIXEL_PIXELS) && NEOPIXEL_PIXELS < 3
2347
+    #error "Your FYSETC Mini Panel requires NEOPIXEL_PIXELS >= 3."
2348
+  #endif
2349
+  #if FAUX_RGB
2350
+    #undef NEO_RGB
2351
+    #undef FAUX_RGB
2352
+  #endif
2353
+#elif EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && !DISABLED(RGB_LED)
2354
+  #error "Your FYSETC Mini Panel requires RGB_LED."
2341 2355
 #endif
2342 2356
 
2343 2357
 /**
2344
- * LED Backlight Timeout
2358
+ * LED Control Menu requirements
2345 2359
  */
2346
-#if defined(LED_BACKLIGHT_TIMEOUT) && !(ENABLED(PSU_CONTROL) && ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864))
2347
-  #error "LED_BACKLIGHT_TIMEOUT requires a FYSETC Mini Panel and a Power Switch."
2360
+#if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
2361
+  #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
2348 2362
 #endif
2349 2363
 
2350 2364
 /**
@@ -2888,15 +2902,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2888 2902
 #endif
2889 2903
 
2890 2904
 /**
2891
- * FYSETC Mini 12864 RGB backlighting required
2892
- */
2893
-#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
2894
-  #error "RGB_LED is required for FYSETC_MINI_12864 1.2 and 2.0."
2895
-#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
2896
-  #error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays."
2897
-#endif
2898
-
2899
-/**
2900 2905
  * Check existing CS pins against enabled TMC SPI drivers.
2901 2906
  */
2902 2907
 #define INVALID_TMC_SPI(ST) (AXIS_HAS_SPI(ST) && !PIN_EXISTS(ST##_CS))
@@ -3415,8 +3420,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
3415 3420
   #error "A very large BLOCK_BUFFER_SIZE is not needed and takes longer to drain the buffer on pause / cancel."
3416 3421
 #endif
3417 3422
 
3418
-#if ENABLED(LED_CONTROL_MENU) && !IS_ULTIPANEL
3419
-  #error "LED_CONTROL_MENU requires an LCD controller."
3423
+#if ENABLED(LED_CONTROL_MENU) && NONE(HAS_MARLINUI_MENU, DWIN_CREALITY_LCD_ENHANCED)
3424
+  #error "LED_CONTROL_MENU requires an LCD controller that implements the menu."
3420 3425
 #endif
3421 3426
 
3422 3427
 #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)

+ 17
- 0
Marlin/src/inc/Warnings.cpp View File

@@ -563,3 +563,20 @@
563 563
 #if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX
564 564
   #warning "Contrast cannot be changed when LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX."
565 565
 #endif
566
+
567
+/**
568
+ * FYSETC backlighting
569
+ */
570
+#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS)
571
+  #warning "Your FYSETC Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS."
572
+#endif
573
+
574
+#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
575
+  #warning "Your FYSETC Mini Panel works best with RGB_LED."
576
+#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
577
+  #warning "Your FYSETC Mini Panel works best with LED_USER_PRESET_STARTUP."
578
+#endif
579
+
580
+#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && BOTH(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT
581
+  #warning "Your FYSETC display with PSU_CONTROL works best with LED_POWEROFF_TIMEOUT."
582
+#endif

+ 128
- 3
Marlin/src/lcd/e3v2/enhanced/dwin.cpp View File

@@ -95,6 +95,14 @@
95 95
   #include "printstats.h"
96 96
 #endif
97 97
 
98
+#if ENABLED(CASE_LIGHT_MENU)
99
+  #include "../../../feature/caselight.h"
100
+#endif
101
+
102
+#if ENABLED(LED_CONTROL_MENU)
103
+  #include "../../../feature/leds/leds.h"
104
+#endif
105
+
98 106
 #include <WString.h>
99 107
 #include <stdio.h>
100 108
 #include <string.h>
@@ -249,6 +257,12 @@ MenuClass *MaxJerkMenu = nullptr;
249 257
 MenuClass *StepsMenu = nullptr;
250 258
 MenuClass *HotendPIDMenu = nullptr;
251 259
 MenuClass *BedPIDMenu = nullptr;
260
+#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
261
+  MenuClass *CaseLightMenu = nullptr;
262
+#endif
263
+#if ENABLED(LED_CONTROL_MENU)
264
+  MenuClass *LedControlMenu = nullptr;
265
+#endif
252 266
 #if HAS_BED_PROBE
253 267
   MenuClass *ZOffsetWizMenu = nullptr;
254 268
 #endif
@@ -991,7 +1005,7 @@ void Redraw_SD_List() {
991 1005
   }
992 1006
   else {
993 1007
     DWIN_Draw_Rectangle(1, HMI_data.AlertBg_Color, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4));
994
-    DWINUI::Draw_CenteredString(font16x32, HMI_data.AlertTxt_Color, MBASE(3), GET_TEXT_F(MSG_MEDIA_NOT_INSERTED));
1008
+    DWINUI::Draw_CenteredString(font12x24, HMI_data.AlertTxt_Color, MBASE(3), GET_TEXT_F(MSG_MEDIA_NOT_INSERTED));
995 1009
   }
996 1010
 }
997 1011
 
@@ -1891,12 +1905,22 @@ void DWIN_StoreSettings(char *buff) {
1891 1905
 }
1892 1906
 
1893 1907
 void DWIN_LoadSettings(const char *buff) {
1894
-  memcpy(&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size));
1908
+  // (void *)-> Avoid Warning when save data different from uintX_t in HMI_data_t struct
1909
+  memcpy((void *)&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size));
1895 1910
   dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
1896 1911
   if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults();
1897 1912
   DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color);
1898 1913
   TERN_(PREVENT_COLD_EXTRUSION, ApplyExtMinT());
1899 1914
   feedrate_percentage = 100;
1915
+  #if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
1916
+    // Apply Case light brightness
1917
+    caselight.brightness = HMI_data.CaseLight_Brightness;
1918
+    caselight.update_brightness();
1919
+  #endif
1920
+  #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
1921
+    // Apply Led Color
1922
+    leds.set_color(HMI_data.Led_Color);
1923
+  #endif
1900 1924
 }
1901 1925
 
1902 1926
 void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const lcd_component) {
@@ -2288,6 +2312,41 @@ void SetPID(celsius_t t, heater_id_t h) {
2288 2312
   void SetBrightness() { SetIntOnClick(LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.brightness, nullptr, LiveBrightness); }
2289 2313
 #endif
2290 2314
 
2315
+#if ENABLED(CASE_LIGHT_MENU)
2316
+  void SetCaseLight() {
2317
+    caselight.on = !caselight.on;
2318
+    caselight.update_enabled();
2319
+    Draw_Chkb_Line(CurrentMenu->line(), caselight.on);
2320
+    DWIN_UpdateLCD();
2321
+  }
2322
+  #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
2323
+    void LiveCaseLightBrightness() { HMI_data.CaseLight_Brightness = caselight.brightness = HMI_value.Value; caselight.update_brightness(); }
2324
+    void SetCaseLightBrightness() { SetIntOnClick(0, 255, caselight.brightness, nullptr, LiveCaseLightBrightness); }
2325
+  #endif
2326
+#endif
2327
+
2328
+#if ENABLED(LED_CONTROL_MENU)
2329
+  #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
2330
+    void SetLedStatus() {
2331
+      leds.toggle();
2332
+      Draw_Chkb_Line(CurrentMenu->line(), leds.lights_on);
2333
+      DWIN_UpdateLCD();
2334
+    }
2335
+  #endif
2336
+  #if ENABLED(HAS_COLOR_LEDS)
2337
+    void LiveLedColorR() { leds.color.r = HMI_value.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2338
+    void SetLedColorR() { SetIntOnClick(0, 255, leds.color.r, nullptr, LiveLedColorR); }
2339
+    void LiveLedColorG() { leds.color.g = HMI_value.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2340
+    void SetLedColorG() { SetIntOnClick(0, 255, leds.color.g, nullptr, LiveLedColorG); }
2341
+    void LiveLedColorB() { leds.color.b = HMI_value.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2342
+    void SetLedColorB() { SetIntOnClick(0, 255, leds.color.b, nullptr, LiveLedColorB); }
2343
+    #if HAS_WHITE_LED
2344
+      void LiveLedColorW() { leds.color.w = HMI_value.Value; HMI_data.Led_Color = leds.color; leds.update(); }
2345
+      void SetLedColorW() { SetIntOnClick(0, 255, leds.color.w, nullptr, LiveLedColorW); }
2346
+    #endif
2347
+  #endif
2348
+#endif
2349
+
2291 2350
 #if ENABLED(SOUND_MENU_ITEM)
2292 2351
   void SetEnableSound() {
2293 2352
     ui.buzzer_enabled = !ui.buzzer_enabled;
@@ -2774,6 +2833,16 @@ void onDrawLanguage(MenuItemClass* menuitem, int8_t line) {
2774 2833
   void onDrawPwrLossR(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, recovery.enabled); }
2775 2834
 #endif
2776 2835
 
2836
+#if ENABLED(CASE_LIGHT_MENU)
2837
+  void onDrawCaseLight(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, caselight.on); }
2838
+#endif
2839
+
2840
+#if ENABLED(LED_CONTROL_MENU)
2841
+  #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
2842
+    void onDrawLedStatus(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, leds.lights_on); }
2843
+  #endif
2844
+#endif
2845
+
2777 2846
 #if ENABLED(SOUND_MENU_ITEM)
2778 2847
   void onDrawEnableSound(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, ui.buzzer_enabled); }
2779 2848
 #endif
@@ -3265,8 +3334,18 @@ void Draw_Control_Menu() {
3265 3334
   if (CurrentMenu != ControlMenu) {
3266 3335
     CurrentMenu = ControlMenu;
3267 3336
     SetMenuTitle({103, 1, 28, 14}, GET_TEXT_F(MSG_CONTROL));
3268
-    DWINUI::MenuItemsPrepare(9);
3337
+    DWINUI::MenuItemsPrepare(11);
3269 3338
     MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3339
+    #if ENABLED(CASE_LIGHT_MENU)
3340
+      #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
3341
+        MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawSubMenu, Draw_CaseLight_Menu);
3342
+      #else 
3343
+        MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3344
+      #endif
3345
+    #endif
3346
+    #if ENABLED(LED_CONTROL_MENU)
3347
+      MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LED_CONTROL), onDrawSubMenu, Draw_LedControl_Menu);
3348
+    #endif
3270 3349
     MENU_ITEM(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawTempSubMenu, Draw_Temperature_Menu);
3271 3350
     MENU_ITEM(ICON_Motion, GET_TEXT_F(MSG_MOTION), onDrawMotionSubMenu, Draw_Motion_Menu);
3272 3351
     #if ENABLED(EEPROM_SETTINGS)
@@ -3469,6 +3548,47 @@ void Draw_GetColor_Menu() {
3469 3548
   DWIN_Draw_Rectangle(1, *HMI_value.P_Int, 20, 315, DWIN_WIDTH - 20, 335);
3470 3549
 }
3471 3550
 
3551
+#if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
3552
+    void Draw_CaseLight_Menu() {
3553
+      checkkey = Menu;
3554
+      if (!CaseLightMenu) CaseLightMenu = new MenuClass();
3555
+      if (CurrentMenu != CaseLightMenu) {
3556
+        CurrentMenu = CaseLightMenu;
3557
+        SetMenuTitle({0}, GET_TEXT_F(MSG_CASE_LIGHT)); // TODO: Chinese, English "Case Light" JPG
3558
+        DWINUI::MenuItemsPrepare(3);
3559
+        MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3560
+        MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3561
+        EDIT_ITEM(ICON_Brightness, GET_TEXT_F(MSG_CASE_LIGHT_BRIGHTNESS), onDrawPInt8Menu, SetCaseLightBrightness, &caselight.brightness);
3562
+      }
3563
+      CurrentMenu->draw();
3564
+    }
3565
+#endif
3566
+
3567
+#if ENABLED(LED_CONTROL_MENU)
3568
+    void Draw_LedControl_Menu() {
3569
+      checkkey = Menu;
3570
+      if (!LedControlMenu) LedControlMenu = new MenuClass();
3571
+      if (CurrentMenu != LedControlMenu) {
3572
+        CurrentMenu = LedControlMenu;
3573
+        SetMenuTitle({0}, GET_TEXT_F(MSG_LED_CONTROL)); // TODO: Chinese, English "LED Control" JPG
3574
+        DWINUI::MenuItemsPrepare(6);
3575
+        MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3576
+        #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
3577
+          MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
3578
+        #endif
3579
+        #if (HAS_COLOR_LEDS)
3580
+          EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_RED), onDrawPInt8Menu, SetLedColorR, &leds.color.r);
3581
+          EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_GREEN), onDrawPInt8Menu, SetLedColorG, &leds.color.g);
3582
+          EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_BLUE), onDrawPInt8Menu, SetLedColorB, &leds.color.b);
3583
+          #if ENABLED(HAS_WHITE_LED)
3584
+            EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_WHITE), onDrawPInt8Menu, SetLedColorW, &leds.color.w);
3585
+          #endif
3586
+        #endif
3587
+      }
3588
+      CurrentMenu->draw();
3589
+    }
3590
+#endif
3591
+
3472 3592
 void Draw_Tune_Menu() {
3473 3593
   checkkey = Menu;
3474 3594
   if (!TuneMenu) TuneMenu = new MenuClass();
@@ -3477,6 +3597,11 @@ void Draw_Tune_Menu() {
3477 3597
     SetMenuTitle({73, 2, 28, 12}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG
3478 3598
     DWINUI::MenuItemsPrepare(14);
3479 3599
     MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess);
3600
+    #if ENABLED(CASE_LIGHT_MENU)
3601
+      MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3602
+    #elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL)
3603
+      MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
3604
+    #endif    
3480 3605
     EDIT_ITEM(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
3481 3606
     #if HAS_HOTEND
3482 3607
       HotendTargetItem = EDIT_ITEM(ICON_HotendTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);

+ 6
- 0
Marlin/src/lcd/e3v2/enhanced/dwin.h View File

@@ -223,6 +223,12 @@ void Draw_Tramming_Menu();
223 223
 #endif
224 224
 void Draw_SelectColors_Menu();
225 225
 void Draw_GetColor_Menu();
226
+#if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
227
+  void Draw_CaseLight_Menu();
228
+#endif
229
+#if ENABLED(LED_CONTROL_MENU)
230
+  void Draw_LedControl_Menu();
231
+#endif
226 232
 void Draw_Tune_Menu();
227 233
 void Draw_Motion_Menu();
228 234
 #if ENABLED(ADVANCED_PAUSE_FEATURE)

+ 23
- 5
Marlin/src/lcd/e3v2/enhanced/dwin_defines.h View File

@@ -30,6 +30,9 @@
30 30
 
31 31
 #include "../../../core/types.h"
32 32
 #include "../common/dwin_color.h"
33
+#if ENABLED(LED_CONTROL_MENU)
34
+  #include "../../../feature/leds/leds.h"
35
+#endif
33 36
 
34 37
 #define Def_Background_Color  RGB( 1, 12,  8)
35 38
 #define Def_Cursor_color      RGB(20, 49, 31)
@@ -53,8 +56,15 @@
53 56
 #define HAS_ESDIAG 1
54 57
 #define DEFAULT_LCD_BRIGHTNESS 127
55 58
 
59
+#if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS)
60
+  #define Def_Leds_Color      LEDColorWhite()
61
+#endif
62
+#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
63
+  #define Def_CaseLight_Brightness 255
64
+#endif
65
+
56 66
 typedef struct {
57
-// Color settings
67
+  // Color settings
58 68
   uint16_t Background_Color = Def_Background_Color;
59 69
   uint16_t Cursor_color     = Def_Cursor_color;
60 70
   uint16_t TitleBg_color    = Def_TitleBg_color;
@@ -73,19 +83,27 @@ typedef struct {
73 83
   uint16_t Barfill_Color    = Def_Barfill_Color;
74 84
   uint16_t Indicator_Color  = Def_Indicator_Color;
75 85
   uint16_t Coordinate_Color = Def_Coordinate_Color;
76
-//
77
-  #if defined(PREHEAT_1_TEMP_HOTEND) && HAS_HOTEND
86
+  // Temperatures
87
+  #if HAS_HOTEND && defined(PREHEAT_1_TEMP_HOTEND)
78 88
     int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND;
79 89
   #endif
80
-  #if defined(PREHEAT_1_TEMP_BED) && HAS_HEATED_BED
90
+  #if HAS_HEATED_BED && defined(PREHEAT_1_TEMP_BED)
81 91
     int16_t BedPidT = PREHEAT_1_TEMP_BED;
82 92
   #endif
83
-  #if ANY(HAS_HOTEND, HAS_HEATED_BED)
93
+  #if HAS_HOTEND || HAS_HEATED_BED
84 94
     int16_t PidCycles = 10;
85 95
   #endif
86 96
   #if ENABLED(PREVENT_COLD_EXTRUSION)
87 97
     int16_t ExtMinT = EXTRUDE_MINTEMP;
88 98
   #endif
99
+  // Led
100
+  #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
101
+    LEDColor Led_Color = Def_Leds_Color;
102
+  #endif
103
+  // Case Light
104
+  #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
105
+    uint8_t CaseLight_Brightness = Def_CaseLight_Brightness;
106
+  #endif
89 107
 } HMI_data_t;
90 108
 
91 109
 static constexpr size_t eeprom_data_size = 64;

+ 2
- 0
Marlin/src/lcd/e3v2/enhanced/dwinui.h View File

@@ -76,6 +76,8 @@
76 76
 #define ICON_Scolor               ICON_MaxSpeed
77 77
 #define ICON_SetCustomPreheat     ICON_SetEndTemp
78 78
 #define ICON_Sound                ICON_Cool
79
+#define ICON_CaseLight            ICON_Motion
80
+#define ICON_LedControl           ICON_Motion
79 81
 
80 82
 // Extended and default UI Colors
81 83
 #define Color_Black           0

+ 1
- 0
Marlin/src/lcd/language/language_en.h View File

@@ -609,6 +609,7 @@ namespace Language_en {
609 609
     LSTR MSG_COLORS_RED                   = _UxGT("Red");
610 610
     LSTR MSG_COLORS_GREEN                 = _UxGT("Green");
611 611
     LSTR MSG_COLORS_BLUE                  = _UxGT("Blue");
612
+    LSTR MSG_COLORS_WHITE                 = _UxGT("White");
612 613
     LSTR MSG_UI_LANGUAGE                  = _UxGT("UI Language");
613 614
     LSTR MSG_SOUND_ENABLE                 = _UxGT("Enable sound");
614 615
     LSTR MSG_LOCKSCREEN                   = _UxGT("Lock Screen");

+ 7
- 7
Marlin/src/lcd/marlinui.cpp View File

@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "../MarlinCore.h" // for printingIsPaused
26 26
 
27
-#ifdef LED_BACKLIGHT_TIMEOUT
27
+#if LED_POWEROFF_TIMEOUT > 0 || BOTH(HAS_WIRED_LCD, PRINTER_EVENT_LEDS)
28 28
   #include "../feature/leds/leds.h"
29 29
 #endif
30 30
 
@@ -277,7 +277,7 @@ void MarlinUI::init() {
277 277
     #include "../feature/power_monitor.h"
278 278
   #endif
279 279
 
280
-  #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT)
280
+  #if LED_POWEROFF_TIMEOUT > 0
281 281
     #include "../feature/power.h"
282 282
   #endif
283 283
 
@@ -676,7 +676,7 @@ void MarlinUI::init() {
676 676
     TERN_(HAS_MARLINUI_MENU, return_to_status());
677 677
 
678 678
     // RED ALERT. RED ALERT.
679
-    #ifdef LED_BACKLIGHT_TIMEOUT
679
+    #if ENABLED(PRINTER_EVENT_LEDS)
680 680
       leds.set_color(LEDColorRed());
681 681
       #ifdef NEOPIXEL_BKGD_INDEX_FIRST
682 682
         neo.set_background_color(255, 0, 0, 0);
@@ -883,7 +883,7 @@ void MarlinUI::init() {
883 883
     static uint16_t max_display_update_time = 0;
884 884
     millis_t ms = millis();
885 885
 
886
-    #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT)
886
+    #if LED_POWEROFF_TIMEOUT > 0
887 887
       leds.update_timeout(powerManager.psu_on);
888 888
     #endif
889 889
 
@@ -1034,7 +1034,7 @@ void MarlinUI::init() {
1034 1034
 
1035 1035
           refresh(LCDVIEW_REDRAW_NOW);
1036 1036
 
1037
-          #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT)
1037
+          #if LED_POWEROFF_TIMEOUT > 0
1038 1038
             if (!powerManager.psu_on) leds.reset_timeout(ms);
1039 1039
           #endif
1040 1040
         }
@@ -1699,13 +1699,13 @@ void MarlinUI::init() {
1699 1699
 
1700 1700
     refresh();
1701 1701
 
1702
-    #if HAS_WIRED_LCD || defined(LED_BACKLIGHT_TIMEOUT)
1702
+    #if HAS_WIRED_LCD || LED_POWEROFF_TIMEOUT > 0
1703 1703
       const millis_t ms = millis();
1704 1704
     #endif
1705 1705
 
1706 1706
     TERN_(HAS_WIRED_LCD, next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL); // Delay LCD update for SD activity
1707 1707
 
1708
-    #ifdef LED_BACKLIGHT_TIMEOUT
1708
+    #if LED_POWEROFF_TIMEOUT > 0
1709 1709
       leds.reset_timeout(ms);
1710 1710
     #endif
1711 1711
   }

+ 1
- 1
buildroot/tests/DUE View File

@@ -17,7 +17,7 @@ opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \
17 17
            FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \
18 18
            ASSISTED_TRAMMING REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \
19 19
            EEPROM_SETTINGS SDSUPPORT BINARY_FILE_TRANSFER \
20
-           BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
20
+           BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN \
21 21
            NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_USE_RGB_LED CASE_LIGHT_MENU \
22 22
            NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \
23 23
            AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \

+ 2
- 2
buildroot/tests/LPC1768 View File

@@ -14,8 +14,8 @@ set -e
14 14
 #exec_test $1 $2 "Default Configuration" "$3"
15 15
 
16 16
 restore_configs
17
-opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB  SERIAL_PORT_3 3 \
18
-        NEOPIXEL_TYPE NEO_GRB RGB_LED_R_PIN P2_12 RGB_LED_G_PIN P1_23 RGB_LED_B_PIN P1_22 RGB_LED_W_PIN P1_24
17
+opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB SERIAL_PORT_3 3 \
18
+        NEOPIXEL_TYPE NEO_RGB RGB_LED_R_PIN P2_12 RGB_LED_G_PIN P1_23 RGB_LED_B_PIN P1_22 RGB_LED_W_PIN P1_24
19 19
 opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT SDCARD_READONLY SERIAL_PORT_2 RGBW_LED E_DUAL_STEPPER_DRIVERS \
20 20
            NEOPIXEL_LED NEOPIXEL_IS_SEQUENTIAL NEOPIXEL_STARTUP_TEST NEOPIXEL_BKGD_INDEX_FIRST NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_COLOR NEOPIXEL_BKGD_ALWAYS_ON
21 21
 exec_test $1 $2 "ReARM EFB VIKI2, SDSUPPORT, 2 Serial ports (USB CDC + UART0), NeoPixel" "$3"

Loading…
Cancel
Save