Optimize G-code / feature dependencies (#18919)

This commit is contained in:
Scott Lahteine
2020-08-06 08:14:00 -05:00
committed by GitHub
parent 6bcfb58cd4
commit 99ba866d8d
26 changed files with 632 additions and 189 deletions

View File

@@ -21,9 +21,25 @@
*/
#pragma once
extern uint8_t case_light_brightness;
extern bool case_light_on;
extern uint8_t case_light_brightness_sav; // saves brighness info when case_light_on is false
extern bool case_light_arg_flag; // flag to notify if S or P argument type
#include "../inc/MarlinConfigPre.h"
void update_case_light();
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
#include "leds/leds.h"
#endif
class CaseLight {
public:
static uint8_t brightness;
static bool on;
static void update(const bool sflag);
static inline void update_brightness() { update(false); }
static inline void update_enabled() { update(true); }
private:
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
static LEDColor color;
#endif
};
extern CaseLight caselight;