From da6e5ce3db40877e437b91ac4c5f5708e88a3afa Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 6 Aug 2020 08:14:00 -0500 Subject: [PATCH] Optimize G-code / feature dependencies (#18919) --- Marlin/src/MarlinCore.cpp | 6 +- ...{binary_protocol.cpp => binary_stream.cpp} | 4 +- .../{binary_protocol.h => binary_stream.h} | 0 Marlin/src/feature/caselight.cpp | 48 +-- Marlin/src/feature/caselight.h | 26 +- Marlin/src/feature/e_parser.cpp | 2 +- Marlin/src/feature/e_parser.h | 2 +- Marlin/src/gcode/feature/caselight/M355.cpp | 76 +++-- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 4 +- Marlin/src/gcode/host/M115.cpp | 4 +- Marlin/src/gcode/queue.cpp | 5 +- Marlin/src/inc/Conditionals_LCD.h | 15 - Marlin/src/inc/Conditionals_post.h | 5 +- .../screens/advanced_settings_menu.cpp | 8 +- .../ftdi_eve_touch_ui/screens/main_menu.cpp | 2 +- .../lib/ftdi_eve_touch_ui/screens/screens.cpp | 2 +- .../lib/ftdi_eve_touch_ui/screens/screens.h | 4 +- Marlin/src/lcd/extui/ui_api.cpp | 14 +- Marlin/src/lcd/menu/menu_led.cpp | 8 +- .../libs/heatshrink/heatshrink_decoder.cpp | 31 +- .../src/libs/heatshrink/heatshrink_decoder.h | 27 +- Marlin/src/module/configuration_store.cpp | 12 +- .../PlatformIO/scripts/common-dependencies.h | 88 +++++ .../PlatformIO/scripts/common-dependencies.py | 110 +++--- platformio.ini | 316 ++++++++++++++++-- 26 files changed, 632 insertions(+), 189 deletions(-) rename Marlin/src/feature/{binary_protocol.cpp => binary_stream.cpp} (95%) rename Marlin/src/feature/{binary_protocol.h => binary_stream.h} (100%) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 74e15250e6..8c5966f744 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -189,7 +189,7 @@ #include "feature/leds/tempstat.h" #endif -#if HAS_CASE_LIGHT +#if ENABLED(CASE_LIGHT_ENABLE) #include "feature/caselight.h" #endif @@ -1082,11 +1082,11 @@ void setup() { OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // OFF #endif - #if HAS_CASE_LIGHT + #if ENABLED(CASE_LIGHT_ENABLE) #if DISABLED(CASE_LIGHT_USE_NEOPIXEL) if (PWM_PIN(CASE_LIGHT_PIN)) SET_PWM(CASE_LIGHT_PIN); else SET_OUTPUT(CASE_LIGHT_PIN); #endif - SETUP_RUN(update_case_light()); + SETUP_RUN(caselight.update_brightness()); #endif #if ENABLED(MK2_MULTIPLEXER) diff --git a/Marlin/src/feature/binary_protocol.cpp b/Marlin/src/feature/binary_stream.cpp similarity index 95% rename from Marlin/src/feature/binary_protocol.cpp rename to Marlin/src/feature/binary_stream.cpp index 5884a05f42..81e110339b 100644 --- a/Marlin/src/feature/binary_protocol.cpp +++ b/Marlin/src/feature/binary_stream.cpp @@ -25,7 +25,7 @@ #if ENABLED(BINARY_FILE_TRANSFER) #include "../sd/cardreader.h" -#include "binary_protocol.h" +#include "binary_stream.h" char* SDFileTransferProtocol::Packet::Open::data = nullptr; size_t SDFileTransferProtocol::data_waiting, SDFileTransferProtocol::transfer_timeout, SDFileTransferProtocol::idle_timeout; @@ -33,4 +33,4 @@ bool SDFileTransferProtocol::transfer_active, SDFileTransferProtocol::dummy_tran BinaryStream binaryStream[NUM_SERIAL]; -#endif // BINARY_FILE_TRANSFER +#endif diff --git a/Marlin/src/feature/binary_protocol.h b/Marlin/src/feature/binary_stream.h similarity index 100% rename from Marlin/src/feature/binary_protocol.h rename to Marlin/src/feature/binary_stream.h diff --git a/Marlin/src/feature/caselight.cpp b/Marlin/src/feature/caselight.cpp index 4287a0f262..8a128bb12d 100644 --- a/Marlin/src/feature/caselight.cpp +++ b/Marlin/src/feature/caselight.cpp @@ -22,14 +22,17 @@ #include "../inc/MarlinConfig.h" -#if HAS_CASE_LIGHT +#if ENABLED(CASE_LIGHT_ENABLE) -uint8_t case_light_brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS; -bool case_light_on = CASE_LIGHT_DEFAULT_ON; +#include "caselight.h" + +CaseLight caselight; + +uint8_t CaseLight::brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS; +bool CaseLight::on = CASE_LIGHT_DEFAULT_ON; #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) - #include "leds/leds.h" - LEDColor case_light_color = + LEDColor CaseLight::color = #ifdef CASE_LIGHT_NEOPIXEL_COLOR CASE_LIGHT_NEOPIXEL_COLOR #else @@ -38,34 +41,33 @@ bool case_light_on = CASE_LIGHT_DEFAULT_ON; ; #endif -/** - * The following are needed because ARM chips ignore a "WRITE(CASE_LIGHT_PIN,x)" command to the pins that - * are directly controlled by the PWM module. In order to turn them off the brightness level needs to be - * set to off. Since we can't use the pwm register to save the last brightness level we need a variable - * to save it. - */ -uint8_t case_light_brightness_sav; // saves brighness info so can restore when "M355 S1" received -bool case_light_arg_flag; // flag to notify if S or P argument type - #ifndef INVERT_CASE_LIGHT #define INVERT_CASE_LIGHT false #endif -void update_case_light() { +void CaseLight::update(const bool sflag) { + /** + * The brightness_sav (and sflag) is needed because ARM chips ignore + * a "WRITE(CASE_LIGHT_PIN,x)" command to the pins that are directly + * controlled by the PWM module. In order to turn them off the brightness + * level needs to be set to OFF. Since we can't use the PWM register to + * save the last brightness level we need a variable to save it. + */ + static uint8_t brightness_sav; // Save brightness info for restore on "M355 S1" - if (!(case_light_arg_flag && !case_light_on)) - case_light_brightness_sav = case_light_brightness; // save brightness except if this is an S0 argument - if (case_light_arg_flag && case_light_on) - case_light_brightness = case_light_brightness_sav; // restore last brightens if this is an S1 argument + if (on || !sflag) + brightness_sav = brightness; // Save brightness except for M355 S0 + if (sflag && on) + brightness = brightness_sav; // Restore last brightness for M355 S1 #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) || DISABLED(CASE_LIGHT_NO_BRIGHTNESS) - const uint8_t i = case_light_on ? case_light_brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i; + const uint8_t i = on ? brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i; #endif #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) leds.set_color( - MakeLEDColor(case_light_color.r, case_light_color.g, case_light_color.b, case_light_color.w, n10ct), + MakeLEDColor(color.r, color.g, color.b, color.w, n10ct), false ); @@ -83,11 +85,11 @@ void update_case_light() { else #endif { - const bool s = case_light_on ? !INVERT_CASE_LIGHT : INVERT_CASE_LIGHT; + const bool s = on ? !INVERT_CASE_LIGHT : INVERT_CASE_LIGHT; WRITE(CASE_LIGHT_PIN, s ? HIGH : LOW); } #endif // !CASE_LIGHT_USE_NEOPIXEL } -#endif // HAS_CASE_LIGHT +#endif // CASE_LIGHT_ENABLE diff --git a/Marlin/src/feature/caselight.h b/Marlin/src/feature/caselight.h index ff01b1a67d..9d1e76da26 100644 --- a/Marlin/src/feature/caselight.h +++ b/Marlin/src/feature/caselight.h @@ -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; diff --git a/Marlin/src/feature/e_parser.cpp b/Marlin/src/feature/e_parser.cpp index 85b1845a64..a4c2d0dac9 100644 --- a/Marlin/src/feature/e_parser.cpp +++ b/Marlin/src/feature/e_parser.cpp @@ -21,7 +21,7 @@ */ /** - * emergency_parser.cpp - Intercept special commands directly in the serial stream + * e_parser.cpp - Intercept special commands directly in the serial stream */ #include "../inc/MarlinConfigPre.h" diff --git a/Marlin/src/feature/e_parser.h b/Marlin/src/feature/e_parser.h index 73e459680e..8d11463ecd 100644 --- a/Marlin/src/feature/e_parser.h +++ b/Marlin/src/feature/e_parser.h @@ -22,7 +22,7 @@ #pragma once /** - * emergency_parser.h - Intercept special commands directly in the serial stream + * e_parser.h - Intercept special commands directly in the serial stream */ #include "../inc/MarlinConfigPre.h" diff --git a/Marlin/src/gcode/feature/caselight/M355.cpp b/Marlin/src/gcode/feature/caselight/M355.cpp index 4d2acd189c..bb6b57f666 100644 --- a/Marlin/src/gcode/feature/caselight/M355.cpp +++ b/Marlin/src/gcode/feature/caselight/M355.cpp @@ -20,45 +20,47 @@ * */ -#include "../../gcode.h" - #include "../../../inc/MarlinConfig.h" -#if HAS_CASE_LIGHT - #include "../../../feature/caselight.h" +#if ENABLED(CASE_LIGHT_ENABLE) - /** - * M355: Turn case light on/off and set brightness - * - * P Set case light brightness (PWM pin required - ignored otherwise) - * - * S Set case light on/off - * - * When S turns on the light on a PWM pin then the current brightness level is used/restored - * - * M355 P200 S0 turns off the light & sets the brightness level - * M355 S1 turns on the light with a brightness of 200 (assuming a PWM pin) - */ - void GcodeSuite::M355() { - uint8_t args = 0; - if (parser.seenval('P')) { - ++args, case_light_brightness = parser.value_byte(); - case_light_arg_flag = false; - } - if (parser.seenval('S')) { - ++args, case_light_on = parser.value_bool(); - case_light_arg_flag = true; - } - if (args) update_case_light(); +#include "../../../feature/caselight.h" +#include "../../gcode.h" - // always report case light status - SERIAL_ECHO_START(); - if (!case_light_on) { - SERIAL_ECHOLNPGM("Case light: off"); - } - else { - if (!PWM_PIN(CASE_LIGHT_PIN)) SERIAL_ECHOLNPGM("Case light: on"); - else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness); - } +/** + * M355: Turn case light on/off and set brightness + * + * P Set case light brightness (PWM pin required - ignored otherwise) + * + * S Set case light on/off + * + * When S turns on the light on a PWM pin then the current brightness level is used/restored + * + * M355 P200 S0 turns off the light & sets the brightness level + * M355 S1 turns on the light with a brightness of 200 (assuming a PWM pin) + */ +void GcodeSuite::M355() { + bool didset = false; + if (parser.seenval('P')) { + didset = true; + caselight.brightness = parser.value_byte(); + } + const bool sflag = parser.seenval('S'); + if (sflag) { + didset = true; + caselight.on = parser.value_bool(); } -#endif // HAS_CASE_LIGHT + if (didset) caselight.update(sflag); + + // Always report case light status + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("Case light: "); + if (!caselight.on) + SERIAL_ECHOLNPGM(STR_OFF); + else { + if (!PWM_PIN(CASE_LIGHT_PIN)) SERIAL_ECHOLNPGM(STR_ON); + else SERIAL_ECHOLN(int(caselight.brightness)); + } +} + +#endif // CASE_LIGHT_ENABLE diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 7c1083f7f7..f1692ee807 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -842,7 +842,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 351: M351(); break; // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low. #endif - #if HAS_CASE_LIGHT + #if ENABLED(CASE_LIGHT_ENABLE) case 355: M355(); break; // M355: Set case light brightness #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 7c469458cd..7e89e809d0 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -702,7 +702,7 @@ private: static void M351(); #endif - TERN_(HAS_CASE_LIGHT, static void M355()); + TERN_(CASE_LIGHT_ENABLE, static void M355()); TERN_(REPETIER_GCODE_M360, static void M360()); @@ -845,7 +845,7 @@ private: TERN_(MAGNETIC_PARKING_EXTRUDER, static void M951()); TERN_(TOUCH_SCREEN_CALIBRATION, static void M995()); - + TERN_(PLATFORM_M997_SUPPORT, static void M997()); static void M999(); diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index c3ff9c8c1a..cd64c563f9 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -93,8 +93,8 @@ void GcodeSuite::M115() { cap_line(PSTR("SOFTWARE_POWER"), ENABLED(PSU_CONTROL)); // TOGGLE_LIGHTS (M355) - cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(HAS_CASE_LIGHT)); - cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(HAS_CASE_LIGHT, PWM_PIN(CASE_LIGHT_PIN))); + cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(CASE_LIGHT_ENABLE)); + cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, PWM_PIN(CASE_LIGHT_PIN))); // EMERGENCY_PARSER (M108, M112, M410, M876) cap_line(PSTR("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER)); diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index c77db0bf2a..b9169d90e1 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -40,7 +40,7 @@ GCodeQueue queue; #endif #if ENABLED(BINARY_FILE_TRANSFER) - #include "../feature/binary_protocol.h" + #include "../feature/binary_stream.h" #endif #if ENABLED(POWER_LOSS_RECOVERY) @@ -628,11 +628,10 @@ void GCodeQueue::advance() { #if ENABLED(SERIAL_STATS_DROPPED_RX) SERIAL_ECHOLNPAIR("Dropped bytes: ", MYSERIAL0.dropped()); #endif - #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) SERIAL_ECHOLNPAIR("Max RX Queue Size: ", MYSERIAL0.rxMaxEnqueued()); #endif - #endif // !defined(__AVR__) || !defined(USBCON) + #endif ok_to_send(); } diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 4ffd6fddcc..cabca762ab 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -430,14 +430,6 @@ #endif #endif -#if ENABLED(SR_LCD_3W_NL) - // Feature checks for SR_LCD_3W_NL -#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) - #define USES_LIQUIDTWI2 -#elif ANY(HAS_CHARACTER_LCD, LCD_I2C_TYPE_PCF8575, LCD_I2C_TYPE_PCA8574, SR_LCD_2W_NL, LCM1602) - #define USES_LIQUIDCRYSTAL -#endif - #if ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS) #define HAS_LCD_MENU 1 #endif @@ -774,10 +766,3 @@ #ifndef EXTRUDE_MINTEMP #define EXTRUDE_MINTEMP 170 #endif - -/** - * To check if we need the folder src/features/leds - */ -#if ANY(TEMP_STAT_LEDS, HAS_COLOR_LEDS, HAS_CASE_LIGHT, PRINTER_EVENT_LEDS, LED_BACKLIGHT_TIMEOUT, PCA9632_BUZZER, LED_CONTROL_MENU, NEOPIXEL_LED) - #define HAS_LED_FEATURE 1 -#endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a93e0527bf..556d57b669 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1944,9 +1944,6 @@ #if PIN_EXISTS(PHOTOGRAPH) #define HAS_PHOTOGRAPH 1 #endif -#if PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE) - #define HAS_CASE_LIGHT 1 -#endif // Digital control #if PIN_EXISTS(STEPPER_RESET) @@ -2223,7 +2220,7 @@ /** * MIN/MAX case light PWM scaling */ -#if HAS_CASE_LIGHT +#if ENABLED(CASE_LIGHT_ENABLE) #ifndef CASE_LIGHT_MAX_PWM #define CASE_LIGHT_MAX_PWM 255 #elif !WITHIN(CASE_LIGHT_MAX_PWM, 1, 255) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp index 12bfe5e68d..35040734b4 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp @@ -38,7 +38,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { } #ifdef TOUCH_UI_PORTRAIT - #if EITHER(HAS_CASE_LIGHT, SENSORLESS_HOMING) + #if EITHER(CASE_LIGHT_ENABLE, SENSORLESS_HOMING) #define GRID_ROWS 9 #else #define GRID_ROWS 8 @@ -59,7 +59,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #define BACKLASH_POS BTN_POS(2,7), BTN_SIZE(1,1) #define CASE_LIGHT_POS BTN_POS(1,8), BTN_SIZE(1,1) #define TMC_HOMING_THRS_POS BTN_POS(2,8), BTN_SIZE(1,1) - #if EITHER(HAS_CASE_LIGHT, SENSORLESS_HOMING) + #if EITHER(CASE_LIGHT_ENABLE, SENSORLESS_HOMING) #define BACK_POS BTN_POS(1,9), BTN_SIZE(2,1) #else #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1) @@ -91,7 +91,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .font(Theme::font_medium) .enabled(ENABLED(HAS_BED_PROBE)) .tag(2) .button( ZPROBE_ZOFFSET_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) - .enabled(ENABLED(HAS_CASE_LIGHT)) + .enabled(ENABLED(CASE_LIGHT_ENABLE)) .tag(16).button( CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT)) .tag(3) .button( STEPS_PER_MM_POS, GET_TEXT_F(MSG_STEPS_PER_MM)) .enabled(ENABLED(HAS_TRINAMIC_CONFIG)) @@ -149,7 +149,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; #endif case 15: GOTO_SCREEN(DisplayTuningScreen); break; - #if HAS_CASE_LIGHT + #if ENABLED(CASE_LIGHT_ENABLE) case 16: GOTO_SCREEN(CaseLightScreen); break; #endif default: return false; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp index 12cb8d0891..dfb23daa52 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp @@ -137,7 +137,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { case 4: GOTO_SCREEN(MoveAxisScreen); break; case 5: injectCommands_P(PSTR("M84")); break; case 6: GOTO_SCREEN(TemperatureScreen); break; - #if BOTH(TOUCH_UI_COCOA_PRESS, HAS_CASE_LIGHT) + #if BOTH(TOUCH_UI_COCOA_PRESS, CASE_LIGHT_ENABLE) case 7: GOTO_SCREEN(CaseLightScreen); break; #else case 7: GOTO_SCREEN(ChangeFilamentScreen); break; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp index 82d1831e62..01438aeb94 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp @@ -83,7 +83,7 @@ SCREEN_TABLE { #else DECL_SCREEN(JerkScreen), #endif -#if HAS_CASE_LIGHT +#if ENABLED(CASE_LIGHT_ENABLE) DECL_SCREEN(CaseLightScreen), #endif #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h index 276727fc46..92e6b230f7 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h @@ -63,7 +63,7 @@ enum { #else JERK_SCREEN_CACHE, #endif -#if HAS_CASE_LIGHT +#if ENABLED(CASE_LIGHT_ENABLE) CASE_LIGHT_SCREEN_CACHE, #endif #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) @@ -579,7 +579,7 @@ class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public Cac }; #endif -#if HAS_CASE_LIGHT +#if ENABLED(CASE_LIGHT_ENABLE) class CaseLightScreen : public BaseNumericAdjustmentScreen, public CachedScreen { public: static void onRedraw(draw_mode_t); diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 451aa1f12a..c192754495 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -599,18 +599,18 @@ namespace ExtUI { #endif #endif - #if HAS_CASE_LIGHT - bool getCaseLightState() { return case_light_on; } + #if ENABLED(CASE_LIGHT_ENABLE) + bool getCaseLightState() { return caselight.on; } void setCaseLightState(const bool value) { - case_light_on = value; - update_case_light(); + caselight.on = value; + caselight.update_enabled(); } #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) - float getCaseLightBrightness_percent() { return ui8_to_percent(case_light_brightness); } + float getCaseLightBrightness_percent() { return ui8_to_percent(caselight.brightness); } void setCaseLightBrightness_percent(const float value) { - case_light_brightness = map(constrain(value, 0, 100), 0, 100, 0, 255); - update_case_light(); + caselight.brightness = map(constrain(value, 0, 100), 0, 100, 0, 255); + caselight.update_brightness(); } #endif #endif diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 2719b3d850..ac56ca0e52 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -76,8 +76,8 @@ void menu_case_light() { START_MENU(); BACK_ITEM(MSG_CONFIGURATION); - EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &case_light_brightness, 0, 255, update_case_light, true); - EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); + EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true); + EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&caselight.on, caselight.update_enabled); END_MENU(); } #endif @@ -97,7 +97,7 @@ void menu_led() { #endif SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom); #endif - // + // // Set Case light on/off/brightness // #if ENABLED(CASE_LIGHT_MENU) @@ -106,7 +106,7 @@ void menu_led() { SUBMENU(MSG_CASE_LIGHT, menu_case_light); else #endif - EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); + EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&caselight.on, caselight.update_enabled); #endif END_MENU(); } diff --git a/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp b/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp index 4684af975e..3f0f828cd7 100644 --- a/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp +++ b/Marlin/src/libs/heatshrink/heatshrink_decoder.cpp @@ -1,9 +1,36 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(BINARY_FILE_TRANSFER) + /** * libs/heatshrink/heatshrink_decoder.cpp */ +#include "heatshrink_decoder.h" + #include #include -#include "heatshrink_decoder.h" #pragma GCC optimize ("O3") @@ -353,3 +380,5 @@ static void push_byte(heatshrink_decoder *hsd, output_info *oi, uint8_t byte) { oi->buf[(*oi->output_size)++] = byte; (void)hsd; } + +#endif // BINARY_FILE_TRANSFER diff --git a/Marlin/src/libs/heatshrink/heatshrink_decoder.h b/Marlin/src/libs/heatshrink/heatshrink_decoder.h index 11fafe617f..eb113aa5e5 100644 --- a/Marlin/src/libs/heatshrink/heatshrink_decoder.h +++ b/Marlin/src/libs/heatshrink/heatshrink_decoder.h @@ -1,13 +1,36 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + /** * libs/heatshrink/heatshrink_decoder.h */ #pragma once -#include -#include #include "heatshrink_common.h" #include "heatshrink_config.h" +#include +#include + typedef enum { HSDR_SINK_OK, /* data sunk, ready to poll */ HSDR_SINK_FULL, /* out of space in internal buffer */ diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index b9f44eb6f8..28e15cfeb0 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -404,7 +404,7 @@ typedef struct SettingsDataStruct { // HAS_CASE_LIGHT_BRIGHTNESS // #if HAS_CASE_LIGHT_BRIGHTNESS - uint8_t case_light_brightness; + uint8_t caselight_brightness; // M355 P #endif // @@ -465,7 +465,7 @@ void MarlinSettings::postprocess() { TERN_(HAS_LINEAR_E_JERK, planner.recalculate_max_e_jerk()); - TERN_(HAS_CASE_LIGHT_BRIGHTNESS, update_case_light()); + TERN_(HAS_CASE_LIGHT_BRIGHTNESS, caselight.update_brightness()); // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm // and init stepper.count[], planner.position[] with current_position @@ -1342,7 +1342,7 @@ void MarlinSettings::postprocess() { // Case Light Brightness // #if HAS_CASE_LIGHT_BRIGHTNESS - EEPROM_WRITE(case_light_brightness); + EEPROM_WRITE(caselight.brightness); #endif // @@ -2181,8 +2181,8 @@ void MarlinSettings::postprocess() { // Case Light Brightness // #if HAS_CASE_LIGHT_BRIGHTNESS - _FIELD_TEST(case_light_brightness); - EEPROM_READ(case_light_brightness); + _FIELD_TEST(caselight_brightness); + EEPROM_READ(caselight.brightness); #endif // @@ -2493,7 +2493,7 @@ void MarlinSettings::reset() { // // Case Light Brightness // - TERN_(HAS_CASE_LIGHT_BRIGHTNESS, case_light_brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS); + TERN_(HAS_CASE_LIGHT_BRIGHTNESS, caselight.brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS); // // TOUCH_SCREEN_CALIBRATION diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h index a1f8b095ad..d18cb8c281 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.h +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h @@ -65,3 +65,91 @@ #ifdef HAL_PATH #include HAL_PATH(../../../../Marlin/src/HAL, inc/Conditionals_post.h) #endif + +// +// Conditionals only used for [features] +// +#if ENABLED(SR_LCD_3W_NL) + // Feature checks for SR_LCD_3W_NL +#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) + #define USES_LIQUIDTWI2 +#elif ANY(HAS_CHARACTER_LCD, LCD_I2C_TYPE_PCF8575, LCD_I2C_TYPE_PCA8574, SR_LCD_2W_NL, LCM1602) + #define USES_LIQUIDCRYSTAL +#endif + +#if BOTH(ANYCUBIC_LCD_I3MEGA, EXTENSIBLE_UI) + #define HAS_ANYCUBIC_TFT_EXTUI +#endif + +#if SAVED_POSITIONS + #define HAS_SAVED_POSITIONS +#endif + +#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER) + #define HAS_GCODE_M876 +#endif + +#if PREHEAT_COUNT + #define HAS_PREHEAT_COUNT +#endif + +#if EXTRUDERS + #define HAS_EXTRUDERS + #if EXTRUDERS > 1 + #define HAS_MULTI_EXTRUDER + #endif +#endif + +#if HAS_LCD_MENU + #if ENABLED(BACKLASH_GCODE) + #define HAS_MENU_BACKLASH + #endif + #if ENABLED(LEVEL_BED_CORNERS) + #define HAS_MENU_BED_CORNERS + #endif + #if ENABLED(CANCEL_OBJECTS) + #define HAS_MENU_CANCELOBJECT + #endif + #if ENABLED(CUSTOM_USER_MENUS) + #define HAS_MENU_CUSTOM + #endif + #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) + #define HAS_MENU_DELTA_CALIBRATE + #endif + #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_MENU) + #define HAS_MENU_LED + #endif + #if ENABLED(ADVANCED_PAUSE_FEATURE) + #define HAS_MENU_FILAMENT + #endif + #if ENABLED(SDSUPPORT) + #define HAS_MENU_MEDIA + #endif + #if ENABLED(MIXING_EXTRUDER) + #define HAS_MENU_MIXER + #endif + #if ENABLED(POWER_LOSS_RECOVERY) + #define HAS_MENU_JOB_RECOVERY + #endif + #if HAS_POWER_MONITOR + #define HAS_MENU_POWER_MONITOR + #endif + #if HAS_CUTTER + #define HAS_MENU_CUTTER + #endif + #if HAS_TEMPERATURE + #define HAS_MENU_TEMPERATURE + #endif + #if ENABLED(MMU2_MENUS) + #define HAS_MENU_MMU2 + #endif + #if HAS_TRINAMIC_CONFIG + #define HAS_MENU_TMC + #endif + #if ENABLED(TOUCH_SCREEN_CALIBRATION) + #define HAS_MENU_TOUCH_SCREEN + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + #define HAS_MENU_UBL + #endif +#endif diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py index 37efaa3743..ec708b116a 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.py +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py @@ -6,41 +6,56 @@ import subprocess import os import re try: - import configparser + import configparser except ImportError: - import ConfigParser as configparser + import ConfigParser as configparser from platformio.managers.package import PackageManager Import("env") -FEATURE_DEPENDENCIES = {} +FEATURE_CONFIG = {} + +def add_to_feat_cnf(feature, flines): + feat = FEATURE_CONFIG[feature] + atoms = re.sub(',\\s*', '\n', flines).strip().split('\n') + for dep in atoms: + parts = dep.split('=') + name = parts.pop(0) + rest = '='.join(parts) + if name in ['extra_scripts', 'src_filter', 'lib_ignore']: + feat[name] = rest + else: + feat['lib_deps'] += [dep] def load_config(): config = configparser.ConfigParser() config.read("platformio.ini") items = config.items('features') for key in items: - ukey = key[0].upper() - if not ukey in FEATURE_DEPENDENCIES: - FEATURE_DEPENDENCIES[ukey] = { - 'lib_deps': [] - } - deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n') - for dep in deps: - parts = dep.split('=') - name = parts.pop(0) - rest = '='.join(parts) - if name in ['extra_scripts', 'src_filter', 'lib_ignore']: - FEATURE_DEPENDENCIES[ukey][name] = rest - else: - FEATURE_DEPENDENCIES[ukey]['lib_deps'] += [dep] + feature = key[0].upper() + if not feature in FEATURE_CONFIG: + FEATURE_CONFIG[feature] = { 'lib_deps': [] } + add_to_feat_cnf(feature, key[1]) + + # Add options matching marlin.MY_OPTION to the pile + all_opts = env.GetProjectOptions() + for n in all_opts: + mat = re.match(r'marlin\.(.+)', n[0]) + if mat: + try: + val = env.GetProjectOption(n[0]) + except: + val = None + if val: + add_to_feat_cnf(mat.group(1).upper(), val) def get_all_known_libs(): known_libs = [] - for feature in FEATURE_DEPENDENCIES: - if not 'lib_deps' in FEATURE_DEPENDENCIES[feature]: + for feature in FEATURE_CONFIG: + feat = FEATURE_CONFIG[feature] + if not 'lib_deps' in feat: continue - for dep in FEATURE_DEPENDENCIES[feature]['lib_deps']: + for dep in feat['lib_deps']: name, _, _ = PackageManager.parse_pkg_uri(dep) known_libs.append(name) return known_libs @@ -64,21 +79,23 @@ def force_ignore_unused_libs(): known_libs = get_all_known_libs() diff = (list(set(known_libs) - set(env_libs))) lib_ignore = env.GetProjectOption('lib_ignore') + diff - print("Ignoring libs:", lib_ignore) + print("Ignore libraries:", lib_ignore) set_env_field('lib_ignore', lib_ignore) -def install_features_dependencies(): +def apply_features_config(): load_config() - for feature in FEATURE_DEPENDENCIES: + for feature in FEATURE_CONFIG: if not env.MarlinFeatureIsEnabled(feature): continue - if 'lib_deps' in FEATURE_DEPENDENCIES[feature]: + feat = FEATURE_CONFIG[feature] + + if 'lib_deps' in feat and len(feat['lib_deps']): print("Adding lib_deps for %s... " % feature) - # deps to add + # feat to add deps_to_add = {} - for dep in FEATURE_DEPENDENCIES[feature]['lib_deps']: + for dep in feat['lib_deps']: name, _, _ = PackageManager.parse_pkg_uri(dep) deps_to_add[name] = dep @@ -101,27 +118,27 @@ def install_features_dependencies(): # Only add the missing dependencies set_env_field('lib_deps', deps + list(deps_to_add.values())) - if 'extra_scripts' in FEATURE_DEPENDENCIES[feature]: - print("Executing extra_scripts for %s... " % feature) - env.SConscript(FEATURE_DEPENDENCIES[feature]['extra_scripts'], exports="env") + if 'extra_scripts' in feat: + print("Running extra_scripts for %s... " % feature) + env.SConscript(feat['extra_scripts'], exports="env") - if 'src_filter' in FEATURE_DEPENDENCIES[feature]: + if 'src_filter' in feat: print("Adding src_filter for %s... " % feature) src_filter = ' '.join(env.GetProjectOption('src_filter')) # first we need to remove the references to the same folder - my_srcs = re.findall( r'[+-](<.*?>)', FEATURE_DEPENDENCIES[feature]['src_filter']) + my_srcs = re.findall( r'[+-](<.*?>)', feat['src_filter']) cur_srcs = re.findall( r'[+-](<.*?>)', src_filter) for d in my_srcs: if d in cur_srcs: src_filter = re.sub(r'[+-]' + d, '', src_filter) - src_filter = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter + src_filter = feat['src_filter'] + ' ' + src_filter set_env_field('src_filter', [src_filter]) env.Replace(SRC_FILTER=src_filter) - if 'lib_ignore' in FEATURE_DEPENDENCIES[feature]: - print("Ignoring libs for %s... " % feature) - lib_ignore = env.GetProjectOption('lib_ignore') + [FEATURE_DEPENDENCIES[feature]['lib_ignore']] + if 'lib_ignore' in feat: + print("Adding lib_ignore for %s... " % feature) + lib_ignore = env.GetProjectOption('lib_ignore') + [feat['lib_ignore']] set_env_field('lib_ignore', lib_ignore) # @@ -170,7 +187,7 @@ def search_compiler(): # Use the compiler to get a list of all enabled features # def load_marlin_features(): - if "MARLIN_FEATURES" in env: + if 'MARLIN_FEATURES' in env: return # Process defines @@ -199,16 +216,27 @@ def load_marlin_features(): feature = define[8:].strip().decode().split(' ') feature, definition = feature[0], ' '.join(feature[1:]) marlin_features[feature] = definition - env["MARLIN_FEATURES"] = marlin_features + env['MARLIN_FEATURES'] = marlin_features # # Return True if a matching feature is enabled # def MarlinFeatureIsEnabled(env, feature): load_marlin_features() - r = re.compile(feature) - matches = list(filter(r.match, env["MARLIN_FEATURES"])) - return len(matches) > 0 + r = re.compile('^' + feature + '$') + found = list(filter(r.match, env['MARLIN_FEATURES'])) + + # Defines could still be 'false' or '0', so check + some_on = False + if len(found): + for f in found: + val = env['MARLIN_FEATURES'][f] + if val in [ '', '1', 'true' ]: + some_on = True + elif val in env['MARLIN_FEATURES']: + some_on = env.MarlinFeatureIsEnabled(val) + + return some_on # # Add a method for other PIO scripts to query enabled features @@ -218,5 +246,5 @@ env.AddMethod(MarlinFeatureIsEnabled) # # Add dependencies for enabled Marlin features # -install_features_dependencies() +apply_features_config() force_ignore_unused_libs() diff --git a/platformio.ini b/platformio.ini index 029ce65881..6c3214d544 100644 --- a/platformio.ini +++ b/platformio.ini @@ -26,15 +26,160 @@ include_dir = Marlin # [common] default_src_filter = + - - + - - - - - - - - - - - + - - - - + - + - - - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + - - - - + - + - - - - - - - - + - - + - + - - + - - + - + - - - - - - + - - + - + - + - + - - + - - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - - + - - + - + - - + - + - + - - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - - + - + - + - + - + - - + - extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py @@ -49,12 +194,17 @@ HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/MKS-LittlevGL/ar src_filter=+ extra_scripts=download_mks_assets.py HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1 - src_filter=+ + src_filter=+ + + + + +HAS_STEALTHCHOP = src_filter=+ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip -DIGIPOT_MCP4... = SlowSoftI2CMaster +HAS_I2C_DIGIPOT = SlowSoftI2CMaster + src_filter=+ HAS_TMC26X = TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip + src_filter=+ HAS_L64XX = Arduino-L6470@0.8.0 + src_filter=+ + + NEOPIXEL_LED = Adafruit NeoPixel@1.5.0 + src_filter=+ MAX6675_IS_MAX31865 = Adafruit MAX31865 library@~1.1.0 HAS_GRAPHICAL_LCD = U8glib-HAL@0.4.1 src_filter=+ @@ -64,17 +214,143 @@ DWIN_CREALITY_LCD = src_filter=+ HAS_CHARACTER_LCD = src_filter=+ HAS_GRAPHICAL_TFT = src_filter=+ HAS_LCD_MENU = src_filter=+ -HAS_DGUS_LCD = src_filter=+ -TOUCH_UI_FTDI_EVE = src_filter=+ +HAS_GAMES = src_filter=+ +MARLIN_BRICKOUT = src_filter=+ +MARLIN_INVADERS = src_filter=+ +MARLIN_MAZE = src_filter=+ +MARLIN_SNAKE = src_filter=+ +HAS_MENU_BACKLASH = src_filter=+ +HAS_MENU_BED_CORNERS = src_filter=+ +LCD_BED_LEVELING = src_filter=+ +HAS_MENU_CANCELOBJECT = src_filter=+ +HAS_MENU_DELTA_CALIBRATE = src_filter=+ +HAS_MENU_FILAMENT = src_filter=+ +LCD_INFO_MENU = src_filter=+ +HAS_MENU_JOB_RECOVERY = src_filter=+ +HAS_MENU_LED = src_filter=+ +HAS_MENU_MEDIA = src_filter=+ +HAS_MENU_MIXER = src_filter=+ +HAS_MENU_MMU2 = src_filter=+ +HAS_MENU_POWER_MONITOR = src_filter=+ +HAS_MENU_CUTTER = src_filter=+ +HAS_MENU_TEMPERATURE = src_filter=+ +HAS_MENU_TMC = src_filter=+ +HAS_MENU_TOUCH_SCREEN = src_filter=+ +HAS_MENU_UBL = src_filter=+ ANYCUBIC_LCD_I3MEGA = src_filter=+ +HAS_DGUS_LCD = src_filter=+ + +TOUCH_UI_FTDI_EVE = src_filter=+ +HAS_ANYCUBIC_TFT_EXTUI = src_filter=+ +EXTUI_EXAMPLE = src_filter=+ +MALYAN_LCD = src_filter=+ +HAS_SPI_LCD = src_filter=+ USB_FLASH_DRIVE_SUPPORT = src_filter=+ -AUTO_BED_LEVELING_(3POINT|(BI)?LINEAR) = src_filter=+ + +AUTO_BED_LEVELING_BILINEAR = src_filter=+ +AUTO_BED_LEVELING_(3POINT|(BI)?LINEAR) = src_filter=+ MESH_BED_LEVELING = src_filter=+ + AUTO_BED_LEVELING_UBL = src_filter=+ + +BACKLASH_COMPENSATION = src_filter=+ +BARICUDA = src_filter=+ + +BINARY_FILE_TRANSFER = src_filter=+ + +BLTOUCH = src_filter=+ +CANCEL_OBJECTS = src_filter=+ + +CASE_LIGHT_ENABLE = src_filter=+ + +EXTERNAL_CLOSED_LOOP_CONTROLLER = src_filter=+ + +USE_CONTROLLER_FAN = src_filter=+ DAC_STEPPER_CURRENT = src_filter=+ -HAS_I2C_DIGIPOT = src_filter=+ -HAS_LED_FEATURE = src_filter=+ -(ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer +DIRECT_STEPPING = src_filter=+ + +EMERGENCY_PARSER = src_filter=+ - +I2C_POSITION_ENCODERS = src_filter=+ +HAS_FANMUX = src_filter=+ +FILAMENT_WIDTH_SENSOR = src_filter=+ + +FWRETRACT = src_filter=+ + +HOST_ACTION_COMMANDS = src_filter=+ +HOTEND_IDLE_TIMEOUT = src_filter=+ +JOYSTICK = src_filter=+ +BLINKM = src_filter=+ +HAS_COLOR_LEDS = src_filter=+ + +PCA9533 = src_filter=+ +PCA9632 = src_filter=+ +PRINTER_EVENT_LEDS = src_filter=+ +TEMP_STAT_LEDS = src_filter=+ +MAX7219_DEBUG = src_filter=+ + +MIXING_EXTRUDER = src_filter=+ + +PRUSA_MMU2 = src_filter=+ + +ADVANCED_PAUSE_FEATURE = src_filter=+ + + +AUTO_POWER_CONTROL = src_filter=+ +HAS_POWER_MONITOR = src_filter=+ + +POWER_LOSS_RECOVERY = src_filter=+ + +PROBE_TEMP_COMPENSATION = src_filter=+ + +HAS_FILAMENT_SENSOR = src_filter=+ + +MK2_MULTIPLEXER = src_filter=+ +EXT_SOLENOID|MANUAL_SOLENOID_CONTROL = src_filter=+ +HAS_CUTTER = src_filter=+ + +EXPERIMENTAL_I2CBUS = src_filter=+ + +Z_STEPPER_AUTO_ALIGN = src_filter=+ + +G26_MESH_VALIDATION = src_filter=+ +ASSISTED_TRAMMING = src_filter=+ +HAS_MESH = src_filter=+ +HAS_LEVELING = src_filter=+ +DELTA_AUTO_CALIBRATION = src_filter=+ +CALIBRATION_GCODE = src_filter=+ +Z_MIN_PROBE_REPEATABILITY_TEST = src_filter=+ +M100_FREE_MEMORY_WATCHER = src_filter=+ +BACKLASH_GCODE = src_filter=+ +IS_KINEMATIC = src_filter=+ +HAS_EXTRA_ENDSTOPS = src_filter=+ +SKEW_CORRECTION_GCODE = src_filter=+ +PINS_DEBUGGING = src_filter=- +NO_VOLUMETRICS = src_filter=- +HAS_MULTI_EXTRUDER = src_filter=+ +HAS_HOTEND_OFFSET = src_filter=+ +EDITABLE_SERVO_ANGLES = src_filter=+ +PREVENT_COLD_EXTRUSION = src_filter=+ +HAS_USER_THERMISTORS = src_filter=+ +SD_ABORT_ON_ENDSTOP_HIT = src_filter=+ +COOLANT_CONTROL = src_filter=+ +HAS_SOFTWARE_ENDSTOPS = src_filter=+ +HAS_DUPLICATION_MODE = src_filter=+ +LIN_ADVANCE = src_filter=+ +PHOTO_GCODE = src_filter=+ +CONTROLLER_FAN_EDITABLE = src_filter=+ +GCODE_MACROS = src_filter=+ +GRADIENT_MIX = src_filter=+ +HAS_SAVED_POSITIONS = src_filter=+ + +PARK_HEAD_ON_PAUSE = src_filter=+ +FILAMENT_LOAD_UNLOAD_GCODES = src_filter=+ +CNC_WORKSPACE_PLANES = src_filter=+ +CNC_COORDINATE_SYSTEMS = src_filter=+ +HAS_M206_COMMAND = src_filter=+ +EXPECTED_PRINTER_CHECK = src_filter=+ +HOST_KEEPALIVE_FEATURE = src_filter=+ +REPETIER_GCODE_M360 = src_filter=+ +HAS_GCODE_M876 = src_filter=+ +HAS_RESUME_CONTINUE = src_filter=+ +HAS_PREHEAT_COUNT = src_filter=+ +HAS_LCD_CONTRAST = src_filter=+ +LCD_SET_PROGRESS_MANUALLY = src_filter=+ +TOUCH_SCREEN_CALIBRATION = src_filter=+ +ARC_SUPPORT = src_filter=+ +GCODE_MOTION_MODES = src_filter=+ +BABYSTEPPING = src_filter=+ +Z_PROBE_SLED = src_filter=+ +G38_PROBE_TARGET = src_filter=+ +MAGNETIC_PARKING_EXTRUDER = src_filter=+ +SDSUPPORT = src_filter=+ +HAS_EXTRUDERS = src_filter=+ + +INCH_MODE_SUPPORT = src_filter=+ +TEMPERATURE_UNITS_SUPPORT = src_filter=+ +NEED_HEX_PRINT = src_filter=+ +NEED_LSF = src_filter=+ +NOZZLE_PARK_FEATURE = src_filter=+ + +NOZZLE_CLEAN_FEATURE = src_filter=+ + +DELTA = src_filter=+ + +BEZIER_CURVE_SUPPORT = src_filter=+ + +PRINTCOUNTER = src_filter=+ +HAS_BED_PROBE = src_filter=+ + + + +IS_SCARA = src_filter=+ +MORGAN_SCARA = src_filter=+ +(ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer ESP3DLib=https://github.com/luc-github/ESP3DLib.git arduinoWebSockets=https://github.com/Links2004/arduinoWebSockets.git ESP32SSDP=https://github.com/luc-github/ESP32SSDP.git @@ -268,14 +544,13 @@ src_filter = ${common.default_src_filter} + [env:DUE_USB] platform = atmelsam +extends = env:DUE board = dueUSB -src_filter = ${common.default_src_filter} + [env:DUE_debug] # Used when WATCHDOG_RESET_MANUAL is enabled platform = atmelsam -board = due -src_filter = ${common.default_src_filter} + +extends = env:DUE build_flags = ${common.build_flags} -funwind-tables -mpoke-function-name @@ -285,8 +560,7 @@ build_flags = ${common.build_flags} # [common_DUE_archim] platform = atmelsam -board = due -src_filter = ${common.default_src_filter} + +extends = env:DUE build_flags = ${common.build_flags} -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON extra_scripts = ${common.extra_scripts} @@ -320,7 +594,7 @@ src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} SoftwareSerialM Adafruit SPIFlash - SdFat - Adafruit Fork +marlin.SDSUPPORT = SdFat - Adafruit Fork debug_tool = jlink ################################# @@ -342,8 +616,8 @@ extra_scripts = ${common.extra_scripts} src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} Servo - LiquidCrystal@1.0.0 - Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip +marlin.USES_LIQUIDCRYSTAL = LiquidCrystal@1.0.0 +marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g # debug options for backtrace #-funwind-tables @@ -426,9 +700,9 @@ extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py lib_deps = ${common.lib_deps} - Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use SoftwareSerialM USBComposite for STM32F1@0.91 +marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use debug_tool = stlink upload_protocol = dfu