From 41c7ae5d5466c3a234ac52a97e7b91afa16774b8 Mon Sep 17 00:00:00 2001 From: Zachary Annand Date: Mon, 31 Aug 2020 16:06:24 -0500 Subject: [PATCH] Separate Neopixels followup (#19179) --- Marlin/src/feature/leds/neopixel.h | 9 ++++++--- Marlin/src/inc/Conditionals_LCD.h | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/src/feature/leds/neopixel.h b/Marlin/src/feature/leds/neopixel.h index 81a0a8b1c6..09a5cf8b39 100644 --- a/Marlin/src/feature/leds/neopixel.h +++ b/Marlin/src/feature/leds/neopixel.h @@ -110,7 +110,7 @@ public: #if CONJOINED_NEOPIXEL adaneo2.show(); #else - adaneo1.setPin(NEOPIXEL2_PIN); + TERN_(NEOPIXEL2_SEPARATE,,adaneo1.setPin(NEOPIXEL2_PIN)); adaneo1.show(); adaneo1.setPin(NEOPIXEL_PIN); #endif @@ -133,7 +133,7 @@ extern Marlin_NeoPixel neo; // Neo pixel channel 2 #if ENABLED(NEOPIXEL2_SEPARATE) - + #if NEOPIXEL2_TYPE == NEO_RGB || NEOPIXEL2_TYPE == NEO_RBG || NEOPIXEL2_TYPE == NEO_GRB || NEOPIXEL2_TYPE == NEO_GBR || NEOPIXEL2_TYPE == NEO_BRG || NEOPIXEL2_TYPE == NEO_BGR #define NEOPIXEL2_IS_RGB 1 #else @@ -161,7 +161,10 @@ extern Marlin_NeoPixel neo; static inline void begin() { adaneo.begin(); } static inline void set_pixel_color(const uint16_t n, const uint32_t c) { adaneo.setPixelColor(n, c); } static inline void set_brightness(const uint8_t b) { adaneo.setBrightness(b); } - static inline void show() { adaneo.show(); } + static inline void show() { + adaneo.show(); + adaneo.setPin(NEOPIXEL2_PIN); + } // Accessors static inline uint16_t pixels() { return adaneo.numPixels();} diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index bbe89b7c50..112ff93a0e 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -780,8 +780,3 @@ #ifndef EXTRUDE_MINTEMP #define EXTRUDE_MINTEMP 170 #endif - -// This flag indicates if Neopixel pins are shared or separated -#if EITHER(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES) - #define CONJOINED_NEOPIXEL 1 -#endif