Merge pull request #8388 from Tannoo/2.0.x-led_control_menu
[2.0] led_control_menu
This commit is contained in:
commit
bee2b5eea4
54 changed files with 1018 additions and 120 deletions
|
@ -63,7 +63,7 @@ script:
|
||||||
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
|
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
|
||||||
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
|
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
|
||||||
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
|
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
|
||||||
- opt_enable_adv FWRETRACT MAX7219_DEBUG
|
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
|
||||||
- opt_set ABL_GRID_POINTS_X 16
|
- opt_set ABL_GRID_POINTS_X 16
|
||||||
- opt_set ABL_GRID_POINTS_Y 16
|
- opt_set ABL_GRID_POINTS_Y 16
|
||||||
- opt_set_adv FANMUX0_PIN 53
|
- opt_set_adv FANMUX0_PIN 53
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -775,8 +775,8 @@ void setup() {
|
||||||
OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off
|
OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if HAS_COLOR_LEDS
|
||||||
setup_neopixel();
|
leds.setup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -483,6 +483,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -483,6 +483,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -471,6 +471,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -495,6 +495,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -483,6 +483,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -484,6 +484,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -484,6 +484,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -484,6 +484,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -484,6 +484,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -489,6 +489,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -484,6 +484,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -482,6 +482,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -483,6 +483,23 @@
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LED Control Menu
|
||||||
|
* Enable this feature to add LED Control to the LCD menu
|
||||||
|
*/
|
||||||
|
//#define LED_CONTROL_MENU
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
#define LED_USER_PRESET_RED 255 // User defined RED value
|
||||||
|
#define LED_USER_PRESET_GREEN 128 // User defined GREEN value
|
||||||
|
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||||
|
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||||
|
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||||
|
#endif
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
||||||
|
|
|
@ -21,8 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blinkm.cpp - Library for controlling a BlinkM over i2c
|
* blinkm.cpp - Control a BlinkM over i2c
|
||||||
* Created by Tim Koster, August 21 2013.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
@ -30,17 +29,18 @@
|
||||||
#if ENABLED(BLINKM)
|
#if ENABLED(BLINKM)
|
||||||
|
|
||||||
#include "blinkm.h"
|
#include "blinkm.h"
|
||||||
|
#include "leds.h"
|
||||||
|
#include <Wire.h>
|
||||||
|
|
||||||
void blinkm_set_led_color(const byte r, const byte g, const byte b) {
|
void blinkm_set_led_color(const LEDColor &color) {
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
Wire.beginTransmission(0x09);
|
Wire.beginTransmission(0x09);
|
||||||
Wire.write('o'); //to disable ongoing script, only needs to be used once
|
Wire.write('o'); //to disable ongoing script, only needs to be used once
|
||||||
Wire.write('n');
|
Wire.write('n');
|
||||||
Wire.write(r);
|
Wire.write(color.r);
|
||||||
Wire.write(g);
|
Wire.write(color.g);
|
||||||
Wire.write(b);
|
Wire.write(color.b);
|
||||||
Wire.endTransmission();
|
Wire.endTransmission();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BLINKM
|
#endif // BLINKM
|
||||||
|
|
||||||
|
|
|
@ -21,16 +21,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blinkm.h - Library for controlling a BlinkM over i2c
|
* blinkm.h - Control a BlinkM over i2c
|
||||||
* Created by Tim Koster, August 21 2013.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BLINKM_H__
|
#ifndef _BLINKM_H_
|
||||||
#define __BLINKM_H__
|
#define _BLINKM_H_
|
||||||
|
|
||||||
#include <Arduino.h>
|
struct LEDColor;
|
||||||
#include <Wire.h>
|
typedef LEDColor LEDColor;
|
||||||
|
|
||||||
void blinkm_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b);
|
void blinkm_set_led_color(const LEDColor &color);
|
||||||
|
|
||||||
#endif // __BLINKM_H__
|
#endif // _BLINKM_H_
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marlin RGB LED general support
|
* leds.cpp - Marlin RGB LED general support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
@ -30,27 +30,56 @@
|
||||||
|
|
||||||
#include "leds.h"
|
#include "leds.h"
|
||||||
|
|
||||||
void set_led_color(
|
#if ENABLED(BLINKM)
|
||||||
const uint8_t r, const uint8_t g, const uint8_t b
|
#include "blinkm.h"
|
||||||
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
|
#endif
|
||||||
, const uint8_t w // = 0
|
|
||||||
|
#if ENABLED(PCA9632)
|
||||||
|
#include "pca9632.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
const LEDColor LEDLights::defaultLEDColor = MakeLEDColor(
|
||||||
|
LED_USER_PRESET_RED,
|
||||||
|
LED_USER_PRESET_GREEN,
|
||||||
|
LED_USER_PRESET_BLUE,
|
||||||
|
LED_USER_PRESET_WHITE,
|
||||||
|
LED_USER_PRESET_BRIGHTNESS
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
LEDColor LEDLights::color;
|
||||||
|
bool LEDLights::lights_on;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LEDLights leds;
|
||||||
|
|
||||||
|
void LEDLights::setup() {
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
, const uint8_t p // = NEOPIXEL_BRIGHTNESS
|
setup_neopixel();
|
||||||
, const bool isSequence // = false
|
|
||||||
#endif
|
#endif
|
||||||
|
#if ENABLED(LED_USER_PRESET_STARTUP)
|
||||||
|
set_default();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void LEDLights::set_color(const LEDColor &incol
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, bool isSequence/*=false*/
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
|
||||||
const uint32_t color = pixels.Color(r, g, b, w);
|
const uint32_t neocolor = pixels.Color(incol.r, incol.g, incol.b, incol.w);
|
||||||
static uint16_t nextLed = 0;
|
static uint16_t nextLed = 0;
|
||||||
|
|
||||||
pixels.setBrightness(p);
|
pixels.setBrightness(incol.i);
|
||||||
if (!isSequence)
|
if (!isSequence)
|
||||||
set_neopixel_color(color);
|
set_neopixel_color(neocolor);
|
||||||
else {
|
else {
|
||||||
pixels.setPixelColor(nextLed, color);
|
pixels.setPixelColor(nextLed, neocolor);
|
||||||
pixels.show();
|
pixels.show();
|
||||||
if (++nextLed >= pixels.numPixels()) nextLed = 0;
|
if (++nextLed >= pixels.numPixels()) nextLed = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -59,28 +88,53 @@ void set_led_color(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BLINKM)
|
#if ENABLED(BLINKM)
|
||||||
blinkm_set_led_color(r, g, b); // Use i2c to send the RGB components to the device.
|
|
||||||
|
// This variant uses i2c to send the RGB components to the device.
|
||||||
|
blinkm_set_led_color(incol);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||||
// This variant uses 3 separate pins for the RGB components.
|
|
||||||
|
// This variant uses 3-4 separate pins for the RGB(W) components.
|
||||||
// If the pins can do PWM then their intensity will be set.
|
// If the pins can do PWM then their intensity will be set.
|
||||||
WRITE(RGB_LED_R_PIN, r ? HIGH : LOW);
|
WRITE(RGB_LED_R_PIN, incol.r ? HIGH : LOW);
|
||||||
WRITE(RGB_LED_G_PIN, g ? HIGH : LOW);
|
WRITE(RGB_LED_G_PIN, incol.g ? HIGH : LOW);
|
||||||
WRITE(RGB_LED_B_PIN, b ? HIGH : LOW);
|
WRITE(RGB_LED_B_PIN, incol.b ? HIGH : LOW);
|
||||||
analogWrite(RGB_LED_R_PIN, r);
|
analogWrite(RGB_LED_R_PIN, incol.r);
|
||||||
analogWrite(RGB_LED_G_PIN, g);
|
analogWrite(RGB_LED_G_PIN, incol.g);
|
||||||
analogWrite(RGB_LED_B_PIN, b);
|
analogWrite(RGB_LED_B_PIN, incol.b);
|
||||||
|
|
||||||
#if ENABLED(RGBW_LED)
|
#if ENABLED(RGBW_LED)
|
||||||
WRITE(RGB_LED_W_PIN, w ? HIGH : LOW);
|
WRITE(RGB_LED_W_PIN, incol.w ? HIGH : LOW);
|
||||||
analogWrite(RGB_LED_W_PIN, w);
|
analogWrite(RGB_LED_W_PIN, incol.w);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PCA9632)
|
#if ENABLED(PCA9632)
|
||||||
pca9632_set_led_color(r, g, b); // Update I2C LED driver
|
// Update I2C LED driver
|
||||||
|
pca9632_set_led_color(incol);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
// Don't update the color when OFF
|
||||||
|
lights_on = !incol.is_off();
|
||||||
|
if (lights_on) color = incol;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LEDLights::set_white() {
|
||||||
|
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(BLINKM) || ENABLED(PCA9632)
|
||||||
|
set_color(LEDColorWhite());
|
||||||
|
#endif
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
set_neopixel_color(pixels.Color(NEO_WHITE));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
void LEDLights::toggle() { if (lights_on) set_off(); else update(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // HAS_COLOR_LEDS
|
#endif // HAS_COLOR_LEDS
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marlin general RGB LED support
|
* leds.h - Marlin general RGB LED support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LEDS_H__
|
#ifndef __LEDS_H__
|
||||||
|
@ -30,39 +30,140 @@
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
#include <Adafruit_NeoPixel.h>
|
|
||||||
#include "neopixel.h"
|
#include "neopixel.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BLINKM)
|
#define HAS_WHITE_LED (ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED))
|
||||||
#include "blinkm.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(PCA9632)
|
/**
|
||||||
#include "pca9632.h"
|
* LEDcolor type for use with leds.set_color
|
||||||
#endif
|
*/
|
||||||
|
typedef struct LEDColor {
|
||||||
#if ENABLED(RGB_LED) || ENABLED(BLINKM) || ENABLED(PCA9632)
|
uint8_t r, g, b
|
||||||
#define LED_WHITE 255, 255, 255
|
#if HAS_WHITE_LED
|
||||||
#elif ENABLED(RGBW_LED)
|
, w
|
||||||
#define LED_WHITE 0, 0, 0, 255
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
#define LED_BRIGHTNESS pixels.getBrightness()
|
|
||||||
#else
|
|
||||||
#define LED_BRIGHTNESS 255
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void set_led_color(
|
|
||||||
const uint8_t r, const uint8_t g, const uint8_t b
|
|
||||||
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
|
|
||||||
, const uint8_t w = 0
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
, const uint8_t p = NEOPIXEL_BRIGHTNESS
|
, i
|
||||||
, const bool isSequence = false
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
);
|
;
|
||||||
|
LEDColor() : r(255), g(255), b(255)
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
, w(255)
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, i(NEOPIXEL_BRIGHTNESS)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
{}
|
||||||
|
LEDColor(uint8_t r, uint8_t g, uint8_t b
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
, uint8_t w=0
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, uint8_t i=NEOPIXEL_BRIGHTNESS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
) : r(r), g(g), b(b)
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
, w(w)
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, i(i)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
{}
|
||||||
|
LEDColor& operator=(const LEDColor &right) {
|
||||||
|
if (this != &right) memcpy(this, &right, sizeof(LEDColor));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
bool operator==(const LEDColor &right) {
|
||||||
|
if (this == &right) return true;
|
||||||
|
return 0 == memcmp(this, &right, sizeof(LEDColor));
|
||||||
|
}
|
||||||
|
bool operator!=(const LEDColor &right) { return !operator==(right); }
|
||||||
|
bool is_off() const {
|
||||||
|
return 3 > r + g + b
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
+ w
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
}
|
||||||
|
} LEDColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Color helpers and presets
|
||||||
|
*/
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
#define LEDColorWhite() LEDColor(0, 0, 0, 255)
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
#define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B, W, I)
|
||||||
|
#else
|
||||||
|
#define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B, W)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B)
|
||||||
|
#define LEDColorWhite() LEDColor(255, 255, 255)
|
||||||
|
#endif
|
||||||
|
#define LEDColorOff() LEDColor( 0, 0, 0)
|
||||||
|
#define LEDColorRed() LEDColor(255, 0, 0)
|
||||||
|
#define LEDColorOrange() LEDColor(255, 80, 0)
|
||||||
|
#define LEDColorYellow() LEDColor(255, 255, 0)
|
||||||
|
#define LEDColorGreen() LEDColor( 0, 255, 0)
|
||||||
|
#define LEDColorBlue() LEDColor( 0, 0, 255)
|
||||||
|
#define LEDColorIndigo() LEDColor( 0, 255, 255)
|
||||||
|
#define LEDColorViolet() LEDColor(255, 0, 255)
|
||||||
|
|
||||||
|
class LEDLights {
|
||||||
|
public:
|
||||||
|
LEDLights() {} // ctor
|
||||||
|
|
||||||
|
static void setup(); // init()
|
||||||
|
|
||||||
|
static void set_color(const LEDColor &color
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, bool isSequence=false
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
|
FORCE_INLINE void set_color(uint8_t r, uint8_t g, uint8_t b
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
, uint8_t w=0
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, uint8_t i=NEOPIXEL_BRIGHTNESS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, bool isSequence=false
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
|
set_color(MakeLEDColor(r, g, b, w, i)
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
, isSequence
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_white();
|
||||||
|
FORCE_INLINE static void set_off() { set_color(LEDColorOff()); }
|
||||||
|
FORCE_INLINE static void set_green() { set_color(LEDColorGreen()); }
|
||||||
|
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
static const LEDColor defaultLEDColor;
|
||||||
|
FORCE_INLINE static void set_default() { set_color(defaultLEDColor); }
|
||||||
|
FORCE_INLINE static void set_red() { set_color(LEDColorRed()); }
|
||||||
|
FORCE_INLINE static void set_orange() { set_color(LEDColorOrange()); }
|
||||||
|
FORCE_INLINE static void set_yellow() { set_color(LEDColorYellow()); }
|
||||||
|
FORCE_INLINE static void set_blue() { set_color(LEDColorBlue()); }
|
||||||
|
FORCE_INLINE static void set_indigo() { set_color(LEDColorIndigo()); }
|
||||||
|
FORCE_INLINE static void set_violet() { set_color(LEDColorViolet()); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
static LEDColor color; // last non-off color
|
||||||
|
static bool lights_on; // the last set color was "on"
|
||||||
|
static void toggle(); // swap "off" with color
|
||||||
|
FORCE_INLINE static void update() { set_color(color); }
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
extern LEDLights leds;
|
||||||
|
|
||||||
#endif // __LEDS_H__
|
#endif // __LEDS_H__
|
||||||
|
|
|
@ -53,7 +53,29 @@ void setup_neopixel() {
|
||||||
set_neopixel_color(pixels.Color(0, 0, 255, 0)); // blue
|
set_neopixel_color(pixels.Color(0, 0, 255, 0)); // blue
|
||||||
safe_delay(1000);
|
safe_delay(1000);
|
||||||
#endif
|
#endif
|
||||||
set_neopixel_color(pixels.Color(NEO_WHITE)); // white
|
|
||||||
|
#if ENABLED(LED_USER_PRESET_STARTUP)
|
||||||
|
set_neopixel_color(pixels.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE));
|
||||||
|
#else
|
||||||
|
set_neopixel_color(pixels.Color(0, 0, 0, 0));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) {
|
||||||
|
const uint32_t color = pixels.Color(r, g, b, w);
|
||||||
|
pixels.setBrightness(p);
|
||||||
|
#if !ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||||
|
set_neopixel_color(color);
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
static uint16_t nextLed = 0;
|
||||||
|
pixels.setPixelColor(nextLed, color);
|
||||||
|
pixels.show();
|
||||||
|
if (++nextLed >= pixels.numPixels()) nextLed = 0;
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // NEOPIXEL_LED
|
#endif // NEOPIXEL_LED
|
||||||
|
|
|
@ -36,13 +36,14 @@
|
||||||
#define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB
|
#define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB
|
||||||
|
|
||||||
#if NEOPIXEL_IS_RGB
|
#if NEOPIXEL_IS_RGB
|
||||||
#define NEO_WHITE 255, 255, 255
|
#define NEO_WHITE 255, 255, 255, 0
|
||||||
#else
|
#else
|
||||||
#define NEO_WHITE 0, 0, 0, 255
|
#define NEO_WHITE 0, 0, 0, 255
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setup_neopixel();
|
void setup_neopixel();
|
||||||
void set_neopixel_color(const uint32_t color);
|
void set_neopixel_color(const uint32_t color);
|
||||||
|
//bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p);
|
||||||
|
|
||||||
extern Adafruit_NeoPixel pixels;
|
extern Adafruit_NeoPixel pixels;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#if ENABLED(PCA9632)
|
#if ENABLED(PCA9632)
|
||||||
|
|
||||||
#include "pca9632.h"
|
#include "pca9632.h"
|
||||||
|
#include "leds.h"
|
||||||
|
#include <Wire.h>
|
||||||
|
|
||||||
#define PCA9632_MODE1_VALUE 0b00000001 //(ALLCALL)
|
#define PCA9632_MODE1_VALUE 0b00000001 //(ALLCALL)
|
||||||
#define PCA9632_MODE2_VALUE 0b00010101 //(DIMMING, INVERT, CHANGE ON STOP,TOTEM)
|
#define PCA9632_MODE2_VALUE 0b00010101 //(DIMMING, INVERT, CHANGE ON STOP,TOTEM)
|
||||||
|
@ -97,7 +99,7 @@ static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void pca9632_set_led_color(const byte r, const byte g, const byte b) {
|
void pca9632_set_led_color(const LEDColor &color) {
|
||||||
if (!PCA_init) {
|
if (!PCA_init) {
|
||||||
PCA_init = 1;
|
PCA_init = 1;
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
|
@ -105,11 +107,11 @@ void pca9632_set_led_color(const byte r, const byte g, const byte b) {
|
||||||
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE2, PCA9632_MODE2_VALUE);
|
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE2, PCA9632_MODE2_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
const byte LEDOUT = (r ? LED_PWM << PCA9632_RED : 0)
|
const byte LEDOUT = (color.r ? LED_PWM << PCA9632_RED : 0)
|
||||||
| (g ? LED_PWM << PCA9632_GRN : 0)
|
| (color.g ? LED_PWM << PCA9632_GRN : 0)
|
||||||
| (b ? LED_PWM << PCA9632_BLU : 0);
|
| (color.b ? LED_PWM << PCA9632_BLU : 0);
|
||||||
|
|
||||||
PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, r, g, b);
|
PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, color.r, color.g, color.b);
|
||||||
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT);
|
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Driver for the Philips PCA9632 LED driver.
|
* Driver for the Philips PCA9632 LED driver.
|
||||||
* Written by Robert Mendon Feb 2017.
|
* Written by Robert Mendon Feb 2017.
|
||||||
*/
|
*/
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
#ifndef __PCA9632_H__
|
#ifndef __PCA9632_H__
|
||||||
#define __PCA9632_H__
|
#define __PCA9632_H__
|
||||||
|
|
||||||
#include <Arduino.h>
|
struct LEDColor;
|
||||||
#include <Wire.h>
|
typedef LEDColor LEDColor;
|
||||||
|
|
||||||
void pca9632_set_led_color(const byte r, const byte g, const byte b);
|
void pca9632_set_led_color(const LEDColor &color);
|
||||||
|
|
||||||
#endif // __PCA9632_H__
|
#endif // __PCA9632_H__
|
||||||
|
|
|
@ -45,17 +45,13 @@
|
||||||
* M150 P ; Set LED full brightness
|
* M150 P ; Set LED full brightness
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M150() {
|
void GcodeSuite::M150() {
|
||||||
set_led_color(
|
leds.set_color(MakeLEDColor(
|
||||||
parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||||
parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||||
parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0
|
parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||||
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
|
parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||||
, parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0
|
parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : pixels.getBrightness()
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
));
|
||||||
, parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : pixels.getBrightness()
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_COLOR_LEDS
|
#endif // HAS_COLOR_LEDS
|
||||||
|
|
|
@ -370,13 +370,13 @@ inline void get_serial_commands() {
|
||||||
SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
|
SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
|
||||||
#if ENABLED(PRINTER_EVENT_LEDS)
|
#if ENABLED(PRINTER_EVENT_LEDS)
|
||||||
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
|
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
|
||||||
set_led_color(0, 255, 0); // Green
|
leds.set_green();
|
||||||
#if HAS_RESUME_CONTINUE
|
#if HAS_RESUME_CONTINUE
|
||||||
enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
|
enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
|
||||||
#else
|
#else
|
||||||
safe_delay(1000);
|
safe_delay(1000);
|
||||||
#endif
|
#endif
|
||||||
set_led_color(0, 0, 0); // OFF
|
leds.set_off();
|
||||||
#endif
|
#endif
|
||||||
card.checkautostart(true);
|
card.checkautostart(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,13 +190,11 @@ void GcodeSuite::M109() {
|
||||||
const uint8_t blue = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 255, 0);
|
const uint8_t blue = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 255, 0);
|
||||||
if (blue != old_blue) {
|
if (blue != old_blue) {
|
||||||
old_blue = blue;
|
old_blue = blue;
|
||||||
set_led_color(255, 0, blue
|
leds.set_color(
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
MakeLEDColor(255, 0, blue, 0, pixels.getBrightness())
|
||||||
, 0, pixels.getBrightness()
|
|
||||||
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||||
, true
|
, true
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,12 +231,7 @@ void GcodeSuite::M109() {
|
||||||
if (wait_for_heatup) {
|
if (wait_for_heatup) {
|
||||||
LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
|
LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
|
||||||
#if ENABLED(PRINTER_EVENT_LEDS)
|
#if ENABLED(PRINTER_EVENT_LEDS)
|
||||||
#if ENABLED(RGB_LED) || ENABLED(BLINKM) || ENABLED(PCA9632) || ENABLED(RGBW_LED)
|
leds.set_white();
|
||||||
set_led_color(LED_WHITE);
|
|
||||||
#endif
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
set_neopixel_color(pixels.Color(NEO_WHITE));
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,13 +132,11 @@ void GcodeSuite::M190() {
|
||||||
const uint8_t red = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 0, 255);
|
const uint8_t red = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 0, 255);
|
||||||
if (red != old_red) {
|
if (red != old_red) {
|
||||||
old_red = red;
|
old_red = red;
|
||||||
set_led_color(red, 0, 255
|
leds.set_color(
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
MakeLEDColor(red, 0, 255, 0, pixels.getBrightness())
|
||||||
, 0, pixels.getBrightness()
|
|
||||||
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||||
, true
|
, true
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1178,6 +1178,29 @@
|
||||||
#define MAX_VFAT_ENTRIES (2)
|
#define MAX_VFAT_ENTRIES (2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Set defaults for unspecified LED user colors
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#ifndef LED_USER_PRESET_RED
|
||||||
|
#define LED_USER_PRESET_RED 255
|
||||||
|
#endif
|
||||||
|
#ifndef LED_USER_PRESET_GREEN
|
||||||
|
#define LED_USER_PRESET_GREEN 255
|
||||||
|
#endif
|
||||||
|
#ifndef LED_USER_PRESET_BLUE
|
||||||
|
#define LED_USER_PRESET_BLUE 255
|
||||||
|
#endif
|
||||||
|
#ifndef LED_USER_PRESET_WHITE
|
||||||
|
#define LED_USER_PRESET_WHITE 0
|
||||||
|
#endif
|
||||||
|
#ifndef LED_USER_PRESET_BRIGHTNESS
|
||||||
|
#ifdef NEOPIXEL_BRIGHTNESS
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS NEOPIXEL_BRIGHTNESS
|
||||||
|
#else
|
||||||
|
#define LED_USER_PRESET_BRIGHTNESS 255
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Force SDCARD_SORT_ALPHA to be enabled for Graphical LCD on LPC1768
|
// Force SDCARD_SORT_ALPHA to be enabled for Graphical LCD on LPC1768
|
||||||
// because of a bug in the shared SPI implementation. (See #8122)
|
// because of a bug in the shared SPI implementation. (See #8122)
|
||||||
#if defined(TARGET_LPC1768) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
#if defined(TARGET_LPC1768) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "Conditionals_post.h"
|
#include "Conditionals_post.h"
|
||||||
#include "SanityCheck.h"
|
#include "SanityCheck.h"
|
||||||
|
#include "../HAL/HAL_SanityCheck.h"
|
||||||
|
|
||||||
// Include all core headers
|
// Include all core headers
|
||||||
#include "../core/enum.h"
|
#include "../core/enum.h"
|
||||||
|
|
|
@ -1479,6 +1479,8 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m
|
||||||
#error "BLOCK_BUFFER_SIZE must be a power of 2."
|
#error "BLOCK_BUFFER_SIZE must be a power of 2."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../HAL/HAL_SanityCheck.h" // get CPU specific checks
|
#if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
|
||||||
|
#error "LED_CONTROL_MENU requires an LCD controller."
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _SANITYCHECK_H_
|
#endif // _SANITYCHECK_H_
|
||||||
|
|
|
@ -174,7 +174,6 @@
|
||||||
#ifndef MSG_USER_MENU
|
#ifndef MSG_USER_MENU
|
||||||
#define MSG_USER_MENU _UxGT("Custom Commands")
|
#define MSG_USER_MENU _UxGT("Custom Commands")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MSG_UBL_DOING_G29
|
#ifndef MSG_UBL_DOING_G29
|
||||||
#define MSG_UBL_DOING_G29 _UxGT("Doing G29")
|
#define MSG_UBL_DOING_G29 _UxGT("Doing G29")
|
||||||
#endif
|
#endif
|
||||||
|
@ -362,6 +361,64 @@
|
||||||
#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("Step-By-Step UBL")
|
#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("Step-By-Step UBL")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MSG_LED_CONTROL
|
||||||
|
#define MSG_LED_CONTROL _UxGT("LED Control")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_LEDS_ON
|
||||||
|
#define MSG_LEDS_ON _UxGT("Lights On")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_LEDS_OFF
|
||||||
|
#define MSG_LEDS_OFF _UxGT("Lights Off")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_LED_PRESETS
|
||||||
|
#define MSG_LED_PRESETS _UxGT("Light Presets")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_RED
|
||||||
|
#define MSG_SET_LEDS_RED _UxGT("Red")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_ORANGE
|
||||||
|
#define MSG_SET_LEDS_ORANGE _UxGT("Orange")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_YELLOW
|
||||||
|
#define MSG_SET_LEDS_YELLOW _UxGT("Yellow")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_GREEN
|
||||||
|
#define MSG_SET_LEDS_GREEN _UxGT("Green")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_BLUE
|
||||||
|
#define MSG_SET_LEDS_BLUE _UxGT("Blue")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_INDIGO
|
||||||
|
#define MSG_SET_LEDS_INDIGO _UxGT("Indigo")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_VIOLET
|
||||||
|
#define MSG_SET_LEDS_VIOLET _UxGT("Violet")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_WHITE
|
||||||
|
#define MSG_SET_LEDS_WHITE _UxGT("White")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_SET_LEDS_DEFAULT
|
||||||
|
#define MSG_SET_LEDS_DEFAULT _UxGT("Default")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_CUSTOM_LEDS
|
||||||
|
#define MSG_CUSTOM_LEDS _UxGT("Custom Lights")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_INTENSITY_R
|
||||||
|
#define MSG_INTENSITY_R _UxGT("Red Intensity")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_INTENSITY_G
|
||||||
|
#define MSG_INTENSITY_G _UxGT("Green Intensity")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_INTENSITY_B
|
||||||
|
#define MSG_INTENSITY_B _UxGT("Blue Intensity")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_INTENSITY_W
|
||||||
|
#define MSG_INTENSITY_W _UxGT("White Intensity")
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_LED_BRIGHTNESS
|
||||||
|
#define MSG_LED_BRIGHTNESS _UxGT("Brightness")
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MSG_MOVING
|
#ifndef MSG_MOVING
|
||||||
#define MSG_MOVING _UxGT("Moving...")
|
#define MSG_MOVING _UxGT("Moving...")
|
||||||
#endif
|
#endif
|
||||||
|
@ -839,7 +896,6 @@
|
||||||
#define MSG_INFO_PRINT_FILAMENT _UxGT("Extruded")
|
#define MSG_INFO_PRINT_FILAMENT _UxGT("Extruded")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MSG_INFO_MIN_TEMP
|
#ifndef MSG_INFO_MIN_TEMP
|
||||||
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
|
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -55,6 +55,10 @@
|
||||||
#include "../feature/bedlevel/bedlevel.h"
|
#include "../feature/bedlevel/bedlevel.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
#include "../feature/leds/leds.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// For i2c define BUZZ to use lcd_buzz
|
// For i2c define BUZZ to use lcd_buzz
|
||||||
#if DISABLED(LCD_USE_I2C_BUZZER)
|
#if DISABLED(LCD_USE_I2C_BUZZER)
|
||||||
#include "../libs/buzzer.h"
|
#include "../libs/buzzer.h"
|
||||||
|
@ -185,6 +189,10 @@ uint16_t max_display_update_time = 0;
|
||||||
void lcd_info_menu();
|
void lcd_info_menu();
|
||||||
#endif // LCD_INFO_MENU
|
#endif // LCD_INFO_MENU
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
void lcd_led_menu();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
void lcd_advanced_pause_toocold_menu();
|
void lcd_advanced_pause_toocold_menu();
|
||||||
void lcd_advanced_pause_option_menu();
|
void lcd_advanced_pause_option_menu();
|
||||||
|
@ -1014,6 +1022,10 @@ void kill_screen(const char* lcd_msg) {
|
||||||
MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu);
|
MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
MENU_ITEM(submenu, MSG_LED_CONTROL, lcd_led_menu);
|
||||||
|
#endif
|
||||||
|
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3931,6 +3943,66 @@ void kill_screen(const char* lcd_msg) {
|
||||||
}
|
}
|
||||||
#endif // LCD_INFO_MENU
|
#endif // LCD_INFO_MENU
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* LED Menu
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
|
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
|
||||||
|
void lcd_led_presets_menu() {
|
||||||
|
START_MENU();
|
||||||
|
#if LCD_HEIGHT > 2
|
||||||
|
STATIC_ITEM(MSG_LED_PRESETS, true, true);
|
||||||
|
#endif
|
||||||
|
MENU_BACK(MSG_LED_CONTROL);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_WHITE, leds.set_white);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_RED, leds.set_red);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_ORANGE, leds.set_orange);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_YELLOW,leds.set_yellow);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_GREEN, leds.set_green);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_BLUE, leds.set_blue);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_INDIGO, leds.set_indigo);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_VIOLET, leds.set_violet);
|
||||||
|
END_MENU();
|
||||||
|
}
|
||||||
|
#endif // LED_COLOR_PRESETS
|
||||||
|
|
||||||
|
void lcd_led_custom_menu() {
|
||||||
|
START_MENU();
|
||||||
|
MENU_BACK(MSG_LED_CONTROL);
|
||||||
|
MENU_ITEM_EDIT_CALLBACK(int8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true);
|
||||||
|
MENU_ITEM_EDIT_CALLBACK(int8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true);
|
||||||
|
MENU_ITEM_EDIT_CALLBACK(int8, MSG_INTENSITY_B, &leds.color.b, 0, 255, leds.update, true);
|
||||||
|
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
|
||||||
|
MENU_ITEM_EDIT_CALLBACK(int8, MSG_INTENSITY_W, &leds.color.w, 0, 255, leds.update, true);
|
||||||
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
MENU_ITEM_EDIT_CALLBACK(int8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
END_MENU();
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_led_menu() {
|
||||||
|
START_MENU();
|
||||||
|
MENU_BACK(MSG_MAIN);
|
||||||
|
if (leds.lights_on)
|
||||||
|
MENU_ITEM(function, MSG_LEDS_OFF, leds.toggle);
|
||||||
|
else
|
||||||
|
MENU_ITEM(function, MSG_LEDS_ON, leds.toggle);
|
||||||
|
MENU_ITEM(function, MSG_SET_LEDS_DEFAULT, leds.set_default);
|
||||||
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
|
MENU_ITEM(submenu, MSG_LED_PRESETS, lcd_led_presets_menu);
|
||||||
|
#endif
|
||||||
|
MENU_ITEM(submenu, MSG_CUSTOM_LEDS, lcd_led_custom_menu);
|
||||||
|
END_MENU();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Filament Change Feature Screens
|
* Filament Change Feature Screens
|
||||||
|
|
|
@ -1316,8 +1316,8 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
||||||
// then the machine is not coasting anymore and the safe entry / exit velocities shall be used.
|
// then the machine is not coasting anymore and the safe entry / exit velocities shall be used.
|
||||||
|
|
||||||
// The junction velocity will be shared between successive segments. Limit the junction velocity to their minimum.
|
// The junction velocity will be shared between successive segments. Limit the junction velocity to their minimum.
|
||||||
bool prev_speed_larger = previous_nominal_speed > block->nominal_speed;
|
const bool prev_speed_larger = previous_nominal_speed > block->nominal_speed;
|
||||||
float smaller_speed_factor = prev_speed_larger ? (block->nominal_speed / previous_nominal_speed) : (previous_nominal_speed / block->nominal_speed);
|
const float smaller_speed_factor = prev_speed_larger ? (block->nominal_speed / previous_nominal_speed) : (previous_nominal_speed / block->nominal_speed);
|
||||||
// Pick the smaller of the nominal speeds. Higher speed shall not be achieved at the junction during coasting.
|
// Pick the smaller of the nominal speeds. Higher speed shall not be achieved at the junction during coasting.
|
||||||
vmax_junction = prev_speed_larger ? block->nominal_speed : previous_nominal_speed;
|
vmax_junction = prev_speed_larger ? block->nominal_speed : previous_nominal_speed;
|
||||||
// Factor to multiply the previous / current nominal velocities to get componentwise limited velocities.
|
// Factor to multiply the previous / current nominal velocities to get componentwise limited velocities.
|
||||||
|
@ -1449,7 +1449,7 @@ void Planner::_set_position_mm(const float &a, const float &b, const float &c, c
|
||||||
#else
|
#else
|
||||||
#define _EINDEX E_AXIS
|
#define _EINDEX E_AXIS
|
||||||
#endif
|
#endif
|
||||||
long na = position[X_AXIS] = LROUND(a * axis_steps_per_mm[X_AXIS]),
|
const long na = position[X_AXIS] = LROUND(a * axis_steps_per_mm[X_AXIS]),
|
||||||
nb = position[Y_AXIS] = LROUND(b * axis_steps_per_mm[Y_AXIS]),
|
nb = position[Y_AXIS] = LROUND(b * axis_steps_per_mm[Y_AXIS]),
|
||||||
nc = position[Z_AXIS] = LROUND(c * axis_steps_per_mm[Z_AXIS]),
|
nc = position[Z_AXIS] = LROUND(c * axis_steps_per_mm[Z_AXIS]),
|
||||||
ne = position[E_AXIS] = LROUND(e * axis_steps_per_mm[_EINDEX]);
|
ne = position[E_AXIS] = LROUND(e * axis_steps_per_mm[_EINDEX]);
|
||||||
|
|
Reference in a new issue