Refactor PRINTER_EVENT_LEDS, apply to M303 (#12038)

Co-Authored-By: Giuliano Zaro <gmagician@users.noreply.github.com>
This commit is contained in:
Giuliano Zaro
2018-10-11 04:25:43 +02:00
committed by Scott Lahteine
parent d8d76cd2ba
commit d43d4e4219
13 changed files with 205 additions and 73 deletions

View File

@ -545,6 +545,7 @@
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
#define HAS_RESUME_CONTINUE (ENABLED(EXTENSIBLE_UI) || ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
#define HAS_LEDS_OFF_FLAG (ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT) && HAS_RESUME_CONTINUE)
#define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
#define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS))

View File

@ -1571,7 +1571,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
* RGB_LED Requirements
*/
#define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B))
#if ENABLED(RGB_LED)
#if ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
#elif ENABLED(RGB_LED)
#if !_RGB_TEST
#error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
#elif ENABLED(RGBW_LED)
@ -1585,8 +1587,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0)
#error "NEOPIXEL_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
#endif
#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) && DISABLED(NEOPIXEL_LED)
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
#endif
/**

View File

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _VERSION_H_
#define _VERSION_H_
#pragma once
#include "../core/macros.h" // for ENABLED
@ -97,5 +95,3 @@
#define WEBSITE_URL "http://marlinfw.org"
#endif // USE_AUTOMATIC_VERSIONING
#endif // _VERSION_H_