diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d278d1275b9..4706bb505245 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -242,12 +242,12 @@ jobs: echo testing STM32F1 targets... export TEST_PLATFORM="-e STM32F1" restore_configs - echo use_example_configs STM32F10 - use_example_configs STM32F10 + echo use_example_configs STM32/STM32F10 + use_example_configs STM32/STM32F10 build_marlin_pio ./ ${TEST_PLATFORM} restore_configs - echo use_example_configs stm32f103ret6 - use_example_configs stm32f103ret6 + echo use_example_configs STM32/stm32f103ret6 + use_example_configs STM32/stm32f103ret6 build_marlin_pio ./ ${TEST_PLATFORM} restore_configs diff --git a/.travis.yml b/.travis.yml index 18f6e22b7548..06a8a0bae9d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,18 +9,37 @@ notifications: email: false env: - - TEST_PLATFORM="megaatmega2560" + - TEST_PLATFORM="ARMED" + #- TEST_PLATFORM="at90usb1286_cdc" + #- TEST_PLATFORM="at90usb1286_dfu" - TEST_PLATFORM="DUE" + - TEST_PLATFORM="esp32" + - TEST_PLATFORM="fysetc_f6_13" + - TEST_PLATFORM="jgaurora_a5s_a1" + - TEST_PLATFORM="linux_native" - TEST_PLATFORM="LPC1768" - TEST_PLATFORM="LPC1769" + #- TEST_PLATFORM="malyanm200" + - TEST_PLATFORM="megaatmega1280" + - TEST_PLATFORM="megaatmega2560" + #- TEST_PLATFORM="mks_robin" + #- TEST_PLATFORM="mks_robin_lite" + #- TEST_PLATFORM="mks_robin_mini" + #- TEST_PLATFORM="mks_robin_nano" + - TEST_PLATFORM="rambo" + - TEST_PLATFORM="adafruit_grandcentral_m4" + - TEST_PLATFORM="sanguino_atmega1284p" + - TEST_PLATFORM="sanguino_atmega644p" - TEST_PLATFORM="STM32F1" - - TEST_PLATFORM="teensy31" - - TEST_PLATFORM="teensy35" - - TEST_PLATFORM="linux_native" - - TEST_PLATFORM="esp32" + - TEST_PLATFORM="BIGTREE_SKR_MINI" + #- TEST_PLATFORM="fysetc_STM32F1" - TEST_PLATFORM="alfawise_U20" + #- TEST_PLATFORM="STM32F4" - TEST_PLATFORM="black_stm32f407ve" - - TEST_PLATFORM="adafruit_grandcentral_m4" + - TEST_PLATFORM="BIGTREE_SKR_PRO" + #- TEST_PLATFORM="STM32F7" + - TEST_PLATFORM="teensy31" + - TEST_PLATFORM="teensy35" before_install: # diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4438c3d8d305..544ffd204ec2 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -70,13 +70,9 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(V1 Engineering, Ryan, 402)" // Who made the changes. -//#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 "402 " SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + /** * *** VENDORS PLEASE READ *** @@ -89,10 +85,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -372,6 +371,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -410,7 +410,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 999 #define TEMP_SENSOR_1 0 @@ -1574,10 +1574,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2002,6 +2002,20 @@ // packaged with Marlin. Source code for the user interface will need to // be placed in "src/lcd/extensible_ui/lib" // +// Touch-screen LCD for Malyan M200 printers +// +//#define MALYAN_LCD + +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + +// +// Third-party or vendor-customized controller interfaces. +// Sources should be installed in 'src/lcd/extensible_ui'. +// //#define EXTENSIBLE_UI //============================================================================= @@ -2009,7 +2023,7 @@ //============================================================================= // -// MKS Robin 320x240 color display +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define MKS_ROBIN_TFT diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index ca661f21eee2..3ccb6e88ac8f 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -229,9 +229,8 @@ */ //#define USE_CONTROLLER_FAN //MFD: TODO find a good pin and enable it #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -533,10 +532,10 @@ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -726,9 +725,36 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif +#if HAS_LCD_MENU // Include a page of printer information in the LCD Main Menu #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU + // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -752,23 +778,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -801,8 +810,15 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -873,17 +889,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -989,6 +1019,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -997,6 +1028,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety // The hardware watchdog should reset the microcontroller disabling all outputs, @@ -1492,78 +1582,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1676,12 +1779,21 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used for tuning the trigger sensitivity. - * Higher values make the system LESS sensitive. - * Lower value make the system MORE sensitive. - * Too low values can lead to false positives, while too high values will collide the axis without triggering. - * It is advised to set X/Y/Z_HOME_BUMP_MM to 0. - * M914 X/Y/Z to live tune the setting + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) + * + * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. + * + * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** + * Poll the driver through SPI to determine load when homing. + * Removes the need for a wire from DIAG1 to an endstop pin. + * + * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when + * homing and adds a guard period for endstop triggering. */ //#define SENSORLESS_HOMING // TMC2130 only @@ -1695,6 +1807,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 #endif @@ -2028,6 +2141,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2082,6 +2202,13 @@ #define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/Marlin/Makefile b/Marlin/Makefile index 0a47e0a8fc11..05535fed0c01 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -251,6 +251,10 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1141) else ifeq ($(HARDWARE_MOTHERBOARD),1142) # Overlord/Overlord Pro else ifeq ($(HARDWARE_MOTHERBOARD),1143) +# ADIMLab Gantry v1 +else ifeq ($(HARDWARE_MOTHERBOARD),1144) +# ADIMLab Gantry v2 +else ifeq ($(HARDWARE_MOTHERBOARD),1145) # # RAMBo and derivatives @@ -277,42 +281,44 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1205) else ifeq ($(HARDWARE_MOTHERBOARD),1300) # Cartesio CN Controls V12 else ifeq ($(HARDWARE_MOTHERBOARD),1301) -# Cheaptronic v1.0 +# Cartesio CN Controls V15 else ifeq ($(HARDWARE_MOTHERBOARD),1302) -# Cheaptronic v2.0 +# Cheaptronic v1.0 else ifeq ($(HARDWARE_MOTHERBOARD),1303) -# Makerbot Mightyboard Revision E +# Cheaptronic v2.0 else ifeq ($(HARDWARE_MOTHERBOARD),1304) -# Megatronics +# Makerbot Mightyboard Revision E else ifeq ($(HARDWARE_MOTHERBOARD),1305) -# Megatronics v2.0 +# Megatronics else ifeq ($(HARDWARE_MOTHERBOARD),1306) -# Megatronics v3.0 +# Megatronics v2.0 else ifeq ($(HARDWARE_MOTHERBOARD),1307) -# Megatronics v3.1 +# Megatronics v3.0 else ifeq ($(HARDWARE_MOTHERBOARD),1308) -# Megatronics v3.2 +# Megatronics v3.1 else ifeq ($(HARDWARE_MOTHERBOARD),1309) -# Elefu Ra Board (v3) +# Megatronics v3.2 else ifeq ($(HARDWARE_MOTHERBOARD),1310) -# Leapfrog +# Elefu Ra Board (v3) else ifeq ($(HARDWARE_MOTHERBOARD),1311) -# Mega controller +# Leapfrog else ifeq ($(HARDWARE_MOTHERBOARD),1312) -# Geeetech GT2560 Rev B for Mecreator2 +# Mega controller else ifeq ($(HARDWARE_MOTHERBOARD),1313) -# Geeetech GT2560 Rev. A +# Geeetech GT2560 Rev B for Mecreator2 else ifeq ($(HARDWARE_MOTHERBOARD),1314) -# Geeetech GT2560 Rev. A+ (with auto level probe) +# Geeetech GT2560 Rev. A else ifeq ($(HARDWARE_MOTHERBOARD),1315) -# Geeetech GT2560 Rev B for A10(M/D) +# Geeetech GT2560 Rev. A+ (with auto level probe) else ifeq ($(HARDWARE_MOTHERBOARD),1316) -# Geeetech GT2560 Rev B for A20(M/D) +# Geeetech GT2560 Rev B for A10(M/D) else ifeq ($(HARDWARE_MOTHERBOARD),1317) -# Einstart retrofit +# Geeetech GT2560 Rev B for A20(M/D) else ifeq ($(HARDWARE_MOTHERBOARD),1318) -# Wanhao 0ne+ i3 Mini +# Einstart retrofit else ifeq ($(HARDWARE_MOTHERBOARD),1319) +# Wanhao 0ne+ i3 Mini +else ifeq ($(HARDWARE_MOTHERBOARD),1320) # # ATmega1281, ATmega2561 diff --git a/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp b/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp index 7923968fd2ee..55ca669a876f 100644 --- a/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp +++ b/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp @@ -65,7 +65,7 @@ Timer get_pwm_timer(const pin_t pin) { /*n, q*/ 2, 0 }; } - #elif defined TCCR2A + #elif defined(TCCR2A) #if ENABLED(USE_OCR2A_AS_TOP) case TIMER2A: break; // protect TIMER2A case TIMER2B: { diff --git a/Marlin/src/HAL/HAL_DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h b/Marlin/src/HAL/HAL_DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h index f1cdbba29300..b83247415033 100644 --- a/Marlin/src/HAL/HAL_DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h +++ b/Marlin/src/HAL/HAL_DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h @@ -23,6 +23,7 @@ #include "../../../inc/MarlinConfigPre.h" #include "../../shared/Marduino.h" +#include void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index); void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level); diff --git a/Marlin/src/HAL/HAL_DUE/fastio_Due.h b/Marlin/src/HAL/HAL_DUE/fastio_Due.h index 2bcd604ae5fd..a97a944e33f1 100644 --- a/Marlin/src/HAL/HAL_DUE/fastio_Due.h +++ b/Marlin/src/HAL/HAL_DUE/fastio_Due.h @@ -70,7 +70,7 @@ const uint32_t mask = MASK(DIO ## IO ## _PIN); \ if (V) port->PIO_SODR = mask; \ else port->PIO_CODR = mask; \ -} while(0) +}while(0) // Toggle a pin #define _TOGGLE(IO) _WRITE(IO, !READ(IO)) diff --git a/Marlin/src/HAL/HAL_DUE/usb/compiler.h b/Marlin/src/HAL/HAL_DUE/usb/compiler.h index d9ecd3f0fef9..cecdd256f04d 100644 --- a/Marlin/src/HAL/HAL_DUE/usb/compiler.h +++ b/Marlin/src/HAL/HAL_DUE/usb/compiler.h @@ -112,7 +112,7 @@ * \def unused * \brief Marking \a v as a unused parameter or value. */ -#define unused(v) do { (void)(v); } while(0) +#define unused(v) do { (void)(v); }while(0) /** * \def barrier @@ -169,7 +169,7 @@ * heuristics and inline the function no matter how big it thinks it * becomes. */ -#if defined(__CC_ARM) +#ifdef __CC_ARM # define __always_inline __forceinline #elif (defined __GNUC__) #ifdef __always_inline @@ -187,7 +187,7 @@ * This annotation instructs the compiler to ignore its inlining * heuristics and not inline the function. */ -#if defined(__CC_ARM) +#ifdef __CC_ARM # define __no_inline __attribute__((noinline)) #elif (defined __GNUC__) # define __no_inline __attribute__((__noinline__)) @@ -204,7 +204,7 @@ * * \param expr Expression to evaluate and supposed to be nonzero. */ -#if defined(_ASSERT_ENABLE_) +#ifdef _ASSERT_ENABLE_ # if defined(TEST_SUITE_DEFINE_ASSERT_MACRO) // Assert() is defined in unit_test/suite.h # include "unit_test/suite.h" @@ -998,14 +998,14 @@ typedef U8 Byte; //!< 8-bit unsigned integer. #endif // #ifndef __ASSEMBLY__ -#if defined(__ICCARM__) +#ifdef __ICCARM__ #define SHORTENUM __packed #elif defined(__GNUC__) #define SHORTENUM __attribute__((packed)) #endif /* No operation */ -#if defined(__ICCARM__) +#ifdef __ICCARM__ #define nop() __no_operation() #elif defined(__GNUC__) #define nop() (__NOP()) diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp index 85c087971213..96052b88efce 100644 --- a/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp +++ b/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp @@ -27,9 +27,10 @@ #include "../shared/HAL_SPI.h" #include #include "spi_pins.h" -#include "../../core/macros.h" #include +#include "../../core/macros.h" + // ------------------------ // Public Variables // ------------------------ diff --git a/Marlin/src/HAL/HAL_ESP32/web.cpp b/Marlin/src/HAL/HAL_ESP32/web.cpp index b2bb03d714d9..c593fc024216 100644 --- a/Marlin/src/HAL/HAL_ESP32/web.cpp +++ b/Marlin/src/HAL/HAL_ESP32/web.cpp @@ -22,16 +22,18 @@ #ifdef ARDUINO_ARCH_ESP32 +#include +#undef DISABLED // esp32-hal-gpio.h + #include "../../inc/MarlinConfigPre.h" #if ENABLED(WEBSUPPORT) -#include #include "wifi.h" AsyncEventSource events("/events"); // event source (Server-Sent events) -void onNotFound(AsyncWebServerRequest *request){ +void onNotFound(AsyncWebServerRequest *request) { request->send(404); } diff --git a/Marlin/src/HAL/HAL_LINUX/include/Arduino.h b/Marlin/src/HAL/HAL_LINUX/include/Arduino.h index 0d29df466e81..dfe0228ac2a0 100644 --- a/Marlin/src/HAL/HAL_LINUX/include/Arduino.h +++ b/Marlin/src/HAL/HAL_LINUX/include/Arduino.h @@ -49,8 +49,6 @@ typedef uint8_t byte; #define PGM_P const char * // Used for libraries, preprocessor, and constants -#define min(a,b) ((a)<(b)?(a):(b)) -#define max(a,b) ((a)>(b)?(a):(b)) #define abs(x) ((x)>0?(x):-(x)) #ifndef isnan diff --git a/Marlin/src/HAL/HAL_LINUX/include/serial.h b/Marlin/src/HAL/HAL_LINUX/include/serial.h index e21227640448..9098af5ff82d 100644 --- a/Marlin/src/HAL/HAL_LINUX/include/serial.h +++ b/Marlin/src/HAL/HAL_LINUX/include/serial.h @@ -108,11 +108,11 @@ class HalSerial { void flush() { receive_buffer.clear(); } - uint8_t availableForWrite(void){ + uint8_t availableForWrite(void) { return transmit_buffer.free() > 255 ? 255 : (uint8_t)transmit_buffer.free(); } - void flushTX(void){ + void flushTX(void) { if (host_connected) while (transmit_buffer.available()) { /* nada */ } } @@ -142,10 +142,10 @@ class HalSerial { void print_bin(uint32_t value, uint8_t num_digits) { uint32_t mask = 1 << (num_digits -1); for (uint8_t i = 0; i < num_digits; i++) { - if (!(i % 4) && i) write(' '); - if (!(i % 16) && i) write(' '); - if (value & mask) write('1'); - else write('0'); + if (!(i % 4) && i) write(' '); + if (!(i % 16) && i) write(' '); + if (value & mask) write('1'); + else write('0'); value <<= 1; } } diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c b/Marlin/src/HAL/HAL_LPC1768/u8g/LCD_I2C_routines.c similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c rename to Marlin/src/HAL/HAL_LPC1768/u8g/LCD_I2C_routines.c diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/LCD_I2C_routines.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/LCD_I2C_routines.h diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/LCD_defines.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/LCD_defines.h diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h b/Marlin/src/HAL/HAL_LPC1768/u8g/LCD_delay.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/LCD_delay.h diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c b/Marlin/src/HAL/HAL_LPC1768/u8g/LCD_pin_routines.c similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c rename to Marlin/src/HAL/HAL_LPC1768/u8g/LCD_pin_routines.c diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/LCD_pin_routines.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/LCD_pin_routines.h diff --git a/Marlin/src/HAL/HAL_LPC1768/usb_serial.cpp b/Marlin/src/HAL/HAL_LPC1768/usb_serial.cpp index d143bae7098b..c83931745aa3 100644 --- a/Marlin/src/HAL/HAL_LPC1768/usb_serial.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/usb_serial.cpp @@ -1,13 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ + #ifdef TARGET_LPC1768 + #include "../../inc/MarlinConfigPre.h" #if ENABLED(EMERGENCY_PARSER) - #include "../../feature/emergency_parser.h" - EmergencyParser::State emergency_state; - bool CDC_RecvCallback(const char buffer) { - emergency_parser.update(emergency_state, buffer); - return true; - } -#endif // ENABLED(EMERGENCY_PARSER) +#include "../../feature/emergency_parser.h" +EmergencyParser::State emergency_state; +bool CDC_RecvCallback(const char buffer) { + emergency_parser.update(emergency_state, buffer); + return true; +} + +#endif // EMERGENCY_PARSER #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/HAL_SAMD51/Servo_SAMD51.cpp b/Marlin/src/HAL/HAL_SAMD51/Servo_SAMD51.cpp index 16ba8369e986..c4fd2d57bc69 100644 --- a/Marlin/src/HAL/HAL_SAMD51/Servo_SAMD51.cpp +++ b/Marlin/src/HAL/HAL_SAMD51/Servo_SAMD51.cpp @@ -115,12 +115,12 @@ HAL_SERVO_TIMER_ISR() { tc->COUNT16.CC[tcChannel].reg = (uint16_t)(tcCounterValue - 4UL); // at least REFRESH_INTERVAL has elapsed } if (tcChannel == 0) { - SYNC(tc->COUNT16.SYNCBUSY.bit.CC0); + SYNC(tc->COUNT16.SYNCBUSY.bit.CC0); // Clear the interrupt tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0; } else { - SYNC(tc->COUNT16.SYNCBUSY.bit.CC1); + SYNC(tc->COUNT16.SYNCBUSY.bit.CC1); // Clear the interrupt tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC1; } diff --git a/Marlin/src/HAL/HAL_SAMD51/fastio_SAMD51.h b/Marlin/src/HAL/HAL_SAMD51/fastio_SAMD51.h index 93136911f685..ecd9acea44dc 100644 --- a/Marlin/src/HAL/HAL_SAMD51/fastio_SAMD51.h +++ b/Marlin/src/HAL/HAL_SAMD51/fastio_SAMD51.h @@ -243,6 +243,7 @@ #define DIO5_PIN PIN_PC21 #define DIO16_PIN PIN_PC22 #define DIO17_PIN PIN_PC23 + #define DIO88_PIN PIN_PC24 // NEOPIXEL // PORTD #define DIO22_PIN PIN_PD12 #define DIO6_PIN PIN_PD20 diff --git a/Marlin/src/HAL/HAL_SAMD51/inc/SanityCheck.h b/Marlin/src/HAL/HAL_SAMD51/inc/SanityCheck.h index 0d45b28c322a..0f27d8bf355c 100644 --- a/Marlin/src/HAL/HAL_SAMD51/inc/SanityCheck.h +++ b/Marlin/src/HAL/HAL_SAMD51/inc/SanityCheck.h @@ -32,7 +32,7 @@ #endif #if ENABLED(EMERGENCY_PARSER) - #error "EMERGENCY_PARSER is not yet implemented for STM32F4. Disable EMERGENCY_PARSER to continue." + #error "EMERGENCY_PARSER is not yet implemented for SAMD51. Disable EMERGENCY_PARSER to continue." #endif #if ENABLED(SDIO_SUPPORT) diff --git a/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp b/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp index b2df7a16a7f8..ca5a131eecbb 100644 --- a/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp +++ b/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp @@ -22,7 +22,6 @@ */ #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) - #include "../../inc/MarlinConfig.h" #include @@ -73,16 +72,17 @@ void spiInit(uint8_t spiRate) { // Use datarates Marlin uses uint32_t clock; switch (spiRate) { - case SPI_FULL_SPEED: clock = 20000000; break; // 13.9mhz=20000000 6.75mhz=10000000 3.38mhz=5000000 .833mhz=1000000 - case SPI_HALF_SPEED: clock = 5000000; break; - case SPI_QUARTER_SPEED: clock = 2500000; break; - case SPI_EIGHTH_SPEED: clock = 1250000; break; - case SPI_SPEED_5: clock = 625000; break; - case SPI_SPEED_6: clock = 300000; break; - default: - clock = 4000000; // Default from the SPI library + case SPI_FULL_SPEED: clock = 20000000; break; // 13.9mhz=20000000 6.75mhz=10000000 3.38mhz=5000000 .833mhz=1000000 + case SPI_HALF_SPEED: clock = 5000000; break; + case SPI_QUARTER_SPEED: clock = 2500000; break; + case SPI_EIGHTH_SPEED: clock = 1250000; break; + case SPI_SPEED_5: clock = 625000; break; + case SPI_SPEED_6: clock = 300000; break; + default: + clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); + SPI.begin(); } diff --git a/Marlin/src/HAL/HAL_STM32/fastio_STM32.h b/Marlin/src/HAL/HAL_STM32/fastio_STM32.h index 29ddf5faa33a..917ee3a1a630 100644 --- a/Marlin/src/HAL/HAL_STM32/fastio_STM32.h +++ b/Marlin/src/HAL/HAL_STM32/fastio_STM32.h @@ -53,7 +53,7 @@ void FastIO_init(); // Must be called before using fast io macros #define _WRITE(IO, V) do { \ if (V) FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO])) ; \ else FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR = _BV32(STM_PIN(digitalPin[IO])) ; \ - } while(0) + }while(0) #else #define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + (V ? 0 : 16))) #endif diff --git a/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h b/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h index 92d14d027a77..9d9796eabecb 100644 --- a/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h +++ b/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h @@ -145,19 +145,19 @@ uint8_t get_pin_mode(const pin_t Ard_num) { case 'D' : mode_all = GPIOD->MODER; break; #ifdef PE_0 case 'E' : mode_all = GPIOE->MODER; break; - #elif defined (PF_0) + #elif defined(PF_0) case 'F' : mode_all = GPIOF->MODER; break; - #elif defined (PG_0) + #elif defined(PG_0) case 'G' : mode_all = GPIOG->MODER; break; - #elif defined (PH_0) + #elif defined(PH_0) case 'H' : mode_all = GPIOH->MODER; break; - #elif defined (PI_0) + #elif defined(PI_0) case 'I' : mode_all = GPIOI->MODER; break; - #elif defined (PJ_0) + #elif defined(PJ_0) case 'J' : mode_all = GPIOJ->MODER; break; - #elif defined (PK_0) + #elif defined(PK_0) case 'K' : mode_all = GPIOK->MODER; break; - #elif defined (PL_0) + #elif defined(PL_0) case 'L' : mode_all = GPIOL->MODER; break; #endif } @@ -189,7 +189,7 @@ void port_print(const pin_t Ard_num) { for (Index = 0; Index < NUMBER_PINS_TOTAL; Index++) if (Ard_num == GET_PIN_MAP_PIN_M43(Index)) break; - char * const ppa = pin_xref[Index].Port_pin_alpha; + const char * ppa = pin_xref[Index].Port_pin_alpha; sprintf_P(buffer, PSTR("%s"), ppa); SERIAL_ECHO(buffer); if (ppa[3] == '\0') SERIAL_CHAR(' '); diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp index 17457343d0ab..1af050e20323 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp @@ -93,7 +93,7 @@ uint16_t HAL_adc_result; // ------------------------ STM32ADC adc(ADC1); -uint8_t adc_pins[] = { +const uint8_t adc_pins[] = { #if HAS_TEMP_ADC_0 TEMP_0_PIN, #endif @@ -270,7 +270,7 @@ void HAL_adc_init(void) { #else adc.setSampleRate(ADC_SMPR_41_5); // 41.5 ADC cycles #endif - adc.setPins(adc_pins, ADC_PIN_COUNT); + adc.setPins((uint8_t *)adc_pins, ADC_PIN_COUNT); adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), nullptr); adc.setScanMode(); adc.setContinuous(); diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp index 5acae7bf9153..4b8177addb4c 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp @@ -33,7 +33,7 @@ #ifdef __STM32F1__ #include "../../inc/MarlinConfig.h" -#include +#include "SPI.h" // ------------------------ // Public functions diff --git a/Marlin/src/HAL/HAL_STM32F1/SPI.cpp b/Marlin/src/HAL/HAL_STM32F1/SPI.cpp new file mode 100644 index 000000000000..a869951034cf --- /dev/null +++ b/Marlin/src/HAL/HAL_STM32F1/SPI.cpp @@ -0,0 +1,738 @@ +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2010 Perry Hung. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + *****************************************************************************/ + +/** + * @author Marti Bolivar + * @brief Wirish SPI implementation. + */ + +#ifdef __STM32F1__ + +#include "SPI.h" + +#include +#include +#include + +#include +#include + +/** Time in ms for DMA receive timeout */ +#define DMA_TIMEOUT 100 + +#if CYCLES_PER_MICROSECOND != 72 + #warning "Unexpected clock speed; SPI frequency calculation will be incorrect" +#endif + +struct spi_pins { uint8_t nss, sck, miso, mosi; }; + +static const spi_pins* dev_to_spi_pins(spi_dev *dev); +static void configure_gpios(spi_dev *dev, bool as_master); +static spi_baud_rate determine_baud_rate(spi_dev *dev, uint32_t freq); + +#if (BOARD_NR_SPI >= 3) && !defined(STM32_HIGH_DENSITY) + #error "The SPI library is misconfigured: 3 SPI ports only available on high density STM32 devices" +#endif + +static const spi_pins board_spi_pins[] __FLASH__ = { + #if BOARD_NR_SPI >= 1 + { BOARD_SPI1_NSS_PIN, + BOARD_SPI1_SCK_PIN, + BOARD_SPI1_MISO_PIN, + BOARD_SPI1_MOSI_PIN }, + #endif + #if BOARD_NR_SPI >= 2 + { BOARD_SPI2_NSS_PIN, + BOARD_SPI2_SCK_PIN, + BOARD_SPI2_MISO_PIN, + BOARD_SPI2_MOSI_PIN }, + #endif + #if BOARD_NR_SPI >= 3 + { BOARD_SPI3_NSS_PIN, + BOARD_SPI3_SCK_PIN, + BOARD_SPI3_MISO_PIN, + BOARD_SPI3_MOSI_PIN }, + #endif +}; + +#if BOARD_NR_SPI >= 1 + static void *_spi1_this; +#endif +#if BOARD_NR_SPI >= 2 + static void *_spi2_this; +#endif +#if BOARD_NR_SPI >= 3 + static void *_spi3_this; +#endif + +/** + * Constructor + */ +SPIClass::SPIClass(uint32_t spi_num) { + _currentSetting = &_settings[spi_num - 1]; // SPI channels are called 1 2 and 3 but the array is zero indexed + + switch (spi_num) { + #if BOARD_NR_SPI >= 1 + case 1: + _currentSetting->spi_d = SPI1; + _spi1_this = (void*)this; + break; + #endif + #if BOARD_NR_SPI >= 2 + case 2: + _currentSetting->spi_d = SPI2; + _spi2_this = (void*)this; + break; + #endif + #if BOARD_NR_SPI >= 3 + case 3: + _currentSetting->spi_d = SPI3; + _spi3_this = (void*)this; + break; + #endif + default: ASSERT(0); + } + + // Init things specific to each SPI device + // clock divider setup is a bit of hack, and needs to be improved at a later date. + #if BOARD_NR_SPI >= 1 + _settings[0].spi_d = SPI1; + _settings[0].clockDivider = determine_baud_rate(_settings[0].spi_d, _settings[0].clock); + _settings[0].spiDmaDev = DMA1; + _settings[0].spiTxDmaChannel = DMA_CH3; + _settings[0].spiRxDmaChannel = DMA_CH2; + #endif + #if BOARD_NR_SPI >= 2 + _settings[1].spi_d = SPI2; + _settings[1].clockDivider = determine_baud_rate(_settings[1].spi_d, _settings[1].clock); + _settings[1].spiDmaDev = DMA1; + _settings[1].spiTxDmaChannel = DMA_CH5; + _settings[1].spiRxDmaChannel = DMA_CH4; + #endif + #if BOARD_NR_SPI >= 3 + _settings[2].spi_d = SPI3; + _settings[2].clockDivider = determine_baud_rate(_settings[2].spi_d, _settings[2].clock); + _settings[2].spiDmaDev = DMA2; + _settings[2].spiTxDmaChannel = DMA_CH2; + _settings[2].spiRxDmaChannel = DMA_CH1; + #endif + + // added for DMA callbacks. + _currentSetting->state = SPI_STATE_IDLE; +} + +/** + * Set up/tear down + */ +void SPIClass::updateSettings() { + uint32_t flags = ((_currentSetting->bitOrder == MSBFIRST ? SPI_FRAME_MSB : SPI_FRAME_LSB) | _currentSetting->dataSize | SPI_SW_SLAVE | SPI_SOFT_SS); + spi_master_enable(_currentSetting->spi_d, (spi_baud_rate)_currentSetting->clockDivider, (spi_mode)_currentSetting->dataMode, flags); +} + +void SPIClass::begin() { + spi_init(_currentSetting->spi_d); + configure_gpios(_currentSetting->spi_d, 1); + updateSettings(); + // added for DMA callbacks. + _currentSetting->state = SPI_STATE_READY; +} + +void SPIClass::beginSlave() { + spi_init(_currentSetting->spi_d); + configure_gpios(_currentSetting->spi_d, 0); + uint32_t flags = ((_currentSetting->bitOrder == MSBFIRST ? SPI_FRAME_MSB : SPI_FRAME_LSB) | _currentSetting->dataSize); + spi_slave_enable(_currentSetting->spi_d, (spi_mode)_currentSetting->dataMode, flags); + // added for DMA callbacks. + _currentSetting->state = SPI_STATE_READY; +} + +void SPIClass::end() { + if (!spi_is_enabled(_currentSetting->spi_d)) return; + + // Follows RM0008's sequence for disabling a SPI in master/slave + // full duplex mode. + while (spi_is_rx_nonempty(_currentSetting->spi_d)) { + // FIXME [0.1.0] remove this once you have an interrupt based driver + volatile uint16_t rx __attribute__((unused)) = spi_rx_reg(_currentSetting->spi_d); + } + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } + + spi_peripheral_disable(_currentSetting->spi_d); + // added for DMA callbacks. + // Need to add unsetting the callbacks for the DMA channels. + _currentSetting->state = SPI_STATE_IDLE; +} + +/* Roger Clark added 3 functions */ +void SPIClass::setClockDivider(uint32_t clockDivider) { + _currentSetting->clockDivider = clockDivider; + uint32_t cr1 = _currentSetting->spi_d->regs->CR1 & ~(SPI_CR1_BR); + _currentSetting->spi_d->regs->CR1 = cr1 | (clockDivider & SPI_CR1_BR); +} + +void SPIClass::setBitOrder(BitOrder bitOrder) { + _currentSetting->bitOrder = bitOrder; + uint32_t cr1 = _currentSetting->spi_d->regs->CR1 & ~(SPI_CR1_LSBFIRST); + if (bitOrder == LSBFIRST) cr1 |= SPI_CR1_LSBFIRST; + _currentSetting->spi_d->regs->CR1 = cr1; +} + +/** + * Victor Perez. Added to test changing datasize from 8 to 16 bit modes on the fly. + * Input parameter should be SPI_CR1_DFF set to 0 or 1 on a 32bit word. + */ +void SPIClass::setDataSize(uint32_t datasize) { + _currentSetting->dataSize = datasize; + uint32_t cr1 = _currentSetting->spi_d->regs->CR1 & ~(SPI_CR1_DFF); + uint8_t en = spi_is_enabled(_currentSetting->spi_d); + spi_peripheral_disable(_currentSetting->spi_d); + _currentSetting->spi_d->regs->CR1 = cr1 | (datasize & SPI_CR1_DFF) | en; +} + +void SPIClass::setDataMode(uint8_t dataMode) { + /* + Notes: + As far as we know the AVR numbers for dataMode match the numbers required by the STM32. + From the AVR doc http://www.atmel.com/images/doc2585.pdf section 2.4 + + SPI Mode CPOL CPHA Shift SCK-edge Capture SCK-edge + 0 0 0 Falling Rising + 1 0 1 Rising Falling + 2 1 0 Rising Falling + 3 1 1 Falling Rising + + On the STM32 it appears to be + + bit 1 - CPOL : Clock polarity + (This bit should not be changed when communication is ongoing) + 0 : CLK to 0 when idle + 1 : CLK to 1 when idle + + bit 0 - CPHA : Clock phase + (This bit should not be changed when communication is ongoing) + 0 : The first clock transition is the first data capture edge + 1 : The second clock transition is the first data capture edge + + If someone finds this is not the case or sees a logic error with this let me know ;-) + */ + _currentSetting->dataMode = dataMode; + uint32_t cr1 = _currentSetting->spi_d->regs->CR1 & ~(SPI_CR1_CPOL|SPI_CR1_CPHA); + _currentSetting->spi_d->regs->CR1 = cr1 | (dataMode & (SPI_CR1_CPOL|SPI_CR1_CPHA)); +} + +void SPIClass::beginTransaction(uint8_t pin, SPISettings settings) { + setBitOrder(settings.bitOrder); + setDataMode(settings.dataMode); + setDataSize(settings.dataSize); + setClockDivider(determine_baud_rate(_currentSetting->spi_d, settings.clock)); + begin(); +} + +void SPIClass::beginTransactionSlave(SPISettings settings) { + setBitOrder(settings.bitOrder); + setDataMode(settings.dataMode); + setDataSize(settings.dataSize); + beginSlave(); +} + +void SPIClass::endTransaction() { } + +/** + * I/O + */ + +uint16_t SPIClass::read() { + while (!spi_is_rx_nonempty(_currentSetting->spi_d)) { /* nada */ } + return (uint16)spi_rx_reg(_currentSetting->spi_d); +} + +void SPIClass::read(uint8_t *buf, uint32_t len) { + if (len == 0) return; + spi_rx_reg(_currentSetting->spi_d); // clear the RX buffer in case a byte is waiting on it. + spi_reg_map * regs = _currentSetting->spi_d->regs; + // start sequence: write byte 0 + regs->DR = 0x00FF; // write the first byte + // main loop + while (--len) { + while(!(regs->SR & SPI_SR_TXE)) { /* nada */ } // wait for TXE flag + noInterrupts(); // go atomic level - avoid interrupts to surely get the previously received data + regs->DR = 0x00FF; // write the next data item to be transmitted into the SPI_DR register. This clears the TXE flag. + while (!(regs->SR & SPI_SR_RXNE)) { /* nada */ } // wait till data is available in the DR register + *buf++ = (uint8)(regs->DR); // read and store the received byte. This clears the RXNE flag. + interrupts(); // let systick do its job + } + // read remaining last byte + while (!(regs->SR & SPI_SR_RXNE)) { /* nada */ } // wait till data is available in the Rx register + *buf++ = (uint8)(regs->DR); // read and store the received byte +} + +void SPIClass::write(uint16_t data) { + /* Added for 16bit data Victor Perez. Roger Clark + * Improved speed by just directly writing the single byte to the SPI data reg and wait for completion, + * by taking the Tx code from transfer(byte) + * This almost doubles the speed of this function. + */ + spi_tx_reg(_currentSetting->spi_d, data); // write the data to be transmitted into the SPI_DR register (this clears the TXE flag) + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } // "... and then wait until BSY=0 before disabling the SPI." +} + +void SPIClass::write16(uint16_t data) { + // Added by stevestrong: write two consecutive bytes in 8 bit mode (DFF=0) + spi_tx_reg(_currentSetting->spi_d, data>>8); // write high byte + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // Wait until TXE=1 + spi_tx_reg(_currentSetting->spi_d, data); // write low byte + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // Wait until TXE=1 + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } // wait until BSY=0 +} + +void SPIClass::write(uint16_t data, uint32_t n) { + // Added by stevstrong: Repeatedly send same data by the specified number of times + spi_reg_map * regs = _currentSetting->spi_d->regs; + while (n--) { + regs->DR = data; // write the data to be transmitted into the SPI_DR register (this clears the TXE flag) + while (!(regs->SR & SPI_SR_TXE)) { /* nada */ } // wait till Tx empty + } + while (regs->SR & SPI_SR_BSY) { /* nada */ } // wait until BSY=0 before returning +} + +void SPIClass::write(const void *data, uint32_t length) { + spi_dev * spi_d = _currentSetting->spi_d; + spi_tx(spi_d, data, length); // data can be array of bytes or words + while (!spi_is_tx_empty(spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(spi_d)) { /* nada */ } // "... and then wait until BSY=0 before disabling the SPI." +} + +uint8_t SPIClass::transfer(uint8_t byte) const { + spi_dev * spi_d = _currentSetting->spi_d; + spi_rx_reg(spi_d); // read any previous data + spi_tx_reg(spi_d, byte); // Write the data item to be transmitted into the SPI_DR register + while (!spi_is_tx_empty(spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(spi_d)) { /* nada */ } // "... and then wait until BSY=0 before disabling the SPI." + return (uint8)spi_rx_reg(spi_d); // "... and read the last received data." +} + +uint16_t SPIClass::transfer16(uint16_t data) const { + // Modified by stevestrong: write & read two consecutive bytes in 8 bit mode (DFF=0) + // This is more effective than two distinct byte transfers + spi_dev * spi_d = _currentSetting->spi_d; + spi_rx_reg(spi_d); // read any previous data + spi_tx_reg(spi_d, data>>8); // write high byte + while (!spi_is_tx_empty(spi_d)) { /* nada */ } // wait until TXE=1 + while (spi_is_busy(spi_d)) { /* nada */ } // wait until BSY=0 + uint16_t ret = spi_rx_reg(spi_d)<<8; // read and shift high byte + spi_tx_reg(spi_d, data); // write low byte + while (!spi_is_tx_empty(spi_d)) { /* nada */ } // wait until TXE=1 + while (spi_is_busy(spi_d)) { /* nada */ } // wait until BSY=0 + ret += spi_rx_reg(spi_d); // read low byte + return ret; +} + +/** + * Roger Clark and Victor Perez, 2015 + * Performs a DMA SPI transfer with at least a receive buffer. + * If a TX buffer is not provided, FF is sent over and over for the lenght of the transfer. + * On exit TX buffer is not modified, and RX buffer cotains the received data. + * Still in progress. + */ +void SPIClass::dmaTransferSet(const void *transmitBuf, void *receiveBuf) { + dma_init(_currentSetting->spiDmaDev); + //spi_rx_dma_enable(_currentSetting->spi_d); + //spi_tx_dma_enable(_currentSetting->spi_d); + dma_xfer_size dma_bit_size = (_currentSetting->dataSize==DATA_SIZE_16BIT) ? DMA_SIZE_16BITS : DMA_SIZE_8BITS; + dma_setup_transfer(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel, &_currentSetting->spi_d->regs->DR, + dma_bit_size, receiveBuf, dma_bit_size, (DMA_MINC_MODE | DMA_TRNS_CMPLT ));// receive buffer DMA + if (!transmitBuf) { + transmitBuf = &ff; + dma_setup_transfer(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &_currentSetting->spi_d->regs->DR, + dma_bit_size, (volatile void*)transmitBuf, dma_bit_size, (DMA_FROM_MEM));// Transmit FF repeatedly + } + else { + dma_setup_transfer(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &_currentSetting->spi_d->regs->DR, + dma_bit_size, (volatile void*)transmitBuf, dma_bit_size, (DMA_MINC_MODE | DMA_FROM_MEM ));// Transmit buffer DMA + } + dma_set_priority(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, DMA_PRIORITY_LOW); + dma_set_priority(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel, DMA_PRIORITY_VERY_HIGH); +} + +uint8_t SPIClass::dmaTransferRepeat(uint16_t length) { + if (length == 0) return 0; + if (spi_is_rx_nonempty(_currentSetting->spi_d) == 1) spi_rx_reg(_currentSetting->spi_d); + _currentSetting->state = SPI_STATE_TRANSFER; + dma_set_num_transfers(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel, length); + dma_set_num_transfers(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, length); + dma_enable(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel);// enable receive + dma_enable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel);// enable transmit + spi_rx_dma_enable(_currentSetting->spi_d); + spi_tx_dma_enable(_currentSetting->spi_d); + if (_currentSetting->receiveCallback) + return 0; + + //uint32_t m = millis(); + uint8_t b = 0; + uint32_t m = millis(); + while (!(dma_get_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel) & DMA_ISR_TCIF1)) { + // Avoid interrupts and just loop waiting for the flag to be set. + if ((millis() - m) > DMA_TIMEOUT) { b = 2; break; } + } + + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } // "... and then wait until BSY=0 before disabling the SPI." + spi_tx_dma_disable(_currentSetting->spi_d); + spi_rx_dma_disable(_currentSetting->spi_d); + dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel); + dma_clear_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel); + dma_clear_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + _currentSetting->state = SPI_STATE_READY; + return b; +} + +/** + * Roger Clark and Victor Perez, 2015 + * Performs a DMA SPI transfer with at least a receive buffer. + * If a TX buffer is not provided, FF is sent over and over for the length of the transfer. + * On exit TX buffer is not modified, and RX buffer contains the received data. + * Still in progress. + */ +uint8_t SPIClass::dmaTransfer(const void *transmitBuf, void *receiveBuf, uint16_t length) { + dmaTransferSet(transmitBuf, receiveBuf); + return dmaTransferRepeat(length); +} + +/** + * Roger Clark and Victor Perez, 2015 + * Performs a DMA SPI send using a TX buffer. + * On exit TX buffer is not modified. + * Still in progress. + * 2016 - stevstrong - reworked to automatically detect bit size from SPI setting + */ +void SPIClass::dmaSendSet(const void * transmitBuf, bool minc) { + uint32_t flags = ( (DMA_MINC_MODE*minc) | DMA_FROM_MEM | DMA_TRNS_CMPLT); + dma_init(_currentSetting->spiDmaDev); + dma_xfer_size dma_bit_size = (_currentSetting->dataSize==DATA_SIZE_16BIT) ? DMA_SIZE_16BITS : DMA_SIZE_8BITS; + dma_setup_transfer(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &_currentSetting->spi_d->regs->DR, dma_bit_size, + (volatile void*)transmitBuf, dma_bit_size, flags);// Transmit buffer DMA + dma_set_priority(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, DMA_PRIORITY_LOW); +} + +uint8_t SPIClass::dmaSendRepeat(uint16_t length) { + if (length == 0) return 0; + + dma_clear_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + dma_set_num_transfers(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, length); + _currentSetting->state = SPI_STATE_TRANSMIT; + dma_enable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); // enable transmit + spi_tx_dma_enable(_currentSetting->spi_d); + if (_currentSetting->transmitCallback) return 0; + + uint32_t m = millis(); + uint8_t b = 0; + while (!(dma_get_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel) & DMA_ISR_TCIF1)) { + // Avoid interrupts and just loop waiting for the flag to be set. + if ((millis() - m) > DMA_TIMEOUT) { b = 2; break; } + } + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } // "... and then wait until BSY=0 before disabling the SPI." + spi_tx_dma_disable(_currentSetting->spi_d); + dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + dma_clear_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + _currentSetting->state = SPI_STATE_READY; + return b; +} + +uint8_t SPIClass::dmaSend(const void * transmitBuf, uint16_t length, bool minc) { + dmaSendSet(transmitBuf, minc); + return dmaSendRepeat(length); +} + +uint8_t SPIClass::dmaSendAsync(const void * transmitBuf, uint16_t length, bool minc) { + uint8_t b = 0; + + if (_currentSetting->state != SPI_STATE_READY) { + uint32_t m = millis(); + while (!(dma_get_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel) & DMA_ISR_TCIF1)) { + //Avoid interrupts and just loop waiting for the flag to be set. + //delayMicroseconds(10); + if ((millis() - m) > DMA_TIMEOUT) { b = 2; break; } + } + + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } // "... and then wait until BSY=0 before disabling the SPI." + spi_tx_dma_disable(_currentSetting->spi_d); + dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + _currentSetting->state = SPI_STATE_READY; + } + + if (length == 0) return 0; + uint32_t flags = ( (DMA_MINC_MODE*minc) | DMA_FROM_MEM | DMA_TRNS_CMPLT); + + dma_init(_currentSetting->spiDmaDev); + // TX + dma_xfer_size dma_bit_size = (_currentSetting->dataSize==DATA_SIZE_16BIT) ? DMA_SIZE_16BITS : DMA_SIZE_8BITS; + dma_setup_transfer(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &_currentSetting->spi_d->regs->DR, + dma_bit_size, (volatile void*)transmitBuf, dma_bit_size, flags);// Transmit buffer DMA + dma_set_num_transfers(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, length); + dma_clear_isr_bits(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + dma_enable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel);// enable transmit + spi_tx_dma_enable(_currentSetting->spi_d); + + _currentSetting->state = SPI_STATE_TRANSMIT; + return b; +} + + +/** + * New functions added to manage callbacks. + * Victor Perez 2017 + */ +void SPIClass::onReceive(void(*callback)(void)) { + _currentSetting->receiveCallback = callback; + if (callback) { + switch (_currentSetting->spi_d->clk_id) { + #if BOARD_NR_SPI >= 1 + case RCC_SPI1: + dma_attach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel, &SPIClass::_spi1EventCallback); + break; + #endif + #if BOARD_NR_SPI >= 2 + case RCC_SPI2: + dma_attach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel, &SPIClass::_spi2EventCallback); + break; + #endif + #if BOARD_NR_SPI >= 3 + case RCC_SPI3: + dma_attach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel, &SPIClass::_spi3EventCallback); + break; + #endif + default: + ASSERT(0); + } + } + else { + dma_detach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel); + } +} + +void SPIClass::onTransmit(void(*callback)(void)) { + _currentSetting->transmitCallback = callback; + if (callback) { + switch (_currentSetting->spi_d->clk_id) { + #if BOARD_NR_SPI >= 1 + case RCC_SPI1: + dma_attach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &SPIClass::_spi1EventCallback); + break; + #endif + #if BOARD_NR_SPI >= 2 + case RCC_SPI2: + dma_attach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &SPIClass::_spi2EventCallback); + break; + #endif + #if BOARD_NR_SPI >= 3 + case RCC_SPI3: + dma_attach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel, &SPIClass::_spi3EventCallback); + break; + #endif + default: + ASSERT(0); + } + } + else { + dma_detach_interrupt(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + } +} + +/** + * TODO: check if better to first call the customer code, next disable the DMA requests. + * Also see if we need to check whether callbacks are set or not, may be better to be checked + * during the initial setup and only set the callback to EventCallback if they are set. + */ +void SPIClass::EventCallback() { + while (!spi_is_tx_empty(_currentSetting->spi_d)) { /* nada */ } // "5. Wait until TXE=1 ..." + while (spi_is_busy(_currentSetting->spi_d)) { /* nada */ } // "... and then wait until BSY=0" + switch (_currentSetting->state) { + case SPI_STATE_TRANSFER: + while (spi_is_rx_nonempty(_currentSetting->spi_d)) { /* nada */ } + _currentSetting->state = SPI_STATE_READY; + spi_tx_dma_disable(_currentSetting->spi_d); + spi_rx_dma_disable(_currentSetting->spi_d); + //dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + //dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiRxDmaChannel); + if (_currentSetting->receiveCallback) + _currentSetting->receiveCallback(); + break; + case SPI_STATE_TRANSMIT: + _currentSetting->state = SPI_STATE_READY; + spi_tx_dma_disable(_currentSetting->spi_d); + //dma_disable(_currentSetting->spiDmaDev, _currentSetting->spiTxDmaChannel); + if (_currentSetting->transmitCallback) + _currentSetting->transmitCallback(); + break; + default: + break; + } +} + +void SPIClass::attachInterrupt() { + // Should be enableInterrupt() +} + +void SPIClass::detachInterrupt() { + // Should be disableInterrupt() +} + +/* + * Pin accessors + */ + +uint8_t SPIClass::misoPin() { + return dev_to_spi_pins(_currentSetting->spi_d)->miso; +} + +uint8_t SPIClass::mosiPin() { + return dev_to_spi_pins(_currentSetting->spi_d)->mosi; +} + +uint8_t SPIClass::sckPin() { + return dev_to_spi_pins(_currentSetting->spi_d)->sck; +} + +uint8_t SPIClass::nssPin() { + return dev_to_spi_pins(_currentSetting->spi_d)->nss; +} + +/* + * Deprecated functions + */ + +uint8_t SPIClass::send(uint8_t data) { + this->write(data); + return 1; +} + +uint8_t SPIClass::send(uint8_t *buf, uint32_t len) { + this->write(buf, len); + return len; +} + +uint8_t SPIClass::recv() { + return this->read(); +} + +/* + * DMA call back functions, one per port. + */ +#if BOARD_NR_SPI >= 1 + void SPIClass::_spi1EventCallback() { + reinterpret_cast(_spi1_this)->EventCallback(); + } +#endif +#if BOARD_NR_SPI >= 2 + void SPIClass::_spi2EventCallback() { + reinterpret_cast(_spi2_this)->EventCallback(); + } +#endif +#if BOARD_NR_SPI >= 3 + void SPIClass::_spi3EventCallback() { + reinterpret_cast(_spi3_this)->EventCallback(); + } +#endif + +/* + * Auxiliary functions + */ +static const spi_pins* dev_to_spi_pins(spi_dev *dev) { + switch (dev->clk_id) { + #if BOARD_NR_SPI >= 1 + case RCC_SPI1: return board_spi_pins; + #endif + #if BOARD_NR_SPI >= 2 + case RCC_SPI2: return board_spi_pins + 1; + #endif + #if BOARD_NR_SPI >= 3 + case RCC_SPI3: return board_spi_pins + 2; + #endif + default: return NULL; + } +} + +static void disable_pwm(const stm32_pin_info *i) { + if (i->timer_device) + timer_set_mode(i->timer_device, i->timer_channel, TIMER_DISABLED); +} + +static void configure_gpios(spi_dev *dev, bool as_master) { + const spi_pins *pins = dev_to_spi_pins(dev); + if (!pins) return; + + const stm32_pin_info *nssi = &PIN_MAP[pins->nss], + *scki = &PIN_MAP[pins->sck], + *misoi = &PIN_MAP[pins->miso], + *mosii = &PIN_MAP[pins->mosi]; + + disable_pwm(nssi); + disable_pwm(scki); + disable_pwm(misoi); + disable_pwm(mosii); + + spi_config_gpios(dev, as_master, nssi->gpio_device, nssi->gpio_bit, + scki->gpio_device, scki->gpio_bit, misoi->gpio_bit, + mosii->gpio_bit); +} + +static const spi_baud_rate baud_rates[8] __FLASH__ = { + SPI_BAUD_PCLK_DIV_2, + SPI_BAUD_PCLK_DIV_4, + SPI_BAUD_PCLK_DIV_8, + SPI_BAUD_PCLK_DIV_16, + SPI_BAUD_PCLK_DIV_32, + SPI_BAUD_PCLK_DIV_64, + SPI_BAUD_PCLK_DIV_128, + SPI_BAUD_PCLK_DIV_256, +}; + +/** + * Note: This assumes you're on a LeafLabs-style board + * (CYCLES_PER_MICROSECOND == 72, APB2 at 72MHz, APB1 at 36MHz). + */ +static spi_baud_rate determine_baud_rate(spi_dev *dev, uint32_t freq) { + uint32_t clock = 0; + switch (rcc_dev_clk(dev->clk_id)) { + case RCC_AHB: + case RCC_APB2: clock = STM32_PCLK2; break; // 72 Mhz + case RCC_APB1: clock = STM32_PCLK1; break; // 36 Mhz + } + clock >>= 1; + + uint8_t i = 0; + while (i < 7 && freq < clock) { clock >>= 1; i++; } + return baud_rates[i]; +} + +SPIClass SPI(1); + +#endif // __STM32F1__ diff --git a/Marlin/src/HAL/HAL_STM32F1/SPI.h b/Marlin/src/HAL/HAL_STM32F1/SPI.h new file mode 100644 index 000000000000..1e77bf106610 --- /dev/null +++ b/Marlin/src/HAL/HAL_STM32F1/SPI.h @@ -0,0 +1,409 @@ +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2010 Perry Hung. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + *****************************************************************************/ +#pragma once + +#include +#include +#include + +#include +#include +#include + +// SPI_HAS_TRANSACTION means SPI has +// - beginTransaction() +// - endTransaction() +// - usingInterrupt() +// - SPISetting(clock, bitOrder, dataMode) +//#define SPI_HAS_TRANSACTION + +#define SPI_CLOCK_DIV2 SPI_BAUD_PCLK_DIV_2 +#define SPI_CLOCK_DIV4 SPI_BAUD_PCLK_DIV_4 +#define SPI_CLOCK_DIV8 SPI_BAUD_PCLK_DIV_8 +#define SPI_CLOCK_DIV16 SPI_BAUD_PCLK_DIV_16 +#define SPI_CLOCK_DIV32 SPI_BAUD_PCLK_DIV_32 +#define SPI_CLOCK_DIV64 SPI_BAUD_PCLK_DIV_64 +#define SPI_CLOCK_DIV128 SPI_BAUD_PCLK_DIV_128 +#define SPI_CLOCK_DIV256 SPI_BAUD_PCLK_DIV_256 + +/* + * Roger Clark. 20150106 + * Commented out redundant AVR defined + * +#define SPI_MODE_MASK 0x0C // CPOL = bit 3, CPHA = bit 2 on SPCR +#define SPI_CLOCK_MASK 0x03 // SPR1 = bit 1, SPR0 = bit 0 on SPCR +#define SPI_2XCLOCK_MASK 0x01 // SPI2X = bit 0 on SPSR + +// define SPI_AVR_EIMSK for AVR boards with external interrupt pins +#if defined(EIMSK) + #define SPI_AVR_EIMSK EIMSK +#elif defined(GICR) + #define SPI_AVR_EIMSK GICR +#elif defined(GIMSK) + #define SPI_AVR_EIMSK GIMSK +#endif +*/ + +#ifndef STM32_LSBFIRST + #define STM32_LSBFIRST 0 +#endif +#ifndef STM32_MSBFIRST + #define STM32_MSBFIRST 1 +#endif + +// PC13 or PA4 +#define BOARD_SPI_DEFAULT_SS PA4 +//#define BOARD_SPI_DEFAULT_SS PC13 + +#define SPI_MODE0 SPI_MODE_0 +#define SPI_MODE1 SPI_MODE_1 +#define SPI_MODE2 SPI_MODE_2 +#define SPI_MODE3 SPI_MODE_3 + +#define DATA_SIZE_8BIT SPI_CR1_DFF_8_BIT +#define DATA_SIZE_16BIT SPI_CR1_DFF_16_BIT + +typedef enum { + SPI_STATE_IDLE, + SPI_STATE_READY, + SPI_STATE_RECEIVE, + SPI_STATE_TRANSMIT, + SPI_STATE_TRANSFER +} spi_mode_t; + +class SPISettings { +public: + SPISettings(uint32_t clock, BitOrder bitOrder, uint8_t dataMode) { + if (__builtin_constant_p(clock)) + init_AlwaysInline(clock, bitOrder, dataMode, DATA_SIZE_8BIT); + else + init_MightInline(clock, bitOrder, dataMode, DATA_SIZE_8BIT); + } + SPISettings(uint32_t clock, BitOrder bitOrder, uint8_t dataMode, uint32_t dataSize) { + if (__builtin_constant_p(clock)) + init_AlwaysInline(clock, bitOrder, dataMode, dataSize); + else + init_MightInline(clock, bitOrder, dataMode, dataSize); + } + SPISettings(uint32_t clock) { + if (__builtin_constant_p(clock)) + init_AlwaysInline(clock, MSBFIRST, SPI_MODE0, DATA_SIZE_8BIT); + else + init_MightInline(clock, MSBFIRST, SPI_MODE0, DATA_SIZE_8BIT); + } + SPISettings() { + init_AlwaysInline(4000000, MSBFIRST, SPI_MODE0, DATA_SIZE_8BIT); + } +private: + void init_MightInline(uint32_t clock, BitOrder bitOrder, uint8_t dataMode, uint32_t dataSize) { + init_AlwaysInline(clock, bitOrder, dataMode, dataSize); + } + void init_AlwaysInline(uint32_t clock, BitOrder bitOrder, uint8_t dataMode, uint32_t dataSize) __attribute__((__always_inline__)) { + this->clock = clock; + this->bitOrder = bitOrder; + this->dataMode = dataMode; + this->dataSize = dataSize; + } + uint32_t clock; + uint32_t dataSize; + uint32_t clockDivider; + BitOrder bitOrder; + uint8_t dataMode; + uint8_t _SSPin; + volatile spi_mode_t state; + spi_dev *spi_d; + dma_channel spiRxDmaChannel, spiTxDmaChannel; + dma_dev* spiDmaDev; + void (*receiveCallback)(void) = NULL; + void (*transmitCallback)(void) = NULL; + + friend class SPIClass; +}; + +/* + * Kept for compat. + */ +static const uint8_t ff = 0xFF; + +/** + * @brief Wirish SPI interface. + * + * This implementation uses software slave management, so the caller + * is responsible for controlling the slave select line. + */ +class SPIClass { + +public: + /** + * @param spiPortNumber Number of the SPI port to manage. + */ + SPIClass(uint32_t spiPortNumber); + + /** + * @brief Equivalent to begin(SPI_1_125MHZ, MSBFIRST, 0). + */ + void begin(); + + /** + * @brief Turn on a SPI port and set its GPIO pin modes for use as a slave. + * + * SPI port is enabled in full duplex mode, with software slave management. + * + * @param bitOrder Either LSBFIRST (little-endian) or MSBFIRST(big-endian) + * @param mode SPI mode to use + */ + void beginSlave(uint32_t bitOrder, uint32_t mode); + + /** + * @brief Equivalent to beginSlave(MSBFIRST, 0). + */ + void beginSlave(); + + /** + * @brief Disables the SPI port, but leaves its GPIO pin modes unchanged. + */ + void end(); + + void beginTransaction(SPISettings settings) { beginTransaction(BOARD_SPI_DEFAULT_SS, settings); } + void beginTransaction(uint8_t pin, SPISettings settings); + void endTransaction(); + + void beginTransactionSlave(SPISettings settings); + + void setClockDivider(uint32_t clockDivider); + void setBitOrder(BitOrder bitOrder); + void setDataMode(uint8_t dataMode); + + // SPI Configuration methods + void attachInterrupt(); + void detachInterrupt(); + + /* Victor Perez. Added to change datasize from 8 to 16 bit modes on the fly. + * Input parameter should be SPI_CR1_DFF set to 0 or 1 on a 32bit word. + * Requires an added function spi_data_size on STM32F1 / cores / maple / libmaple / spi.c + */ + void setDataSize(uint32_t ds); + + /* Victor Perez 2017. Added to set and clear callback functions for callback + * on DMA transfer completion. + * onReceive used to set the callback in case of dmaTransfer (tx/rx), once rx is completed + * onTransmit used to set the callback in case of dmaSend (tx only). That function + * will NOT be called in case of TX/RX + */ + void onReceive(void(*)(void)); + void onTransmit(void(*)(void)); + + /* + * I/O + */ + + /** + * @brief Return the next unread byte/word. + * + * If there is no unread byte/word waiting, this function will block + * until one is received. + */ + uint16_t read(); + + /** + * @brief Read length bytes, storing them into buffer. + * @param buffer Buffer to store received bytes into. + * @param length Number of bytes to store in buffer. This + * function will block until the desired number of + * bytes have been read. + */ + void read(uint8_t *buffer, uint32_t length); + + /** + * @brief Transmit one byte/word. + * @param data to transmit. + */ + void write(uint16_t data); + void write16(uint16_t data); // write 2 bytes in 8 bit mode (DFF=0) + + /** + * @brief Transmit one byte/word a specified number of times. + * @param data to transmit. + */ + void write(uint16_t data, uint32_t n); + + /** + * @brief Transmit multiple bytes/words. + * @param buffer Bytes/words to transmit. + * @param length Number of bytes/words in buffer to transmit. + */ + void write(const void * buffer, uint32_t length); + + /** + * @brief Transmit a byte, then return the next unread byte. + * + * This function transmits before receiving. + * + * @param data Byte to transmit. + * @return Next unread byte. + */ + uint8_t transfer(uint8_t data) const; + uint16_t transfer16(uint16_t data) const; + + /** + * @brief Sets up a DMA Transfer for "length" bytes. + * The transfer mode (8 or 16 bit mode) is evaluated from the SPI peripheral setting. + * + * This function transmits and receives to buffers. + * + * @param transmitBuf buffer Bytes to transmit. If passed as 0, it sends FF repeatedly for "length" bytes + * @param receiveBuf buffer Bytes to save received data. + * @param length Number of bytes in buffer to transmit. + */ + uint8_t dmaTransfer(const void * transmitBuf, void * receiveBuf, uint16_t length); + void dmaTransferSet(const void *transmitBuf, void *receiveBuf); + uint8_t dmaTransferRepeat(uint16_t length); + + /** + * @brief Sets up a DMA Transmit for SPI 8 or 16 bit transfer mode. + * The transfer mode (8 or 16 bit mode) is evaluated from the SPI peripheral setting. + * + * This function only transmits and does not care about the RX fifo. + * + * @param data buffer half words to transmit, + * @param length Number of bytes in buffer to transmit. + * @param minc Set to use Memory Increment mode, clear to use Circular mode. + */ + uint8_t dmaSend(const void * transmitBuf, uint16_t length, bool minc = 1); + void dmaSendSet(const void * transmitBuf, bool minc); + uint8_t dmaSendRepeat(uint16_t length); + + uint8_t dmaSendAsync(const void * transmitBuf, uint16_t length, bool minc = 1); + /* + * Pin accessors + */ + + /** + * @brief Return the number of the MISO (master in, slave out) pin + */ + uint8_t misoPin(); + + /** + * @brief Return the number of the MOSI (master out, slave in) pin + */ + uint8_t mosiPin(); + + /** + * @brief Return the number of the SCK (serial clock) pin + */ + uint8_t sckPin(); + + /** + * @brief Return the number of the NSS (slave select) pin + */ + uint8_t nssPin(); + + /* Escape hatch */ + + /** + * @brief Get a pointer to the underlying libmaple spi_dev for + * this HardwareSPI instance. + */ + spi_dev* c_dev(void) { return _currentSetting->spi_d; } + + spi_dev* dev() { return _currentSetting->spi_d; } + + /** + * @brief Sets the number of the SPI peripheral to be used by + * this HardwareSPI instance. + * + * @param spi_num Number of the SPI port. 1-2 in low density devices + * or 1-3 in high density devices. + */ + void setModule(int spi_num) { + _currentSetting=&_settings[spi_num-1];// SPI channels are called 1 2 and 3 but the array is zero indexed + } + + /* -- The following methods are deprecated --------------------------- */ + + /** + * @brief Deprecated. + * + * Use HardwareSPI::transfer() instead. + * + * @see HardwareSPI::transfer() + */ + uint8_t send(uint8_t data); + + /** + * @brief Deprecated. + * + * Use HardwareSPI::write() in combination with + * HardwareSPI::read() (or HardwareSPI::transfer()) instead. + * + * @see HardwareSPI::write() + * @see HardwareSPI::read() + * @see HardwareSPI::transfer() + */ + uint8_t send(uint8_t *data, uint32_t length); + + /** + * @brief Deprecated. + * + * Use HardwareSPI::read() instead. + * + * @see HardwareSPI::read() + */ + uint8_t recv(); + +private: + + SPISettings _settings[BOARD_NR_SPI]; + SPISettings *_currentSetting; + + void updateSettings(); + + /* + * Functions added for DMA transfers with Callback. + * Experimental. + */ + + void EventCallback(); + + #if BOARD_NR_SPI >= 1 + static void _spi1EventCallback(); + #endif + #if BOARD_NR_SPI >= 2 + static void _spi2EventCallback(); + #endif + #if BOARD_NR_SPI >= 3 + static void _spi3EventCallback(); + #endif + /* + spi_dev *spi_d; + uint8_t _SSPin; + uint32_t clockDivider; + uint8_t dataMode; + BitOrder bitOrder; + */ +}; + +extern SPIClass SPI; diff --git a/Marlin/src/HAL/HAL_STM32F1/SoftwareSerial.cpp b/Marlin/src/HAL/HAL_STM32F1/SoftwareSerial.cpp index 309500d4817b..99772a03c209 100644 --- a/Marlin/src/HAL/HAL_STM32F1/SoftwareSerial.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/SoftwareSerial.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . * */ -#ifdef __STM32F1__ +#if defined(__STM32F1__) && !defined(HAVE_SW_SERIAL) /** * Empty class for Software Serial implementation (Custom RX/TX pins) diff --git a/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h b/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h index 6cc7a72d95e1..463d951c1eab 100644 --- a/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h +++ b/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h @@ -38,8 +38,8 @@ #define _SET_OUTPUT(IO) _SET_MODE(IO, GPIO_OUTPUT_PP) #define _SET_OUTPUT_OD(IO) _SET_MODE(IO, GPIO_OUTPUT_OD) -#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); } while(0) -#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); } while(0) +#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0) +#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0) #define SET_INPUT(IO) _SET_MODE(IO, GPIO_INPUT_FLOATING) #define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU) diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp index 7004d88ffd66..8097a284870c 100644 --- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp @@ -42,7 +42,6 @@ // Store settings in the last two pages // Flash pages must be erased before writing, so keep track. bool firstWrite = false; -uint32_t pageBase = EEPROM_START_ADDRESS; bool PersistentStore::access_start() { firstWrite = true; @@ -67,42 +66,27 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui firstWrite = false; } - // First write full words - int i = 0; - int wordsToWrite = size / sizeof(uint16_t); - uint16_t* wordBuffer = (uint16_t *)value; - while (wordsToWrite) { - status = FLASH_ProgramHalfWord(pageBase + pos + (i * 2), wordBuffer[i]); - if (status != FLASH_COMPLETE) return true; - wordsToWrite--; - i++; - } - - // Now, write any remaining single byte - const uint16_t odd = size & 1; - if (odd) { - uint16_t temp = value[size - 1]; - status = FLASH_ProgramHalfWord(pageBase + pos + i, temp); - if (status != FLASH_COMPLETE) return true; + for (size_t i = 0; i < size; i++) { + if (FLASH_ProgramHalfWord(EEPROM_PAGE0_BASE + (pos + i) * 2, value[i]) != FLASH_COMPLETE) + return true; } crc16(crc, value, size); - pos += size + odd; + pos += size; return false; } bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) { - for (uint16_t i = 0; i < size; i++) { - byte* accessPoint = (byte*)(pageBase + pos + i); - uint8_t c = *accessPoint; - if (writing) value[i] = c; - crc16(crc, &c, 1); + for (size_t i = 0; i < size; i++) { + uint8_t v = *(uint16_t *)(EEPROM_PAGE0_BASE + (pos + i) * 2); + if (writing) value[i] = v; + crc16(crc, &v, 1); } - pos += ((size + 1) & ~1); // i.e., size+(size&1), round up odd values + pos += size; return false; } -size_t PersistentStore::capacity() { return E2END + 1; } +size_t PersistentStore::capacity() { return size_t(E2END + 1); } #endif // EEPROM_SETTINGS && EEPROM FLASH #endif // __STM32F1__ diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h b/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h index 61807f026dc2..e3cfe00e6183 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h @@ -160,9 +160,6 @@ uint8_t HAL_get_reset_source(void); void _delay_ms(const int delay); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" - /* extern "C" { int freeMemory(void); @@ -172,14 +169,17 @@ extern "C" { extern "C" char* _sbrk(int incr); /* -static int freeMemory() { +int freeMemory() { volatile int top; top = (int)((char*)&top - reinterpret_cast(_sbrk(0))); return top; } */ -static int freeMemory() { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" + +static inline int freeMemory(void) { volatile char top; return &top - reinterpret_cast(_sbrk(0)); } diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F4/HAL_timers_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F4/HAL_timers_STM32F4.cpp index 45ea7fc984f8..26ea90e6d4c5 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F4/HAL_timers_STM32F4.cpp +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F4/HAL_timers_STM32F4.cpp @@ -53,56 +53,40 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { switch (timer_num) { case STEP_TIMER_NUM: // STEPPER TIMER TIM5 - use a 32bit timer - #ifdef STM32GENERIC - __HAL_RCC_TIM5_CLK_ENABLE(); - TimerHandle[timer_num].handle.Instance = TIM5; - TimerHandle[timer_num].handle.Init.Prescaler = step_prescaler; - TimerHandle[timer_num].handle.Init.CounterMode = TIM_COUNTERMODE_UP; - TimerHandle[timer_num].handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - TimerHandle[timer_num].callback = (uint32_t)TC5_Handler; - #else - TimerHandle[timer_num].timer = TIM5; - TimerHandle[timer_num].irqHandle = TC5_Handler; - TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / step_prescaler) / frequency) - 1, step_prescaler); - #endif + __HAL_RCC_TIM5_CLK_ENABLE(); + TimerHandle[timer_num].handle.Instance = TIM5; + TimerHandle[timer_num].handle.Init.Prescaler = step_prescaler; + TimerHandle[timer_num].handle.Init.CounterMode = TIM_COUNTERMODE_UP; + TimerHandle[timer_num].handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + TimerHandle[timer_num].callback = (uint32_t)TC5_Handler; HAL_NVIC_SetPriority(STEP_TIMER_IRQ_ID, 1, 0); break; case TEMP_TIMER_NUM: // TEMP TIMER TIM7 - any available 16bit Timer (1 already used for PWM) - #ifdef STM32GENERIC - __HAL_RCC_TIM7_CLK_ENABLE(); - TimerHandle[timer_num].handle.Instance = TIM7; - TimerHandle[timer_num].handle.Init.Prescaler = temp_prescaler; - TimerHandle[timer_num].handle.Init.CounterMode = TIM_COUNTERMODE_UP; - TimerHandle[timer_num].handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - TimerHandle[timer_num].callback = (uint32_t)TC7_Handler; - #else - TimerHandle[timer_num].timer = TIM7; - TimerHandle[timer_num].irqHandle = TC7_Handler; - TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / temp_prescaler) / frequency) - 1, temp_prescaler); - #endif + __HAL_RCC_TIM7_CLK_ENABLE(); + TimerHandle[timer_num].handle.Instance = TIM7; + TimerHandle[timer_num].handle.Init.Prescaler = temp_prescaler; + TimerHandle[timer_num].handle.Init.CounterMode = TIM_COUNTERMODE_UP; + TimerHandle[timer_num].handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + TimerHandle[timer_num].callback = (uint32_t)TC7_Handler; HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_ID, 2, 0); break; } timers_initialized[timer_num] = true; } - #ifdef STM32GENERIC - TimerHandle[timer_num].handle.Init.Period = (((HAL_TIMER_RATE) / TimerHandle[timer_num].handle.Init.Prescaler) / frequency) - 1; - if (HAL_TIM_Base_Init(&TimerHandle[timer_num].handle) == HAL_OK) - HAL_TIM_Base_Start_IT(&TimerHandle[timer_num].handle); - #endif + TimerHandle[timer_num].handle.Init.Period = (((HAL_TIMER_RATE) / TimerHandle[timer_num].handle.Init.Prescaler) / frequency) - 1; + if (HAL_TIM_Base_Init(&TimerHandle[timer_num].handle) == HAL_OK) + HAL_TIM_Base_Start_IT(&TimerHandle[timer_num].handle); } -#ifdef STM32GENERIC - extern "C" void TIM5_IRQHandler() { - ((void(*)(void))TimerHandle[0].callback)(); - } - extern "C" void TIM7_IRQHandler() { - ((void(*)(void))TimerHandle[1].callback)(); - } -#endif +extern "C" void TIM5_IRQHandler() { + ((void(*)(void))TimerHandle[0].callback)(); +} +extern "C" void TIM7_IRQHandler() { + ((void(*)(void))TimerHandle[1].callback)(); +} void HAL_timer_enable_interrupt(const uint8_t timer_num) { switch (timer_num) { diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/HAL_timers_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/HAL_timers_STM32F7.cpp index 8da2fc0cfa83..32697d7ccd82 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/HAL_timers_STM32F7.cpp +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/HAL_timers_STM32F7.cpp @@ -59,8 +59,9 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { timerConfig[0].IRQ_Id = TIM5_IRQn; timerConfig[0].callback = (uint32_t)TC5_Handler; HAL_NVIC_SetPriority(timerConfig[0].IRQ_Id, 1, 0); - SET_OUTPUT(STEPPER_ENABLE_PIN); - WRITE(STEPPER_ENABLE_PIN); + #if PIN_EXISTS(STEPPER_ENABLE) + OUT_WRITE(STEPPER_ENABLE_PIN, HIGH); + #endif break; case TEMP_TIMER_NUM: //TEMP TIMER TIM7 // any available 16bit Timer (1 already used for PWM) diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.cpp b/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.cpp index 2f60bf35462d..ac2589272470 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.cpp +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.cpp @@ -37,7 +37,7 @@ #include "../../../inc/MarlinConfig.h" #include "../../../Marlin.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" #include "../../../module/printcounter.h" #include "../../../libs/duration_t.h" #include "../../../libs/hex_print_routines.h" @@ -189,7 +189,6 @@ void TMC26XStepper::start() { pinMode(step_pin, OUTPUT); pinMode(dir_pin, OUTPUT); pinMode(cs_pin, OUTPUT); - //SET_OUTPUT(STEPPER_ENABLE_PIN); extDigitalWrite(step_pin, LOW); extDigitalWrite(dir_pin, LOW); extDigitalWrite(cs_pin, HIGH); @@ -314,10 +313,12 @@ void TMC26XStepper::setCurrent(uint16_t current) { current_scaling = (byte)((resistor_value * mASetting * 32.0 / (0.165 * sq(1000.0))) - 0.5); //theoretically - 1.0 for better rounding it is 0.5 #ifdef TMC_DEBUG0 // crashes SERIAL_ECHOPAIR("\nCS (Vsense=1): ",current_scaling); - } else { - SERIAL_ECHOPAIR("\nCS: ", current_scaling); #endif } + #ifdef TMC_DEBUG0 // crashes + else + SERIAL_ECHOPAIR("\nCS: ", current_scaling); + #endif // do some sanity checks NOMORE(current_scaling, 31); diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/eeprom_emul.cpp b/Marlin/src/HAL/HAL_STM32_F4_F7/eeprom_emul.cpp index f8db99d3f642..1c9de1e212af 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/eeprom_emul.cpp +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/eeprom_emul.cpp @@ -86,6 +86,8 @@ uint16_t EE_Initialize(void) { pEraseInit.NbSectors = 1; pEraseInit.VoltageRange = VOLTAGE_RANGE; + HAL_StatusTypeDef FlashStatus; // = HAL_OK + /* Check for invalid header states and repair if necessary */ uint32_t SectorError; switch (PageStatus0) { @@ -135,7 +137,7 @@ uint16_t EE_Initialize(void) { } } /* Mark Page0 as valid */ - HAL_StatusTypeDef FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE0_BASE_ADDRESS, VALID_PAGE); + FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE0_BASE_ADDRESS, VALID_PAGE); /* If program operation was failed, a Flash error code is returned */ if (FlashStatus != HAL_OK) return FlashStatus; pEraseInit.Sector = PAGE1_ID; diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/fastio_STM32_F4_F7.h b/Marlin/src/HAL/HAL_STM32_F4_F7/fastio_STM32_F4_F7.h index d65900540dc6..566f1a08516e 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/fastio_STM32_F4_F7.h +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/fastio_STM32_F4_F7.h @@ -27,6 +27,10 @@ * These use GPIO functions instead of Direct Port Manipulation, as on AVR. */ +#ifndef PWM + #define PWM OUTPUT +#endif + #define READ(IO) digitalRead(IO) #define WRITE(IO,V) digitalWrite(IO,V) @@ -61,6 +65,8 @@ #define PORTC 2 #define PORTD 3 #define PORTE 4 +#define PORTF 5 +#define PORTG 6 #define _STM32_PIN(P,PN) ((PORT##P * 16) + PN) diff --git a/Marlin/src/HAL/shared/Marduino.h b/Marlin/src/HAL/shared/Marduino.h index 891646daab03..4376579f85af 100644 --- a/Marlin/src/HAL/shared/Marduino.h +++ b/Marlin/src/HAL/shared/Marduino.h @@ -31,6 +31,7 @@ #undef sq // Redefined by teensy3/wiring.h #undef SBI // Redefined by arduino/const_functions.h #undef CBI // Redefined by arduino/const_functions.h +#undef UNUSED // Redefined by stm32f4xx_hal_def.h #include // NOTE: If included earlier then this line is a NOOP @@ -74,3 +75,8 @@ #ifndef M_PI #define M_PI 3.14159265358979323846f #endif + +// Remove compiler warning on an unused variable +#ifndef UNUSED + #define UNUSED(x) ((void)(x)) +#endif diff --git a/Marlin/src/HAL/shared/servo.h b/Marlin/src/HAL/shared/servo.h index d1a83bf16951..51b0c7b5714b 100644 --- a/Marlin/src/HAL/shared/servo.h +++ b/Marlin/src/HAL/shared/servo.h @@ -84,7 +84,7 @@ #else #include - #if defined(__AVR__) || defined(ARDUINO_ARCH_SAM) || defined (__SAMD51__) + #if defined(__AVR__) || defined(ARDUINO_ARCH_SAM) || defined(__SAMD51__) // we're good to go #else #error "This library only supports boards with an AVR, SAM3X or SAMD51 processor." diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 993dd26529f6..376bd6dc9103 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -45,7 +45,7 @@ #include "HAL/shared/Delay.h" -#include "module/stepper_indirection.h" +#include "module/stepper/indirection.h" #ifdef ARDUINO #include @@ -65,7 +65,7 @@ #include "feature/host_actions.h" #endif -#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER) +#if USE_BEEPER #include "libs/buzzer.h" #endif @@ -290,6 +290,15 @@ void enable_all_steppers() { enable_E5(); } +void enable_e_steppers() { + enable_E0(); + enable_E1(); + enable_E2(); + enable_E3(); + enable_E4(); + enable_E5(); +} + void disable_e_steppers() { disable_E0(); disable_E1(); @@ -539,28 +548,28 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) { #if ENABLED(SWITCHING_EXTRUDER) bool oldstatus; switch (active_extruder) { - default: oldstatus = E0_ENABLE_READ; enable_E0(); break; + default: oldstatus = E0_ENABLE_READ(); enable_E0(); break; #if E_STEPPERS > 1 - case 2: case 3: oldstatus = E1_ENABLE_READ; enable_E1(); break; + case 2: case 3: oldstatus = E1_ENABLE_READ(); enable_E1(); break; #if E_STEPPERS > 2 - case 4: case 5: oldstatus = E2_ENABLE_READ; enable_E2(); break; + case 4: case 5: oldstatus = E2_ENABLE_READ(); enable_E2(); break; #endif // E_STEPPERS > 2 #endif // E_STEPPERS > 1 } #else // !SWITCHING_EXTRUDER bool oldstatus; switch (active_extruder) { - default: oldstatus = E0_ENABLE_READ; enable_E0(); break; + default: oldstatus = E0_ENABLE_READ(); enable_E0(); break; #if E_STEPPERS > 1 - case 1: oldstatus = E1_ENABLE_READ; enable_E1(); break; + case 1: oldstatus = E1_ENABLE_READ(); enable_E1(); break; #if E_STEPPERS > 2 - case 2: oldstatus = E2_ENABLE_READ; enable_E2(); break; + case 2: oldstatus = E2_ENABLE_READ(); enable_E2(); break; #if E_STEPPERS > 3 - case 3: oldstatus = E3_ENABLE_READ; enable_E3(); break; + case 3: oldstatus = E3_ENABLE_READ(); enable_E3(); break; #if E_STEPPERS > 4 - case 4: oldstatus = E4_ENABLE_READ; enable_E4(); break; + case 4: oldstatus = E4_ENABLE_READ(); enable_E4(); break; #if E_STEPPERS > 5 - case 5: oldstatus = E5_ENABLE_READ; enable_E5(); break; + case 5: oldstatus = E5_ENABLE_READ(); enable_E5(); break; #endif // E_STEPPERS > 5 #endif // E_STEPPERS > 4 #endif // E_STEPPERS > 3 @@ -661,9 +670,14 @@ void idle( ) { #if ENABLED(SPI_ENDSTOPS) - if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period)) + if (endstops.tmc_spi_homing.any + #if ENABLED(IMPROVE_HOMING_RELIABILITY) + && ELAPSED(millis(), sg_guard_period) + #endif + ) { for (uint8_t i = 4; i--;) // Read SGT 4 times per idle loop if (endstops.tmc_spi_homing_check()) break; + } #endif #if ENABLED(MAX7219_DEBUG) @@ -688,7 +702,7 @@ void idle( print_job_timer.tick(); #endif - #if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER) && DISABLED(PCA9632_BUZZER) + #if USE_BEEPER buzzer.tick(); #endif @@ -731,7 +745,7 @@ void idle( * Kill all activity and lock the machine. * After this the machine will need to be reset. */ -void kill(PGM_P const lcd_msg/*=nullptr*/) { +void kill(PGM_P const lcd_msg/*=nullptr*/, const bool steppers_off/*=false*/) { thermalManager.disable_all_heaters(); SERIAL_ERROR_MSG(MSG_ERR_KILLED); @@ -746,10 +760,10 @@ void kill(PGM_P const lcd_msg/*=nullptr*/) { host_action_kill(); #endif - minkill(); + minkill(steppers_off); } -void minkill() { +void minkill(const bool steppers_off/*=false*/) { // Wait a short time (allows messages to get out before shutting down. for (int i = 1000; i--;) DELAY_US(600); @@ -759,7 +773,11 @@ void minkill() { // Wait to ensure all interrupts stopped for (int i = 1000; i--;) DELAY_US(250); - thermalManager.disable_all_heaters(); // turn off heaters again + // Reiterate heaters off + thermalManager.disable_all_heaters(); + + // Power off all steppers (for M112) or just the E steppers + steppers_off ? disable_all_steppers() : disable_e_steppers(); #if HAS_POWER_SWITCH PSU_OFF(); @@ -872,6 +890,10 @@ void setup() { runout.setup(); #endif + #if ENABLED(POWER_LOSS_RECOVERY) + recovery.setup(); + #endif + setup_killpin(); #if HAS_TMC220x @@ -1112,6 +1134,10 @@ void setup() { init_closedloop(); #endif + #ifdef STARTUP_COMMANDS + queue.inject_P(PSTR(STARTUP_COMMANDS)); + #endif + #if ENABLED(INIT_SDCARD_ON_BOOT) && !HAS_SPI_LCD card.beginautostart(); #endif diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index cef5950b990b..1a9acc007582 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -316,13 +316,14 @@ void manage_inactivity(const bool ignore_stepper_queue=false); /** * The axis order in all axis related arrays is X, Y, Z, E */ +void enable_e_steppers(); void enable_all_steppers(); void disable_e_stepper(const uint8_t e); void disable_e_steppers(); void disable_all_steppers(); -void kill(PGM_P const lcd_msg=nullptr); -void minkill(); +void kill(PGM_P const lcd_msg=nullptr, const bool steppers_off=false); +void minkill(const bool steppers_off=false); void quickstop_stepper(); diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 7d02566247dc..c35aac8ce641 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -95,6 +95,8 @@ #define BOARD_Z_BOLT_X_SERIES 1141 // Z-Bolt X Series #define BOARD_TT_OSCAR 1142 // TT OSCAR #define BOARD_OVERLORD 1143 // Overlord/Overlord Pro +#define BOARD_HJC2560C_REV1 1144 // ADIMLab Gantry v1 +#define BOARD_HJC2560C_REV2 1145 // ADIMLab Gantry v2 // // RAMBo and derivatives @@ -113,24 +115,25 @@ #define BOARD_CNCONTROLS_11 1300 // Cartesio CN Controls V11 #define BOARD_CNCONTROLS_12 1301 // Cartesio CN Controls V12 -#define BOARD_CHEAPTRONIC 1302 // Cheaptronic v1.0 -#define BOARD_CHEAPTRONIC_V2 1303 // Cheaptronic v2.0 -#define BOARD_MIGHTYBOARD_REVE 1304 // Makerbot Mightyboard Revision E -#define BOARD_MEGATRONICS 1305 // Megatronics -#define BOARD_MEGATRONICS_2 1306 // Megatronics v2.0 -#define BOARD_MEGATRONICS_3 1307 // Megatronics v3.0 -#define BOARD_MEGATRONICS_31 1308 // Megatronics v3.1 -#define BOARD_MEGATRONICS_32 1309 // Megatronics v3.2 -#define BOARD_ELEFU_3 1310 // Elefu Ra Board (v3) -#define BOARD_LEAPFROG 1311 // Leapfrog -#define BOARD_MEGACONTROLLER 1312 // Mega controller -#define BOARD_GT2560_REV_A 1313 // Geeetech GT2560 Rev. A -#define BOARD_GT2560_REV_A_PLUS 1314 // Geeetech GT2560 Rev. A+ (with auto level probe) -#define BOARD_GT2560_V3 1315 // Geeetech GT2560 Rev B for A10(M/D) -#define BOARD_GT2560_V3_MC2 1316 // Geeetech GT2560 Rev B for Mecreator2 -#define BOARD_GT2560_V3_A20 1317 // Geeetech GT2560 Rev B for A20(M/D) -#define BOARD_EINSTART_S 1318 // Einstart retrofit -#define BOARD_WANHAO_ONEPLUS 1319 // Wanhao 0ne+ i3 Mini +#define BOARD_CNCONTROLS_15 1302 // Cartesio CN Controls V15 +#define BOARD_CHEAPTRONIC 1303 // Cheaptronic v1.0 +#define BOARD_CHEAPTRONIC_V2 1304 // Cheaptronic v2.0 +#define BOARD_MIGHTYBOARD_REVE 1305 // Makerbot Mightyboard Revision E +#define BOARD_MEGATRONICS 1306 // Megatronics +#define BOARD_MEGATRONICS_2 1307 // Megatronics v2.0 +#define BOARD_MEGATRONICS_3 1308 // Megatronics v3.0 +#define BOARD_MEGATRONICS_31 1309 // Megatronics v3.1 +#define BOARD_MEGATRONICS_32 1310 // Megatronics v3.2 +#define BOARD_ELEFU_3 1311 // Elefu Ra Board (v3) +#define BOARD_LEAPFROG 1312 // Leapfrog +#define BOARD_MEGACONTROLLER 1313 // Mega controller +#define BOARD_GT2560_REV_A 1314 // Geeetech GT2560 Rev. A +#define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev. A+ (with auto level probe) +#define BOARD_GT2560_V3 1316 // Geeetech GT2560 Rev B for A10(M/D) +#define BOARD_GT2560_V3_MC2 1317 // Geeetech GT2560 Rev B for Mecreator2 +#define BOARD_GT2560_V3_A20 1318 // Geeetech GT2560 Rev B for A20(M/D) +#define BOARD_EINSTART_S 1319 // Einstart retrofit +#define BOARD_WANHAO_ONEPLUS 1320 // Wanhao 0ne+ i3 Mini // // ATmega1281, ATmega2561 @@ -290,6 +293,7 @@ #define BOARD_BLACK_STM32F407ZE 4205 // BLACK_STM32F407ZE #define BOARD_STEVAL 4206 // STEVAL-3DP001V1 3D PRINTER BOARD #define BOARD_BIGTREE_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG) +#define BOARD_BIGTREE_BTT002_V1_0 4208 // BigTreeTech BTT002 v1.0 (STM32F407VE) // // ARM Cortex M7 diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index 617090a6f2f6..005ffb7da522 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -67,12 +67,14 @@ #define AXIS_DRIVER_TYPE(A,T) AXIS_DRIVER_TYPE_##A(T) +#define HAS_E_DRIVER(T) ( AXIS_DRIVER_TYPE_E0(T) || AXIS_DRIVER_TYPE_E1(T) \ + || AXIS_DRIVER_TYPE_E2(T) || AXIS_DRIVER_TYPE_E3(T) \ + || AXIS_DRIVER_TYPE_E4(T) || AXIS_DRIVER_TYPE_E5(T) ) + #define HAS_DRIVER(T) ( AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) \ || AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) \ || AXIS_DRIVER_TYPE_Z(T) || AXIS_DRIVER_TYPE_Z2(T) || AXIS_DRIVER_TYPE_Z3(T) \ - || AXIS_DRIVER_TYPE_E0(T) || AXIS_DRIVER_TYPE_E1(T) \ - || AXIS_DRIVER_TYPE_E2(T) || AXIS_DRIVER_TYPE_E3(T) \ - || AXIS_DRIVER_TYPE_E4(T) || AXIS_DRIVER_TYPE_E5(T) ) + || HAS_E_DRIVER(T) ) // Test for supported TMC drivers that require advanced configuration // Does not match standalone configurations diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 07cdddedee75..77d0b3cfbad5 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -67,6 +67,7 @@ // sk Slovak // tr Turkish // uk Ukrainian +// vi Vietnamese // zh_CN Chinese (Simplified) // zh_TW Chinese (Traditional) @@ -89,10 +90,11 @@ #define MACHINE_UUID DEFAULT_MACHINE_UUID #endif -#ifdef BOARD_WEBSITE_URL - #undef WEBSITE_URL - #define WEBSITE_URL BOARD_WEBSITE_URL -#endif +#define MARLIN_WEBSITE_URL "http://marlinfw.org" + +//#if !defined(STRING_SPLASH_LINE3) && defined(WEBSITE_URL) +// #define STRING_SPLASH_LINE3 WEBSITE_URL +//#endif #if HAS_GRAPHICAL_LCD // diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index a6e546a4a83f..ce72247c5d31 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -53,15 +53,6 @@ // Nanoseconds per cycle #define NANOSECONDS_PER_CYCLE (1000000000.0 / F_CPU) -// Remove compiler warning on an unused variable -#ifndef UNUSED - #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) - #define UNUSED(X) (void)X - #else - #define UNUSED(x) ((void)(x)) - #endif -#endif - // Macros to make a string from a macro #define STRINGIFY_(M) #M #define STRINGIFY(M) STRINGIFY_(M) @@ -118,24 +109,24 @@ // Using GCC extensions, but Travis GCC version does not like it and gives // "error: statement-expressions are not allowed outside functions nor in template-argument lists" #define NOLESS(v, n) \ - do { \ + do{ \ __typeof__(n) _n = (n); \ if (v < _n) v = _n; \ - } while(0) + }while(0) #define NOMORE(v, n) \ - do { \ + do{ \ __typeof__(n) _n = (n); \ if (v > _n) v = _n; \ - } while(0) + }while(0) #define LIMIT(v, n1, n2) \ - do { \ + do{ \ __typeof__(n1) _n1 = (n1); \ __typeof__(n2) _n2 = (n2); \ if (v < _n1) v = _n1; \ else if (v > _n2) v = _n2; \ - } while(0) + }while(0) #endif diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index bae554bccb2c..463b9b6f53f4 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -184,5 +184,5 @@ void print_bin(const uint16_t val); void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z); void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]); -#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0) -#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); } while(0) +#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0) +#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); }while(0) diff --git a/Marlin/src/feature/babystep.cpp b/Marlin/src/feature/babystep.cpp index eb6ed046a432..41d7e800752f 100644 --- a/Marlin/src/feature/babystep.cpp +++ b/Marlin/src/feature/babystep.cpp @@ -37,7 +37,7 @@ Babystep babystep; volatile int16_t Babystep::todo[BS_TODO_AXIS(Z_AXIS) + 1]; -#if HAS_LCD_MENU +#if HAS_LCD_MENU || ENABLED(EXTENSIBLE_UI) int16_t Babystep::accum; #if ENABLED(BABYSTEP_DISPLAY_TOTAL) int16_t Babystep::axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1]; @@ -75,7 +75,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) { if (!CAN_BABYSTEP(axis)) return; - #if HAS_LCD_MENU + #if HAS_LCD_MENU || ENABLED(EXTENSIBLE_UI) accum += distance; // Count up babysteps for the UI #if ENABLED(BABYSTEP_DISPLAY_TOTAL) axis_total[BS_TOTAL_AXIS(axis)] += distance; diff --git a/Marlin/src/feature/babystep.h b/Marlin/src/feature/babystep.h index 1969e6c9c387..ff3709e5ff4f 100644 --- a/Marlin/src/feature/babystep.h +++ b/Marlin/src/feature/babystep.h @@ -30,7 +30,7 @@ #define BS_TODO_AXIS(A) 0 #endif -#if HAS_LCD_MENU && ENABLED(BABYSTEP_DISPLAY_TOTAL) +#if (HAS_LCD_MENU || ENABLED(EXTENSIBLE_UI)) && ENABLED(BABYSTEP_DISPLAY_TOTAL) #if ENABLED(BABYSTEP_XY) #define BS_TOTAL_AXIS(A) A #else @@ -41,7 +41,7 @@ class Babystep { public: static volatile int16_t todo[BS_TODO_AXIS(Z_AXIS) + 1]; - #if HAS_LCD_MENU + #if HAS_LCD_MENU || ENABLED(EXTENSIBLE_UI) static int16_t accum; // Total babysteps in current edit #if ENABLED(BABYSTEP_DISPLAY_TOTAL) static int16_t axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1]; // Total babysteps since G28 diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 568f766150fa..6b6233f82656 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -752,16 +752,15 @@ save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained DEPLOY_PROBE(); - uint8_t count = GRID_MAX_POINTS, current = 1; + uint8_t count = GRID_MAX_POINTS; do { - current = (GRID_MAX_POINTS) - count + 1; - if (do_ubl_mesh_map) display_map(g29_map_type); - SERIAL_ECHOLNPAIR("\nProbing mesh point ", int(current), "/", int(GRID_MAX_POINTS), ".\n"); + const int current = (GRID_MAX_POINTS) - count + 1; + SERIAL_ECHOLNPAIR("\nProbing mesh point ", current, "/", int(GRID_MAX_POINTS), ".\n"); #if HAS_DISPLAY - ui.status_printf_P(0, PSTR(MSG_PROBING_MESH " %i/%i"), int(current), int(GRID_MAX_POINTS)); + ui.status_printf_P(0, PSTR(MSG_PROBING_MESH " %i/%i"), current, int(GRID_MAX_POINTS)); #endif #if HAS_LCD_MENU @@ -1500,8 +1499,7 @@ DEBUG_ECHO_F(rx, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(ry, 7); - DEBUG_ECHOPGM(") logical: "); - DEBUG_CHAR('('); + DEBUG_ECHOPGM(") logical: ("); DEBUG_ECHO_F(LOGICAL_X_POSITION(rx), 7); DEBUG_CHAR(','); DEBUG_ECHO_F(LOGICAL_Y_POSITION(ry), 7); diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp index a75f4d982218..1a458a2a5574 100644 --- a/Marlin/src/feature/controllerfan.cpp +++ b/Marlin/src/feature/controllerfan.cpp @@ -24,7 +24,7 @@ #if ENABLED(USE_CONTROLLER_FAN) -#include "../module/stepper_indirection.h" +#include "../module/stepper/indirection.h" #include "../module/temperature.h" uint8_t controllerfan_speed; @@ -36,35 +36,37 @@ void controllerfan_update() { if (ELAPSED(ms, nextMotorCheck)) { nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s + const bool xory = X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON; + // If any of the drivers or the bed are enabled... - if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON + if (xory || Z_ENABLE_READ() == Z_ENABLE_ON #if HAS_HEATED_BED || thermalManager.temp_bed.soft_pwm_amount > 0 #endif #if HAS_X2_ENABLE - || X2_ENABLE_READ == X_ENABLE_ON + || X2_ENABLE_READ() == X_ENABLE_ON #endif #if HAS_Y2_ENABLE - || Y2_ENABLE_READ == Y_ENABLE_ON + || Y2_ENABLE_READ() == Y_ENABLE_ON #endif #if HAS_Z2_ENABLE - || Z2_ENABLE_READ == Z_ENABLE_ON + || Z2_ENABLE_READ() == Z_ENABLE_ON #endif #if HAS_Z3_ENABLE - || Z3_ENABLE_READ == Z_ENABLE_ON + || Z3_ENABLE_READ() == Z_ENABLE_ON #endif #if E_STEPPERS - || E0_ENABLE_READ == E_ENABLE_ON + || E0_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 1 - || E1_ENABLE_READ == E_ENABLE_ON + || E1_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 2 - || E2_ENABLE_READ == E_ENABLE_ON + || E2_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 3 - || E3_ENABLE_READ == E_ENABLE_ON + || E3_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 4 - || E4_ENABLE_READ == E_ENABLE_ON + || E4_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 5 - || E5_ENABLE_READ == E_ENABLE_ON + || E5_ENABLE_READ() == E_ENABLE_ON #endif // E_STEPPERS > 5 #endif // E_STEPPERS > 4 #endif // E_STEPPERS > 3 @@ -76,12 +78,17 @@ void controllerfan_update() { } // Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds - uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED; - controllerfan_speed = speed; + controllerfan_speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : ( + #ifdef CONTROLLERFAN_SPEED_Z_ONLY + xory ? CONTROLLERFAN_SPEED : CONTROLLERFAN_SPEED_Z_ONLY + #else + CONTROLLERFAN_SPEED + #endif + ); - // allows digital or PWM fan output to be used (see M42 handling) - WRITE(CONTROLLER_FAN_PIN, speed); - analogWrite(pin_t(CONTROLLER_FAN_PIN), speed); + // Allow digital or PWM fan output (see M42 handling) + WRITE(CONTROLLER_FAN_PIN, controllerfan_speed); + analogWrite(pin_t(CONTROLLER_FAN_PIN), controllerfan_speed); } } diff --git a/Marlin/src/feature/leds/leds.cpp b/Marlin/src/feature/leds/leds.cpp index e5e952ed6ce8..210aeef0922b 100644 --- a/Marlin/src/feature/leds/leds.cpp +++ b/Marlin/src/feature/leds/leds.cpp @@ -125,7 +125,7 @@ void LEDLights::set_color(const LEDColor &incol // If the pins can do PWM then their intensity will be set. #define UPDATE_RGBW(C,c) do { if (PWM_PIN(RGB_LED_##C##_PIN)) \ analogWrite(pin_t(RGB_LED_##C##_PIN), incol.c); \ - else WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); } while(0) + else WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); }while(0) UPDATE_RGBW(R,r); UPDATE_RGBW(G,g); UPDATE_RGBW(B,b); diff --git a/Marlin/src/feature/leds/pca9632.cpp b/Marlin/src/feature/leds/pca9632.cpp index 6f69bd31ef1b..87589a9bcd73 100644 --- a/Marlin/src/feature/leds/pca9632.cpp +++ b/Marlin/src/feature/leds/pca9632.cpp @@ -137,13 +137,15 @@ void pca9632_set_led_color(const LEDColor &color) { } #if ENABLED(PCA9632_BUZZER) - void pca9632_buzz(uint16_t const f, uint16_t d) { - UNUSED(f); UNUSED(d); + + void pca9632_buzz(const long duration, const uint16_t freq) { + UNUSED(duration); UNUSED(freq); uint8_t data[] = PCA9632_BUZZER_DATA; Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS)); Wire.write(data, sizeof(data)); Wire.endTransmission(); } -#endif + +#endif // PCA9632_BUZZER #endif // PCA9632 diff --git a/Marlin/src/feature/leds/pca9632.h b/Marlin/src/feature/leds/pca9632.h index 023e4519790c..2abdf7c7af19 100644 --- a/Marlin/src/feature/leds/pca9632.h +++ b/Marlin/src/feature/leds/pca9632.h @@ -32,5 +32,6 @@ typedef LEDColor LEDColor; void pca9632_set_led_color(const LEDColor &color); #if ENABLED(PCA9632_BUZZER) - void pca9632_buzz(uint16_t const, uint16_t); + #include + void pca9632_buzz(const long, const uint16_t); #endif diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 5700591ca360..f1b8227b7457 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -187,6 +187,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l host_action_prompt_button(PSTR("Continue")); host_action_prompt_show(); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("Load Filament")); + #endif while (wait_for_user) { #if HAS_BUZZER filament_change_beep(max_beep_count); @@ -239,6 +242,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Continuous Purge Running..."), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("Continuous Purge Running...")); + #endif for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); wait_for_user = false; @@ -353,8 +359,8 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, planner.settings.retract_acceleration = saved_acceleration; #endif - // Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS) - #if (E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN) || AXIS_DRIVER_TYPE_E0(TMC2660) || AXIS_DRIVER_TYPE_E1(TMC2660) || AXIS_DRIVER_TYPE_E2(TMC2660) || AXIS_DRIVER_TYPE_E3(TMC2660) || AXIS_DRIVER_TYPE_E4(TMC2660) || AXIS_DRIVER_TYPE_E5(TMC2660) + // Disable E steppers for manual change + #if HAS_E_STEPPER_ENABLE disable_e_stepper(active_extruder); safe_delay(100); #endif @@ -517,6 +523,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("Nozzle Parked")); + #endif while (wait_for_user) { #if HAS_BUZZER filament_change_beep(max_beep_count); @@ -538,6 +547,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep host_prompt_do(PROMPT_USER_CONTINUE, PSTR("HeaterTimeout"), PSTR("Reheat")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("HeaterTimeout")); + #endif + // Wait for LCD click or M108 while (wait_for_user) idle(true); diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index ff012ee6bd34..777c7a052eae 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -30,7 +30,7 @@ #include "power.h" #include "../module/temperature.h" -#include "../module/stepper_indirection.h" +#include "../module/stepper/indirection.h" #include "../Marlin.h" Power powerManager; @@ -55,31 +55,31 @@ bool Power::is_power_needed() { #endif // If any of the drivers or the bed are enabled... - if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON + if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON #if HAS_HEATED_BED || thermalManager.temp_bed.soft_pwm_amount > 0 #endif #if HAS_X2_ENABLE - || X2_ENABLE_READ == X_ENABLE_ON + || X2_ENABLE_READ() == X_ENABLE_ON #endif #if HAS_Y2_ENABLE - || Y2_ENABLE_READ == Y_ENABLE_ON + || Y2_ENABLE_READ() == Y_ENABLE_ON #endif #if HAS_Z2_ENABLE - || Z2_ENABLE_READ == Z_ENABLE_ON + || Z2_ENABLE_READ() == Z_ENABLE_ON #endif #if E_STEPPERS - || E0_ENABLE_READ == E_ENABLE_ON + || E0_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 1 - || E1_ENABLE_READ == E_ENABLE_ON + || E1_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 2 - || E2_ENABLE_READ == E_ENABLE_ON + || E2_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 3 - || E3_ENABLE_READ == E_ENABLE_ON + || E3_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 4 - || E4_ENABLE_READ == E_ENABLE_ON + || E4_ENABLE_READ() == E_ENABLE_ON #if E_STEPPERS > 5 - || E5_ENABLE_READ == E_ENABLE_ON + || E5_ENABLE_READ() == E_ENABLE_ON #endif // E_STEPPERS > 5 #endif // E_STEPPERS > 4 #endif // E_STEPPERS > 3 diff --git a/Marlin/src/feature/power_loss_recovery.h b/Marlin/src/feature/power_loss_recovery.h index d58285e5631a..34322243fd03 100644 --- a/Marlin/src/feature/power_loss_recovery.h +++ b/Marlin/src/feature/power_loss_recovery.h @@ -26,12 +26,16 @@ */ #include "../sd/cardreader.h" -#include "../inc/MarlinConfigPre.h" +#include "../inc/MarlinConfig.h" #if ENABLED(MIXING_EXTRUDER) #include "../feature/mixing.h" #endif +#if !defined(POWER_LOSS_STATE) && PIN_EXISTS(POWER_LOSS) + #define POWER_LOSS_STATE HIGH +#endif + //#define DEBUG_POWER_LOSS_RECOVERY //#define SAVE_EACH_CMD_MODE //#define SAVE_INFO_INTERVAL_MS 0 @@ -110,6 +114,20 @@ class PrintJobRecovery { static void init(); + static inline void setup() { + #if PIN_EXISTS(POWER_LOSS) + #if ENABLED(POWER_LOSS_PULL) + #if POWER_LOSS_STATE == LOW + SET_INPUT_PULLUP(POWER_LOSS_PIN); + #else + SET_INPUT_PULLDOWN(POWER_LOSS_PIN); + #endif + #else + SET_INPUT(POWER_LOSS_PIN); + #endif + #endif + } + static bool enabled; static void enable(const bool onoff); static void changed(); diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.cpp b/Marlin/src/feature/prusa_MMU2/mmu2.cpp index 3450e98b3fcf..0baa5bd95864 100644 --- a/Marlin/src/feature/prusa_MMU2/mmu2.cpp +++ b/Marlin/src/feature/prusa_MMU2/mmu2.cpp @@ -35,13 +35,17 @@ MMU2 mmu2; #include "../../libs/nozzle.h" #include "../../module/temperature.h" #include "../../module/planner.h" -#include "../../module/stepper_indirection.h" +#include "../../module/stepper/indirection.h" #include "../../Marlin.h" #if ENABLED(HOST_PROMPT_SUPPORT) #include "../../feature/host_actions.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../../lcd/extensible_ui/ui_api.h" +#endif + #define DEBUG_OUT ENABLED(MMU2_DEBUG) #include "../../core/debug_out.h" @@ -711,6 +715,9 @@ void MMU2::filament_runout() { #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("MMU2 Eject Recover")); + #endif while (wait_for_user) idle(); BUZZ(200, 404); BUZZ(200, 404); diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 5c4b4d56845b..faf2d8b11095 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -249,6 +249,8 @@ class FilamentSensorBase { && (dual_x_carriage_mode == DXC_DUPLICATION_MODE || dual_x_carriage_mode == DXC_MIRRORED_MODE) #elif ENABLED(MULTI_NOZZLE_DUPLICATION) && extruder_duplication_enabled + #else + && false #endif #endif ) return runout_states; // Any extruder diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index b3ea6e7cb7ea..428a5986fadb 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -27,7 +27,7 @@ #include "tmc_util.h" #include "../Marlin.h" -#include "../module/stepper_indirection.h" +#include "../module/stepper/indirection.h" #include "../module/printcounter.h" #include "../libs/duration_t.h" #include "../gcode/gcode.h" diff --git a/Marlin/src/feature/touch/xpt2046.cpp b/Marlin/src/feature/touch/xpt2046.cpp index 747659dc7c01..3acfc0199e9d 100644 --- a/Marlin/src/feature/touch/xpt2046.cpp +++ b/Marlin/src/feature/touch/xpt2046.cpp @@ -63,10 +63,6 @@ void XPT2046::init(void) { uint8_t XPT2046::read_buttons() { int16_t tsoffsets[4] = { 0 }; - static uint32_t touchtimeout = 0; - if (PENDING(millis(), touchtimeout)) return 0; - touchtimeout = millis() + 80; // ideally want to set this lower for the games... 30 or 40. - if (tsoffsets[0] + tsoffsets[1] == 0) { // Not yet set, so use defines as fallback... tsoffsets[0] = XPT2046_X_CALIBRATION; @@ -84,10 +80,11 @@ uint8_t XPT2046::read_buttons() { if (y < 175 || y > 234) return 0; - if (WITHIN(x, 11, 109)) encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * ENCODER_PULSES_PER_STEP; - else if (WITHIN(x, 111, 209)) encoderDiff = ENCODER_STEPS_PER_MENU_ITEM * ENCODER_PULSES_PER_STEP; - else if (WITHIN(x, 211, 309)) return EN_C; - return 0; + return WITHIN(x, 14, 77) ? EN_D + : WITHIN(x, 90, 153) ? EN_A + : WITHIN(x, 166, 229) ? EN_B + : WITHIN(x, 242, 305) ? EN_C + : 0; } bool XPT2046::isTouched() { diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index d936809051f0..420eb65c9f3a 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -453,6 +453,7 @@ void GcodeSuite::G28(const bool always_home_all) { ui.refresh(); report_current_position(); + #if ENABLED(NANODLP_Z_SYNC) #if ENABLED(NANODLP_ALL_AXIS) #define _HOME_SYNC true // For any axis, output sync text. diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 397f5d2f75e6..5eaadeb77d45 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -445,7 +445,7 @@ void GcodeSuite::G33() { _tower_results = (_4p_calibration && towers_set) || probe_points >= 3, _opposite_results = (_4p_calibration && !towers_set) || probe_points >= 3, _endstop_results = probe_points != 1 && probe_points != -1 && probe_points != 0, - _angle_results = probe_points >= 3 && towers_set; + _angle_results = probe_points >= 3 && towers_set; static const char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h"; int8_t iterations = 0; float test_precision, diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 101b3cc008ea..4b38eff325b1 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -284,7 +284,7 @@ void GcodeSuite::G34() { // Home Z after the alignment procedure process_subcommands_now_P(PSTR("G28 Z")); - } while(0); + }while(0); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G34"); } diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 8909397b3272..7b048f21904f 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -42,6 +42,10 @@ #include "../../feature/host_actions.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../../lcd/extensible_ui/ui_api.h" +#endif + #ifndef GET_PIN_MAP_PIN_M43 #define GET_PIN_MAP_PIN_M43(Q) GET_PIN_MAP_PIN(Q) #endif @@ -329,6 +333,9 @@ void GcodeSuite::M43() { #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("M43 Wait Called")); + #endif #endif for (;;) { diff --git a/Marlin/src/gcode/control/M108_M112_M410.cpp b/Marlin/src/gcode/control/M108_M112_M410.cpp index 242aac1c0674..9b6193bd9309 100644 --- a/Marlin/src/gcode/control/M108_M112_M410.cpp +++ b/Marlin/src/gcode/control/M108_M112_M410.cpp @@ -38,10 +38,10 @@ void GcodeSuite::M108() { } /** - * M112: Emergency Stop + * M112: Full Shutdown */ void GcodeSuite::M112() { - kill(); + kill(PSTR("M112 Shutdown"), true); } /** diff --git a/Marlin/src/gcode/control/M17_M18_M84.cpp b/Marlin/src/gcode/control/M17_M18_M84.cpp index 6706cee008a0..de6eab4f7422 100644 --- a/Marlin/src/gcode/control/M17_M18_M84.cpp +++ b/Marlin/src/gcode/control/M17_M18_M84.cpp @@ -30,11 +30,21 @@ #endif /** - * M17: Enable power on all stepper motors + * M17: Enable stepper motors */ void GcodeSuite::M17() { - LCD_MESSAGEPGM(MSG_NO_MOVE); - enable_all_steppers(); + if (parser.seen("XYZE")) { + if (parser.seen('X')) enable_X(); + if (parser.seen('Y')) enable_Y(); + if (parser.seen('Z')) enable_Z(); + #if HAS_E_STEPPER_ENABLE + if (parser.seen('E')) enable_e_steppers(); + #endif + } + else { + LCD_MESSAGEPGM(MSG_NO_MOVE); + enable_all_steppers(); + } } /** @@ -45,20 +55,17 @@ void GcodeSuite::M18_M84() { stepper_inactive_time = parser.value_millis_from_seconds(); } else { - bool all_axis = !(parser.seen('X') || parser.seen('Y') || parser.seen('Z') || parser.seen('E')); - if (all_axis) { - planner.finish_and_disable(); - } - else { + if (parser.seen("XYZE")) { planner.synchronize(); if (parser.seen('X')) disable_X(); if (parser.seen('Y')) disable_Y(); if (parser.seen('Z')) disable_Z(); - // Only disable on boards that have separate ENABLE_PINS or another method for disabling the driver - #if (E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN) || AXIS_DRIVER_TYPE_E0(TMC2660) || AXIS_DRIVER_TYPE_E1(TMC2660) || AXIS_DRIVER_TYPE_E2(TMC2660) || AXIS_DRIVER_TYPE_E3(TMC2660) || AXIS_DRIVER_TYPE_E4(TMC2660) || AXIS_DRIVER_TYPE_E5(TMC2660) + #if HAS_E_STEPPER_ENABLE if (parser.seen('E')) disable_e_steppers(); #endif } + else + planner.finish_and_disable(); #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL) if (ubl.lcd_map_control) { diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index efb749501769..03f73fe87787 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -86,7 +86,7 @@ /** * M81: Turn off Power, including Power Supply, if there is one. * - * This code should ALWAYS be available for EMERGENCY SHUTDOWN! + * This code should ALWAYS be available for FULL SHUTDOWN! */ void GcodeSuite::M81() { thermalManager.disable_all_heaters(); diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 8a016e13e647..79bacf06623d 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -52,7 +52,7 @@ void GcodeSuite::M502() { * M503: print settings currently in memory */ void GcodeSuite::M503() { - (void)settings.report(parser.boolval('S', true)); + (void)settings.report(!parser.boolval('S', true)); } #endif // !DISABLE_M503 diff --git a/Marlin/src/gcode/feature/L6470/M122.cpp b/Marlin/src/gcode/feature/L6470/M122.cpp index 2e50d8ff7905..1fbb72aacf3a 100644 --- a/Marlin/src/gcode/feature/L6470/M122.cpp +++ b/Marlin/src/gcode/feature/L6470/M122.cpp @@ -26,7 +26,7 @@ #include "../../gcode.h" #include "../../../libs/L6470/L6470_Marlin.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" inline void echo_yes_no(const bool yes) { serialprintPGM(yes ? PSTR(" YES") : PSTR(" NO ")); } diff --git a/Marlin/src/gcode/feature/L6470/M906.cpp b/Marlin/src/gcode/feature/L6470/M906.cpp index df0c085bc697..7f48033190a1 100644 --- a/Marlin/src/gcode/feature/L6470/M906.cpp +++ b/Marlin/src/gcode/feature/L6470/M906.cpp @@ -26,7 +26,7 @@ #include "../../gcode.h" #include "../../../libs/L6470/L6470_Marlin.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" #include "../../../module/planner.h" #define DEBUG_OUT ENABLED(L6470_CHITCHAT) diff --git a/Marlin/src/gcode/feature/L6470/M916-918.cpp b/Marlin/src/gcode/feature/L6470/M916-918.cpp index 0e79d5f233d7..b756c6cf88e5 100644 --- a/Marlin/src/gcode/feature/L6470/M916-918.cpp +++ b/Marlin/src/gcode/feature/L6470/M916-918.cpp @@ -25,7 +25,7 @@ #if HAS_DRIVER(L6470) #include "../../gcode.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" #include "../../../module/planner.h" #include "../../../libs/L6470/L6470_Marlin.h" diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index 6463889c2a25..e8239838d79c 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -26,7 +26,7 @@ #include "../../gcode.h" #include "../../../feature/tmc_util.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" template void tmc_say_stealth_status(TMC &st) { diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp index ba57fbb4ce38..072f7ba1fdd7 100644 --- a/Marlin/src/gcode/feature/trinamic/M906.cpp +++ b/Marlin/src/gcode/feature/trinamic/M906.cpp @@ -26,7 +26,7 @@ #include "../../gcode.h" #include "../../../feature/tmc_util.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" /** * M906: Set motor current in milliamps. diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index 459c3f6aa846..27a0be9a64cc 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -26,7 +26,7 @@ #include "../../gcode.h" #include "../../../feature/tmc_util.h" -#include "../../../module/stepper_indirection.h" +#include "../../../module/stepper/indirection.h" #include "../../../module/planner.h" #include "../../queue.h" diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index e6eb46dc936c..1db3a304eb58 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -342,6 +342,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 12: M12(); break; // M12: Synchronize and optionally force a CLC set #endif + #if ENABLED(EXPECTED_PRINTER_CHECK) + case 16: M16(); break; // M16: Expected printer check + #endif + case 17: M17(); break; // M17: Enable all stepper motors #if ENABLED(SDSUPPORT) @@ -403,7 +407,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #if DISABLED(EMERGENCY_PARSER) case 108: M108(); break; // M108: Cancel Waiting - case 112: M112(); break; // M112: Emergency Stop + case 112: M112(); break; // M112: Full Shutdown case 410: M410(); break; // M410: Quickstop - Abort all the planned moves. #if ENABLED(HOST_PROMPT_SUPPORT) case 876: M876(); break; // M876: Handle Host prompt responses diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index b7a2e3e4ba34..71eb7005c447 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -83,6 +83,7 @@ * M8 - Turn flood coolant ON. (Requires COOLANT_CONTROL) * M9 - Turn coolant OFF. (Requires COOLANT_CONTROL) * M12 - Set up closed loop control system. (Requires EXTERNAL_CLOSED_LOOP_CONTROLLER) + * M16 - Expected printer check. (Requires EXPECTED_PRINTER_CHECK) * M17 - Enable/Power all stepper motors * M18 - Disable all stepper motors; same as M84 * M20 - List SD card. (Requires SDSUPPORT) @@ -131,7 +132,7 @@ * If AUTOTEMP is enabled, S B F. Exit autotemp by any M109 without F * M110 - Set the current line number. (Used by host printing) * M111 - Set debug flags: "M111 S". See flag bits defined in enum.h. - * M112 - Emergency stop. + * M112 - Full Shutdown. * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE) * M114 - Report current position. * M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT) @@ -472,6 +473,10 @@ class GcodeSuite { static void M12(); #endif + #if ENABLED(EXPECTED_PRINTER_CHECK) + static void M16(); + #endif + static void M17(); static void M18_M84(); diff --git a/Marlin/src/gcode/geometry/G53-G59.cpp b/Marlin/src/gcode/geometry/G53-G59.cpp index 813c026e7502..88914ccffde0 100644 --- a/Marlin/src/gcode/geometry/G53-G59.cpp +++ b/Marlin/src/gcode/geometry/G53-G59.cpp @@ -27,23 +27,21 @@ #include "../../module/stepper.h" +//#define DEBUG_M53 + /** * Select a coordinate system and update the workspace offset. * System index -1 is used to specify machine-native. */ bool GcodeSuite::select_coordinate_system(const int8_t _new) { if (active_coordinate_system == _new) return false; - planner.synchronize(); - float old_offset[XYZ] = { 0 }, new_offset[XYZ] = { 0 }; - if (WITHIN(active_coordinate_system, 0, MAX_COORDINATE_SYSTEMS - 1)) - COPY(old_offset, coordinate_system[active_coordinate_system]); + active_coordinate_system = _new; + float new_offset[XYZ] = { 0 }; if (WITHIN(_new, 0, MAX_COORDINATE_SYSTEMS - 1)) COPY(new_offset, coordinate_system[_new]); - active_coordinate_system = _new; LOOP_XYZ(i) { - const float diff = new_offset[i] - old_offset[i]; - if (diff) { - position_shift[i] += diff; + if (position_shift[i] != new_offset[i]) { + position_shift[i] = new_offset[i]; update_workspace_offset((AxisEnum)i); } } @@ -60,11 +58,20 @@ bool GcodeSuite::select_coordinate_system(const int8_t _new) { * Marlin also uses G53 on a line by itself to go back to native space. */ void GcodeSuite::G53() { - const int8_t _system = active_coordinate_system; - active_coordinate_system = -1; - if (parser.chain()) { // If this command has more following... - process_parsed_command(); - active_coordinate_system = _system; + const int8_t old_system = active_coordinate_system; + select_coordinate_system(-1); // Always remove workspace offsets + #ifdef DEBUG_M53 + SERIAL_ECHOLNPGM("Go to native space"); + report_current_position(); + #endif + + if (parser.chain()) { // Command to chain? + process_parsed_command(); // ...process the chained command + select_coordinate_system(old_system); + #ifdef DEBUG_M53 + SERIAL_ECHOLNPAIR("Go back to workspace ", old_system); + report_current_position(); + #endif } } diff --git a/Marlin/src/gcode/geometry/G92.cpp b/Marlin/src/gcode/geometry/G92.cpp index 9304274520ee..0ecf43e580dc 100644 --- a/Marlin/src/gcode/geometry/G92.cpp +++ b/Marlin/src/gcode/geometry/G92.cpp @@ -52,12 +52,9 @@ void GcodeSuite::G92() { case 1: { // Zero the G92 values and restore current position #if !IS_SCARA - LOOP_XYZ(i) { - const float v = position_shift[i]; - if (v) { - position_shift[i] = 0; - update_workspace_offset((AxisEnum)i); - } + LOOP_XYZ(i) if (position_shift[i]) { + position_shift[i] = 0; + update_workspace_offset((AxisEnum)i); } #endif // Not SCARA } return; diff --git a/Marlin/src/gcode/host/M114.cpp b/Marlin/src/gcode/host/M114.cpp index b4b2f58d3337..58d7ef3e33c6 100644 --- a/Marlin/src/gcode/host/M114.cpp +++ b/Marlin/src/gcode/host/M114.cpp @@ -31,7 +31,7 @@ #if HAS_DRIVER(L6470) //C:\Users\bobku\Documents\GitHub\Marlin-Bob-2\Marlin\src\gcode\host\M114.cpp //C:\Users\bobku\Documents\GitHub\Marlin-Bob-2\Marlin\src\module\bob_L6470.cpp - #include "../../module/L6470/L6470_Marlin.h" + #include "../../libs/L6470/L6470_Marlin.h" #define DEBUG_OUT ENABLED(L6470_CHITCHAT) #include "../../core/debug_out.h" #endif diff --git a/Marlin/src/gcode/host/M16.cpp b/Marlin/src/gcode/host/M16.cpp new file mode 100644 index 000000000000..94ae79b263bf --- /dev/null +++ b/Marlin/src/gcode/host/M16.cpp @@ -0,0 +1,40 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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(EXPECTED_PRINTER_CHECK) + +#include "../gcode.h" +#include "../../Marlin.h" + +/** + * M16: Expected Printer Check + */ +void GcodeSuite::M16() { + + if (strcmp_P(parser.string_arg, PSTR(MACHINE_NAME))) + kill(PSTR(MSG_EXPECTED_PRINTER)); + +} + +#endif diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 3bbf32991890..05fb7576fb9a 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -97,6 +97,9 @@ void GcodeSuite::M0_M1() { #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("M0/1 Break Called")); + #endif if (ms > 0) { ms += millis(); // wait until this time for a click @@ -105,10 +108,6 @@ void GcodeSuite::M0_M1() { else while (wait_for_user) idle(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onUserConfirmRequired(nullptr); - #endif - #if HAS_LEDS_OFF_FLAG printerEventLEDs.onResumeAfterWait(); #endif diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index de87103ff955..76a63a21af1b 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -225,6 +225,9 @@ void GCodeParser::parse(char *p) { case 810: case 811: case 812: case 813: case 814: case 815: case 816: case 817: case 818: case 819: #endif + #if ENABLED(EXPECTED_PRINTER_CHECK) + case 16: + #endif case 23: case 28: case 30: case 117: case 118: case 928: string_arg = p; return; default: break; } diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index 8749a59868c1..d8589031edf7 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -33,9 +33,6 @@ */ void GcodeSuite::M75() { print_job_timer.start(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onPrintTimerStarted(); - #endif } /** diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index da099fffaf4f..2d088ed30bcb 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -30,9 +30,6 @@ #define DOGLCD #define IS_ULTIPANEL - #define DEFAULT_LCD_CONTRAST 90 - #define LCD_CONTRAST_MIN 60 - #define LCD_CONTRAST_MAX 140 #elif ENABLED(ZONESTAR_LCD) @@ -63,25 +60,13 @@ #define IS_ULTIPANEL #if ENABLED(miniVIKI) - #define LCD_CONTRAST_MIN 75 - #define LCD_CONTRAST_MAX 115 - #define DEFAULT_LCD_CONTRAST 95 #define U8GLIB_ST7565_64128N #elif ENABLED(VIKI2) - #define LCD_CONTRAST_MIN 0 - #define LCD_CONTRAST_MAX 255 - #define DEFAULT_LCD_CONTRAST 140 #define U8GLIB_ST7565_64128N #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define LCD_CONTRAST_MIN 90 - #define LCD_CONTRAST_MAX 130 - #define DEFAULT_LCD_CONTRAST 110 #define U8GLIB_LM6059_AF #define SD_DETECT_INVERTED #elif ENABLED(AZSMZ_12864) - #define LCD_CONTRAST_MIN 120 - #define LCD_CONTRAST_MAX 255 - #define DEFAULT_LCD_CONTRAST 190 #define U8GLIB_ST7565_64128N #endif @@ -128,17 +113,12 @@ #elif ENABLED(MKS_MINI_12864) #define MINIPANEL - #define DEFAULT_LCD_CONTRAST 150 - #define LCD_CONTRAST_MAX 255 #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) #define FYSETC_MINI_12864 #define DOGLCD #define IS_ULTIPANEL - #define LCD_CONTRAST_MIN 0 - #define LCD_CONTRAST_MAX 255 - #define DEFAULT_LCD_CONTRAST 220 #define LED_COLORS_REDUCE_GREEN #if HAS_POWER_SWITCH && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) #define LED_BACKLIGHT_TIMEOUT 10000 @@ -166,9 +146,6 @@ #define IS_ULTIPANEL #define U8GLIB_SSD1309 #define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin - #define LCD_CONTRAST_MIN 0 - #define LCD_CONTRAST_MAX 254 - #define DEFAULT_LCD_CONTRAST 127 #define ENCODER_PULSES_PER_STEP 2 #define ENCODER_STEPS_PER_MENU_ITEM 2 @@ -190,9 +167,6 @@ #if ENABLED(MAKRPANEL) #define U8GLIB_ST7565_64128N #endif - #ifndef DEFAULT_LCD_CONTRAST - #define DEFAULT_LCD_CONTRAST 17 - #endif #endif #if ENABLED(IS_U8GLIB_SSD1306) @@ -368,7 +342,7 @@ #endif // Extensible UI serial touch screens. (See src/lcd/extensible_ui) -#if EITHER(MALYAN_LCD, DGUS_LCD) +#if ANY(MALYAN_LCD, DGUS_LCD, LULZBOT_TOUCH_UI) #define IS_EXTUI #define EXTENSIBLE_UI #endif @@ -381,22 +355,6 @@ #define HAS_LCD_MENU (ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS)) #define HAS_ADC_BUTTONS ENABLED(ADC_KEYPAD) -/** - * Default LCD contrast for Graphical LCD displays - */ -#define HAS_LCD_CONTRAST (HAS_GRAPHICAL_LCD && defined(DEFAULT_LCD_CONTRAST)) -#if HAS_LCD_CONTRAST - #ifndef LCD_CONTRAST_MIN - #define LCD_CONTRAST_MIN 0 - #endif - #ifndef LCD_CONTRAST_MAX - #define LCD_CONTRAST_MAX 63 - #endif - #ifndef DEFAULT_LCD_CONTRAST - #define DEFAULT_LCD_CONTRAST 32 - #endif -#endif - /** * Extruders have some combination of stepper motors and hotends * so we separate these concepts into the defines: @@ -567,7 +525,7 @@ #define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE) #define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) -#define HAS_SERVICE_INTERVALS (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0) +#define HAS_SERVICE_INTERVALS (ENABLED(PRINTCOUNTER) && (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0)) #define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR) #define Z_MULTI_STEPPER_DRIVERS EITHER(Z_DUAL_STEPPER_DRIVERS, Z_TRIPLE_STEPPER_DRIVERS) @@ -594,32 +552,6 @@ #define INVERT_E_DIR false #endif -#if ENABLED(HOST_ACTION_COMMANDS) - #ifndef ACTION_ON_PAUSE - #define ACTION_ON_PAUSE "pause" - #endif - #ifndef ACTION_ON_RESUME - #define ACTION_ON_RESUME "resume" - #endif - #ifndef ACTION_ON_PAUSED - #define ACTION_ON_PAUSED "paused" - #endif - #ifndef ACTION_ON_RESUMED - #define ACTION_ON_RESUMED "resumed" - #endif - #ifndef ACTION_ON_CANCEL - #define ACTION_ON_CANCEL "cancel" - #endif - #if ENABLED(G29_RETRY_AND_RECOVER) - #ifndef ACTION_ON_G29_RECOVER - #define ACTION_ON_G29_RECOVER "probe_rewipe" - #endif - #ifndef ACTION_ON_G29_FAILURE - #define ACTION_ON_G29_FAILURE "probe_failed" - #endif - #endif -#endif - #if ENABLED(SLIM_LCD_MENUS) #define BOOT_MARLIN_LOGO_SMALL #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 168bc9cc17c3..a77117d50b88 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -99,3 +99,9 @@ #define LED_USER_PRESET_BRIGHTNESS 255 #endif #endif + +// Extensible UI pin mapping for RepRapDiscount +#define TOUCH_UI_ULTIPANEL ENABLED(LULZBOT_TOUCH_UI) && ANY(AO_EXP1_PINMAP, AO_EXP2_PINMAP, CR10_TFT_PINMAP) + +// TMC SPI Chaining +#define TMC_USE_CHAIN (X_CHAIN_POS||Y_CHAIN_POS||Z_CHAIN_POS||X2_CHAIN_POS||Y2_CHAIN_POS||Z2_CHAIN_POS||Z3_CHAIN_POS||E0_CHAIN_POS||E1_CHAIN_POS||E2_CHAIN_POS||E3_CHAIN_POS||E4_CHAIN_POS||E5_CHAIN_POS) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c6a2efbd59c6..d9f4855ecb49 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -246,6 +246,63 @@ #define MAX_AUTORETRACT 99 #endif +/** + * LCD Contrast for Graphical Displays + */ +#if ENABLED(CARTESIO_UI) + #define _LCD_CONTRAST_MIN 60 + #define _LCD_CONTRAST_INIT 90 + #define _LCD_CONTRAST_MAX 140 +#elif ENABLED(miniVIKI) + #define _LCD_CONTRAST_MIN 75 + #define _LCD_CONTRAST_INIT 95 + #define _LCD_CONTRAST_MAX 115 +#elif ENABLED(VIKI2) + #define _LCD_CONTRAST_INIT 140 +#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #define _LCD_CONTRAST_MIN 90 + #define _LCD_CONTRAST_INIT 110 + #define _LCD_CONTRAST_MAX 130 +#elif ENABLED(AZSMZ_12864) + #define _LCD_CONTRAST_MIN 120 + #define _LCD_CONTRAST_INIT 190 +#elif ENABLED(MKS_MINI_12864) + #define _LCD_CONTRAST_INIT 150 +#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) + #define _LCD_CONTRAST_INIT 220 +#elif ENABLED(ULTI_CONTROLLER) + #define _LCD_CONTRAST_INIT 127 + #define _LCD_CONTRAST_MAX 254 +#elif EITHER(MAKRPANEL, MINIPANEL) + #define _LCD_CONTRAST_INIT 17 +#endif + +#define HAS_LCD_CONTRAST defined(_LCD_CONTRAST_INIT) +#if HAS_LCD_CONTRAST + #ifndef LCD_CONTRAST_MIN + #ifdef _LCD_CONTRAST_MIN + #define LCD_CONTRAST_MIN _LCD_CONTRAST_MIN + #else + #define LCD_CONTRAST_MIN 0 + #endif + #endif + #ifndef LCD_CONTRAST_INIT + #define LCD_CONTRAST_INIT _LCD_CONTRAST_INIT + #endif + #ifndef LCD_CONTRAST_MAX + #ifdef _LCD_CONTRAST_MAX + #define LCD_CONTRAST_MAX _LCD_CONTRAST_MAX + #elif _LCD_CONTRAST_INIT > 63 + #define LCD_CONTRAST_MAX 255 + #else + #define LCD_CONTRAST_MAX 63 // ST7567 6-bits contrast + #endif + #endif + #ifndef DEFAULT_LCD_CONTRAST + #define DEFAULT_LCD_CONTRAST LCD_CONTRAST_INIT + #endif +#endif + /** * Override here because this is set in Configuration_adv.h */ @@ -917,9 +974,10 @@ #if HOMING_Z_WITH_PROBE #undef Z_STALL_SENSITIVITY #endif - #define X_SENSORLESS (AXIS_HAS_STALLGUARD(X) && defined(X_STALL_SENSITIVITY)) - #define Y_SENSORLESS (AXIS_HAS_STALLGUARD(Y) && defined(Y_STALL_SENSITIVITY)) - #define Z_SENSORLESS (AXIS_HAS_STALLGUARD(Z) && defined(Z_STALL_SENSITIVITY)) + #define X_SENSORLESS (AXIS_HAS_STALLGUARD(X) && defined(X_STALL_SENSITIVITY)) + #define X2_SENSORLESS (AXIS_HAS_STALLGUARD(X2) && defined(X2_STALL_SENSITIVITY)) + #define Y_SENSORLESS (AXIS_HAS_STALLGUARD(Y) && defined(Y_STALL_SENSITIVITY)) + #define Z_SENSORLESS (AXIS_HAS_STALLGUARD(Z) && defined(Z_STALL_SENSITIVITY)) #if ENABLED(SPI_ENDSTOPS) #define X_SPI_SENSORLESS X_SENSORLESS #define Y_SPI_SENSORLESS Y_SENSORLESS @@ -927,6 +985,11 @@ #endif #endif +#define HAS_E_STEPPER_ENABLE (HAS_E_DRIVER(TMC2660) \ + || ( E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != X_ENABLE_PIN \ + && E0_ENABLE_PIN != Y_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN ) \ +) + // Endstops and bed probe #define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_OR_PROBE(A,M)) #define HAS_X_MIN _HAS_STOP(X,MIN) @@ -996,7 +1059,21 @@ #define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)) #define HAS_AUTO_FAN_5 (HOTENDS > 5 && PIN_EXISTS(E5_AUTO_FAN)) #define HAS_AUTO_CHAMBER_FAN (HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN)) + #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 || HAS_AUTO_FAN_4 || HAS_AUTO_FAN_5 || HAS_AUTO_CHAMBER_FAN) +#if HAS_AUTO_FAN + #define AUTO_CHAMBER_IS_0 (CHAMBER_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_1 (CHAMBER_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_2 (CHAMBER_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_3 (CHAMBER_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_4 (CHAMBER_AUTO_FAN_PIN == E4_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_5 (CHAMBER_AUTO_FAN_PIN == E5_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_E (AUTO_CHAMBER_IS_0 || AUTO_CHAMBER_IS_1 || AUTO_CHAMBER_IS_2 || AUTO_CHAMBER_IS_3 || AUTO_CHAMBER_IS_4 || AUTO_CHAMBER_IS_5) +#endif + +#if !HAS_AUTO_CHAMBER_FAN || AUTO_CHAMBER_IS_E + #undef AUTO_POWER_CHAMBER_FAN +#endif // Other fans #define HAS_FAN0 (PIN_EXISTS(FAN)) @@ -1029,7 +1106,8 @@ #define HAS_KILL (PIN_EXISTS(KILL)) #define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) -#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER) || ENABLED(PCA9632_BUZZER)) +#define HAS_BUZZER (PIN_EXISTS(BEEPER) || EITHER(LCD_USE_I2C_BUZZER, PCA9632_BUZZER)) +#define USE_BEEPER (HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER, PCA9632_BUZZER)) #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE)) // Digital control @@ -1551,7 +1629,7 @@ #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 #endif -#else +#elif HAS_BUZZER #ifndef LCD_FEEDBACK_FREQUENCY_HZ #define LCD_FEEDBACK_FREQUENCY_HZ 5000 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index e6bd1beb1d79..66db197ecdbd 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -386,13 +386,15 @@ #error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT. Please update your configuration." #elif defined(SDPOWER) #error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins." +#elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2) + #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them from Configuration.h." #endif -#define BOARD_MKS_13 -1109 -#define BOARD_TRIGORILLA -1131 -#define BOARD_RURAMPS4D -3020 -#define BOARD_FORMBOT_TREX2 -1125 -#define BOARD_BIQU_SKR_V1_1 -2014 +#define BOARD_MKS_13 -1000 +#define BOARD_TRIGORILLA -1001 +#define BOARD_RURAMPS4D -1002 +#define BOARD_FORMBOT_TREX2 -1003 +#define BOARD_BIQU_SKR_V1_1 -1004 #if MB(MKS_13) #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration." #elif MB(TRIGORILLA) @@ -401,8 +403,8 @@ #error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration." #elif MB(FORMBOT_TREX2) #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration." -#elif MB(BOARD_BIQU_SKR_V1_1) - #error "BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration." +#elif MB(BIQU_SKR_V1_1) + #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration." #endif #undef BOARD_MKS_13 #undef BOARD_TRIGORILLA @@ -1009,6 +1011,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif +/** + * Junction deviation is not compatible with kinematic systems. + */ +#if ENABLED(JUNCTION_DEVIATION) && IS_KINEMATIC + #error "Junction deviation is only compatible with Cartesians." +#endif + /** * Probes */ @@ -1892,6 +1901,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + ENABLED(OVERLORD_OLED) \ + ENABLED(DGUS_LCD) \ + ENABLED(MALYAN_LCD) \ + + ENABLED(LULZBOT_TOUCH_UI) \ + ENABLED(FSMC_GRAPHICAL_TFT) #error "Please select no more than one LCD controller option." #endif @@ -2118,6 +2128,70 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "STEALTHCHOP requires TMC2130, TMC2160, TMC2208, TMC2209, or TMC5160 stepper drivers." #endif +#if TMC_USE_CHAIN + #if (X_CHAIN_POS && !PIN_EXISTS(X_CS) ) \ + || (Y_CHAIN_POS && !PIN_EXISTS(Y_CS) ) \ + || (Z_CHAIN_POS && !PIN_EXISTS(Z_CS) ) \ + || (X2_CHAIN_POS && !PIN_EXISTS(X2_CS)) \ + || (Y2_CHAIN_POS && !PIN_EXISTS(Y2_CS)) \ + || (Z2_CHAIN_POS && !PIN_EXISTS(Z2_CS)) \ + || (Z3_CHAIN_POS && !PIN_EXISTS(Z3_CS)) \ + || (E0_CHAIN_POS && !PIN_EXISTS(E0_CS)) \ + || (E1_CHAIN_POS && !PIN_EXISTS(E1_CS)) \ + || (E2_CHAIN_POS && !PIN_EXISTS(E2_CS)) \ + || (E3_CHAIN_POS && !PIN_EXISTS(E3_CS)) \ + || (E4_CHAIN_POS && !PIN_EXISTS(E4_CS)) \ + || (E5_CHAIN_POS && !PIN_EXISTS(E5_CS)) + #error "With TMC_USE_CHAIN all chained TMC drivers need a CS pin." + #else + #if X_CHAIN_POS + #define CS_COMPARE X_CS_PIN + #elif Y_CHAIN_POS + #define CS_COMPARE Y_CS_PIN + #elif Z_CHAIN_POS + #define CS_COMPARE Z_CS_PIN + #elif X2_CHAIN_POS + #define CS_COMPARE X2_CS_PIN + #elif Y2_CHAIN_POS + #define CS_COMPARE Y2_CS_PIN + #elif Z2_CHAIN_POS + #define CS_COMPARE Z2_CS_PIN + #elif Z3_CHAIN_POS + #define CS_COMPARE Z3_CS_PIN + #elif E0_CHAIN_POS + #define CS_COMPARE E0_CS_PIN + #elif E1_CHAIN_POS + #define CS_COMPARE E1_CS_PIN + #elif E2_CHAIN_POS + #define CS_COMPARE E2_CS_PIN + #elif E3_CHAIN_POS + #define CS_COMPARE E3_CS_PIN + #elif E4_CHAIN_POS + #define CS_COMPARE E4_CS_PIN + #elif E5_CHAIN_POS + #define CS_COMPARE E5_CS_PIN + #else + #error "With TMC_USE_CHAIN some TMC drivers should be chained." + #endif + #if (X_CHAIN_POS && X_CS_PIN != CS_COMPARE) \ + || (Y_CHAIN_POS && Y_CS_PIN != CS_COMPARE) \ + || (Z_CHAIN_POS && Z_CS_PIN != CS_COMPARE) \ + || (X2_CHAIN_POS && X2_CS_PIN != CS_COMPARE) \ + || (Y2_CHAIN_POS && Y2_CS_PIN != CS_COMPARE) \ + || (Z2_CHAIN_POS && Z2_CS_PIN != CS_COMPARE) \ + || (Z3_CHAIN_POS && Z3_CS_PIN != CS_COMPARE) \ + || (E0_CHAIN_POS && E0_CS_PIN != CS_COMPARE) \ + || (E1_CHAIN_POS && E1_CS_PIN != CS_COMPARE) \ + || (E2_CHAIN_POS && E2_CS_PIN != CS_COMPARE) \ + || (E3_CHAIN_POS && E3_CS_PIN != CS_COMPARE) \ + || (E4_CHAIN_POS && E4_CS_PIN != CS_COMPARE) \ + || (E5_CHAIN_POS && E5_CS_PIN != CS_COMPARE) + #error "With TMC_USE_CHAIN all TMC drivers must use the same CS pin." + #endif + #endif + #undef CS_COMPARE +#endif // TMC_USE_CHAIN + #if ENABLED(DELTA) && (ENABLED(STEALTHCHOP_XY) != ENABLED(STEALTHCHOP_Z)) #error "STEALTHCHOP_XY and STEALTHCHOP_Z must be the same on DELTA." #endif @@ -2207,7 +2281,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) constexpr float sanity_arr_z_align_x[] = Z_STEPPER_ALIGN_X, sanity_arr_z_align_y[] = Z_STEPPER_ALIGN_Y; static_assert( COUNT(sanity_arr_z_align_x) == Z_STEPPER_COUNT && COUNT(sanity_arr_z_align_y) == Z_STEPPER_COUNT, - "Z_STEPPER_ALIGN_[XY]POS settings require one element per Z stepper." + "Z_STEPPER_ALIGN_[XY] settings require one element per Z stepper." ); #endif diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 95ffad59b960..024654ec9c78 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -51,7 +51,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ - #define STRING_DISTRIBUTION_DATE "2019-08-08" + #define STRING_DISTRIBUTION_DATE "2019-08-30" /** * Required minimum Configuration.h and Configuration_adv.h file versions. @@ -90,7 +90,7 @@ /** * The WEBSITE_URL is the location where users can get more information such as - * documentation about a specific Marlin release. + * documentation about a specific Marlin release. Displayed in the Info Menu. */ #define WEBSITE_URL "http://marlinfw.org" diff --git a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp index 08cc468d208e..781e76d379e7 100644 --- a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp +++ b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp @@ -877,7 +877,7 @@ static int pf_bsearch_cb_comp_hd4map_pgm(void *userdata, size_t idx, void * data return hd44780_charmap_compare(&localval, (hd44780_charmap_t *)data_pin); } -void lcd_moveto(const uint8_t col, const uint8_t row) { lcd.setCursor(col, row); } +void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { lcd.setCursor(col, row); } void lcd_put_int(const int i) { lcd.print(i); } diff --git a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp index b40aab6e09f9..a8cf421dcb8d 100644 --- a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp @@ -269,7 +269,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS #endif // LCD_PROGRESS_BAR - #if ENABLED(SDSUPPORT) + #if ENABLED(SDSUPPORT) && HAS_LCD_MENU // CHARSET_MENU const static PROGMEM byte refresh[8] = { @@ -319,7 +319,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS #endif { createChar_P(LCD_STR_UPLEVEL[0], uplevel); - #if ENABLED(SDSUPPORT) + #if ENABLED(SDSUPPORT) && HAS_LCD_MENU // SD Card sub-menu special characters createChar_P(LCD_STR_REFRESH[0], refresh); createChar_P(LCD_STR_FOLDER[0], folder); @@ -360,23 +360,48 @@ void MarlinUI::init_lcd() { lcd.clear(); } +bool MarlinUI::detected() { + return true + #if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE) + && lcd.LcdDetected() == 1 + #endif + ; +} + +#if HAS_SLOW_BUTTONS + uint8_t MarlinUI::read_slow_buttons() { + #if ENABLED(LCD_I2C_TYPE_MCP23017) + // Reading these buttons this is likely to be too slow to call inside interrupt context + // so they are called during normal lcd_update + uint8_t slow_bits = lcd.readButtons() + #if !BUTTON_EXISTS(ENC) + << B_I2C_BTN_OFFSET + #endif + ; + #if ENABLED(LCD_I2C_VIKI) + if ((slow_bits & (B_MI | B_RI)) && PENDING(millis(), next_button_update_ms)) // LCD clicked + slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated + #endif // LCD_I2C_VIKI + return slow_bits; + #endif // LCD_I2C_TYPE_MCP23017 + } +#endif + void MarlinUI::clear_lcd() { lcd.clear(); } #if ENABLED(SHOW_BOOTSCREEN) - void lcd_erase_line(const int16_t line) { + void lcd_erase_line(const lcd_uint_t line) { lcd_moveto(0, line); for (uint8_t i = LCD_WIDTH + 1; --i;) lcd_put_wchar(' '); } // Scroll the PSTR 'text' in a 'len' wide field for 'time' milliseconds at position col,line - void lcd_scroll(const uint8_t col, const uint8_t line, PGM_P const text, const uint8_t len, const int16_t time) { + void lcd_scroll(const lcd_uint_t col, const lcd_uint_t line, PGM_P const text, const uint8_t len, const int16_t time) { uint8_t slen = utf8_strlen_P(text); if (slen < len) { - // Fits into, - lcd_moveto(col, line); - lcd_put_u8str_max_P(text, len); + lcd_put_u8str_max_P(col, line, text, len); for (; slen < len; ++slen) lcd_put_wchar(' '); safe_delay(time); } @@ -385,11 +410,8 @@ void MarlinUI::clear_lcd() { lcd.clear(); } int dly = time / _MAX(slen, 1); for (uint8_t i = 0; i <= slen; i++) { - // Go to the correct place - lcd_moveto(col, line); - - // Print the text - lcd_put_u8str_max_P(p, len); + // Print the text at the correct place + lcd_put_u8str_max_P(col, line, p, len); // Fill with spaces for (uint8_t ix = slen - i; ix < len; ++ix) lcd_put_wchar(' '); @@ -406,9 +428,9 @@ void MarlinUI::clear_lcd() { lcd.clear(); } static void logo_lines(PGM_P const extra) { int16_t indent = (LCD_WIDTH - 8 - utf8_strlen_P(extra)) / 2; - lcd_moveto(indent, 0); lcd_put_wchar('\x00'); lcd_put_u8str_P(PSTR( "------" )); lcd_put_wchar('\x01'); - lcd_moveto(indent, 1); lcd_put_u8str_P(PSTR("|Marlin|")); lcd_put_u8str_P(extra); - lcd_moveto(indent, 2); lcd_put_wchar('\x02'); lcd_put_u8str_P(PSTR( "------" )); lcd_put_wchar('\x03'); + lcd_put_wchar(indent, 0, '\x00'); lcd_put_u8str_P(PSTR( "------" )); lcd_put_wchar('\x01'); + lcd_put_u8str_P(indent, 1, PSTR("|Marlin|")); lcd_put_u8str_P(extra); + lcd_put_wchar(indent, 2, '\x02'); lcd_put_u8str_P(PSTR( "------" )); lcd_put_wchar('\x03'); } void MarlinUI::show_bootscreen() { @@ -420,67 +442,35 @@ void MarlinUI::clear_lcd() { lcd.clear(); } #define CENTER_OR_SCROLL(STRING,DELAY) \ lcd_erase_line(3); \ if (utf8_strlen(STRING) <= LCD_WIDTH) { \ - lcd_moveto((LCD_WIDTH - utf8_strlen_P(PSTR(STRING))) / 2, 3); \ - lcd_put_u8str_P(PSTR(STRING)); \ + lcd_put_u8str_P((LCD_WIDTH - utf8_strlen_P(PSTR(STRING))) / 2, 3, PSTR(STRING)); \ safe_delay(DELAY); \ } \ else { \ lcd_scroll(0, 3, PSTR(STRING), LCD_WIDTH, DELAY); \ } - #ifdef STRING_SPLASH_LINE1 - // - // Show the Marlin logo with splash line 1 - // - if (LCD_EXTRA_SPACE >= utf8_strlen(STRING_SPLASH_LINE1) + 1) { - // - // Show the Marlin logo, splash line1, and splash line 2 - // - logo_lines(PSTR(" " STRING_SPLASH_LINE1)); - #ifdef STRING_SPLASH_LINE2 - CENTER_OR_SCROLL(STRING_SPLASH_LINE2, 2000); - #else - safe_delay(2000); - #endif - } - else { - // - // Show the Marlin logo with splash line 1 - // After a delay show splash line 2, if it exists - // - #ifdef STRING_SPLASH_LINE2 - #define _SPLASH_WAIT_1 1500 - #else - #define _SPLASH_WAIT_1 2000 - #endif - logo_lines(PSTR("")); - CENTER_OR_SCROLL(STRING_SPLASH_LINE1, _SPLASH_WAIT_1); - #ifdef STRING_SPLASH_LINE2 - CENTER_OR_SCROLL(STRING_SPLASH_LINE2, 1500); - #ifdef STRING_SPLASH_LINE3 - CENTER_OR_SCROLL(STRING_SPLASH_LINE3, 1500); - #endif - #endif - } - #elif defined(STRING_SPLASH_LINE2) + // + // Show the Marlin logo with splash line 1 + // + if (LCD_EXTRA_SPACE >= utf8_strlen(SHORT_BUILD_VERSION) + 1) { // - // Show splash line 2 only, alongside the logo if possible + // Show the Marlin logo, splash line1, and splash line 2 // - if (LCD_EXTRA_SPACE >= utf8_strlen(STRING_SPLASH_LINE2) + 1) { - logo_lines(PSTR(" " STRING_SPLASH_LINE2)); - safe_delay(2000); - } - else { - logo_lines(PSTR("")); - CENTER_OR_SCROLL(STRING_SPLASH_LINE2, 2000); - } - #else + logo_lines(PSTR(" " SHORT_BUILD_VERSION)); + CENTER_OR_SCROLL(MARLIN_WEBSITE_URL, 2000); + } + else { // - // Show only the Marlin logo + // Show the Marlin logo and short build version + // After a delay show the website URL // logo_lines(PSTR("")); - safe_delay(2000); - #endif + CENTER_OR_SCROLL(SHORT_BUILD_VERSION, 1500); + CENTER_OR_SCROLL(MARLIN_WEBSITE_URL, 1500); + #ifdef STRING_SPLASH_LINE3 + CENTER_OR_SCROLL(STRING_SPLASH_LINE3, 1500); + #endif + } lcd.clear(); safe_delay(100); @@ -491,16 +481,12 @@ void MarlinUI::clear_lcd() { lcd.clear(); } #endif // SHOW_BOOTSCREEN void MarlinUI::draw_kill_screen() { - lcd_moveto(0, 0); - lcd_put_u8str(status_message); - #if LCD_HEIGHT < 4 - lcd_moveto(0, 2); - #else - lcd_moveto(0, 2); - lcd_put_u8str_P(PSTR(MSG_HALTED)); - lcd_moveto(0, 3); + lcd_put_u8str(0, 0, status_message); + lcd_uint_t y = 2; + #if LCD_HEIGHT >= 4 + lcd_put_u8str_P(0, y++, PSTR(MSG_HALTED)); #endif - lcd_put_u8str_P(PSTR(MSG_PLEASE_RESET)); + lcd_put_u8str_P(0, y, PSTR(MSG_PLEASE_RESET)); } // @@ -568,11 +554,13 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const char pref FORCE_INLINE void _draw_bed_status(const bool blink) { _draw_heater_status(H_BED, ( - #if HAS_LEVELING - planner.leveling_active && blink ? '_' : - #endif - LCD_STR_BEDTEMP[0] - ), blink); + #if HAS_LEVELING + planner.leveling_active && blink ? '_' : + #endif + LCD_STR_BEDTEMP[0] + ), + blink + ); } #if HAS_PRINT_PROGRESS @@ -859,8 +847,7 @@ void MarlinUI::draw_status_screen() { #if LCD_HEIGHT > 3 - lcd_moveto(0, 2); - lcd_put_wchar(LCD_STR_FEEDRATE[0]); + lcd_put_wchar(0, 2, LCD_STR_FEEDRATE[0]); lcd_put_u8str(i16tostr3(feedrate_percentage)); lcd_put_wchar('%'); @@ -868,8 +855,7 @@ void MarlinUI::draw_status_screen() { duration_t elapsed = print_job_timer.duration(); const uint8_t len = elapsed.toDigital(buffer), timepos = LCD_WIDTH - len - 1; - lcd_moveto(timepos, 2); - lcd_put_wchar(LCD_STR_CLOCK[0]); + lcd_put_wchar(timepos, 2, LCD_STR_CLOCK[0]); lcd_put_u8str(buffer); #if LCD_WIDTH >= 20 @@ -918,8 +904,7 @@ void MarlinUI::draw_status_screen() { _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position[Z_AXIS])), blink); #if HAS_LEVELING && (HOTENDS > 1 || !HAS_HEATED_BED) - lcd_moveto(LCD_WIDTH - 1, 0); - lcd_put_wchar(planner.leveling_active || blink ? '_' : ' '); + lcd_put_wchar(LCD_WIDTH - 1, 0, planner.leveling_active || blink ? '_' : ' '); #endif // ========== Line 2 ========== @@ -934,8 +919,7 @@ void MarlinUI::draw_status_screen() { _draw_bed_status(blink); #endif - lcd_moveto(LCD_WIDTH - 9, 1); - lcd_put_wchar(LCD_STR_FEEDRATE[0]); + lcd_put_wchar(LCD_WIDTH - 9, 1, LCD_STR_FEEDRATE[0]); lcd_put_u8str(i16tostr3(feedrate_percentage)); lcd_put_wchar('%'); @@ -1006,8 +990,7 @@ void MarlinUI::draw_status_screen() { void draw_menu_item(const bool sel, const uint8_t row, PGM_P pstr, const char pre_char, const char post_char) { uint8_t n = LCD_WIDTH - 2; - lcd_moveto(0, row); - lcd_put_wchar(sel ? pre_char : ' '); + lcd_put_wchar(0, row, sel ? pre_char : ' '); n -= lcd_put_u8str_max_P(pstr, n); for (; n; --n) lcd_put_wchar(' '); lcd_put_wchar(post_char); @@ -1015,8 +998,7 @@ void MarlinUI::draw_status_screen() { void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P pstr, const char* const data, const bool pgm) { uint8_t n = LCD_WIDTH - 2 - (pgm ? utf8_strlen_P(data) : utf8_strlen(data)); - lcd_moveto(0, row); - lcd_put_wchar(sel ? LCD_STR_ARROW_RIGHT[0] : ' '); + lcd_put_wchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' '); n -= lcd_put_u8str_max_P(pstr, n); lcd_put_wchar(':'); for (; n; --n) lcd_put_wchar(' '); @@ -1026,14 +1008,12 @@ void MarlinUI::draw_status_screen() { void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { ui.encoder_direction_normal(); - lcd_moveto(0, 1); - lcd_put_u8str_P(pstr); + lcd_put_u8str_P(0, 1, pstr); if (value != nullptr) { lcd_put_wchar(':'); int len = utf8_strlen(value); - const uint8_t valrow = (utf8_strlen_P(pstr) + 1 + len + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit - lcd_moveto((LCD_WIDTH - 1) - (len + 1), valrow); // Right-justified, padded by spaces - lcd_put_wchar(' '); // Overwrite char if value gets shorter + const lcd_uint_t valrow = (utf8_strlen_P(pstr) + 1 + len + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit + lcd_put_wchar((LCD_WIDTH - 1) - (len + 1), valrow, ' '); // Right-justified, padded, add a leading space lcd_put_u8str(value); } } @@ -1051,8 +1031,7 @@ void MarlinUI::draw_status_screen() { void draw_sd_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard, const bool isDir) { UNUSED(pstr); - lcd_moveto(0, row); - lcd_put_wchar(sel ? LCD_STR_ARROW_RIGHT[0] : ' '); + lcd_put_wchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' '); constexpr uint8_t maxlen = LCD_WIDTH - 2; uint8_t n = maxlen - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), maxlen); for (; n; --n) lcd_put_wchar(' '); @@ -1063,7 +1042,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(LCD_HAS_STATUS_INDICATORS) - static void MarlinUI::update_indicators() { + void MarlinUI::update_indicators() { // Set the LEDS - referred to as backlights by the LiquidTWI2 library static uint8_t ledsprev = 0; uint8_t leds = 0; @@ -1144,9 +1123,9 @@ void MarlinUI::draw_status_screen() { } custom_char; typedef struct { - uint8_t column, row, - x_pixel_offset, y_pixel_offset, - x_pixel_mask; + lcd_uint_t column, row, + x_pixel_offset, y_pixel_offset; + uint8_t x_pixel_mask; } coordinate; void add_edges_to_custom_char(custom_char &custom, const coordinate &ul, const coordinate &lr, const coordinate &brc, const uint8_t cell_location); @@ -1174,22 +1153,21 @@ void MarlinUI::draw_status_screen() { return ret_val; } - inline coordinate pixel_location(const uint8_t x, const uint8_t y) { return pixel_location((int16_t)x, (int16_t)y); } + inline coordinate pixel_location(const lcd_uint_t x, const lcd_uint_t y) { return pixel_location((int16_t)x, (int16_t)y); } - void prep_and_put_map_char(custom_char &chrdata, const coordinate &ul, const coordinate &lr, const coordinate &brc, const uint8_t cl, const char c, const uint8_t x, const uint8_t y) { + void prep_and_put_map_char(custom_char &chrdata, const coordinate &ul, const coordinate &lr, const coordinate &brc, const uint8_t cl, const char c, const lcd_uint_t x, const lcd_uint_t y) { add_edges_to_custom_char(chrdata, ul, lr, brc, cl); lcd.createChar(c, (uint8_t*)&chrdata); - lcd_moveto(x, y); - lcd_put_wchar(c); + lcd_put_wchar(x, y, c); } - void MarlinUI::ubl_plot(const uint8_t x, const uint8_t inverted_y) { + void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) { #if LCD_WIDTH >= 20 #define _LCD_W_POS 12 #define _PLOT_X 1 #define _MAP_X 3 - #define _LABEL(C,X,Y) lcd_moveto(X, Y); lcd_put_u8str(C) + #define _LABEL(C,X,Y) lcd_put_u8str(X, Y, C) #define _XLABEL(X,Y) _LABEL("X:",X,Y) #define _YLABEL(X,Y) _LABEL("Y:",X,Y) #define _ZLABEL(X,Y) _LABEL("Z:",X,Y) @@ -1197,7 +1175,7 @@ void MarlinUI::draw_status_screen() { #define _LCD_W_POS 8 #define _PLOT_X 0 #define _MAP_X 1 - #define _LABEL(X,Y,C) lcd_moveto(X, Y); lcd_put_wchar(C) + #define _LABEL(X,Y,C) lcd_put_wchar(X, Y, C) #define _XLABEL(X,Y) _LABEL('X',X,Y) #define _YLABEL(X,Y) _LABEL('Y',X,Y) #define _ZLABEL(X,Y) _LABEL('Z',X,Y) @@ -1209,10 +1187,10 @@ void MarlinUI::draw_status_screen() { * Show X and Y positions */ _XLABEL(_PLOT_X, 0); - lcd_put_u8str(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x])))); + lcd_put_u8str(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot])))); _YLABEL(_LCD_W_POS, 0); - lcd_put_u8str(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[inverted_y])))); + lcd_put_u8str(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot])))); lcd_moveto(_PLOT_X, 0); @@ -1220,13 +1198,13 @@ void MarlinUI::draw_status_screen() { coordinate upper_left, lower_right, bottom_right_corner; custom_char new_char; - uint8_t i, j, k, l, m, n, n_rows, n_cols, y, - bottom_line, right_edge, - x_map_pixels, y_map_pixels, - pixels_per_x_mesh_pnt, pixels_per_y_mesh_pnt, - suppress_x_offset = 0, suppress_y_offset = 0; + uint8_t i, n, n_rows, n_cols; + lcd_uint_t j, k, l, m, bottom_line, right_edge, + x_map_pixels, y_map_pixels, + pixels_per_x_mesh_pnt, pixels_per_y_mesh_pnt, + suppress_x_offset = 0, suppress_y_offset = 0; - y = GRID_MAX_POINTS_Y - inverted_y - 1; + const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y - 1) - y_plot; upper_left.column = 0; upper_left.row = 0; @@ -1261,17 +1239,13 @@ void MarlinUI::draw_status_screen() { n_cols = right_edge / (HD44780_CHAR_WIDTH) + 1; for (i = 0; i < n_cols; i++) { - lcd_moveto(i, 0); - lcd_put_wchar(CHAR_LINE_TOP); // Box Top line - lcd_moveto(i, n_rows - 1); - lcd_put_wchar(CHAR_LINE_BOT); // Box Bottom line + lcd_put_wchar(i, 0, CHAR_LINE_TOP); // Box Top line + lcd_put_wchar(i, n_rows - 1, CHAR_LINE_BOT); // Box Bottom line } for (j = 0; j < n_rows; j++) { - lcd_moveto(0, j); - lcd_put_wchar(CHAR_EDGE_L); // Box Left edge - lcd_moveto(n_cols - 1, j); - lcd_put_wchar(CHAR_EDGE_R); // Box Right edge + lcd_put_wchar(0, j, CHAR_EDGE_L); // Box Left edge + lcd_put_wchar(n_cols - 1, j, CHAR_EDGE_R); // Box Right edge } /** @@ -1281,10 +1255,8 @@ void MarlinUI::draw_status_screen() { k = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 2; l = (HD44780_CHAR_HEIGHT) * n_rows; if (l > k && l - k >= (HD44780_CHAR_HEIGHT) / 2) { - lcd_moveto(0, n_rows - 1); // Box Left edge - lcd_put_wchar(' '); - lcd_moveto(n_cols - 1, n_rows - 1); // Box Right edge - lcd_put_wchar(' '); + lcd_put_wchar(0, n_rows - 1, ' '); // Box Left edge + lcd_put_wchar(n_cols - 1, n_rows - 1, ' '); // Box Right edge } clear_custom_char(&new_char); @@ -1310,12 +1282,12 @@ void MarlinUI::draw_status_screen() { new_char.custom_char_bits[j] = (uint8_t)_BV(i); // Char #3 is used for the box right edge lcd.createChar(CHAR_EDGE_R, (uint8_t*)&new_char); - i = x * pixels_per_x_mesh_pnt - suppress_x_offset; - j = y * pixels_per_y_mesh_pnt - suppress_y_offset; + i = x_plot * pixels_per_x_mesh_pnt - suppress_x_offset; + j = y_plot_inv * pixels_per_y_mesh_pnt - suppress_y_offset; upper_left = pixel_location(i, j); - k = (x + 1) * pixels_per_x_mesh_pnt - 1 - suppress_x_offset; - l = (y + 1) * pixels_per_y_mesh_pnt - 1 - suppress_y_offset; + k = (x_plot + 1) * pixels_per_x_mesh_pnt - 1 - suppress_x_offset; + l = (y_plot_inv + 1) * pixels_per_y_mesh_pnt - 1 - suppress_y_offset; lower_right = pixel_location(k, l); bottom_right_corner = pixel_location(x_map_pixels, y_map_pixels); @@ -1327,7 +1299,7 @@ void MarlinUI::draw_status_screen() { */ clear_custom_char(&new_char); - const uint8_t ypix = _MIN(upper_left.y_pixel_offset + pixels_per_y_mesh_pnt, HD44780_CHAR_HEIGHT); + const lcd_uint_t ypix = _MIN(upper_left.y_pixel_offset + pixels_per_y_mesh_pnt, HD44780_CHAR_HEIGHT); for (j = upper_left.y_pixel_offset; j < ypix; j++) { i = upper_left.x_pixel_mask; for (k = 0; k < pixels_per_x_mesh_pnt; k++) { @@ -1398,11 +1370,10 @@ void MarlinUI::draw_status_screen() { /** * Print plot position */ - lcd_moveto(_LCD_W_POS, 0); - lcd_put_wchar('('); - lcd_put_u8str(ui8tostr3(x)); + lcd_put_wchar(_LCD_W_POS, 0, '('); + lcd_put_u8str(ui8tostr3(x_plot)); lcd_put_wchar(','); - lcd_put_u8str(ui8tostr3(inverted_y)); + lcd_put_u8str(ui8tostr3(y_plot)); lcd_put_wchar(')'); #if LCD_HEIGHT <= 3 // 16x2 or 20x2 display @@ -1411,8 +1382,8 @@ void MarlinUI::draw_status_screen() { * Print Z values */ _ZLABEL(_LCD_W_POS, 1); - if (!isnan(ubl.z_values[x][inverted_y])) - lcd_put_u8str(ftostr43sign(ubl.z_values[x][inverted_y])); + if (!isnan(ubl.z_values[x_plot][y_plot])) + lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot])); else lcd_put_u8str_P(PSTR(" -----")); @@ -1422,16 +1393,16 @@ void MarlinUI::draw_status_screen() { * Show all values at right of screen */ _XLABEL(_LCD_W_POS, 1); - lcd_put_u8str(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x])))); + lcd_put_u8str(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot])))); _YLABEL(_LCD_W_POS, 2); - lcd_put_u8str(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[inverted_y])))); + lcd_put_u8str(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot])))); /** * Show the location value */ _ZLABEL(_LCD_W_POS, 3); - if (!isnan(ubl.z_values[x][inverted_y])) - lcd_put_u8str(ftostr43sign(ubl.z_values[x][inverted_y])); + if (!isnan(ubl.z_values[x_plot][y_plot])) + lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot])); else lcd_put_u8str_P(PSTR(" -----")); diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index efd326c2b77b..0854db855897 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -23,8 +23,16 @@ // Use this file to select the com driver for device drivers that are NOT in the U8G library +#include + #ifndef U8G_HAL_LINKS + // generic prototypes + uint8_t u8g_com_arduino_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_arduino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_arduino_st7920_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_arduino_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #ifdef __SAM3X8E__ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn @@ -36,17 +44,19 @@ #elif defined(__STM32F1__) uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn + uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn #elif defined(ARDUINO_ARCH_STM32) #define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn + uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn - #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn + #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn #elif defined(__AVR__) uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn + #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn #define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn @@ -57,7 +67,10 @@ #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn #endif - uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #ifdef TARGET_LPC1768 + uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #endif + #define U8G_COM_SSD_I2C_HAL u8g_com_arduino_ssd_i2c_fn #if PIN_EXISTS(FSMC_CS) @@ -67,7 +80,8 @@ #define U8G_COM_HAL_FSMC_FN u8g_com_null_fn #endif -#elif TARGET_LPC1768 +#elif defined(TARGET_LPC1768) + uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn @@ -86,6 +100,7 @@ #define U8G_COM_HAL_FSMC_FN u8g_com_null_fn #else // need to give them some definition or else get compiler errors + uint8_t u8g_com_null_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_SW_SPI_FN u8g_com_null_fn #define U8G_COM_HAL_HW_SPI_FN u8g_com_null_fn @@ -93,4 +108,5 @@ #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_null_fn #define U8G_COM_SSD_I2C_HAL u8g_com_null_fn #define U8G_COM_HAL_FSMC_FN u8g_com_null_fn + #endif diff --git a/Marlin/src/lcd/dogm/dogm_Bootscreen.h b/Marlin/src/lcd/dogm/dogm_Bootscreen.h index 7f0c175124a5..ea8ce5e38a3a 100644 --- a/Marlin/src/lcd/dogm/dogm_Bootscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Bootscreen.h @@ -35,7 +35,7 @@ #include "../../../_Bootscreen.h" #ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH - #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH ((CUSTOM_BOOTSCREEN_BMPWIDTH + 7) / 8) + #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH CEILING(CUSTOM_BOOTSCREEN_BMPWIDTH, 8) #endif #ifndef CUSTOM_BOOTSCREEN_BMPHEIGHT #define CUSTOM_BOOTSCREEN_BMPHEIGHT (sizeof(custom_start_bmp) / (CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH)) @@ -69,6 +69,142 @@ B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 }; + #if ENABLED(BOOT_MARLIN_LOGO_ANIMATED) + + const unsigned char start_bmp1[] PROGMEM = { + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 + }; + + const unsigned char start_bmp2[] PROGMEM = { + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111, + B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111, + B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000111, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000011, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 + }; + + const unsigned char start_bmp3[] PROGMEM = { + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111, + B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111, + B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111, + B10001100,B00110000,B11000111,B10000000,B00000000,B00000000,B00000111, + B10001100,B00110000,B11001111,B11000000,B00000000,B00000000,B00000011, + B10001100,B00110000,B11011100,B11100000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11011000,B01100000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11010000,B01100000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11011000,B01100000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11011100,B01100000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11001111,B01110000,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000111,B01110000,B00000000,B00000000,B00000001, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 + }; + + const unsigned char start_bmp4[] PROGMEM = { + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111, + B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111, + B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111, + B10001100,B00110000,B11000111,B10000011,B10000000,B00000000,B00000111, + B10001100,B00110000,B11001111,B11000111,B11000000,B00000000,B00000011, + B10001100,B00110000,B11011100,B11101100,B11100000,B00000000,B00000001, + B10001100,B00110000,B11011000,B01101100,B01100000,B00000000,B00000001, + B10001100,B00110000,B11010000,B01101100,B00000000,B00000000,B00000001, + B10001100,B00110000,B11011000,B01101100,B00000000,B00000000,B00000001, + B10001100,B00110000,B11011100,B01101100,B00000000,B00000000,B00000001, + B10001100,B00110000,B11001111,B01111100,B00000000,B00000000,B00000001, + B10001100,B00110000,B11000111,B01111100,B00000000,B00000000,B00000001, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 + }; + + const unsigned char start_bmp5[] PROGMEM = { + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B10000011,B11001111,B00000000,B00000000,B00001100,B00000000,B00111111, + B10000111,B11111111,B10000000,B00000000,B00001100,B00000000,B00011111, + B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111, + B10001100,B00110000,B11000111,B10000011,B10001100,B00000000,B00000111, + B10001100,B00110000,B11001111,B11000111,B11001100,B00000000,B00000011, + B10001100,B00110000,B11011100,B11101100,B11101100,B00000000,B00000001, + B10001100,B00110000,B11011000,B01101100,B01101100,B00000000,B00000001, + B10001100,B00110000,B11010000,B01101100,B00001100,B00000000,B00000001, + B10001100,B00110000,B11011000,B01101100,B00001100,B00000000,B00000001, + B10001100,B00110000,B11011100,B01101100,B00001110,B00000000,B00000001, + B10001100,B00110000,B11001111,B01111100,B00000111,B10000000,B00000001, + B10001100,B00110000,B11000111,B01111100,B00000011,B10000000,B00000001, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 + }; + + const unsigned char start_bmp6[] PROGMEM = { + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111, + B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111, + B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111, + B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B00000111, + B10001100,B00110000,B11001111,B11000111,B11001100,B00110000,B00000011, + B10001100,B00110000,B11011100,B11101100,B11101100,B00110000,B00000001, + B10001100,B00110000,B11011000,B01101100,B01101100,B00110000,B00000001, + B10001100,B00110000,B11010000,B01101100,B00001100,B00110000,B00000001, + B10001100,B00110000,B11011000,B01101100,B00001100,B00110000,B00000001, + B10001100,B00110000,B11011100,B01101100,B00001110,B00111000,B00000001, + B10001100,B00110000,B11001111,B01111100,B00000111,B10011100,B00000001, + B10001100,B00110000,B11000111,B01111100,B00000011,B10001100,B00000001, + B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000 + }; + + #endif + #else #define START_BMPWIDTH 112 @@ -114,10 +250,269 @@ B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 }; + #if ENABLED(BOOT_MARLIN_LOGO_ANIMATED) + + const unsigned char start_bmp1[] PROGMEM = { + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000, + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 + }; + + const unsigned char start_bmp2[] PROGMEM = { + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111, + B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111, + B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111, + B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111, + B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111, + B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000, + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 + }; + + const unsigned char start_bmp3[] PROGMEM = { + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111, + B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111, + B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111, + B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111, + B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111, + B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000, + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 + }; + + const unsigned char start_bmp4[] PROGMEM = { + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111, + B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111, + B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111, + B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111, + B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111, + B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111, + B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B00000000,B00000000,B00000000,B00000000,B00111111, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B00000000,B00000000,B00000000,B00000000,B00011111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00001111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B00000000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000, + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 + }; + + const unsigned char start_bmp5[] PROGMEM = { + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111, + B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00011111,B11111111, + B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00001111,B11111111, + B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000111,B11111111, + B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000011,B11111111, + B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111, + B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00000000,B00000000,B00000000,B01111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00000000,B00000000,B00000000,B00111111, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00000000,B00000000,B00000000,B00011111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00000000,B00000000,B00000000,B00001111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00000000,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B00000000,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B00000000,B00000000,B00000000,B00000011, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000, + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 + }; + + const unsigned char start_bmp6[] PROGMEM = { + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111, + B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111, + B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00011000,B00000000,B00011111,B11111111, + B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00001111,B11111111, + B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000111,B11111111, + B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000011,B11111111, + B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111, + B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00111100,B00000000,B00000000,B01111111, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00111100,B00000000,B00000000,B00111111, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00111100,B00000000,B00000000,B00011111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00111100,B00000000,B00000000,B00001111, + B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00111100,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00111100,B00000000,B00000000,B00000111, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B10111100,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B10111111,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B10111111,B00000000,B00000000,B00000011, + B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B10111111,B00000000,B00000000,B00000011, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111, + B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110, + B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110, + B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100, + B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000, + B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000, + B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000 + }; + + #endif + +#endif + +#if ENABLED(BOOT_MARLIN_LOGO_ANIMATED) + #ifndef MARLIN_BOOTSCREEN_FRAME_TIME + #define MARLIN_BOOTSCREEN_FRAME_TIME 100 // (ms) + #endif + const unsigned char * const marlin_bootscreen_animation[] PROGMEM = { + start_bmp1, start_bmp2, start_bmp3, start_bmp4, start_bmp5, start_bmp6, start_bmp + }; #endif #ifndef START_BMP_BYTEWIDTH - #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8) + #define START_BMP_BYTEWIDTH CEILING(START_BMPWIDTH, 8) #endif #ifndef START_BMPHEIGHT #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH)) diff --git a/Marlin/src/lcd/dogm/dogm_Statusscreen.h b/Marlin/src/lcd/dogm/dogm_Statusscreen.h index 6f0d10831adb..ed2978a42b8e 100644 --- a/Marlin/src/lcd/dogm/dogm_Statusscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Statusscreen.h @@ -1220,10 +1220,10 @@ #define STATUS_HOTEND4_WIDTH STATUS_HOTEND3_WIDTH #endif #ifndef STATUS_HOTEND5_WIDTH - #define STATUS_HOTEND5_WIDTH STATUS_HOTEND5_WIDTH + #define STATUS_HOTEND5_WIDTH STATUS_HOTEND4_WIDTH #endif #ifndef STATUS_HOTEND6_WIDTH - #define STATUS_HOTEND6_WIDTH STATUS_HOTEND6_WIDTH + #define STATUS_HOTEND6_WIDTH STATUS_HOTEND5_WIDTH #endif constexpr uint8_t status_hotend_width[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_WIDTH, STATUS_HOTEND2_WIDTH, STATUS_HOTEND3_WIDTH, STATUS_HOTEND4_WIDTH, STATUS_HOTEND5_WIDTH, STATUS_HOTEND6_WIDTH); @@ -1264,10 +1264,10 @@ #define STATUS_HOTEND4_X STATUS_HOTEND3_X + STATUS_HEATERS_XSPACE #endif #ifndef STATUS_HOTEND5_X - #define STATUS_HOTEND5_X STATUS_HOTEND5_X + STATUS_HEATERS_XSPACE + #define STATUS_HOTEND5_X STATUS_HOTEND4_X + STATUS_HEATERS_XSPACE #endif #ifndef STATUS_HOTEND6_X - #define STATUS_HOTEND6_X STATUS_HOTEND6_X + STATUS_HEATERS_XSPACE + #define STATUS_HOTEND6_X STATUS_HOTEND5_X + STATUS_HEATERS_XSPACE #endif #if HOTENDS > 2 @@ -1291,10 +1291,10 @@ #define STATUS_HOTEND4_TEXT_X STATUS_HOTEND3_TEXT_X + STATUS_HEATERS_XSPACE #endif #ifndef STATUS_HOTEND5_TEXT_X - #define STATUS_HOTEND5_TEXT_X STATUS_HOTEND5_TEXT_X + STATUS_HEATERS_XSPACE + #define STATUS_HOTEND5_TEXT_X STATUS_HOTEND4_TEXT_X + STATUS_HEATERS_XSPACE #endif #ifndef STATUS_HOTEND6_TEXT_X - #define STATUS_HOTEND6_TEXT_X STATUS_HOTEND6_TEXT_X + STATUS_HEATERS_XSPACE + #define STATUS_HOTEND6_TEXT_X STATUS_HOTEND5_TEXT_X + STATUS_HEATERS_XSPACE #endif constexpr uint8_t status_hotend_text_x[] = ARRAY_N(HOTENDS, STATUS_HOTEND1_TEXT_X, STATUS_HOTEND2_TEXT_X, STATUS_HOTEND3_TEXT_X, STATUS_HOTEND4_TEXT_X, STATUS_HOTEND5_TEXT_X, STATUS_HOTEND6_TEXT_X); #define STATUS_HOTEND_TEXT_X(N) status_hotend_text_x[N] diff --git a/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h b/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h index 78f6f3262d2b..be304b1a14e5 100644 --- a/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h +++ b/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h @@ -22,18 +22,18 @@ // reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH /* - Fontname: -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1 + Fontname: -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-90-100-100-C-111-ISO10646-1 Copyright: Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1 Capital A Height: 7, '1' Height: 7 Calculated Max Values w= 5 h=10 x= 5 y= 5 dx= 6 dy= 0 ascent= 8 len=10 - Font Bounding box w= 6 h=12 x= 0 y=-2 + Font Bounding box w=12 h=13 x= 0 y=-2 Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 Pure Font ascent = 7 descent=-2 X Font ascent = 8 descent=-2 Max Font ascent = 8 descent=-2 */ const u8g_fntpgm_uint8_t ISO10646_1_5x7[1325] U8G_FONT_SECTION("ISO10646_1_5x7") = { - 0x00,0x06,0x0c,0x00,0xfe,0x07,0x02,0x26,0x03,0xbc,0x01,0x7f,0xfe,0x08,0xfe,0x08, + 0x00,0x0c,0x0d,0x00,0xfe,0x07,0x02,0x26,0x03,0xbc,0x01,0x7f,0xfe,0x08,0xfe,0x08, 0xfe,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0xf0,0xc8,0x88,0x88,0x98,0x78,0x10,0x05, 0x08,0x08,0x06,0x00,0x00,0xc0,0xf8,0x88,0x88,0x88,0x88,0x88,0xf8,0x05,0x05,0x05, 0x06,0x00,0x01,0x20,0x30,0xf8,0x30,0x20,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x70, @@ -120,18 +120,18 @@ const u8g_fntpgm_uint8_t ISO10646_1_5x7[1325] U8G_FONT_SECTION("ISO10646_1_5x7") // extended (original) font (symbols 1 - 255) /* - Fontname: -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1 + Fontname: -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-90-100-100-C-111-ISO10646-1 Copyright: Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1 Capital A Height: 7, '1' Height: 7 Calculated Max Values w= 6 h=10 x= 5 y= 7 dx= 6 dy= 0 ascent=10 len=10 - Font Bounding box w= 6 h=12 x= 0 y=-2 + Font Bounding box w=12 h=13 x= 0 y=-2 Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 Pure Font ascent = 7 descent=-2 X Font ascent = 8 descent=-2 Max Font ascent =10 descent=-2 */ const u8g_fntpgm_uint8_t ISO10646_1_5x7[2648] U8G_FONT_SECTION("ISO10646_1_5x7") = { - 0x00,0x06,0x0c,0x00,0xfe,0x07,0x02,0x26,0x03,0xbc,0x01,0xff,0xfe,0x0a,0xfe,0x08, + 0x00,0x0c,0x0d,0x00,0xfe,0x07,0x02,0x26,0x03,0xbc,0x01,0xff,0xfe,0x0a,0xfe,0x08, 0xfe,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0xf0,0xc8,0x88,0x88,0x98,0x78,0x10,0x05, 0x08,0x08,0x06,0x00,0x00,0xc0,0xf8,0x88,0x88,0x88,0x88,0x88,0xf8,0x05,0x05,0x05, 0x06,0x00,0x01,0x20,0x30,0xf8,0x30,0x20,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x70, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h new file mode 100644 index 000000000000..7c309907cdcd --- /dev/null +++ b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h @@ -0,0 +1,232 @@ +/** + * Generated automatically by buildroot/share/fonts/uxggenpages.sh + * Contents will be REPLACED by future processing! + * Use genallfont.sh to generate font data for updated languages. + */ +#include + +const u8g_fntpgm_uint8_t fontpage_2_131_131[31] U8G_FONT_SECTION("fontpage_2_131_131") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x08,0x00,0x00, + 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x70,0x08,0x78,0x88,0x78}; +const u8g_fntpgm_uint8_t fontpage_2_144_145[44] U8G_FONT_SECTION("fontpage_2_144_145") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x90,0x91,0x00,0x08,0x00,0x00, + 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0xf0,0x48,0x48,0xe8,0x48,0x48,0xf0,0x06,0x08, + 0x08,0x06,0x00,0x00,0x08,0x1c,0x08,0x78,0x88,0x88,0x88,0x78}; +const u8g_fntpgm_uint8_t fontpage_2_169_169[31] U8G_FONT_SECTION("fontpage_2_169_169") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa9,0xa9,0x00,0x08,0x00,0x00, + 0x00,0x04,0x08,0x08,0x06,0x00,0x00,0x50,0xa0,0x00,0x60,0x20,0x20,0x20,0x70}; +const u8g_fntpgm_uint8_t fontpage_3_161_161[30] U8G_FONT_SECTION("fontpage_3_161_161") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa1,0xa1,0x00,0x07,0x00,0x00, + 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x08,0x70,0x88,0x88,0x88,0x70}; +const u8g_fntpgm_uint8_t fontpage_3_175_176[43] U8G_FONT_SECTION("fontpage_3_175_176") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xaf,0xb0,0x00,0x08,0x00,0x00, + 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x08,0x98,0x90,0x90,0x90,0x90,0x90,0x60,0x05, + 0x06,0x06,0x06,0x00,0x00,0x08,0x98,0x90,0x90,0xb0,0x50}; +const u8g_fntpgm_uint8_t fontpage_6_131_131[25] U8G_FONT_SECTION("fontpage_6_131_131") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x02,0x02,0x06,0x00,0x08,0x68,0xb0}; +const u8g_fntpgm_uint8_t fontpage_6_137_137[26] U8G_FONT_SECTION("fontpage_6_137_137") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x89,0x89,0x00,0x0a,0x00,0x00, + 0x00,0x03,0x03,0x03,0x06,0x01,0x07,0xc0,0x20,0x40}; +const u8g_fntpgm_uint8_t fontpage_6_163_163[24] U8G_FONT_SECTION("fontpage_6_163_163") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa3,0xa3,0x00,0x00,0xfe,0x00, + 0x00,0x01,0x01,0x01,0x06,0x02,0xfe,0x80}; +const u8g_fntpgm_uint8_t fontpage_6_192_193[33] U8G_FONT_SECTION("fontpage_6_192_193") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc0,0xc1,0x00,0x0a,0x00,0x00, + 0x00,0x02,0x02,0x02,0x06,0x01,0x08,0x80,0x40,0x02,0x02,0x02,0x06,0x02,0x08,0x40, + 0x80}; +const u8g_fntpgm_uint8_t fontpage_61_161_161[30] U8G_FONT_SECTION("fontpage_61_161_161") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa1,0xa1,0x00,0x05,0xfe,0x00, + 0x00,0x05,0x07,0x07,0x07,0x00,0xfe,0x70,0x08,0x78,0x88,0x78,0x00,0x20}; +const u8g_fntpgm_uint8_t fontpage_61_163_163[32] U8G_FONT_SECTION("fontpage_61_163_163") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa3,0xa3,0x00,0x09,0x00,0x00, + 0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x70,0x08,0x78,0x88,0x78 + }; +const u8g_fntpgm_uint8_t fontpage_61_165_165[33] U8G_FONT_SECTION("fontpage_61_165_165") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa5,0xa5,0x00,0x0a,0x00,0x00, + 0x00,0x06,0x0a,0x0a,0x07,0x00,0x00,0x04,0x08,0x30,0x48,0x00,0x70,0x08,0x78,0x88, + 0x78}; +const u8g_fntpgm_uint8_t fontpage_61_167_167[33] U8G_FONT_SECTION("fontpage_61_167_167") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa7,0xa7,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x10,0x08,0x30,0x48,0x00,0x70,0x08,0x78,0x88, + 0x78}; +const u8g_fntpgm_uint8_t fontpage_61_169_169[34] U8G_FONT_SECTION("fontpage_61_169_169") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa9,0xa9,0x00,0x0b,0x00,0x00, + 0x00,0x06,0x0b,0x0b,0x07,0x00,0x00,0x0c,0x04,0x08,0x30,0x48,0x00,0x70,0x08,0x78, + 0x88,0x78}; +const u8g_fntpgm_uint8_t fontpage_61_173_173[33] U8G_FONT_SECTION("fontpage_61_173_173") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xad,0xad,0x00,0x08,0xfe,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0xfe,0x30,0x48,0x00,0x70,0x08,0x78,0x88,0x78,0x00, + 0x20}; +const u8g_fntpgm_uint8_t fontpage_61_175_175[33] U8G_FONT_SECTION("fontpage_61_175_175") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xaf,0xaf,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x08,0x10,0x48,0x30,0x00,0x70,0x08,0x78,0x88, + 0x78}; +const u8g_fntpgm_uint8_t fontpage_61_177_177[33] U8G_FONT_SECTION("fontpage_61_177_177") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xb1,0xb1,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x40,0x20,0x48,0x30,0x00,0x70,0x08,0x78,0x88, + 0x78}; +const u8g_fntpgm_uint8_t fontpage_61_179_179[34] U8G_FONT_SECTION("fontpage_61_179_179") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xb3,0xb3,0x00,0x0b,0x00,0x00, + 0x00,0x05,0x0b,0x0b,0x07,0x00,0x00,0x18,0x08,0x10,0x48,0x30,0x00,0x70,0x08,0x78, + 0x88,0x78}; +const u8g_fntpgm_uint8_t fontpage_61_181_181[34] U8G_FONT_SECTION("fontpage_61_181_181") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xb5,0xb5,0x00,0x0b,0x00,0x00, + 0x00,0x06,0x0b,0x0b,0x07,0x00,0x00,0x14,0x28,0x00,0x48,0x30,0x00,0x70,0x08,0x78, + 0x88,0x78}; +const u8g_fntpgm_uint8_t fontpage_61_183_183[33] U8G_FONT_SECTION("fontpage_61_183_183") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xb7,0xb7,0x00,0x08,0xfe,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0xfe,0x48,0x30,0x00,0x70,0x08,0x78,0x88,0x78,0x00, + 0x20}; +const u8g_fntpgm_uint8_t fontpage_61_187_187[32] U8G_FONT_SECTION("fontpage_61_187_187") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xbb,0xbb,0x00,0x09,0x00,0x00, + 0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x70,0x88,0xf0,0x80,0x78 + }; +const u8g_fntpgm_uint8_t fontpage_61_191_191[33] U8G_FONT_SECTION("fontpage_61_191_191") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xbf,0xbf,0x00,0x0a,0x00,0x00, + 0x00,0x06,0x0a,0x0a,0x07,0x00,0x00,0x04,0x08,0x20,0x50,0x00,0x70,0x88,0xf0,0x80, + 0x78}; +const u8g_fntpgm_uint8_t fontpage_61_193_193[33] U8G_FONT_SECTION("fontpage_61_193_193") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc1,0xc1,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x10,0x08,0x20,0x50,0x00,0x70,0x88,0xf0,0x80, + 0x78}; +const u8g_fntpgm_uint8_t fontpage_61_195_195[34] U8G_FONT_SECTION("fontpage_61_195_195") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0x00,0x0b,0x00,0x00, + 0x00,0x05,0x0b,0x0b,0x07,0x00,0x00,0x18,0x08,0x10,0x60,0x90,0x00,0x60,0x90,0xf0, + 0x80,0x70}; +const u8g_fntpgm_uint8_t fontpage_61_199_199[33] U8G_FONT_SECTION("fontpage_61_199_199") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc7,0xc7,0x00,0x08,0xfe,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0xfe,0x20,0x50,0x00,0x70,0x88,0xf0,0x80,0x78,0x00, + 0x20}; +const u8g_fntpgm_uint8_t fontpage_61_201_201[32] U8G_FONT_SECTION("fontpage_61_201_201") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc9,0xc9,0x00,0x09,0x00,0x00, + 0x00,0x03,0x09,0x09,0x07,0x02,0x00,0x60,0x20,0x40,0x00,0xc0,0x40,0x40,0x40,0xe0 + }; +const u8g_fntpgm_uint8_t fontpage_61_203_203[32] U8G_FONT_SECTION("fontpage_61_203_203") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xcb,0xcb,0x00,0x07,0xfe,0x00, + 0x00,0x03,0x09,0x09,0x07,0x02,0xfe,0x40,0x00,0xc0,0x40,0x40,0x40,0xe0,0x00,0x40 + }; +const u8g_fntpgm_uint8_t fontpage_61_205_205[30] U8G_FONT_SECTION("fontpage_61_205_205") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xcd,0xcd,0x00,0x05,0xfe,0x00, + 0x00,0x05,0x07,0x07,0x07,0x00,0xfe,0x70,0x88,0x88,0x88,0x70,0x00,0x20}; +const u8g_fntpgm_uint8_t fontpage_61_207_207[32] U8G_FONT_SECTION("fontpage_61_207_207") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xcf,0xcf,0x00,0x09,0x00,0x00, + 0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x70,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_209_209[33] U8G_FONT_SECTION("fontpage_61_209_209") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd1,0xd1,0x00,0x0a,0x00,0x00, + 0x00,0x06,0x0a,0x0a,0x07,0x00,0x00,0x04,0x08,0x20,0x50,0x00,0x70,0x88,0x88,0x88, + 0x70}; +const u8g_fntpgm_uint8_t fontpage_61_211_211[33] U8G_FONT_SECTION("fontpage_61_211_211") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd3,0xd3,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x10,0x08,0x20,0x50,0x00,0x70,0x88,0x88,0x88, + 0x70}; +const u8g_fntpgm_uint8_t fontpage_61_213_213[33] U8G_FONT_SECTION("fontpage_61_213_213") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd5,0xd5,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x18,0x08,0x30,0x50,0x00,0x70,0x88,0x88,0x88, + 0x70}; +const u8g_fntpgm_uint8_t fontpage_61_215_215[34] U8G_FONT_SECTION("fontpage_61_215_215") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd7,0xd7,0x00,0x0b,0x00,0x00, + 0x00,0x05,0x0b,0x0b,0x07,0x00,0x00,0x28,0x50,0x00,0x20,0x50,0x00,0x70,0x88,0x88, + 0x88,0x70}; +const u8g_fntpgm_uint8_t fontpage_61_217_217[33] U8G_FONT_SECTION("fontpage_61_217_217") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd9,0xd9,0x00,0x08,0xfe,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0xfe,0x20,0x50,0x00,0x70,0x88,0x88,0x88,0x70,0x00, + 0x20}; +const u8g_fntpgm_uint8_t fontpage_61_219_219[32] U8G_FONT_SECTION("fontpage_61_219_219") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdb,0xdb,0x00,0x09,0x00,0x00, + 0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x20,0x40,0x10,0x08,0x70,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_221_221[32] U8G_FONT_SECTION("fontpage_61_221_221") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdd,0xdd,0x00,0x09,0x00,0x00, + 0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x80,0x40,0x10,0x08,0x70,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_223_223[33] U8G_FONT_SECTION("fontpage_61_223_223") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdf,0xdf,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x60,0x20,0x40,0x10,0x08,0x70,0x88,0x88,0x88, + 0x70}; +const u8g_fntpgm_uint8_t fontpage_61_225_225[32] U8G_FONT_SECTION("fontpage_61_225_225") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe1,0xe1,0x00,0x09,0x00,0x00, + 0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x50,0xa0,0x10,0x08,0x70,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_227_227[32] U8G_FONT_SECTION("fontpage_61_227_227") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe3,0xe3,0x00,0x07,0xfe,0x00, + 0x00,0x05,0x09,0x09,0x00,0x00,0xfe,0x10,0x08,0x70,0x88,0x88,0x88,0x70,0x00,0x20 + }; +const u8g_fntpgm_uint8_t fontpage_61_229_229[30] U8G_FONT_SECTION("fontpage_61_229_229") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe5,0xe5,0x00,0x05,0xfe,0x00, + 0x00,0x05,0x07,0x07,0x07,0x00,0xfe,0x88,0x88,0x88,0x88,0x70,0x00,0x20}; +const u8g_fntpgm_uint8_t fontpage_61_231_231[33] U8G_FONT_SECTION("fontpage_61_231_231") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe7,0xe7,0x00,0x0a,0x00,0x00, + 0x00,0x05,0x0a,0x0a,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x00,0x88,0x88,0x88,0x88, + 0x70}; +const u8g_fntpgm_uint8_t fontpage_61_233_233[32] U8G_FONT_SECTION("fontpage_61_233_233") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe9,0xe9,0x00,0x09,0x00,0x00, + 0x00,0x06,0x09,0x09,0x07,0x00,0x00,0x10,0x20,0x0c,0x04,0x88,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_235_235[32] U8G_FONT_SECTION("fontpage_61_235_235") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xeb,0xeb,0x00,0x09,0x00,0x00, + 0x00,0x06,0x09,0x09,0x07,0x00,0x00,0x40,0x20,0x0c,0x04,0x88,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_237_237[33] U8G_FONT_SECTION("fontpage_61_237_237") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xed,0xed,0x00,0x0a,0x00,0x00, + 0x00,0x06,0x0a,0x0a,0x07,0x00,0x00,0x30,0x10,0x20,0x0c,0x04,0x88,0x88,0x88,0x88, + 0x70}; +const u8g_fntpgm_uint8_t fontpage_61_239_239[32] U8G_FONT_SECTION("fontpage_61_239_239") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xef,0xef,0x00,0x09,0x00,0x00, + 0x00,0x06,0x09,0x09,0x07,0x00,0x00,0x28,0x50,0x0c,0x04,0x88,0x88,0x88,0x88,0x70 + }; +const u8g_fntpgm_uint8_t fontpage_61_241_241[32] U8G_FONT_SECTION("fontpage_61_241_241") = { + 0x00,0x0c,0x0d,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xf1,0xf1,0x00,0x07,0xfe,0x00, + 0x00,0x06,0x09,0x09,0x07,0x00,0xfe,0x0c,0x04,0x88,0x88,0x88,0x88,0x70,0x00,0x20 + }; + +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } +static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { + FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă' + FONTDATA_ITEM(2, 144, 145, fontpage_2_144_145), // 'Đ' -- 'đ' + FONTDATA_ITEM(2, 169, 169, fontpage_2_169_169), // 'ĩ' -- 'ĩ' + FONTDATA_ITEM(3, 161, 161, fontpage_3_161_161), // 'ơ' -- 'ơ' + FONTDATA_ITEM(3, 175, 176, fontpage_3_175_176), // 'Ư' -- 'ư' + FONTDATA_ITEM(6, 131, 131, fontpage_6_131_131), // '̃' -- '̃' + FONTDATA_ITEM(6, 137, 137, fontpage_6_137_137), // '̉' -- '̉' + FONTDATA_ITEM(6, 163, 163, fontpage_6_163_163), // '̣' -- '̣' + FONTDATA_ITEM(6, 192, 193, fontpage_6_192_193), // '̀' -- '́' + FONTDATA_ITEM(61, 161, 161, fontpage_61_161_161), // 'ạ' -- 'ạ' + FONTDATA_ITEM(61, 163, 163, fontpage_61_163_163), // 'ả' -- 'ả' + FONTDATA_ITEM(61, 165, 165, fontpage_61_165_165), // 'ấ' -- 'ấ' + FONTDATA_ITEM(61, 167, 167, fontpage_61_167_167), // 'ầ' -- 'ầ' + FONTDATA_ITEM(61, 169, 169, fontpage_61_169_169), // 'ẩ' -- 'ẩ' + FONTDATA_ITEM(61, 173, 173, fontpage_61_173_173), // 'ậ' -- 'ậ' + FONTDATA_ITEM(61, 175, 175, fontpage_61_175_175), // 'ắ' -- 'ắ' + FONTDATA_ITEM(61, 177, 177, fontpage_61_177_177), // 'ằ' -- 'ằ' + FONTDATA_ITEM(61, 179, 179, fontpage_61_179_179), // 'ẳ' -- 'ẳ' + FONTDATA_ITEM(61, 181, 181, fontpage_61_181_181), // 'ẵ' -- 'ẵ' + FONTDATA_ITEM(61, 183, 183, fontpage_61_183_183), // 'ặ' -- 'ặ' + FONTDATA_ITEM(61, 187, 187, fontpage_61_187_187), // 'ẻ' -- 'ẻ' + FONTDATA_ITEM(61, 191, 191, fontpage_61_191_191), // 'ế' -- 'ế' + FONTDATA_ITEM(61, 193, 193, fontpage_61_193_193), // 'ề' -- 'ề' + FONTDATA_ITEM(61, 195, 195, fontpage_61_195_195), // 'ể' -- 'ể' + FONTDATA_ITEM(61, 199, 199, fontpage_61_199_199), // 'ệ' -- 'ệ' + FONTDATA_ITEM(61, 201, 201, fontpage_61_201_201), // 'ỉ' -- 'ỉ' + FONTDATA_ITEM(61, 203, 203, fontpage_61_203_203), // 'ị' -- 'ị' + FONTDATA_ITEM(61, 205, 205, fontpage_61_205_205), // 'ọ' -- 'ọ' + FONTDATA_ITEM(61, 207, 207, fontpage_61_207_207), // 'ỏ' -- 'ỏ' + FONTDATA_ITEM(61, 209, 209, fontpage_61_209_209), // 'ố' -- 'ố' + FONTDATA_ITEM(61, 211, 211, fontpage_61_211_211), // 'ồ' -- 'ồ' + FONTDATA_ITEM(61, 213, 213, fontpage_61_213_213), // 'ổ' -- 'ổ' + FONTDATA_ITEM(61, 215, 215, fontpage_61_215_215), // 'ỗ' -- 'ỗ' + FONTDATA_ITEM(61, 217, 217, fontpage_61_217_217), // 'ộ' -- 'ộ' + FONTDATA_ITEM(61, 219, 219, fontpage_61_219_219), // 'ớ' -- 'ớ' + FONTDATA_ITEM(61, 221, 221, fontpage_61_221_221), // 'ờ' -- 'ờ' + FONTDATA_ITEM(61, 223, 223, fontpage_61_223_223), // 'ở' -- 'ở' + FONTDATA_ITEM(61, 225, 225, fontpage_61_225_225), // 'ỡ' -- 'ỡ' + FONTDATA_ITEM(61, 227, 227, fontpage_61_227_227), // 'ợ' -- 'ợ' + FONTDATA_ITEM(61, 229, 229, fontpage_61_229_229), // 'ụ' -- 'ụ' + FONTDATA_ITEM(61, 231, 231, fontpage_61_231_231), // 'ủ' -- 'ủ' + FONTDATA_ITEM(61, 233, 233, fontpage_61_233_233), // 'ứ' -- 'ứ' + FONTDATA_ITEM(61, 235, 235, fontpage_61_235_235), // 'ừ' -- 'ừ' + FONTDATA_ITEM(61, 237, 237, fontpage_61_237_237), // 'ử' -- 'ử' + FONTDATA_ITEM(61, 239, 239, fontpage_61_239_239), // 'ữ' -- 'ữ' + FONTDATA_ITEM(61, 241, 241, fontpage_61_241_241), // 'ự' -- 'ự' +}; diff --git a/Marlin/src/lcd/dogm/lcdprint_u8g.cpp b/Marlin/src/lcd/dogm/lcdprint_u8g.cpp index d46eb85903b8..c9ff96547bde 100644 --- a/Marlin/src/lcd/dogm/lcdprint_u8g.cpp +++ b/Marlin/src/lcd/dogm/lcdprint_u8g.cpp @@ -22,7 +22,7 @@ int lcd_glyph_height(void) { return u8g_GetFontBBXHeight(u8g.getU8g()); } -void lcd_moveto(const uint8_t col, const uint8_t row) { u8g.setPrintPos(col, row); } +void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { u8g.setPrintPos(col, row); } void lcd_put_int(const int i) { u8g.print(i); } @@ -33,26 +33,22 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { u8g.print((char)c); return u8g_GetFontBBXWidth(u8g.getU8g()); } - unsigned int x = u8g.getPrintCol(), - y = u8g.getPrintRow(), - ret = uxg_DrawWchar(u8g.getU8g(), x, y, c, max_length); + u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(), + ret = uxg_DrawWchar(u8g.getU8g(), x, y, c, max_length); u8g.setPrintPos(x + ret, y); - return ret; } int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) { - unsigned int x = u8g.getPrintCol(), - y = u8g.getPrintRow(), - ret = uxg_DrawUtf8Str(u8g.getU8g(), x, y, utf8_str, max_length); + u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(), + ret = uxg_DrawUtf8Str(u8g.getU8g(), x, y, utf8_str, max_length); u8g.setPrintPos(x + ret, y); return ret; } int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) { - unsigned int x = u8g.getPrintCol(), - y = u8g.getPrintRow(), - ret = uxg_DrawUtf8StrP(u8g.getU8g(), x, y, utf8_str_P, max_length); + u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(), + ret = uxg_DrawUtf8StrP(u8g.getU8g(), x, y, utf8_str_P, max_length); u8g.setPrintPos(x + ret, y); return ret; } diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index f04d2e89a545..4db6752b453a 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -100,8 +100,7 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) { const char *str = i16tostr3(temp); const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1; - lcd_moveto(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty); - lcd_put_u8str(&str[3-len]); + lcd_put_u8str(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty, &str[3-len]); lcd_put_wchar(LCD_STR_DEGREE[0]); } @@ -264,8 +263,7 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin // FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink) { const uint8_t offs = (XYZ_SPACING) * axis; - lcd_moveto(X_LABEL_POS + offs, XYZ_BASELINE); - lcd_put_wchar('X' + axis); + lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, 'X' + axis); lcd_moveto(X_VALUE_POS + offs, XYZ_BASELINE); if (blink) lcd_put_u8str(value); @@ -429,8 +427,7 @@ void MarlinUI::draw_status_screen() { c = '*'; } #endif - lcd_moveto(STATUS_FAN_TEXT_X, STATUS_FAN_TEXT_Y); - lcd_put_u8str(i16tostr3(thermalManager.fanPercent(spd))); + lcd_put_u8str(STATUS_FAN_TEXT_X, STATUS_FAN_TEXT_Y, i16tostr3(thermalManager.fanPercent(spd))); lcd_put_wchar(c); } } @@ -488,8 +485,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(DOGM_SD_PERCENT) if (PAGE_CONTAINS(41, 48)) { // Percent complete - lcd_moveto(55, 48); - lcd_put_u8str(ui8tostr3(progress)); + lcd_put_u8str(55, 48, ui8tostr3(progress)); lcd_put_wchar('%'); } #endif @@ -510,8 +506,7 @@ void MarlinUI::draw_status_screen() { duration_t elapsed = print_job_timer.duration(); bool has_days = (elapsed.value >= 60*60*24L); uint8_t len = elapsed.toDigital(buffer, has_days); - lcd_moveto(SD_DURATION_X, EXTRAS_BASELINE); - lcd_put_u8str(buffer); + lcd_put_u8str(SD_DURATION_X, EXTRAS_BASELINE, buffer); } #endif // HAS_PRINT_PROGRESS @@ -520,10 +515,6 @@ void MarlinUI::draw_status_screen() { // XYZ Coordinates // - #define X_LABEL_POS 3 - #define X_VALUE_POS 11 - #define XYZ_SPACING 37 - #if ENABLED(XYZ_HOLLOW_FRAME) #define XYZ_FRAME_TOP 29 #define XYZ_FRAME_HEIGHT INFO_FONT_ASCENT + 3 @@ -550,8 +541,6 @@ void MarlinUI::draw_status_screen() { // Two-component mix / gradient instead of XY - lcd_moveto(X_LABEL_POS, XYZ_BASELINE); - char mixer_messages[12]; const char *mix_label; #if ENABLED(GRADIENT_MIX) @@ -566,7 +555,7 @@ void MarlinUI::draw_status_screen() { mix_label = "Mx"; } sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); - lcd_put_u8str(mixer_messages); + lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages); #else @@ -591,28 +580,22 @@ void MarlinUI::draw_status_screen() { if (PAGE_CONTAINS(EXTRAS_2_BASELINE - INFO_FONT_ASCENT, EXTRAS_2_BASELINE - 1)) { set_font(FONT_MENU); - lcd_moveto(3, EXTRAS_2_BASELINE); - lcd_put_wchar(LCD_STR_FEEDRATE[0]); + lcd_put_wchar(3, EXTRAS_2_BASELINE, LCD_STR_FEEDRATE[0]); set_font(FONT_STATUSMENU); - lcd_moveto(12, EXTRAS_2_BASELINE); - lcd_put_u8str(i16tostr3(feedrate_percentage)); + lcd_put_u8str(12, EXTRAS_2_BASELINE, i16tostr3(feedrate_percentage)); lcd_put_wchar('%'); // // Filament sensor display if SD is disabled // #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT) - lcd_moveto(56, EXTRAS_2_BASELINE); - lcd_put_u8str(wstring); - lcd_moveto(102, EXTRAS_2_BASELINE); - lcd_put_u8str(mstring); + lcd_put_u8str(56, EXTRAS_2_BASELINE, wstring); + lcd_put_u8str(102, EXTRAS_2_BASELINE, mstring); lcd_put_wchar('%'); set_font(FONT_MENU); - lcd_moveto(47, EXTRAS_2_BASELINE); - lcd_put_wchar(LCD_STR_FILAM_DIA[0]); // lcd_put_u8str_P(PSTR(LCD_STR_FILAM_DIA)); - lcd_moveto(93, EXTRAS_2_BASELINE); - lcd_put_wchar(LCD_STR_FILAM_MUL[0]); + lcd_put_wchar(47, EXTRAS_2_BASELINE, LCD_STR_FILAM_DIA[0]); // lcd_put_u8str_P(PSTR(LCD_STR_FILAM_DIA)); + lcd_put_wchar(93, EXTRAS_2_BASELINE, LCD_STR_FILAM_MUL[0]); #endif } diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index c1961117c4d2..8db341293a66 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -58,7 +58,6 @@ #if HAS_GRAPHICAL_LCD #include - #include "HAL_LCD_com_defines.h" #define WIDTH 128 diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index 71c8efd5005d..75bb4bf95c39 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -58,7 +58,6 @@ #if HAS_GRAPHICAL_LCD #include - #include "HAL_LCD_com_defines.h" #define LCD_PIXEL_WIDTH 128 diff --git a/Marlin/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp b/Marlin/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp index dfd327e2a101..8451a10e0ef7 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp @@ -59,8 +59,9 @@ #if HAS_GRAPHICAL_LCD && PIN_EXISTS(FSMC_CS) -#include "U8glib.h" +#include #include "HAL_LCD_com_defines.h" + #include #if ENABLED(LCD_USE_DMA_FSMC) @@ -85,11 +86,31 @@ // see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html -#define COLOR_BLACK 0x0000 -#define COLOR_WHITE 0xFFFF -#define COLOR_BLUE 0x21DD -#define COLOR_RED 0xF800 -#define COLOR_DARK 0x0003 // Some dark color +#define COLOR_BLACK 0x0000 // #000000 +#define COLOR_WHITE 0xFFFF // #FFFFFF +#define COLOR_SILVER 0xC618 // #C0C0C0 +#define COLOR_GREY 0x7BEF // #808080 +#define COLOR_DARKGREY 0x4208 // #404040 +#define COLOR_DARKGREY2 0x39E7 // #303030 +#define COLOR_DARK 0x0003 // Some dark color + +#define COLOR_RED 0xF800 // #FF0000 +#define COLOR_LIME 0x7E00 // #00FF00 +#define COLOR_BLUE 0x001F // #0000FF +#define COLOR_YELLOW 0xFFE0 // #FFFF00 +#define COLOR_MAGENTA 0xF81F // #FF00FF +#define COLOR_FUCHSIA 0xF81F // #FF00FF +#define COLOR_CYAN 0x07FF // #00FFFF +#define COLOR_AQUA 0x07FF // #00FFFF + +#define COLOR_MAROON 0x7800 // #800000 +#define COLOR_GREEN 0x03E0 // #008000 +#define COLOR_NAVY 0x000F // #000080 +#define COLOR_OLIVE 0x8400 // #808000 +#define COLOR_PURPLE 0x8010 // #800080 +#define COLOR_TEAL 0x0410 // #008080 + +#define COLOR_ORANGE 0xFC00 // #FF7F00 #ifndef TFT_MARLINUI_COLOR #define TFT_MARLINUI_COLOR COLOR_WHITE @@ -100,11 +121,14 @@ #ifndef TFT_DISABLED_COLOR #define TFT_DISABLED_COLOR COLOR_DARK #endif -#ifndef TFT_BTSLEFT_COLOR - #define TFT_BTSLEFT_COLOR COLOR_BLUE +#ifndef TFT_BTCANCEL_COLOR + #define TFT_BTCANCEL_COLOR COLOR_RED +#endif +#ifndef TFT_BTARROWS_COLOR + #define TFT_BTARROWS_COLOR COLOR_BLUE #endif -#ifndef TFT_BTRIGHT_COLOR - #define TFT_BTRIGHT_COLOR COLOR_RED +#ifndef TFT_BTOKMENU_COLOR + #define TFT_BTOKMENU_COLOR COLOR_RED #endif static uint32_t lcd_id = 0; @@ -141,22 +165,29 @@ static const uint8_t clear_screen_sequence[] = { U8G_ESC_END }; - static const uint8_t button0_sequence[] = { - U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(20), U8G_ESC_DATA(99), + static const uint8_t buttonD_sequence[] = { + U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(14), U8G_ESC_DATA(77), U8G_ESC_ADR(0), LCD_ROW, U8G_ESC_ADR(1), U8G_ESC_DATA(185), U8G_ESC_DATA(224), U8G_ESC_ADR(0), LCD_WRITE_RAM, U8G_ESC_ADR(1), U8G_ESC_END }; - static const uint8_t button1_sequence[] = { - U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(120), U8G_ESC_DATA(199), + static const uint8_t buttonA_sequence[] = { + U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(90), U8G_ESC_DATA(153), U8G_ESC_ADR(0), LCD_ROW, U8G_ESC_ADR(1), U8G_ESC_DATA(185), U8G_ESC_DATA(224), U8G_ESC_ADR(0), LCD_WRITE_RAM, U8G_ESC_ADR(1), U8G_ESC_END }; - static const uint8_t button2_sequence[] = { - U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(220), U8G_ESC_DATA(299), + static const uint8_t buttonB_sequence[] = { + U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(166), U8G_ESC_DATA(229), + U8G_ESC_ADR(0), LCD_ROW, U8G_ESC_ADR(1), U8G_ESC_DATA(185), U8G_ESC_DATA(224), + U8G_ESC_ADR(0), LCD_WRITE_RAM, U8G_ESC_ADR(1), + U8G_ESC_END + }; + + static const uint8_t buttonC_sequence[] = { + U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), U8G_ESC_DATA(242), U8G_ESC_DATA(305), U8G_ESC_ADR(0), LCD_ROW, U8G_ESC_ADR(1), U8G_ESC_DATA(185), U8G_ESC_DATA(224), U8G_ESC_ADR(0), LCD_WRITE_RAM, U8G_ESC_ADR(1), U8G_ESC_END @@ -213,77 +244,100 @@ static const uint8_t ili9341_init_sequence[] = { // 0x9341 - ILI9341 #if ENABLED(TOUCH_BUTTONS) - static const uint8_t button0[] = { - B01111111,B11111111,B11111111,B11111111,B11111110, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00010000,B00000000,B00000001, - B10000000,B00000000,B00010000,B00000000,B00000001, - B10000000,B01000000,B00010000,B00000000,B00000001, - B10000000,B11100000,B00010000,B00000000,B00000001, - B10000001,B11110000,B00010000,B00000000,B00000001, - B10000011,B11111000,B00010000,B00000000,B00000001, - B10000111,B11111100,B00010000,B11111111,B11100001, - B10000000,B11100000,B00010000,B11111111,B11100001, - B10000000,B11100000,B00010000,B00000000,B00000001, - B10000000,B11100000,B00010000,B00000000,B00000001, - B10000000,B11100000,B00010000,B00000000,B00000001, - B10000000,B11100000,B00010000,B00000000,B00000001, - B10000000,B00000000,B00010000,B00000000,B00000001, - B10000000,B00000000,B00010000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B01111111,B11111111,B11111111,B11111111,B11111110, + static const uint8_t buttonD[] = { + B01111111,B11111111,B11111111,B11111110, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00011000,B00110000,B00000001, + B10000000,B00001100,B01100000,B00000001, + B10000000,B00000110,B11000000,B00000001, + B10000000,B00000011,B10000000,B00000001, + B10000000,B00000011,B10000000,B00000001, + B10000000,B00000110,B11000000,B00000001, + B10000000,B00001100,B01100000,B00000001, + B10000000,B00011000,B00110000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B01111111,B11111111,B11111111,B11111110, + }; + + static const uint8_t buttonA[] = { + B01111111,B11111111,B11111111,B11111110, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B01000000,B00000000,B00000001, + B10000000,B11100000,B00000000,B00000001, + B10000001,B11110000,B00000000,B00000001, + B10000011,B11111000,B00000000,B00000001, + B10000111,B11111100,B00111111,B11100001, + B10000000,B11100000,B00111111,B11100001, + B10000000,B11100000,B00000000,B00000001, + B10000000,B11100000,B00000000,B00000001, + B10000000,B11100000,B00000000,B00000001, + B10000000,B11100000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B01111111,B11111111,B11111111,B11111110, }; - static const uint8_t button1[] = { - B01111111,B11111111,B11111111,B11111111,B11111110, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00010000,B00000000,B00000001, - B10000000,B00000000,B00010000,B00000110,B00000001, - B10000000,B11100000,B00010000,B00000110,B00000001, - B10000000,B11100000,B00010000,B00000110,B00000001, - B10000000,B11100000,B00010000,B00000110,B00000001, - B10000000,B11100000,B00010000,B00000110,B00000001, - B10000000,B11100000,B00010000,B11111111,B11110001, - B10000111,B11111100,B00010000,B11111111,B11110001, - B10000011,B11111000,B00010000,B00000110,B00000001, - B10000001,B11110000,B00010000,B00000110,B00000001, - B10000000,B11100000,B00010000,B00000110,B00000001, - B10000000,B01000000,B00010000,B00000110,B00000001, - B10000000,B00000000,B00010000,B00000110,B00000001, - B10000000,B00000000,B00010000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B01111111,B11111111,B11111111,B11111111,B11111110, + static const uint8_t buttonB[] = { + B01111111,B11111111,B11111111,B11111110, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B01100000,B00000111,B00000001, + B10000000,B01100000,B00000111,B00000001, + B10000000,B01100000,B00000111,B00000001, + B10000000,B01100000,B00000111,B00000001, + B10000111,B11111110,B00000111,B00000001, + B10000111,B11111110,B00111111,B11100001, + B10000000,B01100000,B00011111,B11000001, + B10000000,B01100000,B00001111,B10000001, + B10000000,B01100000,B00000111,B00000001, + B10000000,B01100000,B00000010,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B01111111,B11111111,B11111111,B11111110, }; - static const uint8_t button2[] = { - B01111111,B11111111,B11111111,B11111111,B11111110, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000001,B11000000,B00000001, - B10000000,B00000000,B01000001,B11000000,B00000001, - B10000000,B00000000,B11000001,B11000000,B00000001, - B10000000,B00000001,B11111111,B11000000,B00000001, - B10000000,B00000011,B11111111,B11000000,B00000001, - B10000000,B00000001,B11111111,B11000000,B00000001, - B10000000,B00000000,B11000000,B00000000,B00000001, - B10000000,B00000000,B01000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B10000000,B00000000,B00000000,B00000000,B00000001, - B01111111,B11111111,B11111111,B11111111,B11111110, + static const uint8_t buttonC[] = { + B01111111,B11111111,B11111111,B11111110, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00011100,B00000001, + B10000000,B00000100,B00011100,B00000001, + B10000000,B00001100,B00011100,B00000001, + B10000000,B00011111,B11111100,B00000001, + B10000000,B00111111,B11111100,B00000001, + B10000000,B00011111,B11111100,B00000001, + B10000000,B00001100,B00000000,B00000001, + B10000000,B00000100,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B10000000,B00000000,B00000000,B00000001, + B01111111,B11111111,B11111111,B11111110, }; void drawImage(const uint8_t *data, u8g_t *u8g, u8g_dev_t *dev, uint16_t length, uint16_t height, uint16_t color) { - uint16_t buffer[160]; + uint16_t buffer[128]; for (uint16_t i = 0; i < height; i++) { uint16_t k = 0; @@ -332,7 +386,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u uint16_t* buffer = &bufferA[0]; bool allow_async = true; #else - uint16_t buffer[256]; // 16-bit RGB 565 pixel line buffer + uint16_t buffer[WIDTH*2]; // 16-bit RGB 565 pixel line buffer #endif switch (msg) { case U8G_DEV_MSG_INIT: @@ -350,6 +404,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg); } + // Clear Screen Sequence u8g_WriteEscSeqP(u8g, dev, clear_screen_sequence); #ifdef LCD_USE_DMA_FSMC LCD_IO_WriteMultiple(TFT_MARLINBG_COLOR, (320*240)); @@ -377,15 +432,17 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u u8g_WriteSequence(u8g, dev, 150, (uint8_t *)buffer); #endif - u8g_WriteEscSeqP(u8g, dev, button0_sequence); - drawImage(button0, u8g, dev, 40, 20, TFT_BTSLEFT_COLOR); + u8g_WriteEscSeqP(u8g, dev, buttonD_sequence); + drawImage(buttonD, u8g, dev, 32, 20, TFT_BTCANCEL_COLOR); - u8g_WriteEscSeqP(u8g, dev, button1_sequence); - drawImage(button1, u8g, dev, 40, 20, TFT_BTSLEFT_COLOR); + u8g_WriteEscSeqP(u8g, dev, buttonA_sequence); + drawImage(buttonA, u8g, dev, 32, 20, TFT_BTARROWS_COLOR); - u8g_WriteEscSeqP(u8g, dev, button2_sequence); - drawImage(button2, u8g, dev, 40, 20, TFT_BTRIGHT_COLOR); + u8g_WriteEscSeqP(u8g, dev, buttonB_sequence); + drawImage(buttonB, u8g, dev, 32, 20, TFT_BTARROWS_COLOR); + u8g_WriteEscSeqP(u8g, dev, buttonC_sequence); + drawImage(buttonC, u8g, dev, 32, 20, TFT_BTOKMENU_COLOR); #endif // TOUCH_BUTTONS return 0; @@ -398,9 +455,9 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u break; case U8G_DEV_MSG_PAGE_NEXT: - if (++page > 8) return 1; + if (++page > (HEIGHT / PAGE_HEIGHT)) return 1; - for (uint8_t y = 0; y < 8; y++) { + for (uint8_t y = 0; y < PAGE_HEIGHT; y++) { uint32_t k = 0; #ifdef LCD_USE_DMA_FSMC buffer = (y & 1) ? bufferB : bufferA; @@ -422,11 +479,12 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u else LCD_IO_WriteSequence(buffer, 512); #else + uint8_t* bufptr = (uint8_t*) buffer; for (uint8_t i = 2; i--;) { - u8g_WriteSequence(u8g, dev, 128, (uint8_t*)buffer); - u8g_WriteSequence(u8g, dev, 128, (uint8_t*)&(buffer[64])); - u8g_WriteSequence(u8g, dev, 128, (uint8_t*)&(buffer[128])); - u8g_WriteSequence(u8g, dev, 128, (uint8_t*)&(buffer[192])); + u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[0]); + u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[WIDTH]); + u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[WIDTH*2]); + u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[WIDTH*3]); } #endif } diff --git a/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp index e7750b4ac494..20b6a24891de 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp @@ -58,7 +58,6 @@ #if HAS_GRAPHICAL_LCD #include - #include "HAL_LCD_com_defines.h" #define WIDTH 128 diff --git a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp index 023ad66aca82..a3793d203d45 100644 --- a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp @@ -102,30 +102,29 @@ void MarlinUI::set_font(const MarlinFont font_nr) { } } +bool MarlinUI::detected() { return true; } + #if ENABLED(SHOW_BOOTSCREEN) #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) // Draws a slice of a particular frame of the custom bootscreen, without the u8g loop void MarlinUI::draw_custom_bootscreen(const uint8_t frame/*=0*/) { constexpr u8g_uint_t left = u8g_uint_t((LCD_PIXEL_WIDTH - (CUSTOM_BOOTSCREEN_BMPWIDTH)) / 2), - top = u8g_uint_t((LCD_PIXEL_HEIGHT - (CUSTOM_BOOTSCREEN_BMPHEIGHT)) / 2); + top = u8g_uint_t((LCD_PIXEL_HEIGHT - (CUSTOM_BOOTSCREEN_BMPHEIGHT)) / 2); #if ENABLED(CUSTOM_BOOTSCREEN_INVERTED) constexpr u8g_uint_t right = left + CUSTOM_BOOTSCREEN_BMPWIDTH, bottom = top + CUSTOM_BOOTSCREEN_BMPHEIGHT; #endif const u8g_pgm_uint8_t * const bmp = - #if ENABLED(ANIMATED_BOOTSCREEN) + #if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED) (u8g_pgm_uint8_t*)pgm_read_ptr(&custom_bootscreen_animation[frame]) #else custom_start_bmp #endif ; - u8g.drawBitmapP( - left, top, - CEILING(CUSTOM_BOOTSCREEN_BMPWIDTH, 8), CUSTOM_BOOTSCREEN_BMPHEIGHT, bmp - ); + u8g.drawBitmapP(left, top, CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH, CUSTOM_BOOTSCREEN_BMPHEIGHT, bmp); #if ENABLED(CUSTOM_BOOTSCREEN_INVERTED) if (frame == 0) { @@ -140,7 +139,7 @@ void MarlinUI::set_font(const MarlinFont font_nr) { // Shows the custom bootscreen, with the u8g loop, animations and delays void MarlinUI::show_custom_bootscreen() { - #if DISABLED(ANIMATED_BOOTSCREEN) + #if DISABLED(CUSTOM_BOOTSCREEN_ANIMATED) constexpr millis_t d = 0; constexpr uint8_t f = 0; #else @@ -160,26 +159,19 @@ void MarlinUI::set_font(const MarlinFont font_nr) { } #endif // SHOW_CUSTOM_BOOTSCREEN - // Draws a slice of the Marlin bootscreen, without the u8g loop - void MarlinUI::draw_marlin_bootscreen() { - // Screen dimensions. - //const uint8_t width = u8g.getWidth(), height = u8g.getHeight(); - constexpr uint8_t width = LCD_PIXEL_WIDTH, height = LCD_PIXEL_HEIGHT; - + // Draw the static Marlin bootscreen from a u8g loop + // or the animated boot screen within its own u8g loop + void MarlinUI::draw_marlin_bootscreen(const bool line2/*=false*/) { // Determine text space needed - #ifndef STRING_SPLASH_LINE2 - constexpr uint8_t text_total_height = MENU_FONT_HEIGHT, - text_width_1 = uint8_t(sizeof(STRING_SPLASH_LINE1) - 1) * uint8_t(MENU_FONT_WIDTH), - text_width_2 = 0; - #else - constexpr uint8_t text_total_height = uint8_t(MENU_FONT_HEIGHT) * 2, - text_width_1 = uint8_t(sizeof(STRING_SPLASH_LINE1) - 1) * uint8_t(MENU_FONT_WIDTH), - text_width_2 = uint8_t(sizeof(STRING_SPLASH_LINE2) - 1) * uint8_t(MENU_FONT_WIDTH); - #endif - constexpr uint8_t text_max_width = _MAX(text_width_1, text_width_2), - rspace = width - (START_BMPWIDTH); + constexpr u8g_uint_t text_width_1 = u8g_uint_t((sizeof(SHORT_BUILD_VERSION) - 1) * (MENU_FONT_WIDTH)), + text_width_2 = u8g_uint_t((sizeof(MARLIN_WEBSITE_URL) - 1) * (MENU_FONT_WIDTH)), + text_max_width = _MAX(text_width_1, text_width_2), + text_total_height = (MENU_FONT_HEIGHT) * 2, + width = LCD_PIXEL_WIDTH, height = LCD_PIXEL_HEIGHT, + rspace = width - (START_BMPWIDTH); + constexpr bool two_part = (height - (START_BMPHEIGHT)) < ((MENU_FONT_ASCENT) * 2); - int8_t offx, offy, txt_base, txt_offx_1, txt_offx_2; + u8g_int_t offx, offy, txt_base, txt_offx_1, txt_offx_2; // Can the text fit to the right of the bitmap? if (text_max_width < rspace) { @@ -191,8 +183,8 @@ void MarlinUI::set_font(const MarlinFont font_nr) { } else { constexpr int8_t inter = (height - text_total_height - (START_BMPHEIGHT)) / 3; // Evenly distribute vertical space - offy = inter; // V-align boot logo proportionally offx = rspace / 2; // Center the boot logo in the whole space + offy = inter; // V-align boot logo proportionally txt_offx_1 = (width - text_width_1) / 2; // Text 1 centered txt_offx_2 = (width - text_width_2) / 2; // Text 2 centered txt_base = offy + START_BMPHEIGHT + offy + text_total_height - (MENU_FONT_DESCENT); // Even spacing looks best @@ -200,13 +192,25 @@ void MarlinUI::set_font(const MarlinFont font_nr) { NOLESS(offx, 0); NOLESS(offy, 0); - u8g.drawBitmapP(offx, offy, (START_BMPWIDTH + 7) / 8, START_BMPHEIGHT, start_bmp); - set_font(FONT_MENU); - #ifndef STRING_SPLASH_LINE2 - u8g.drawStr(txt_offx_1, txt_base, STRING_SPLASH_LINE1); + auto draw_bootscreen_bmp = [&](const uint8_t *bitmap) { + u8g.drawBitmapP(offx, offy, START_BMP_BYTEWIDTH, START_BMPHEIGHT, bitmap); + set_font(FONT_MENU); + if (!two_part || !line2) lcd_put_u8str_P(txt_offx_1, txt_base - (MENU_FONT_HEIGHT), PSTR(SHORT_BUILD_VERSION)); + if (!two_part || line2) lcd_put_u8str_P(txt_offx_2, txt_base, PSTR(MARLIN_WEBSITE_URL)); + }; + + #if DISABLED(BOOT_MARLIN_LOGO_ANIMATED) + draw_bootscreen_bmp(start_bmp); #else - u8g.drawStr(txt_offx_1, txt_base - (MENU_FONT_HEIGHT), STRING_SPLASH_LINE1); - u8g.drawStr(txt_offx_2, txt_base, STRING_SPLASH_LINE2); + constexpr millis_t d = MARLIN_BOOTSCREEN_FRAME_TIME; + LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) { + u8g.firstPage(); + do { + const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&marlin_bootscreen_animation[f]); + draw_bootscreen_bmp(bmp); + } while (u8g.nextPage()); + if (d) safe_delay(d); + } #endif } @@ -215,9 +219,15 @@ void MarlinUI::set_font(const MarlinFont font_nr) { #ifndef BOOTSCREEN_TIMEOUT #define BOOTSCREEN_TIMEOUT 2500 #endif - u8g.firstPage(); - do { draw_marlin_bootscreen(); } while (u8g.nextPage()); - safe_delay(BOOTSCREEN_TIMEOUT); + for (uint8_t q = 2; q--;) { + #if DISABLED(BOOT_MARLIN_LOGO_ANIMATED) + u8g.firstPage(); + do { draw_marlin_bootscreen(q == 0); } while (u8g.nextPage()); + #else + draw_marlin_bootscreen(q == 0); + #endif + safe_delay((BOOTSCREEN_TIMEOUT) / 2); + } } void MarlinUI::show_bootscreen() { @@ -286,16 +296,13 @@ void MarlinUI::draw_kill_screen() { #if ENABLED(LIGHTWEIGHT_UI) ST7920_Lite_Status_Screen::clear_text_buffer(); #endif - const uint8_t h4 = u8g.getHeight() / 4; + const u8g_uint_t h4 = u8g.getHeight() / 4; u8g.firstPage(); do { set_font(FONT_MENU); - lcd_moveto(0, h4 * 1); - lcd_put_u8str(status_message); - lcd_moveto(0, h4 * 2); - lcd_put_u8str_P(PSTR(MSG_HALTED)); - lcd_moveto(0, h4 * 3); - lcd_put_u8str_P(PSTR(MSG_PLEASE_RESET)); + lcd_put_u8str(0, h4 * 1, status_message); + lcd_put_u8str_P(0, h4 * 2, PSTR(MSG_HALTED)); + lcd_put_u8str_P(0, h4 * 3, PSTR(MSG_PLEASE_RESET)); } while (u8g.nextPage()); } @@ -303,7 +310,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #if HAS_LCD_MENU - uint8_t row_y1, row_y2; + u8g_uint_t row_y1, row_y2; #if ENABLED(ADVANCED_PAUSE_FEATURE) @@ -313,8 +320,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return; - lcd_moveto(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), row_y2); - lcd_put_wchar('E'); + lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), row_y2, 'E'); lcd_put_wchar((char)('1' + extruder)); lcd_put_wchar(' '); lcd_put_u8str(i16tostr3(thermalManager.degHotend(extruder))); @@ -360,7 +366,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (mark_as_selected(row, invert)) { - uint8_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed + u8g_uint_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed if (center && !valstr) { int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2; @@ -377,11 +383,10 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop UNUSED(pre_char); if (mark_as_selected(row, sel)) { - uint8_t n = (LCD_WIDTH - 2) * (MENU_FONT_WIDTH); + u8g_uint_t n = (LCD_WIDTH - 2) * (MENU_FONT_WIDTH); n -= lcd_put_u8str_max_P(pstr, n); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' '); - lcd_moveto(LCD_PIXEL_WIDTH - (MENU_FONT_WIDTH), row_y2); - lcd_put_wchar(post_char); + lcd_put_wchar(LCD_PIXEL_WIDTH - (MENU_FONT_WIDTH), row_y2, post_char); lcd_put_wchar(' '); } } @@ -390,7 +395,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) { if (mark_as_selected(row, sel)) { const uint8_t vallen = (pgm ? utf8_strlen_P(data) : utf8_strlen((char*)data)); - uint8_t n = (LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH); + u8g_uint_t n = (LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH); n -= lcd_put_u8str_max_P(pstr, n); lcd_put_wchar(':'); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' '); @@ -402,13 +407,13 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { ui.encoder_direction_normal(); - const uint8_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value); + const u8g_uint_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value); bool extra_row = labellen > LCD_WIDTH - 2 - vallen; #if ENABLED(USE_BIG_EDIT_FONT) // Use the menu font if the label won't fit on a single line - constexpr uint8_t lcd_edit_width = (LCD_PIXEL_WIDTH) / (EDIT_FONT_WIDTH); - uint8_t lcd_chr_fit, one_chr_width; + constexpr u8g_uint_t lcd_edit_width = (LCD_PIXEL_WIDTH) / (EDIT_FONT_WIDTH); + u8g_uint_t lcd_chr_fit, one_chr_width; if (labellen <= lcd_edit_width - 1) { if (labellen + vallen + 1 > lcd_edit_width) extra_row = true; lcd_chr_fit = lcd_edit_width + 1; @@ -421,20 +426,17 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop ui.set_font(FONT_MENU); } #else - constexpr uint8_t lcd_chr_fit = LCD_WIDTH, - one_chr_width = MENU_FONT_WIDTH; + constexpr u8g_uint_t lcd_chr_fit = LCD_WIDTH, + one_chr_width = MENU_FONT_WIDTH; #endif // Center the label and value lines on the middle line - uint8_t baseline = extra_row ? (LCD_PIXEL_HEIGHT) / 2 - 1 - : (LCD_PIXEL_HEIGHT + EDIT_FONT_ASCENT) / 2; + u8g_uint_t baseline = extra_row ? (LCD_PIXEL_HEIGHT) / 2 - 1 + : (LCD_PIXEL_HEIGHT + EDIT_FONT_ASCENT) / 2; // Assume the label is alpha-numeric (with a descender) bool onpage = PAGE_CONTAINS(baseline - (EDIT_FONT_ASCENT - 1), baseline + EDIT_FONT_DESCENT); - if (onpage) { - lcd_moveto(0, baseline); - lcd_put_u8str_P(pstr); - } + if (onpage) lcd_put_u8str_P(0, baseline, pstr); // If a value is included, print a colon, then print the value right-justified if (value != nullptr) { @@ -445,23 +447,21 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop onpage = PAGE_CONTAINS(baseline - (EDIT_FONT_ASCENT - 1), baseline); } if (onpage) { - lcd_moveto(((lcd_chr_fit - 1) - (vallen + 1)) * one_chr_width, baseline); // Right-justified, leaving padded by spaces - lcd_put_wchar(' '); // overwrite char if value gets shorter + lcd_put_wchar(((lcd_chr_fit - 1) - (vallen + 1)) * one_chr_width, baseline, ' '); // Right-justified, padded, add a leading space lcd_put_u8str(value); } } } - inline void draw_boxed_string(const uint8_t x, const uint8_t y, PGM_P const pstr, const bool inv) { - const uint8_t len = utf8_strlen_P(pstr), bw = len * (MENU_FONT_WIDTH), - bx = x * (MENU_FONT_WIDTH), by = (y + 1) * (MENU_FONT_HEIGHT); + inline void draw_boxed_string(const u8g_uint_t x, const u8g_uint_t y, PGM_P const pstr, const bool inv) { + const u8g_uint_t len = utf8_strlen_P(pstr), bw = len * (MENU_FONT_WIDTH), + bx = x * (MENU_FONT_WIDTH), by = (y + 1) * (MENU_FONT_HEIGHT); if (inv) { u8g.setColorIndex(1); u8g.drawBox(bx - 1, by - (MENU_FONT_ASCENT) + 1, bw + 2, MENU_FONT_HEIGHT - 1); u8g.setColorIndex(0); } - lcd_moveto(bx, by); - lcd_put_u8str_P(pstr); + lcd_put_u8str_P(bx, by, pstr); if (inv) u8g.setColorIndex(1); } @@ -479,8 +479,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (mark_as_selected(row, sel)) { if (isDir) lcd_put_wchar(LCD_STR_FOLDER[0]); constexpr uint8_t maxlen = LCD_WIDTH - 1; - const uint8_t pixw = maxlen * (MENU_FONT_WIDTH); - uint8_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw); + const u8g_uint_t pixw = maxlen * (MENU_FONT_WIDTH); + u8g_uint_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' '); } } @@ -499,8 +499,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) { // Scale the box pixels appropriately - uint8_t x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X), - y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y), + u8g_uint_t x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X), + y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y), pixels_per_x_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X), pixels_per_y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y), @@ -522,8 +522,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop // Display Mesh Point Locations u8g.setColorIndex(1); - const uint8_t sx = x_offset + pixels_per_x_mesh_pnt / 2; - uint8_t y = y_offset + pixels_per_y_mesh_pnt / 2; + const u8g_uint_t sx = x_offset + pixels_per_x_mesh_pnt / 2; + u8g_uint_t y = y_offset + pixels_per_y_mesh_pnt / 2; for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++, y += pixels_per_y_mesh_pnt) if (PAGE_CONTAINS(y, y)) for (uint8_t i = 0, x = sx; i < GRID_MAX_POINTS_X; i++, x += pixels_per_x_mesh_pnt) @@ -531,10 +531,10 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop // Fill in the Specified Mesh Point - uint8_t inverted_y = GRID_MAX_POINTS_Y - y_plot - 1; // The origin is typically in the lower right corner. We need to - // invert the Y to get it to plot in the right location. + const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y - 1) - y_plot; // The origin is typically in the lower right corner. We need to + // invert the Y to get it to plot in the right location. - const uint8_t by = y_offset + inverted_y * pixels_per_y_mesh_pnt; + const u8g_uint_t by = y_offset + y_plot_inv * pixels_per_y_mesh_pnt; if (PAGE_CONTAINS(by, by + pixels_per_y_mesh_pnt)) u8g.drawBox( x_offset + x_plot * pixels_per_x_mesh_pnt, by, @@ -546,26 +546,22 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop // Show X and Y positions at top of screen u8g.setColorIndex(1); if (PAGE_UNDER(7)) { - lcd_moveto(5, 7); - lcd_put_u8str("X:"); + lcd_put_u8str(5, 7, "X:"); lcd_put_u8str(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot])))); - lcd_moveto(74, 7); - lcd_put_u8str("Y:"); + lcd_put_u8str(74, 7, "Y:"); lcd_put_u8str(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot])))); } // Print plot position if (PAGE_CONTAINS(LCD_PIXEL_HEIGHT - (INFO_FONT_HEIGHT - 1), LCD_PIXEL_HEIGHT)) { - lcd_moveto(5, LCD_PIXEL_HEIGHT); - lcd_put_wchar('('); + lcd_put_wchar(5, LCD_PIXEL_HEIGHT, '('); u8g.print(x_plot); lcd_put_wchar(','); u8g.print(y_plot); lcd_put_wchar(')'); // Show the location value - lcd_moveto(74, LCD_PIXEL_HEIGHT); - lcd_put_u8str("Z:"); + lcd_put_u8str(74, LCD_PIXEL_HEIGHT, "Z:"); if (!isnan(ubl.z_values[x_plot][y_plot])) lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot])); else diff --git a/Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.cpp b/Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.cpp index 88308732027a..7d88083edb10 100644 --- a/Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.cpp @@ -200,7 +200,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_ZPos, ¤t_position[2], nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>), // Print Progress. - VPHELPER(VP_PrintProgress_Percentage, &MarlinUI::progress_bar_percent, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ), + VPHELPER(VP_PrintProgress_Percentage, &ui.progress_bar_percent, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ), // Print Time VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendPrintTimeToDisplay ), diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.cpp new file mode 100644 index 000000000000..2e17c6492c68 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.cpp @@ -0,0 +1,560 @@ +/********************* + * flash_storage.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../compat.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "../ftdi_eve_lib/ftdi_eve_lib.h" + +#include "media_file_reader.h" +#include "flash_storage.h" + +// The following must be changed whenever the layout of the flash +// data is changed in a manner that would render the data invalid. + +constexpr uint32_t flash_eeprom_version = 1; + +/* SPI Flash Memory Map: + * + * The following offsets and sizes are specified in 4k erase units: + * + * Page Size Description + * 0 16 DATA STORAGE AREA + * 16 1 VERSIONING DATA + * 17 inf MEDIA STORAGE AREA + * + */ + +#define DATA_STORAGE_SIZE_64K + +using namespace FTDI::SPI; +using namespace FTDI::SPI::most_significant_byte_first; + +bool UIFlashStorage::is_present = false; + +#ifdef SPI_FLASH_SS +/************************** SPI Flash Chip Interface **************************/ + + void SPIFlash::wait_while_busy() { + uint8_t status; + safe_delay(1); + do { + spi_flash_select(); + spi_write_8(READ_STATUS_1); + status = spi_read_8(); + spi_flash_deselect(); + safe_delay(1); + } while (status & 1); + } + + void SPIFlash::erase_sector_4k(uint32_t addr) { + spi_flash_select(); + spi_write_8(WRITE_ENABLE); + spi_flash_deselect(); + + spi_flash_select(); + spi_write_8(ERASE_4K); + spi_write_24(addr); + spi_flash_deselect(); + + wait_while_busy(); + } + + void SPIFlash::erase_sector_64k(uint32_t addr) { + spi_flash_select(); + spi_write_8(WRITE_ENABLE); + spi_flash_deselect(); + + spi_flash_select(); + spi_write_8(ERASE_64K); + spi_write_24(addr); + spi_flash_deselect(); + + wait_while_busy(); + } + + void SPIFlash::spi_write_begin(uint32_t addr) { + spi_flash_select(); + spi_write_8(WRITE_ENABLE); + spi_flash_deselect(); + + spi_flash_select(); + spi_write_8(PAGE_PROGRAM); + spi_write_24(addr); + } + + void SPIFlash::spi_write_end() { + spi_flash_deselect(); + wait_while_busy(); + } + + void SPIFlash::spi_read_begin(uint32_t addr) { + spi_flash_select(); + spi_write_8(READ_DATA); + spi_write_24(addr); + } + + void SPIFlash::spi_read_end() { + spi_flash_deselect(); + } + + void SPIFlash::erase_chip() { + spi_flash_select(); + spi_write_8(WRITE_ENABLE); + spi_flash_deselect(); + + spi_flash_select(); + spi_write_8(ERASE_CHIP); + spi_flash_deselect(); + wait_while_busy(); + } + + void SPIFlash::read_jedec_id(uint8_t &manufacturer_id, uint8_t &device_type, uint8_t &capacity) { + spi_flash_select(); + spi_write_8(READ_JEDEC_ID); + manufacturer_id = spi_recv(); + device_type = spi_recv(); + capacity = spi_recv(); + spi_flash_deselect (); + } + + /* This function writes "size" bytes from "data" starting at addr, while properly + * taking into account the special case of writing across a 256 byte page boundary. + * Returns the addr directly after the write. + */ + uint32_t SPIFlash::write(uint32_t addr, const void *_data, size_t size) { + const uint8_t *data = (const uint8_t*) _data; + while (size) { + const uint32_t page_start = addr & 0xFFFF00ul; + const uint32_t page_end = page_start + 256; + const uint32_t write_size = min(page_end - addr, size); + spi_write_begin(addr); + spi_write_bulk(data, write_size); + spi_write_end(); + addr += write_size; + size -= write_size; + data += write_size; + } + return addr; + } + + uint32_t SPIFlash::read(uint32_t addr, void *data, size_t size) { + spi_read_begin(addr); + spi_read_bulk(data, size); + spi_read_end(); + return addr + size; + } + + /********************************** UTILITY ROUTINES *********************************/ + + bool UIFlashStorage::check_known_device() { + uint8_t manufacturer_id, device_type, capacity; + read_jedec_id(manufacturer_id, device_type, capacity); + + const bool is_known = + ((manufacturer_id == 0xEF) && (device_type == 0x40) && (capacity == 0x15)) || // unknown + ((manufacturer_id == 0x01) && (device_type == 0x40) && (capacity == 0x15)) || // Cypress S25FL116K + ((manufacturer_id == 0xEF) && (device_type == 0x14) && (capacity == 0x15)) || // Winbond W25Q16JV + ((manufacturer_id == 0x1F) && (device_type == 0x86) && (capacity == 0x01)) ; // Adesto AT255F161 + + if (!is_known) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Unable to locate supported SPI Flash Memory."); + SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Manufacturer ID, got: ", manufacturer_id); + SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Device Type , got: ", device_type); + SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Capacity , got: ", capacity); + } + + return is_known; + } + + void UIFlashStorage::initialize() { + for(uint8_t i = 0; i < 10; i++) { + if (check_known_device()) { + is_present = true; + break; + } + safe_delay(1000); + } + } + + /**************************** DATA STORAGE AREA (first 4K or 64k) ********************/ + + #ifdef DATA_STORAGE_SIZE_64K + constexpr uint32_t data_storage_area_size = 64 * 1024; // Large erase unit + #else + constexpr uint32_t data_storage_area_size = 4 * 1024; // Small erase unit + #endif + + /* In order to provide some degree of wear leveling, each data write to the + * SPI Flash chip is appended to data that was already written before, until + * the data storage area is completely filled. New data is written preceeded + * with a 32-bit delimiter 'LULZ', so that we can distinguish written and + * unwritten data: + * + * 'LULZ' <--- 1st record delimiter + * + * + * + * 'LULZ' <--- 2nd record delimiter + * + * + * + * ... + * 'LULZ' <--- Last record delimiter + * + * + * + * 0xFF <--- Start of free space + * 0xFF + * ... + * + * This function walks down the data storage area, verifying that the + * delimiters are either 'LULZ' or 0xFFFFFFFF. In the case that an invalid + * delimiter is found, this function returns -1, indicating that the Flash + * data is invalid (this will happen if the block_size changed with respect + * to earlier firmware). Otherwise, it returns the offset of the last + * valid delimiter 'LULZ', indicating the most recently written data. + */ + int32_t UIFlashStorage::get_config_read_offset(uint32_t block_size) { + uint16_t stride = 4 + block_size; + int32_t read_offset = -1; + + for(uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) { + uint32_t delim; + spi_read_begin(offset); + spi_read_bulk (&delim, sizeof(delim)); + spi_read_end(); + switch (delim) { + case 0xFFFFFFFFul: return read_offset; + case delimiter: read_offset = offset; break; + default: + SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Invalid delimiter in Flash: ", delim); + return -1; + } + } + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("No LULZ delimiter found."); + return -1; + } + + /* This function returns the offset at which new data should be + * appended, or -1 if the Flash needs to be erased */ + int32_t UIFlashStorage::get_config_write_offset(uint32_t block_size) { + int32_t read_offset = get_config_read_offset(block_size); + if (read_offset == -1) return -1; // The SPI flash is invalid + + int32_t write_offset = read_offset + 4 + block_size; + if ((write_offset + 4 + block_size) > data_storage_area_size) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Not enough free space in Flash."); + return -1; // Not enough free space + } + return write_offset; + } + + bool UIFlashStorage::verify_config_data(const void *data, size_t size) { + if (!is_present) return false; + + int32_t read_addr = get_config_read_offset(size); + if (read_addr == -1) return false; + + uint32_t delim; + spi_read_begin(read_addr); + spi_read_bulk (&delim, sizeof(delim)); + bool ok = spi_verify_bulk(data,size); + spi_read_end(); + return ok && delim == delimiter; + } + + bool UIFlashStorage::read_config_data(void *data, size_t size) { + if (!is_present) return false; + + int32_t read_addr = get_config_read_offset(size); + if (read_addr == -1) return false; + + uint32_t delim; + spi_read_begin(read_addr); + spi_read_bulk (&delim, sizeof(delim)); + spi_read_bulk (data, size); + spi_read_end(); + return delim == delimiter; + } + + void UIFlashStorage::write_config_data(const void *data, size_t size) { + if (!is_present) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("SPI Flash chip not present. Not saving UI settings."); + return; + } + + // Since Flash storage has a limited number of write cycles, + // make sure that the data is different before rewriting. + + if (verify_config_data(data, size)) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("UI settings already written, skipping write."); + return; + } + + int16_t write_addr = get_config_write_offset(size); + if (write_addr == -1) { + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("Erasing UI settings from SPI Flash... "); + #ifdef DATA_STORAGE_SIZE_64K + erase_sector_64k(0); + #else + erase_sector_4k(0); + #endif + write_addr = 0; + SERIAL_ECHOLNPGM("DONE"); + } + + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Writing UI settings to SPI Flash (offset ", write_addr); + SERIAL_ECHOPGM(")..."); + + const uint32_t delim = delimiter; + write_addr = write(write_addr, &delim, sizeof(delim)); + write_addr = write(write_addr, data, size); + + SERIAL_ECHOLNPGM("DONE"); + } + + /************************** VERSIONING INFO AREA ************************/ + + /* The version info area follows the data storage area. If the version + * is incorrect, the data on the chip is invalid and format_flash should + * be called. + */ + + typedef struct { + uint32_t magic; + uint32_t version; + } flash_version_info; + + constexpr uint32_t version_info_addr = data_storage_area_size; + constexpr uint32_t version_info_size = 4 * 1024; // Small erase unit + + bool UIFlashStorage::is_valid() { + flash_version_info info; + + spi_read_begin(version_info_addr); + spi_read_bulk (&info, sizeof(flash_version_info)); + spi_read_end(); + + return info.magic == delimiter && info.version == flash_eeprom_version; + } + + void UIFlashStorage::write_version_info() { + flash_version_info info; + + info.magic = delimiter; + info.version = flash_eeprom_version; + + spi_write_begin(version_info_addr); + spi_write_bulk(&info, sizeof(flash_version_info)); + spi_write_end(); + } + + /**************************** MEDIA STORAGE AREA *****************************/ + + /* The media storage area follows the versioning info area. It consists + * of a file index followed by the data for one or more media files. + * + * The file index consists of an array of 32-bit file sizes. If a file + * is not present, the file's size will be set to 0xFFFFFFFF + */ + + constexpr uint32_t media_storage_addr = version_info_addr + version_info_size; + constexpr uint8_t media_storage_slots = 4; + + void UIFlashStorage::format_flash() { + SERIAL_ECHO_START(); SERIAL_ECHOPGM("Erasing SPI Flash..."); + SPIFlash::erase_chip(); + SERIAL_ECHOLNPGM("DONE"); + + write_version_info(); + } + + uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) { + uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots; + spi_read_begin(media_storage_addr); + for(uint8_t i = 0; i < slot; i++) { + addr += spi_read_32(); + } + spi_read_end(); + return addr; + } + + void UIFlashStorage::set_media_file_size(uint8_t slot, uint32_t size) { + spi_write_begin(media_storage_addr + sizeof(uint32_t) * slot); + spi_write_32(size); + spi_write_end(); + } + + uint32_t UIFlashStorage::get_media_file_size(uint8_t slot) { + spi_read_begin(media_storage_addr + sizeof(uint32_t) * slot); + uint32_t size = spi_read_32(); + spi_read_end(); + return size; + } + + /* Writes a media file from the SD card/USB flash drive into a slot on the SPI Flash. Media + * files must be written sequentially following by a chip erase and it is not possible to + * overwrite files. */ + UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str filename, uint8_t slot) { + #if ENABLED(SDSUPPORT) + uint32_t addr; + uint8_t buff[write_page_size]; + + strcpy_P( (char*) buff, (const char*) filename); + + MediaFileReader reader; + if (!reader.open((char*) buff)) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Unable to find media file"); + return FILE_NOT_FOUND; + } + + if (get_media_file_size(slot) != 0xFFFFFFFFUL) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Media file already exists"); + return WOULD_OVERWRITE; + } + + SERIAL_ECHO_START(); SERIAL_ECHOPGM("Writing SPI Flash..."); + + set_media_file_size(slot, reader.size()); + addr = get_media_file_start(slot); + + // Write out the file itself + for(;;) { + const int16_t nBytes = reader.read(buff, write_page_size); + if (nBytes == -1) { + SERIAL_ECHOLNPGM("Failed to read from file"); + return READ_ERROR; + } + + addr = write(addr, buff, nBytes); + if (nBytes != write_page_size) + break; + + #if ENABLED(EXTENSIBLE_UI) + ExtUI::yield(); + #endif + } + + SERIAL_ECHOLNPGM("DONE"); + + SERIAL_ECHO_START(); SERIAL_ECHOPGM("Verifying SPI Flash..."); + + bool verifyOk = true; + + // Verify the file index + + if (get_media_file_start(slot+1) != (get_media_file_start(slot) + reader.size())) { + SERIAL_ECHOLNPGM("File index verification failed. "); + verifyOk = false; + } + + // Verify the file itself + addr = get_media_file_start(slot); + reader.rewind(); + + while (verifyOk) { + const int16_t nBytes = reader.read(buff, write_page_size); + if (nBytes == -1) { + SERIAL_ECHOPGM("Failed to read from file"); + verifyOk = false; + break; + } + + spi_read_begin(addr); + if (!spi_verify_bulk(buff, nBytes)) { + verifyOk = false; + spi_read_end(); + break; + } + spi_read_end(); + + addr += nBytes; + if (nBytes != write_page_size) break; + #if ENABLED(EXTENSIBLE_UI) + ExtUI::yield(); + #endif + }; + + if (verifyOk) { + SERIAL_ECHOLNPGM("DONE"); + return SUCCESS; + } else { + SERIAL_ECHOLNPGM("FAIL"); + return VERIFY_ERROR; + } + #else + return VERIFY_ERROR; + #endif // ENABLED(SDSUPPORT) + } + + bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t slot) { + if (!is_present) return false; + + bytes_remaining = get_media_file_size(slot); + if (bytes_remaining != 0xFFFFFFFFUL) { + SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Boot media file size:", bytes_remaining); + addr = get_media_file_start(slot); + return true; + } else { + return false; + } + } + + int16_t UIFlashStorage::BootMediaReader::read(void *data, const size_t size) { + if (bytes_remaining == 0xFFFFFFFFUL) return -1; + + if (size > bytes_remaining) + return read(data, bytes_remaining); + + if (size > 0) { + spi_read_begin(addr); + spi_read_bulk(data, size); + spi_read_end(); + addr += size; + bytes_remaining -= size; + } + + return size; + } + + int16_t UIFlashStorage::BootMediaReader::read(void *obj, void *data, const size_t size) { + return reinterpret_cast(obj)->read(data, size); + } + +#else + void UIFlashStorage::initialize() {} + bool UIFlashStorage::is_valid() {return true;} + void UIFlashStorage::write_config_data(const void *, size_t) {} + bool UIFlashStorage::verify_config_data(const void *, size_t) {return false;} + bool UIFlashStorage::read_config_data(void *, size_t ) {return false;} + UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str, uint8_t) {return FILE_NOT_FOUND;} + void UIFlashStorage::format_flash() {} + + bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t) {return false;} + int16_t UIFlashStorage::BootMediaReader::read(void *, const size_t) {return -1;} + int16_t UIFlashStorage::BootMediaReader::read(void *, void *, const size_t) {return -1;} +#endif // SPI_FLASH_SS +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.h new file mode 100644 index 000000000000..d211f48b38d3 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.h @@ -0,0 +1,106 @@ +/******************* + * flash_storage.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +class SPIFlash { + public: + static constexpr uint32_t erase_unit_size = 4 * 1024; // Minimum erase unit + static constexpr uint32_t write_page_size = 256; // Minimum page write unit + + enum { + READ_STATUS_1 = 0x05, + READ_STATUS_2 = 0x35, + READ_STATUS_3 = 0x33, + WRITE_ENABLE = 0x06, + WRITE_DISABLE = 0x04, + READ_ID = 0x90, + READ_JEDEC_ID = 0x9F, + READ_DATA = 0x03, + PAGE_PROGRAM = 0x02, + ERASE_4K = 0x20, + ERASE_64K = 0xD8, + ERASE_CHIP = 0xC7 + }; + + static void wait_while_busy(); + static void erase_sector_4k(uint32_t addr); + static void erase_sector_64k(uint32_t addr); + static void erase_chip (); + + static void read_jedec_id(uint8_t &manufacturer_id, uint8_t &device_type, uint8_t &capacity); + + static void spi_read_begin(uint32_t addr); + static void spi_read_end(); + + static void spi_write_begin(uint32_t addr); + static void spi_write_end(); + + static uint32_t write(uint32_t addr, const void *data, size_t size); + static uint32_t read(uint32_t addr, void *data, size_t size); +}; + +class UIFlashStorage : private SPIFlash { + private: + + static bool is_present; + static int32_t get_config_read_offset(uint32_t block_size); + static int32_t get_config_write_offset(uint32_t block_size); + + static uint32_t get_media_file_start(uint8_t slot); + static void set_media_file_size(uint8_t slot, uint32_t size); + static uint32_t get_media_file_size(uint8_t slot); + + static constexpr uint32_t delimiter = 0x4C554C5A; // 'LULZ' + public: + enum error_t { + SUCCESS, + FILE_NOT_FOUND, + READ_ERROR, + VERIFY_ERROR, + WOULD_OVERWRITE + }; + + static void initialize (); + static void format_flash (); + static bool check_known_device(); + + static bool is_valid (); + static void write_version_info(); + + static void write_config_data (const void *data, size_t size); + static bool verify_config_data (const void *data, size_t size); + static bool read_config_data (void *data, size_t size); + static error_t write_media_file (progmem_str filename, uint8_t slot = 0); + + class BootMediaReader; +}; + +class UIFlashStorage::BootMediaReader { + private: + uint32_t addr; + uint32_t bytes_remaining; + + public: + bool isAvailable(uint32_t slot = 0); + int16_t read(void *buffer, size_t const size); + + static int16_t read(void *obj, void *buffer, const size_t size); +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.cpp new file mode 100644 index 000000000000..82ceba0552e3 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.cpp @@ -0,0 +1,63 @@ +/************************ + * media_filereader.cpp * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../compat.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + #include "media_file_reader.h" + + #if ENABLED(SDSUPPORT) + bool MediaFileReader::open(const char* filename) { + card.init(SPI_SPEED, SDSS); + volume.init(&card); + root.openRoot(&volume); + return file.open(&root, filename, O_READ); + } + + int16_t MediaFileReader::read(void *buff, size_t bytes) { + return file.read(buff, bytes); + } + + void MediaFileReader::close() { + file.close(); + } + + uint32_t MediaFileReader::size() { + return file.fileSize(); + } + + void MediaFileReader::rewind() { + file.rewind(); + } + + int16_t MediaFileReader::read(void *obj, void *buff, size_t bytes) { + return reinterpret_cast(obj)->read(buff, bytes); + } + #else + bool MediaFileReader::open(const char*) {return -1;} + int16_t MediaFileReader::read(void *, size_t) {return 0;} + void MediaFileReader::close() {} + uint32_t MediaFileReader::size() {return 0;} + void MediaFileReader::rewind() {} + int16_t MediaFileReader::read(void *, void *, size_t) {return 0;} + #endif +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.h new file mode 100644 index 000000000000..d64182fd5b0b --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.h @@ -0,0 +1,48 @@ +/********************** + * media_filereader.h * + **********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../../../../../inc/MarlinConfigPre.h" + +#if ENABLED(SDSUPPORT) + #include "../../../../../sd/SdFile.h" + #include "../../../../../sd/cardreader.h" +#endif + +class MediaFileReader { + private: + #if ENABLED(SDSUPPORT) + Sd2Card card; + SdVolume volume; + SdFile root, file; + #endif + + public: + bool open(const char* filename); + int16_t read(void *buff, size_t bytes); + uint32_t size(); + void rewind(); + void close(); + + static int16_t read(void *obj, void *buff, size_t bytes); +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h new file mode 100644 index 000000000000..7e051be75a83 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h @@ -0,0 +1,53 @@ +/************ + * compat.h * + ************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/** + * This following provides compatibility whether compiling + * as a part of Marlin or outside it + */ + +#ifdef __has_include + #if __has_include("../../ui_api.h") + #include "../../ui_api.h" + #endif +#else + #include "../../ui_api.h" +#endif + +#ifdef __MARLIN_FIRMWARE__ + // __MARLIN_FIRMWARE__ exists when compiled within Marlin. + #include "pin_mappings.h" +#else + // Messages that are declared in Marlin + #define WELCOME_MSG "Printer Ready" + #define MSG_MEDIA_INSERTED "Media Inserted" + #define MSG_MEDIA_REMOVED "Media Removed" + + namespace UI { + static inline uint32_t safe_millis() {return millis();}; + static inline void yield() {}; + }; +#endif + +class __FlashStringHelper; +typedef const __FlashStringHelper *progmem_str; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h new file mode 100644 index 000000000000..5313bb947ff1 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h @@ -0,0 +1,97 @@ +/************ + * config.h * + ************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "compat.h" + +// Define the display board used (see "ftdi_eve_boards.h" for definitions) + +//#define LCD_FTDI_VM800B35A // FTDI 3.5" 320x240 with FT800 +//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" 480x272 +//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" 480x272 +//#define LCD_HAOYU_FT810CB // Haoyu with 5" 800x480 +//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD User Interface + +// Leave the following commented out to use a board's default resolution. +// If you have changed the LCD panel, you may override the resolution +// below (see "ftdi_eve_resolutions.h" for definitions): + +//#define TOUCH_UI_320x240 +//#define TOUCH_UI_480x272 +//#define TOUCH_UI_800x480 + +// Define the printer interface or pins used (see "ui_pin_mappings.h" for definitions): + +//#define CR10_TFT_PINMAP +//#define AO_EXP1_DEPRECATED_PINMAP // UltraLCD EXP1 connector, old AlephObject's wiring +//#define AO_EXP1_PINMAP // UltraLCD EXP1 connector, new AlephObject's wiring +//#define AO_EXP2_PINMAP // UltraLCD EXP2 connector, new AlephObject's wiring +//#define OTHER_PIN_LAYOUT + +// Otherwise. Define all the pins manually: + +#ifdef OTHER_PIN_LAYOUT + // Select interfacing pins, the following pin specifiers are supported: + // + // ARDUINO_DIGITAL_1 - Arduino pin via digitalWrite/digitalRead + // AVR_A1 - Fast AVR port access via PORTA/PINA/DDRA + // 1 - When compiling Marlin, use Marlin pin IDs. + + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #ifdef CLCD_USE_SOFT_SPI + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif +#endif + +// Defines how to orient the display. An inverted (i.e. upside-down) display +// is supported on the FT800. The FT810 or better also support a portrait +// and mirrored orientation. +//#define TOUCH_UI_INVERTED +//#define TOUCH_UI_PORTRAIT +//#define TOUCH_UI_MIRRORED + +// Use a numeric passcode for "Parental lock". +// This is a recommended for smaller displays. +//#define TOUCH_UI_PASSCODE + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Enable this to debug the event framework +//#define UI_FRAMEWORK_DEBUG + +// Enable the developer's menu and screens +//#define DEVELOPER_SCREENS + +// Maximum feed rate for manual extrusion (mm/s) +//#define MAX_MANUAL_FEEDRATE 240 + +// Sets the SPI speed in Hz + +#define SPI_FREQUENCY 8000000 >> SPI_SPEED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/LICENSE.txt b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/LICENSE.txt new file mode 100644 index 000000000000..94a9ed024d38 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/README.md b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/README.md new file mode 100644 index 000000000000..6ba985d60030 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/README.md @@ -0,0 +1,28 @@ +FTDI EVE Library +---------------- + +The FTDI EVE Library is a fully open-source library and UI framework for the FTDI +FT800 and FT810 graphics processor. + +Although the library has been developed within Lulzbot for providing a user interface +for Marlin, the library has been written so that it can be used in any Arduino sketch. + +The library is split into two parts. The "basic" API provides a shallow interface to +the underlying FTDI hardware and command FIFO and provides low-level access to the +hardware as closely as possible to the API described in the FTDI Programmer's Guide. + +The "extended" API builds on top of the "basic" API to provide a GUI framework for +handling common challenges in building a usable GUI. The GUI framework provides the +following features: + +- Macros for a resolution-independent placement of widgets based on a grid. +- Class-based UI screens, with press and unpress touch events, as well as touch repeat. +- Event loop with button debouncing and button push visual and auditory feedback. +- Easy screen-to-screen navigation including a navigation stack for going backwards. +- Visual feedback for disabled vs enabled buttons, and custom button styles. +- A sound player class for playing individual notes or complete sound sequences. +- Display list caching, for storing static background elements of a screen in RAM_G. + +See the "examples" folder for Arduino sketches. Modify the "src/config.h" file in +each to suit your particular setup. The "sample_configs" contain sample configuration +files for running the sketches on our 3D printer boards. diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/boards.h new file mode 100644 index 000000000000..85e12238f239 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/boards.h @@ -0,0 +1,183 @@ +/************ + * boards.h * + ************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480)) + +#define IS_FT800 \ + constexpr uint16_t ftdi_chip = 800; \ + using namespace FTDI_FT800; \ + namespace DL { \ + using namespace FTDI_FT800_DL; \ + } \ + typedef ft800_memory_map ftdi_memory_map; \ + typedef ft800_registers ftdi_registers; + +#define IS_FT810 \ + constexpr uint16_t ftdi_chip = 810; \ + using namespace FTDI_FT810; \ + namespace DL { \ + using namespace FTDI_FT800_DL; \ + using namespace FTDI_FT810_DL; \ + } \ + typedef ft810_memory_map ftdi_memory_map; \ + typedef ft810_registers ftdi_registers; + + +#ifdef LCD_FTDI_VM800B35A + #if !HAS_RESOLUTION + #define TOUCH_UI_320x240 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 800 + #endif + namespace FTDI { + IS_FT800 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */ + constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */ + constexpr uint8_t Swizzle = 2; + constexpr uint8_t CSpread = 1; + + constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ + } + +/* + * Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B) + * Haoyu Electronics, 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B) + * + * http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16 + * http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16 + * + * Datasheet: + * + * http://www.hantronix.com/files/data/1278363262430-3.pdf + * http://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf + * http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf + * + */ + +#elif defined(LCD_HAOYU_FT800CB) + #if !HAS_RESOLUTION + #define TOUCH_UI_480x272 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 800 + #endif + namespace FTDI { + IS_FT800 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +/* + * Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810 + * + * http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html + * + * Datasheet: + * + * http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf + * + */ + +#elif defined(LCD_HAOYU_FT810CB) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +/* + * Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843) + * + * http://www.4dsystems.com.au/product/4DLCD_FT843/ + * + * Datasheet: + * + * http://www.4dsystems.com.au/productpages/4DLCD-FT843/downloads/FT843-4.3-Display_datasheet_R_1_2.pdf + * + */ + +#elif defined(LCD_4DSYSTEMS_4DLCD_FT843) + #if !HAS_RESOLUTION + #define TOUCH_UI_480x272 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 800 + #endif + namespace FTDI { + IS_FT800 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = true; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ + } + +/* + * Settings for the Aleph Objects Color LCD User Interface + * + * https://code.alephobjects.com/source/aotctl/ + * + * Datasheet: + * + * http://www.hantronix.com/files/data/s1501799605s500-gh7.pdf + * + */ +#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 0; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +#else + + #error Unknown or no LULZBOT_TOUCH_UI board specified. To add a new board, modify "ftdi_eve_boards.h" +#endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp new file mode 100644 index 000000000000..83e23e6e0fd8 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp @@ -0,0 +1,1190 @@ +/**************** + * commands.cpp * + ****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_basic.h" + +#ifdef FTDI_BASIC + +#define MULTIPLE_OF_4(val) ((((val)+3)>>2)<<2) + +using namespace FTDI; +using namespace FTDI::SPI; + +void CLCD::enable (void) { + mem_write_8(REG::PCLK, Pclk); +} + +void CLCD::disable (void) { + mem_write_8(REG::PCLK, 0x00); +} + +void CLCD::set_brightness (uint8_t brightness) { + mem_write_8(REG::PWM_DUTY, min(128,brightness)); +} + +uint8_t CLCD::get_brightness() { + return mem_read_8(REG::PWM_DUTY); +} + +void CLCD::turn_on_backlight (void) { + mem_write_8(REG::PWM_DUTY, 128); +} + +void CLCD::FontMetrics::load(const uint8_t font) { + static_assert(sizeof(FontMetrics) == 148, "Sizeof font metrics is incorrect"); + uint32_t rom_fontroot = mem_read_32(MAP::ROM_FONT_ADDR); + mem_read_bulk(rom_fontroot + 148 * (font - 16), (uint8_t*) this, 148); +} + +uint16_t CLCD::FontMetrics::get_text_width(const char *str, size_t n) const { + uint16_t width = 0; + const uint8_t *p = (const uint8_t *) str; + for(;;) { + const uint8_t val = *p++; n--; + if (!val || n == 0) break; + width += val < 128 ? char_widths[val] : 0; + } + return width; +} + +uint16_t CLCD::FontMetrics::get_text_width_P(const char *str, size_t n) const { + uint16_t width = 0; + const uint8_t *p = (const uint8_t *) str; + for(;;) { + const uint8_t val = pgm_read_byte(p++); n--; + if (!val || n == 0) break; + width += val < 128 ? char_widths[val] : 0; + } + return width; +} + +/************************** HOST COMMAND FUNCTION *********************************/ + +void CLCD::host_cmd (unsigned char host_command, unsigned char byte2) { // Sends 24-Bit Host Command to LCD + if (host_command != ACTIVE) { + host_command |= 0x40; + } + spi_ftdi_select(); + spi_send(host_command); + spi_send(byte2); + spi_send(0x00); + spi_ftdi_deselect(); +} + +/************************** MEMORY READ FUNCTIONS *********************************/ + +void CLCD::spi_read_addr (uint32_t reg_address) { + spi_send((reg_address >> 16) & 0x3F); // Address [21:16] + spi_send((reg_address >> 8 ) & 0xFF); // Address [15:8] + spi_send((reg_address >> 0) & 0xFF); // Address [7:0] + spi_send(0x00); // Dummy Byte +} + +// Write 4-Byte Address, Read Multiple Bytes +void CLCD::mem_read_bulk (uint32_t reg_address, uint8_t *data, uint16_t len) { + spi_ftdi_select(); + spi_read_addr(reg_address); + spi_read_bulk (data, len); + spi_ftdi_deselect(); +} + +// Write 4-Byte Address, Read 1-Byte Data +uint8_t CLCD::mem_read_8 (uint32_t reg_address) { + spi_ftdi_select(); + spi_read_addr(reg_address); + uint8_t r_data = spi_read_8(); + spi_ftdi_deselect(); + return r_data; +} + +// Write 4-Byte Address, Read 2-Bytes Data +uint16_t CLCD::mem_read_16 (uint32_t reg_address) { + using namespace SPI::least_significant_byte_first; + spi_ftdi_select(); + spi_read_addr(reg_address); + uint16_t r_data = spi_read_16(); + spi_ftdi_deselect(); + return r_data; +} + +// Write 4-Byte Address, Read 4-Bytes Data +uint32_t CLCD::mem_read_32 (uint32_t reg_address) { + using namespace SPI::least_significant_byte_first; + spi_ftdi_select(); + spi_read_addr(reg_address); + uint32_t r_data = spi_read_32(); + spi_ftdi_deselect(); + return r_data; +} + +/************************** MEMORY WRITE FUNCTIONS *********************************/ + +// Generic operations for transforming a byte, for use with _mem_write_bulk: +static inline uint8_t reverse_byte(uint8_t a) { + return ((a & 0x1) << 7) | ((a & 0x2) << 5) | + ((a & 0x4) << 3) | ((a & 0x8) << 1) | + ((a & 0x10) >> 1) | ((a & 0x20) >> 3) | + ((a & 0x40) >> 5) | ((a & 0x80) >> 7); +} +static inline uint8_t xbm_write(const uint8_t *p) {return reverse_byte(pgm_read_byte(p));} + +void CLCD::spi_write_addr (uint32_t reg_address) { + spi_send((reg_address >> 16) | 0x80); // Address [21:16] + spi_send((reg_address >> 8 ) & 0xFF); // Address [15:8] + spi_send((reg_address >> 0) & 0xFF); // Address [7:0] +} + +// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from RAM +void CLCD::mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding) { + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_bulk(data, len, padding); + spi_ftdi_deselect(); +} + +// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM +void CLCD::mem_write_bulk (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding) { + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_bulk(str, len, padding); + spi_ftdi_deselect(); +} + + // Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM +void CLCD::mem_write_pgm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding) { + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_bulk(data, len, padding); + spi_ftdi_deselect(); +} + +// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM, reversing bytes (suitable for loading XBM images) +void CLCD::mem_write_xbm (uint32_t reg_address, progmem_str data, uint16_t len, uint8_t padding) { + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_bulk(data, len, padding); + spi_ftdi_deselect(); +} + +// Write 3-Byte Address, Write 1-Byte Data +void CLCD::mem_write_8 (uint32_t reg_address, uint8_t data) { + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_8(data); + spi_ftdi_deselect(); +} + +// Write 3-Byte Address, Write 2-Bytes Data +void CLCD::mem_write_16 (uint32_t reg_address, uint16_t data) { + using namespace SPI::least_significant_byte_first; + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_32(data); + spi_ftdi_deselect(); +} + +// Write 3-Byte Address, Write 4-Bytes Data +void CLCD::mem_write_32 (uint32_t reg_address, uint32_t data) { + using namespace SPI::least_significant_byte_first; + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_32(data); + spi_ftdi_deselect(); +} + +/******************* FT800/810 Co-processor Commands *********************************/ + +#if FTDI_API_LEVEL == 800 +uint32_t CLCD::CommandFifo::command_write_ptr = 0xFFFFFFFFul; +#endif + +void CLCD::CommandFifo::cmd(uint32_t cmd32) { + write((void*)&cmd32, sizeof(uint32_t)); +} + +void CLCD::CommandFifo::cmd(void* data, uint16_t len) { + write(data, len); +} + +void CLCD::CommandFifo::bgcolor(uint32_t rgb) { + cmd(CMD_BGCOLOR); + cmd(rgb); +} + +void CLCD::CommandFifo::fgcolor(uint32_t rgb) { + cmd(CMD_FGCOLOR); + cmd(rgb); +} + +void CLCD::CommandFifo::gradcolor(uint32_t rgb) { + cmd(CMD_GRADCOLOR); + cmd(rgb); +} + +// This sends the a text command to the command preprocessor, must be followed by str() +void CLCD::CommandFifo::button(int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t option) { + struct { + int32_t type = CMD_BUTTON; + int16_t x; + int16_t y; + int16_t w; + int16_t h; + int16_t font; + uint16_t option; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.font = font; + cmd_data.option = option; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +// This sends the a text command to the command preprocessor, must be followed by str() +void CLCD::CommandFifo::text(int16_t x, int16_t y, int16_t font, uint16_t options) { + struct { + int32_t type = CMD_TEXT; + int16_t x; + int16_t y; + int16_t font; + uint16_t options; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.font = font; + cmd_data.options = options; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +// This sends the a toggle command to the command preprocessor, must be followed by str() +void CLCD::CommandFifo::toggle (int16_t x, int16_t y, int16_t w, int16_t font, uint16_t options, bool state) { + struct { + int32_t type = CMD_TOGGLE; + int16_t x; + int16_t y; + int16_t w; + int16_t font; + uint16_t options; + uint16_t state; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.font = font; + cmd_data.options = options; + cmd_data.state = state ? 65535 : 0; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +// This sends the a keys command to the command preprocessor, must be followed by str() +void CLCD::CommandFifo::keys (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t options) { + struct { + int32_t type = CMD_KEYS; + int16_t x; + int16_t y; + int16_t w; + int16_t h; + int16_t font; + uint16_t options; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.font = font; + cmd_data.options = options; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::clock (int16_t x, int16_t y, int16_t r, uint16_t options, int16_t h, int16_t m, int16_t s, int16_t ms) +{ + struct { + int32_t type = CMD_CLOCK; + int16_t x; + int16_t y; + int16_t r; + uint16_t options; + int16_t h; + int16_t m; + int16_t s; + int16_t ms; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.r = r; + cmd_data.options = options; + cmd_data.h = h; + cmd_data.m = m; + cmd_data.s = s; + cmd_data.ms = ms; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::gauge (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t major, uint16_t minor, uint16_t val, uint16_t range) +{ + struct { + int32_t type = CMD_GAUGE; + int16_t x; + int16_t y; + int16_t r; + uint16_t options; + uint16_t major; + uint16_t minor; + uint16_t val; + uint16_t range; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.r = r; + cmd_data.options = options; + cmd_data.major = major; + cmd_data.minor = minor; + cmd_data.val = val; + cmd_data.range = range; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::dial (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t val) +{ + struct { + int32_t type = CMD_DIAL; + int16_t x; + int16_t y; + int16_t r; + uint16_t options; + uint16_t val; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.r = r; + cmd_data.options = options; + cmd_data.val = val; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::scrollbar (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t size, uint16_t range) { + struct { + int32_t type = CMD_SCROLLBAR; + int16_t x; + int16_t y; + int16_t w; + uint16_t h; + uint16_t options; + uint16_t val; + uint16_t size; + uint16_t range; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.options = options; + cmd_data.val = val; + cmd_data.size = size; + cmd_data.range = range; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::progress (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range) { + struct { + int32_t type = CMD_PROGRESS; + int16_t x; + int16_t y; + int16_t w; + int16_t h; + uint16_t options; + uint16_t val; + uint16_t range; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.options = options; + cmd_data.val = val; + cmd_data.range = range; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::slider (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range) { + struct { + int32_t type = CMD_SLIDER; + int16_t x; + int16_t y; + int16_t w; + int16_t h; + uint16_t options; + uint16_t val; + uint16_t range; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.options = options; + cmd_data.val = val; + cmd_data.range = range; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::gradient (int16_t x0, int16_t y0, uint32_t rgb0, int16_t x1, int16_t y1, uint32_t rgb1) { + struct { + int32_t type = CMD_GRADIENT; + int16_t x0; + int16_t y0; + uint32_t rgb0; + int16_t x1; + int16_t y1; + uint32_t rgb1; + } cmd_data; + + cmd_data.x0 = x0; + cmd_data.y0 = y0; + cmd_data.rgb0 = rgb0; + cmd_data.x1 = x1; + cmd_data.y1 = y1; + cmd_data.rgb1 = rgb1; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::number (int16_t x, int16_t y, int16_t font, uint16_t options, int32_t n) { + struct { + int32_t type = CMD_NUMBER; + int16_t x; + int16_t y; + int16_t font; + uint16_t options; + int16_t n; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.font = font; + cmd_data.options = options; + cmd_data.n = n; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::memzero (uint32_t ptr, uint32_t size) { + struct { + uint32_t type = CMD_MEMZERO; + uint32_t ptr; + uint32_t size; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.size = size; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::memset (uint32_t ptr, uint32_t val, uint32_t size) { + struct { + uint32_t type = CMD_MEMSET; + uint32_t ptr; + uint32_t val; + uint32_t size; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.val = val; + cmd_data.size = size; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::memcpy (uint32_t dst, uint32_t src, uint32_t size) { + struct { + uint32_t type = CMD_MEMCPY; + uint32_t dst; + uint32_t src; + uint32_t size; + } cmd_data; + + cmd_data.dst = dst; + cmd_data.src = src; + cmd_data.size = size; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::memcrc (uint32_t ptr, uint32_t num, uint32_t result) { + struct { + uint32_t type = CMD_MEMCRC; + uint32_t ptr; + uint32_t num; + uint32_t result; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.num = num; + cmd_data.result = result; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::memwrite (uint32_t ptr, uint32_t value) { + struct { + uint32_t type = CMD_MEMWRITE; + uint32_t ptr; + uint32_t num; + uint32_t value; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.num = 4; + cmd_data.value = value; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::append (uint32_t ptr, uint32_t size) { + struct { + uint32_t type = CMD_APPEND; + uint32_t ptr; + uint32_t size; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.size = size; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::inflate (uint32_t ptr) { + struct { + uint32_t type = CMD_INFLATE; + uint32_t ptr; + } cmd_data; + + cmd_data.ptr = ptr; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::getptr (uint32_t result) { + struct { + uint32_t type = CMD_GETPTR; + uint32_t result; + } cmd_data; + + cmd_data.result = result; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::track(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t tag) { + struct { + uint32_t type = CMD_TRACK; + int16_t x; + int16_t y; + int16_t w; + int16_t h; + int16_t tag; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.tag = tag; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::sketch(int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t ptr, uint16_t format) { + struct { + uint32_t type = CMD_SKETCH; + int16_t x; + int16_t y; + uint16_t w; + uint16_t h; + uint32_t ptr; + uint16_t format; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.ptr = ptr; + cmd_data.format = format; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::snapshot(uint32_t ptr) { + struct { + uint32_t type = CMD_SNAPSHOT; + uint32_t ptr; + } cmd_data; + + cmd_data.ptr = ptr; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::spinner(int16_t x, int16_t y, uint16_t style, uint16_t scale) { + struct { + uint32_t type = CMD_SPINNER; + uint16_t x; + uint16_t y; + uint16_t style; + uint16_t scale; + } cmd_data; + + cmd_data.x = x; + cmd_data.y = y; + cmd_data.style = style; + cmd_data.scale = scale; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::loadimage(uint32_t ptr, uint32_t options) { + struct { + uint32_t type = CMD_LOADIMAGE; + uint32_t ptr; + uint32_t options; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.options = options; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::getprops (uint32_t ptr, uint32_t width, uint32_t height) { + struct { + uint32_t type = CMD_GETPROPS; + uint32_t ptr; + uint32_t width; + uint32_t height; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.width = width; + cmd_data.height = height; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::scale(int32_t sx, int32_t sy) { + struct { + uint32_t type = CMD_SCALE; + int32_t sx; + int32_t sy; + } cmd_data; + + cmd_data.sx = sx; + cmd_data.sy = sy; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::rotate(int32_t a) { + struct { + uint32_t type = CMD_ROTATE; + int32_t a; + } cmd_data; + + cmd_data.a = a; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +void CLCD::CommandFifo::translate (int32_t tx, int32_t ty) { + struct { + uint32_t type = CMD_TRANSLATE; + int32_t tx; + int32_t ty; + } cmd_data; + + cmd_data.tx = tx; + cmd_data.ty = ty; + + cmd( &cmd_data, sizeof(cmd_data) ); +} + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::setbase (uint8_t base) { + struct { + int32_t type = CMD_SETBASE; + uint32_t base; + } cmd_data; + + cmd_data.base = base; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::setbitmap(uint32_t addr, uint16_t fmt, uint16_t w, uint16_t h) { + struct { + uint32_t type = CMD_SETBITMAP; + uint32_t addr; + uint16_t fmt; + uint16_t w; + uint16_t h; + uint16_t dummy; + } cmd_data; + + cmd_data.addr = addr; + cmd_data.fmt = fmt; + cmd_data.w = w; + cmd_data.h = h; + cmd_data.dummy = 0; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::snapshot2(uint32_t format, uint32_t ptr, int16_t x, int16_t y, uint16_t w, uint16_t h) { + struct { + uint32_t type = CMD_SNAPSHOT2; + uint32_t format; + uint32_t ptr; + int16_t x; + int16_t y; + uint16_t w; + uint16_t h; + } cmd_data; + + cmd_data.format = format; + cmd_data.ptr = ptr; + cmd_data.x = x; + cmd_data.y = y; + cmd_data.w = w; + cmd_data.h = h; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::mediafifo(uint32_t ptr, uint32_t size) { + struct { + uint32_t type = CMD_MEDIAFIFO; + uint32_t ptr; + uint32_t size; + } cmd_data; + + cmd_data.ptr = ptr; + cmd_data.size = size; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::videostart() { + cmd( CMD_VIDEOSTART ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::videoframe(uint32_t dst, uint32_t ptr) { + struct { + uint32_t type = CMD_VIDEOFRAME; + uint32_t dst; + uint32_t ptr; + } cmd_data; + + cmd_data.dst = dst; + cmd_data.ptr = ptr; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::playvideo(uint32_t options) { + struct { + uint32_t type = CMD_PLAYVIDEO; + uint32_t options; + } cmd_data; + + cmd_data.options = options; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::setrotate (uint8_t rotation) { + struct { + uint32_t type = CMD_SETROTATE; + uint32_t rotation; + } cmd_data; + + cmd_data.rotation = rotation; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +#if FTDI_API_LEVEL >= 810 +void CLCD::CommandFifo::romfont (uint8_t font, uint8_t romslot) { + struct { + uint32_t type = CMD_ROMFONT; + uint32_t font; + uint32_t romslot; + } cmd_data; + + cmd_data.font = font; + cmd_data.romslot = romslot; + + cmd( &cmd_data, sizeof(cmd_data) ); +} +#endif + +/**************************** FT800/810 Co-Processor Command FIFO ****************************/ + +bool CLCD::CommandFifo::is_processing() { + return (mem_read_32(REG::CMD_READ) & 0x0FFF) != (mem_read_32(REG::CMD_WRITE) & 0x0FFF); +} + +bool CLCD::CommandFifo::has_fault() { + uint16_t Cmd_Read_Reg = mem_read_32(REG::CMD_READ) & 0x0FFF; + return Cmd_Read_Reg == 0x0FFF; +} + +#if FTDI_API_LEVEL == 800 +void CLCD::CommandFifo::start() { + if (command_write_ptr == 0xFFFFFFFFul) { + command_write_ptr = mem_read_32(REG::CMD_WRITE) & 0x0FFF; + } +} + +void CLCD::CommandFifo::execute() { + if (command_write_ptr != 0xFFFFFFFFul) { + mem_write_32(REG::CMD_WRITE, command_write_ptr); + } +} + +void CLCD::CommandFifo::reset() { + safe_delay(100); + mem_write_32(REG::CPURESET, 0x00000001); + mem_write_32(REG::CMD_WRITE, 0x00000000); + mem_write_32(REG::CMD_READ, 0x00000000); + mem_write_32(REG::CPURESET, 0x00000000); + safe_delay(300); + command_write_ptr = 0xFFFFFFFFul; +}; + +template bool CLCD::CommandFifo::_write_unaligned(T data, uint16_t len) { + const char *ptr = (const char*)data; + uint32_t bytes_tail, bytes_head; + uint32_t command_read_ptr; + + #ifdef UI_FRAMEWORK_DEBUG + if (command_write_ptr == 0xFFFFFFFFul) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Attempt to write to FIFO before CommandFifo::Cmd_Start()."); + } + #endif + + /* Wait until there is enough space in the circular buffer for the transfer */ + do { + command_read_ptr = mem_read_32(REG::CMD_READ) & 0x0FFF; + if (command_read_ptr <= command_write_ptr) { + bytes_tail = 4096U - command_write_ptr; + bytes_head = command_read_ptr; + } else { + bytes_tail = command_read_ptr - command_write_ptr; + bytes_head = 0; + } + // Check for faults which can lock up the command processor + if (has_fault()) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHOLNPGM("Fault waiting for space in the command processor"); + #endif + return false; + } + } while ((bytes_tail + bytes_head) < len); + + /* Write as many bytes as possible following REG::CMD_WRITE */ + uint16_t bytes_to_write = min(len, bytes_tail); + mem_write_bulk (MAP::RAM_CMD + command_write_ptr, T(ptr), bytes_to_write); + command_write_ptr += bytes_to_write; + ptr += bytes_to_write; + len -= bytes_to_write; + + if (len > 0) { + /* Write remaining bytes at start of circular buffer */ + mem_write_bulk (MAP::RAM_CMD, T(ptr), len); + command_write_ptr = len; + } + + if (command_write_ptr == 4096U) { + command_write_ptr = 0; + } + return true; +} + +// Writes len bytes into the FIFO, if len is not +// divisible by four, zero bytes will be written +// to align to the boundary. + +template bool CLCD::CommandFifo::write(T data, uint16_t len) { + const uint8_t padding = MULTIPLE_OF_4(len) - len; + + uint8_t pad_bytes[] = {0, 0, 0, 0}; + return _write_unaligned(data, len) && + _write_unaligned(pad_bytes, padding); +} +#else +void CLCD::CommandFifo::start() { +} + +void CLCD::CommandFifo::execute() { +} + +void CLCD::CommandFifo::reset() { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHOLNPGM("Resetting command processor"); + #endif + safe_delay(100); + mem_write_32(REG::CPURESET, 0x00000001); + mem_write_32(REG::CMD_WRITE, 0x00000000); + mem_write_32(REG::CMD_READ, 0x00000000); + mem_write_32(REG::CPURESET, 0x00000000); + safe_delay(300); +}; + +// Writes len bytes into the FIFO, if len is not +// divisible by four, zero bytes will be written +// to align to the boundary. + +template bool CLCD::CommandFifo::write(T data, uint16_t len) { + const uint8_t padding = MULTIPLE_OF_4(len) - len; + + if (has_fault()) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHOLNPGM("Faulted... ignoring write."); + #endif + return false; + } + // The FT810 provides a special register that can be used + // for writing data without us having to do our own FIFO + // management. + uint16_t Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF; + if (Command_Space < (len + padding)) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Waiting for ", len + padding); + SERIAL_ECHOPAIR(" bytes in command queue, now free: ", Command_Space); + #endif + do { + Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF; + if (has_fault()) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHOLNPGM("... fault"); + #endif + return false; + } + } while (Command_Space < len + padding); + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHOLNPGM("... done"); + #endif + } + mem_write_bulk(REG::CMDB_WRITE, data, len, padding); + return true; +} +#endif + +template bool CLCD::CommandFifo::write(const void*, uint16_t); +template bool CLCD::CommandFifo::write(progmem_str, uint16_t); + +// CO_PROCESSOR COMMANDS + +void CLCD::CommandFifo::str (const char * data) { + write(data, strlen(data)+1); +} + +void CLCD::CommandFifo::str (progmem_str data) { + write(data, strlen_P((const char*)data)+1); +} + +/******************* LCD INITIALIZATION ************************/ + +void CLCD::init (void) { + spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control + ftdi_reset(); // Power down/up the FT8xx with the apropriate delays + + if (Use_Crystal == 1) { + host_cmd(CLKEXT, 0); + } + else { + host_cmd(CLKINT, 0); + } + + host_cmd(ACTIVE, 0); // Activate the System Clock + + /* read the device-id until it returns 0x7c or times out, should take less than 150ms */ + uint8_t counter; + for(counter = 0; counter < 250; counter++) { + uint8_t device_id = mem_read_8(REG::ID); // Read Device ID, Should Be 0x7C; + if (device_id == 0x7c) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("FTDI chip initialized "); + #endif + break; + } + else { + delay(1); + } + if (counter == 249) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("Timeout waiting for device ID, should be 124, got ", device_id); + #endif + } + } + + mem_write_8(REG::PWM_DUTY, 0); // turn off Backlight, Frequency already is set to 250Hz default + + /* Configure the FT8xx Registers */ + mem_write_16(REG::HCYCLE, FTDI::Hcycle); + mem_write_16(REG::HOFFSET, FTDI::Hoffset); + mem_write_16(REG::HSYNC0, FTDI::Hsync0); + mem_write_16(REG::HSYNC1, FTDI::Hsync1); + mem_write_16(REG::VCYCLE, FTDI::Vcycle); + mem_write_16(REG::VOFFSET, FTDI::Voffset); + mem_write_16(REG::VSYNC0, FTDI::Vsync0); + mem_write_16(REG::VSYNC1, FTDI::Vsync1); + mem_write_16(REG::HSIZE, FTDI::Hsize); + mem_write_16(REG::VSIZE, FTDI::Vsize); + mem_write_8(REG::SWIZZLE, FTDI::Swizzle); + mem_write_8(REG::PCLK_POL, FTDI::Pclkpol); + mem_write_8(REG::CSPREAD, FTDI::CSpread); + + /* write a basic display-list to get things started */ + mem_write_32(MAP::RAM_DL, DL::CLEAR_COLOR_RGB); + mem_write_32(MAP::RAM_DL + 4, (DL::CLEAR | 0x07)); /* clear color, stencil and tag buffer */ + mem_write_32(MAP::RAM_DL + 8, DL::DL_DISPLAY); /* end of display list */ + + mem_write_8(REG::DLSWAP, 0x02); // activate display list, Bad Magic Cookie 2 = switch to new list after current frame is scanned out + + //mem_write_8(REG::TOUCH_MODE, 0x03); // Configure the Touch Screen, Bad Magic Cookie, 3 = CONTINUOUS = Reset Default + //mem_write_8(REG::TOUCH_ADC_MODE, 0x01); // Bad Magic Cookie, 1 = single touch = Reset Default + //mem_write_8(REG::TOUCH_OVERSAMPLE, 0x0F); // Reset Default = 7 - why 15? + mem_write_16(REG::TOUCH_RZTHRESH, touch_threshold); /* setup touch sensitivity */ + mem_write_8(REG::VOL_SOUND, 0x00); // Turn Synthesizer Volume Off + + /* turn on the display by setting DISP high */ + /* turn on the Audio Amplifier by setting GPIO_1 high for the select few modules supporting this */ + /* no need to use GPIOX here since DISP/GPIO_0 and GPIO_1 are on REG::GPIO for FT81x as well */ + if (GPIO_1_Audio_Shutdown) { + mem_write_8(REG::GPIO_DIR, GPIO_DISP | GPIO_GP1); + mem_write_8(REG::GPIO, GPIO_DISP | GPIO_GP1); + } else if (GPIO_0_Audio_Enable) { + mem_write_8(REG::GPIO_DIR, GPIO_DISP | GPIO_GP0); + mem_write_8(REG::GPIO, GPIO_DISP | GPIO_GP0); + } + else { + mem_write_8(REG::GPIO, GPIO_DISP); /* REG::GPIO_DIR is set to output for GPIO_DISP by default */ + } + + mem_write_8(REG::PCLK, Pclk); // Turns on Clock by setting PCLK Register to the value necessary for the module + + mem_write_16(REG::PWM_HZ, 0x00FA); + + // Turning off dithering seems to help prevent horizontal line artifacts on certain colors + mem_write_8(REG::DITHER, 0); + + // Initialize the command FIFO + CommandFifo::reset(); + + default_touch_transform(); + default_display_orientation(); +} + +void CLCD::default_touch_transform() { + // Set Initial Values for Touch Transform Registers + mem_write_32(REG::ROTATE, 0); + mem_write_32(REG::TOUCH_TRANSFORM_A, FTDI::default_transform_a); + mem_write_32(REG::TOUCH_TRANSFORM_B, FTDI::default_transform_b); + mem_write_32(REG::TOUCH_TRANSFORM_C, FTDI::default_transform_c); + mem_write_32(REG::TOUCH_TRANSFORM_D, FTDI::default_transform_d); + mem_write_32(REG::TOUCH_TRANSFORM_E, FTDI::default_transform_e); + mem_write_32(REG::TOUCH_TRANSFORM_F, FTDI::default_transform_f); +} + +void CLCD::default_display_orientation() { + #if FTDI_API_LEVEL >= 810 + // Set the initial display orientation. On the FT810, we use the command + // processor to do this since it will also update the transform matrices. + if (FTDI::ftdi_chip >= 810) { + CommandFifo cmd; + cmd.setrotate(0 + #if ENABLED(TOUCH_UI_MIRRORED) + + 4 + #endif + #if ENABLED(TOUCH_UI_PORTRAIT) + + 2 + #endif + #if ENABLED(TOUCH_UI_INVERTED) + + 1 + #endif + ); + cmd.execute(); + } + else { + #if ENABLED(TOUCH_UI_INVERTED) + mem_write_32(REG::ROTATE, 1); + #endif + } + #elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED) + #error PORTRAIT or MIRRORED orientation not supported on the FT800 + #elif ENABLED(TOUCH_UI_INVERTED) + mem_write_32(REG::ROTATE, 1); + #endif +} + +#endif // FTDI_BASIC diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.h new file mode 100644 index 000000000000..c90452993147 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.h @@ -0,0 +1,259 @@ +/**************** + * commands.cpp * + ****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + + /**************************************************************************** + * FUNCTION MAP * + * * + * SPI and FT800/810 Commands * + * * + * CLCD::spi_select() Set CS line to 0 * + * CLCD::spi_deselect() Set CS Line to 1 * + * CLCD::reset() Toggle FT800/810 Power Down Line 50 ms * + * CLCD::spi_init() Configure I/O Lines for SPI * + * CLCD::spi_transfer() Send/Receive 1 SPI Byte * + * CLCD::init() Set FT800/810 Registers * + * CLCD::enable() Turn On FT800/810 PCLK * + * CLCD::disable() Turn Off FT8880/810 PCLK * + * CLCD::set_backlight() Set LCD Backlight Level * + * * + * MEMORY READ FUNCTIONS * + * * + * CLCD::mem_read_addr() Send 32-Bit Address * + * CLCD::mem_read_8() Read 1 Byte * + * CLCD::mem_read_16() Read 2 Bytes * + * CLCD::mem_read_32() Read 4 Bytes * + * * + * MEMORY WRITE FUNCTIONS * + * * + * CLCD::mem_write_addr() Send 24-Bit Address * + * CLCD::mem_write_8() Write 1 Byte * + * CLCD::mem_write_16() Write 2 Bytes * + * CLCD::mem_write_32() Write 4 Bytes * + * * + * HOST COMMAND FUNCTION * + * * + * CLCD::host_cmd() Send 24-Bit Host Command * + * * + * COMMAND BUFFER FUNCTIONS * + * * + * CLCD::cmd() Send 32-Bit Value(4 Bytes)CMD Buffer * + * CLCD::cmd() Send Data Structure with 32-Bit Cmd * + * CLCD::str() Send Text String in 32-Bit Multiples * + + * * + * FT800/810 GRAPHIC COMMANDS * + * * + * class CLCD:CommandFifo {} Class to control Cmd FIFO * + + * CommandFifo::start() Wait for CP finish - Set FIFO Ptr * + * CommandFifo::execute() Set REG_CMD_WRITE and start CP * + * CommandFifo::reset() Set Cmd Buffer Pointers to 0 * + * + * CommandFifo::fgcolor Set Graphic Item Foreground Color * + * CommandFifo::bgcolor Set Graphic Item Background Color * + * CommandFifo::begin() Begin Drawing a Primative * + * CommandFifo::mem_copy() Copy a Block of Memory * + * CommandFifo::append() Append Commands to Current DL * + * CommandFifo::gradient_color() Set 3D Button Highlight Color * + * CommandFifo::button() Draw Button with Bulk Write * + * CommandFifo::text() Draw Text with Bulk Write * + *****************************************************************************/ + + /************************************************** + * RAM_G Graphics RAM Allocation * + * * + * Address Use * + * * + * 8000 Extruder Bitmap * + * 8100 Bed Heat Bitmap * + * 8200 Fan Bitmap * + * 8300 Thumb Drive Symbol Bitmap * + * 35000 Static DL Space (FT800) * + * F5000 Static DL Space (FT810) * + **************************************************/ + +#pragma once + +typedef const __FlashStringHelper *progmem_str; + +class UIStorage; + +class CLCD { + friend class UIStorage; + + public: + typedef FTDI::ftdi_registers REG; + typedef FTDI::ftdi_memory_map MAP; + + static void spi_write_addr (uint32_t reg_address); + static void spi_read_addr (uint32_t reg_address); + + static uint8_t mem_read_8 (uint32_t reg_address); + static uint16_t mem_read_16 (uint32_t reg_address); + static uint32_t mem_read_32 (uint32_t reg_address); + static void mem_read_bulk (uint32_t reg_address, uint8_t *data, uint16_t len); + + static void mem_write_8 (uint32_t reg_address, uint8_t w_data); + static void mem_write_16 (uint32_t reg_address, uint16_t w_data); + static void mem_write_32 (uint32_t reg_address, uint32_t w_data); + static void mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); + static void mem_write_pgm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); + static void mem_write_bulk (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0); + static void mem_write_xbm (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0); + + public: + class CommandFifo; + class FontMetrics; + + static void init (void); + static void default_touch_transform (void); + static void default_display_orientation (void); + static void turn_on_backlight (void); + static void enable (void); + static void disable (void); + static void set_brightness (uint8_t brightness); + static uint8_t get_brightness(); + static void host_cmd (unsigned char host_command, unsigned char byte2); + + static void get_font_metrics (uint8_t font, struct FontMetrics &fm); + static uint16_t get_text_width(const uint8_t font, const char *str); + static uint16_t get_text_width_P(const uint8_t font, const char *str); + + static uint8_t get_tag () {return mem_read_8(REG::TOUCH_TAG);} + static bool is_touching () {return (mem_read_32(REG::TOUCH_DIRECT_XY) & 0x80000000) == 0;} + + static uint8_t get_tracker (uint16_t &value) { + uint32_t tracker = mem_read_32(REG::TRACKER); + value = tracker >> 16; + return tracker & 0xFF; + } +}; + +/*************************** FT800/810 Font Metrics ****************************/ + +class CLCD::FontMetrics { + public: + uint8_t char_widths[128]; + uint32_t format; + uint32_t stride; + uint32_t width; + uint32_t height; + uint32_t ptr; + + FontMetrics(uint8_t font) {load(font);} + + void load(uint8_t font); + + // Returns width of string, up to a maximum of n characters. + uint16_t get_text_width(const char *str, size_t n = SIZE_MAX) const; + uint16_t get_text_width_P(const char *str, size_t n = SIZE_MAX) const; +}; + +/******************* FT800/810 Graphic Commands *********************************/ + +class CLCD::CommandFifo { + protected: + #if FTDI_API_LEVEL >= 810 + uint32_t getRegCmdBSpace(); + #else + static uint32_t command_write_ptr; + template bool _write_unaligned(T data, uint16_t len); + #endif + void start(void); + + public: + template bool write(T data, uint16_t len); + + public: + CommandFifo() {start();} + + static void reset (void); + static bool is_processing(); + static bool has_fault(); + + void execute(void); + + void cmd(uint32_t cmd32); + void cmd(void* data, uint16_t len); + + void dlstart() {cmd(FTDI::CMD_DLSTART);} + void swap() {cmd(FTDI::CMD_SWAP);} + void coldstart() {cmd(FTDI::CMD_COLDSTART);} + void screensaver() {cmd(FTDI::CMD_SCREENSAVER);} + void stop() {cmd(FTDI::CMD_STOP);} + void loadidentity() {cmd(FTDI::CMD_LOADIDENTITY);} + void setmatrix() {cmd(FTDI::CMD_SETMATRIX);} + + void fgcolor (uint32_t rgb); + void bgcolor (uint32_t rgb); + void gradcolor (uint32_t rgb); + + void track (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t tag); + void clock (int16_t x, int16_t y, int16_t r, uint16_t options, int16_t h, int16_t m, int16_t s, int16_t ms); + void gauge (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t major, uint16_t minor, uint16_t val, uint16_t range); + void dial (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t val); + void slider (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range); + void progress (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range); + void scrollbar (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t size, uint16_t range); + void number (int16_t x, int16_t y, int16_t font, uint16_t options, int32_t n); + void spinner (int16_t x, int16_t y, uint16_t style, uint16_t scale); + void sketch (int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t ptr, uint16_t format); + void gradient (int16_t x0, int16_t y0, uint32_t rgb0, int16_t x1, int16_t y1, uint32_t rgb1); + void snapshot (uint32_t ptr); + void loadimage (uint32_t ptr, uint32_t options); + void getprops (uint32_t ptr, uint32_t width, uint32_t height); + + void scale (int32_t sx, int32_t sy); + void rotate (int32_t a); + void translate (int32_t tx, int32_t ty); + + #if FTDI_API_LEVEL >= 810 + void setbase (uint8_t base); + void setrotate (uint8_t rotation); + void setbitmap (uint32_t ptr, uint16_t fmt, uint16_t w, uint16_t h); + void snapshot2 (uint32_t fmt, uint32_t ptr, int16_t x, int16_t y, uint16_t w, uint16_t h); + void mediafifo (uint32_t ptr, uint32_t size); + void playvideo (uint32_t options); + void videostart(); + void videoframe(uint32_t dst, uint32_t ptr); + void romfont (uint8_t font, uint8_t romslot); + #endif + + // All the following must be followed by str() + void text (int16_t x, int16_t y, int16_t font, uint16_t options); + void button (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t option); + void toggle (int16_t x, int16_t y, int16_t w, int16_t font, uint16_t options, bool state); + void keys (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t options); + + // Sends the string portion of text, button, toggle and keys. + void str (const char * data); + void str (progmem_str data); + + void memzero (uint32_t ptr, uint32_t size); + void memset (uint32_t ptr, uint32_t value, uint32_t size); + void memcpy (uint32_t dst, uint32_t src, uint32_t size); + void memcrc (uint32_t ptr, uint32_t num, uint32_t result); + void memwrite (uint32_t ptr, uint32_t value); + void inflate (uint32_t ptr); + void getptr (uint32_t result); + void append (uint32_t ptr, uint32_t size); +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/constants.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/constants.h new file mode 100644 index 000000000000..54836e146627 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/constants.h @@ -0,0 +1,414 @@ +/*************** + * constants.h * + ***************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/**************************************************************************** + * This header defines constants and commands for the FTDI FT810 LCD Driver * + * chip. * + ****************************************************************************/ + +#pragma once + +// OPTIONS + +namespace FTDI { + constexpr uint16_t OPT_3D = 0x0000; + constexpr uint16_t OPT_RGB565 = 0x0000; + constexpr uint16_t OPT_MONO = 0x0001; + constexpr uint16_t OPT_NODL = 0x0002; + constexpr uint16_t OPT_FLAT = 0x0100; + constexpr uint16_t OPT_SIGNED = 0x0100; + constexpr uint16_t OPT_CENTERX = 0x0200; + constexpr uint16_t OPT_CENTERY = 0x0400; + constexpr uint16_t OPT_CENTER = (OPT_CENTERX | OPT_CENTERY); + constexpr uint16_t OPT_RIGHTX = 0x0800; + constexpr uint16_t OPT_NOBACK = 0x1000; + constexpr uint16_t OPT_NOTICKS = 0x2000; + constexpr uint16_t OPT_NOHM = 0x4000; + constexpr uint16_t OPT_NOPOINTER = 0x4000; + constexpr uint16_t OPT_NOSECS = 0x8000; + constexpr uint16_t OPT_NOHANDS = (OPT_NOPOINTER | OPT_NOSECS); +} + +namespace FTDI_FT810 { + constexpr uint16_t OPT_NOTEAR = 0x0004; + constexpr uint16_t OPT_FULLSCREEN = 0x0008; + constexpr uint16_t OPT_MEDIAFIFO = 0x0010; + constexpr uint16_t OPT_SOUND = 0x0020; +} + +// GPIO Bits + +namespace FTDI { + constexpr uint8_t GPIO_GP0 = 1 << 0; + constexpr uint8_t GPIO_GP1 = 1 << 1; + constexpr uint8_t GPIO_DISP = 1 << 7; +} + +namespace FTDI_FT810 { + constexpr uint16_t GPIOX_GP0 = 1 << 0; + constexpr uint16_t GPIOX_GP1 = 1 << 1; + constexpr uint16_t GPIOX_DISP = 1 << 15; +} + +// HOST COMMANDS + +namespace FTDI { + constexpr uint8_t ACTIVE = 0x00; + constexpr uint8_t STANDBY = 0x41; + constexpr uint8_t SLEEP = 0x42; + constexpr uint8_t PWRDOWN = 0x50; + constexpr uint8_t CLKEXT = 0x44; + constexpr uint8_t CLKINT = 0x48; + constexpr uint8_t CORESET = 0x68; +} + +namespace FTDI_FT800 { + constexpr uint8_t CLK48M = 0x62; + constexpr uint8_t CLK36M = 0x61; +} + +namespace FTDI_FT810 { + constexpr uint8_t CLKSEL = 0x61; +} + +// DISPLAY LIST COMMANDS + +namespace FTDI { + constexpr uint8_t ARGB1555 = 0; + constexpr uint8_t L1 = 1; + constexpr uint8_t L4 = 2; + constexpr uint8_t L8 = 3; + constexpr uint8_t RGB332 = 4; + constexpr uint8_t ARGB2 = 5; + constexpr uint8_t ARGB4 = 6; + constexpr uint8_t RGB565 = 7; + constexpr uint8_t PALETTED = 8; + constexpr uint8_t TEXT8X8 = 9; + constexpr uint8_t TEXTVGA = 10; + constexpr uint8_t BARGRAPH = 11; + + constexpr uint8_t ALPHA_FUNC_NEVER = 0; + constexpr uint8_t ALPHA_FUNC_LESS = 1; + constexpr uint8_t ALPHA_FUNC_LEQUAL = 2; + constexpr uint8_t ALPHA_FUNC_GREATER = 3; + constexpr uint8_t ALPHA_FUNC_GEQUAL = 4; + constexpr uint8_t ALPHA_FUNC_EQUAL = 5; + constexpr uint8_t ALPHA_FUNC_NOTEQUAL = 6; + constexpr uint8_t ALPHA_FUNC_ALWAYS = 7; + + constexpr uint8_t NEAREST = 0; + constexpr uint8_t BILINEAR = 1; + constexpr uint8_t BORDER = 0; + constexpr uint8_t REPEAT = 1; + + constexpr uint8_t BLEND_FUNC_ZERO = 0; + constexpr uint8_t BLEND_FUNC_ONE = 1; + constexpr uint8_t BLEND_FUNC_SRC_ALPHA = 2; + constexpr uint8_t BLEND_FUNC_DST_ALPHA = 3; + constexpr uint8_t BLEND_FUNC_ONE_MINUS_SRC_ALPHA = 4; + constexpr uint8_t BLEND_FUNC_ONE_MINUS_DST_ALPHA = 5; + + constexpr uint32_t COLOR_MASK_RED = 8; + constexpr uint32_t COLOR_MASK_GRN = 4; + constexpr uint32_t COLOR_MASK_BLU = 2; + constexpr uint32_t COLOR_MASK_ALPHA = 1; + + constexpr uint8_t STENCIL_FUNC_NEVER = 0; + constexpr uint8_t STENCIL_FUNC_LESS = 1; + constexpr uint8_t STENCIL_FUNC_LEQUAL = 2; + constexpr uint8_t STENCIL_FUNC_GREATER = 3; + constexpr uint8_t STENCIL_FUNC_GEQUAL = 4; + constexpr uint8_t STENCIL_FUNC_EQUAL = 5; + constexpr uint8_t STENCIL_FUNC_NOTEQUAL = 6; + constexpr uint8_t STENCIL_FUNC_ALWAYS = 7; + + constexpr uint8_t STENCIL_OP_ZERO = 0; + constexpr uint8_t STENCIL_OP_KEEP = 1; + constexpr uint8_t STENCIL_OP_REPLACE = 2; + constexpr uint8_t STENCIL_OP_INCR = 3; + constexpr uint8_t STENCIL_OP_DECR = 4; + constexpr uint8_t STENCIL_OP_INVERT = 5; + + typedef enum: uint32_t { + BITMAPS = 1, + POINTS = 2, + LINES = 3, + LINE_STRIP = 4, + EDGE_STRIP_R = 5, + EDGE_STRIP_L = 6, + EDGE_STRIP_A = 7, + EDGE_STRIP_B = 8, + RECTS = 9 + } begin_t; +} + +namespace FTDI_FT800_DL { + constexpr uint32_t ALPHA_FUNC = 0x09000000; + constexpr uint32_t BEGIN = 0x1F000000; + constexpr uint32_t BITMAP_HANDLE = 0x05000000; + constexpr uint32_t BITMAP_LAYOUT = 0x07000000; + constexpr uint32_t BITMAP_SIZE = 0x08000000; + constexpr uint32_t BITMAP_SOURCE = 0x01000000; + constexpr uint32_t BITMAP_TRANSFORM_A = 0x15000000; + constexpr uint32_t BITMAP_TRANSFORM_B = 0x16000000; + constexpr uint32_t BITMAP_TRANSFORM_C = 0x17000000; + constexpr uint32_t BITMAP_TRANSFORM_D = 0x18000000; + constexpr uint32_t BITMAP_TRANSFORM_E = 0x19000000; + constexpr uint32_t BITMAP_TRANSFORM_F = 0x1A000000; + constexpr uint32_t BLEND_FUNC = 0x0B000000; + constexpr uint32_t CALL = 0x1D000000; + constexpr uint32_t CELL = 0x06000000; + constexpr uint32_t CLEAR = 0x26000000; + constexpr uint32_t CLEAR_COLOR_BUFFER = 0x00000004; + constexpr uint32_t CLEAR_STENCIL_BUFFER = 0x00000002; + constexpr uint32_t CLEAR_TAG_BUFFER = 0x00000001; + constexpr uint32_t CLEAR_COLOR_A = 0x0F000000; + constexpr uint32_t CLEAR_COLOR_RGB = 0x02000000; + constexpr uint32_t CLEAR_STENCIL = 0x11000000; + constexpr uint32_t CLEAR_TAG = 0x12000000; + constexpr uint32_t COLOR_A = 0x10000000; + constexpr uint32_t COLOR_MASK = 0x20000000; + constexpr uint32_t COLOR_RGB = 0x04000000; + constexpr uint32_t DL_DISPLAY = 0x00000000; + constexpr uint32_t END = 0x21000000; + constexpr uint32_t JUMP = 0x1E000000; + constexpr uint32_t LINE_WIDTH = 0x0E000000; + constexpr uint32_t MACRO = 0x25000000; + constexpr uint32_t POINT_SIZE = 0x0D000000; + constexpr uint32_t RESTORE_CONTEXT = 0x23000000; + constexpr uint32_t RETURN = 0x24000000; + constexpr uint32_t SAVE_CONTEXT = 0x22000000; + constexpr uint32_t SCISSOR_SIZE = 0x1C000000; + constexpr uint32_t SCISSOR_XY = 0x1B000000; + constexpr uint32_t STENCIL_FUNC = 0x0A000000; + constexpr uint32_t STENCIL_MASK = 0x13000000; + constexpr uint32_t STENCIL_OP = 0x0C000000; + constexpr uint32_t TAG = 0x03000000; + constexpr uint32_t TAG_MASK = 0x14000000; + constexpr uint32_t VERTEX2F = 0x40000000; + constexpr uint32_t VERTEX2II = 0x80000000; +} + +namespace FTDI_FT810_DL { + constexpr uint32_t NOP = 0x25000000; + constexpr uint32_t BITMAP_LAYOUT_H = 0x28000000; + constexpr uint32_t BITMAP_SIZE_H = 0x29000000; + constexpr uint32_t VERTEX_FORMAT = 0x27000000; + constexpr uint32_t VERTEX_TRANSLATE_X = 0x2B000000; + constexpr uint32_t VERTEX_TRANSLATE_Y = 0x2C000000; +} + +// CO-PROCESSOR ENGINE COMMANDS +namespace FTDI { + constexpr uint32_t CMD_DLSTART = 0xFFFFFF00; + constexpr uint32_t CMD_SWAP = 0xFFFFFF01; + constexpr uint32_t CMD_COLDSTART = 0xFFFFFF32; + constexpr uint32_t CMD_INTERRUPT = 0xFFFFFF02; + constexpr uint32_t CMD_APPEND = 0xFFFFFF1E; + constexpr uint32_t CMD_REGREAD = 0xFFFFFF19; + constexpr uint32_t CMD_MEMWRITE = 0xFFFFFF1A; + constexpr uint32_t CMD_INFLATE = 0xFFFFFF22; + constexpr uint32_t CMD_LOADIMAGE = 0xFFFFFF24; + constexpr uint32_t CMD_MEMCRC = 0xFFFFFF18; + constexpr uint32_t CMD_MEMZERO = 0xFFFFFF1C; + constexpr uint32_t CMD_MEMSET = 0xFFFFFF1B; + constexpr uint32_t CMD_MEMCPY = 0xFFFFFF1D; + constexpr uint32_t CMD_BUTTON = 0xFFFFFF0D; + constexpr uint32_t CMD_CLOCK = 0xFFFFFF14; + constexpr uint32_t CMD_FGCOLOR = 0xFFFFFF0A; + constexpr uint32_t CMD_BGCOLOR = 0xFFFFFF09; + constexpr uint32_t CMD_GRADCOLOR = 0xFFFFFF34; + constexpr uint32_t CMD_GAUGE = 0xFFFFFF13; + constexpr uint32_t CMD_GRADIENT = 0xFFFFFF0B; + constexpr uint32_t CMD_KEYS = 0xFFFFFF0E; + constexpr uint32_t CMD_PROGRESS = 0xFFFFFF0F; + constexpr uint32_t CMD_SCROLLBAR = 0xFFFFFF11; + constexpr uint32_t CMD_SLIDER = 0xFFFFFF10; + constexpr uint32_t CMD_DIAL = 0xFFFFFF2D; + constexpr uint32_t CMD_TOGGLE = 0xFFFFFF12; + constexpr uint32_t CMD_TEXT = 0xFFFFFF0C; + constexpr uint32_t CMD_NUMBER = 0xFFFFFF2E; + constexpr uint32_t CMD_LOADIDENTITY = 0xFFFFFF26; + constexpr uint32_t CMD_SETMATRIX = 0xFFFFFF2A; + constexpr uint32_t CMD_GETMATRIX = 0xFFFFFF33; + constexpr uint32_t CMD_GETPTR = 0xFFFFFF23; + constexpr uint32_t CMD_GETPROPS = 0xFFFFFF25; + constexpr uint32_t CMD_SCALE = 0xFFFFFF28; + constexpr uint32_t CMD_ROTATE = 0xFFFFFF29; + constexpr uint32_t CMD_TRANSLATE = 0xFFFFFF27; + constexpr uint32_t CMD_CALIBRATE = 0xFFFFFF15; + constexpr uint32_t CMD_SPINNER = 0xFFFFFF16; + constexpr uint32_t CMD_SCREENSAVER = 0xFFFFFF2F; + constexpr uint32_t CMD_SKETCH = 0xFFFFFF30; + constexpr uint32_t CMD_STOP = 0xFFFFFF17; + constexpr uint32_t CMD_SETFONT = 0xFFFFFF2B; + constexpr uint32_t CMD_TRACK = 0xFFFFFF2C; + constexpr uint32_t CMD_SNAPSHOT = 0xFFFFFF1F; + constexpr uint32_t CMD_LOGO = 0xFFFFFF31; +} + +namespace FTDI_FT810 { + constexpr uint32_t CMD_SETROTATE = 0xFFFFFF36; + constexpr uint32_t CMD_SNAPSHOT2 = 0xFFFFFF37; + constexpr uint32_t CMD_SETBASE = 0xFFFFFF38; + constexpr uint32_t CMD_MEDIAFIFO = 0xFFFFFF39; + constexpr uint32_t CMD_PLAYVIDEO = 0xFFFFFF3A; + constexpr uint32_t CMD_SETFONT2 = 0xFFFFFF3B; + constexpr uint32_t CMD_SETSCRATCH = 0xFFFFFF3C; + constexpr uint32_t CMD_ROMFONT = 0xFFFFFF3F; + constexpr uint32_t CMD_VIDEOSTART = 0xFFFFFF40; + constexpr uint32_t CMD_VIDEOFRAME = 0xFFFFFF41; + constexpr uint32_t CMD_SETBITMAP = 0xFFFFFF43; +} + +namespace FTDI { + enum effect_t { + SILENCE = 0x00, + SQUARE_WAVE = 0x01, + SINE_WAVE = 0x02, + SAWTOOTH_WAVE = 0x03, + TRIANGLE_WAVE = 0x04, + BEEPING = 0x05, + ALARM = 0x06, + WARBLE = 0x07, + CAROUSEL = 0x08, + SHORT_PIPS_1 = 0x10, + SHORT_PIPS_2 = 0x11, + SHORT_PIPS_3 = 0x12, + SHORT_PIPS_4 = 0x13, + SHORT_PIPS_5 = 0x14, + SHORT_PIPS_6 = 0x15, + SHORT_PIPS_7 = 0x16, + SHORT_PIPS_8 = 0x17, + SHORT_PIPS_9 = 0x18, + SHORT_PIPS_10 = 0x19, + SHORT_PIPS_11 = 0x1A, + SHORT_PIPS_12 = 0x1B, + SHORT_PIPS_13 = 0x1C, + SHORT_PIPS_14 = 0x1D, + SHORT_PIPS_15 = 0x1E, + SHORT_PIPS_16 = 0x1F, + DTMF_POUND = 0x23, + DTMF_STAR = 0x2C, + DTMF_0 = 0x30, + DTMF_1 = 0x31, + DTMF_2 = 0x32, + DTMF_3 = 0x33, + DTMF_4 = 0x34, + DTMF_5 = 0x35, + DTMF_6 = 0x36, + DTMF_7 = 0x37, + DTMF_8 = 0x38, + DTMF_9 = 0x39, + HARP = 0x40, + XYLOPHONE = 0x41, + TUBA = 0x42, + GLOCKENSPIEL = 0x43, + ORGAN = 0x44, + TRUMPET = 0x45, + PIANO = 0x46, + CHIMES = 0x47, + MUSIC_BOX = 0x48, + BELL = 0x49, + CLICK = 0x50, + SWITCH = 0x51, + COWBELL = 0x52, + NOTCH = 0x53, + HIHAT = 0x54, + KICKDRUM = 0x55, + POP = 0x56, + CLACK = 0x57, + CHACK = 0x58, + MUTE = 0x60, + UNMUTE = 0x61 + }; + + enum note_t { + END_SONG = 0xFF, + REST = 0x00, + + NOTE_C1 = 0x18, // 24 + NOTE_C1S = 0x19, + NOTE_D1 = 0x1A, + NOTE_D1S = 0x1B, + NOTE_E1 = 0x1C, + NOTE_F1 = 0x1D, + NOTE_F1S = 0x1E, + NOTE_G1 = 0x1F, + NOTE_G1S = 0x20, + NOTE_A1 = 0x21, + NOTE_A1S = 0x22, + NOTE_B1 = 0x23, + + NOTE_C2 = 0x24, //36 + NOTE_C2S = 0x25, + NOTE_D2 = 0x26, + NOTE_D2S = 0x27, + NOTE_E2 = 0x28, + NOTE_F2 = 0x29, + NOTE_F2S = 0x2A, + NOTE_G2 = 0x2B, + NOTE_G2S = 0x2C, + NOTE_A2 = 0x2D, + NOTE_A2S = 0x2E, + NOTE_B2 = 0x2F, + + NOTE_C3 = 0x30, + NOTE_C3S = 0x31, + NOTE_D3 = 0x32, + NOTE_D3S = 0x33, + NOTE_E3 = 0x34, + NOTE_F3 = 0x35, + NOTE_F3S = 0x36, + NOTE_G3 = 0x37, + NOTE_G3S = 0x38, + NOTE_A3 = 0x39, + NOTE_A3S = 0x3A, + NOTE_B3 = 0x3B, + + NOTE_C4 = 0x3C, + NOTE_C4S = 0x3D, + NOTE_D4 = 0x3E, + NOTE_D4S = 0x3F, + NOTE_E4 = 0x40, + NOTE_F4 = 0x41, + NOTE_F4S = 0x42, + NOTE_G4 = 0x43, + NOTE_G4S = 0x44, + NOTE_A4 = 0x45, + NOTE_A4S = 0x46, + NOTE_B4 = 0x47, + + NOTE_C5 = 0x48, + NOTE_C5S = 0x49, + NOTE_D5 = 0x4A, + NOTE_D5S = 0x4B, + NOTE_E5 = 0x4C, + NOTE_F5 = 0x4D, + NOTE_F5S = 0x4E, + NOTE_G5 = 0x4F, + NOTE_G5S = 0x50, + NOTE_A5 = 0x51, + NOTE_A5S = 0x52, + NOTE_B5 = 0x53, + }; +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/display_list.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/display_list.h new file mode 100644 index 000000000000..99a9e0e81089 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/display_list.h @@ -0,0 +1,118 @@ +/****************** + * display_list.h * + *****************/ + +/********************************************************************************** + * Adapted from: * + * https://github.com/RudolphRiedel/FT800-FT813 * + * By Rudolph Riedel * + * * + * MIT License * + * * + * Copyright (c) 2017 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy * + * of this software and associated documentation files (the "Software"), to deal * + * in the Software without restriction, including without limitation the rights * + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included in all * + * copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * + * SOFTWARE. * + * * + **********************************************************************************/ + +#pragma once + +namespace FTDI { + /* FT8xx graphics engine specific macros useful for static display list generation */ + inline uint32_t ALPHA_FUNC(uint8_t func, uint8_t ref) {return DL::ALPHA_FUNC|((func&7UL)<<8)|(ref&255UL);} + inline uint32_t BEGIN(begin_t prim) {return DL::BEGIN|(prim&15UL);} + + inline uint32_t BITMAP_SOURCE(uint32_t ram_g_addr) {return DL::BITMAP_SOURCE|(ram_g_addr);} + inline uint32_t BITMAP_HANDLE(uint8_t handle) {return DL::BITMAP_HANDLE|(handle&31UL);} + inline uint32_t BITMAP_LAYOUT(uint8_t format, uint16_t linestride, uint16_t height) + {return DL::BITMAP_LAYOUT|((format&31UL)<<19)|((linestride&1023UL)<<9)|(height&511UL);} + + inline uint32_t BITMAP_SIZE(uint8_t filter, uint8_t wrapx, uint8_t wrapy, uint16_t width, uint16_t height) + {return DL::BITMAP_SIZE|((filter&1UL)<<20)|((wrapx&1UL)<<19)|((wrapy&1UL)<<18)|((width&511UL)<<9)|(height&511UL);} + #if FTDI_API_LEVEL >= 810 + inline uint32_t BITMAP_LAYOUT_H(uint8_t linestride, uint8_t height) + {return DL::BITMAP_LAYOUT_H|((linestride&3UL)<<2)|(height&3UL);} + inline uint32_t BITMAP_SIZE_H(uint8_t width, uint8_t height) + {return DL::BITMAP_SIZE_H|((width&3UL)<<2)|(height&3UL);} + #endif + inline uint32_t BITMAP_TRANSFORM_A(uint16_t a) {return DL::BITMAP_TRANSFORM_A|(a&131071UL);} + inline uint32_t BITMAP_TRANSFORM_B(uint16_t b) {return DL::BITMAP_TRANSFORM_B|(b&131071UL);} + inline uint32_t BITMAP_TRANSFORM_C(uint32_t c) {return DL::BITMAP_TRANSFORM_C|(c&16777215UL);} + inline uint32_t BITMAP_TRANSFORM_D(uint16_t d) {return DL::BITMAP_TRANSFORM_D|(d&131071UL);} + inline uint32_t BITMAP_TRANSFORM_E(uint16_t e) {return DL::BITMAP_TRANSFORM_E|(e&131071UL);} + inline uint32_t BITMAP_TRANSFORM_F(uint32_t f) {return DL::BITMAP_TRANSFORM_F|(f&16777215UL);} + inline uint32_t BLEND_FUNC(uint8_t src,uint8_t dst) {return DL::BLEND_FUNC|((src&7UL)<<3)|(dst&7UL);} + inline uint32_t CALL(uint16_t dest) {return DL::CALL|(dest&65535UL);} + inline uint32_t CELL(uint8_t cell) {return DL::CELL|(cell&127UL);} + inline uint32_t CLEAR(bool c,bool s,bool t) {return DL::CLEAR|((c?1UL:0UL)<<2)|((s?1UL:0UL)<<1)|(t?1UL:0UL);} + inline uint32_t CLEAR_COLOR_A(uint8_t alpha) {return DL::CLEAR_COLOR_A|(alpha&255UL);} + inline uint32_t CLEAR_COLOR_RGB(uint8_t red, uint8_t green, uint8_t blue) + {return DL::CLEAR_COLOR_RGB|((red&255UL)<<16)|((green&255UL)<<8)|(blue&255UL);} + inline uint32_t CLEAR_COLOR_RGB(uint32_t rgb) {return DL::CLEAR_COLOR_RGB|rgb;} + inline uint32_t CLEAR_STENCIL(uint8_t s) {return DL::CLEAR_STENCIL|(s&255UL);} + inline uint32_t CLEAR_TAG(uint8_t s) {return DL::CLEAR_TAG|(s&255UL);} + inline uint32_t COLOR_A(uint8_t alpha) {return DL::COLOR_A|(alpha&255UL);} + inline uint32_t COLOR_MASK(bool r, bool g, bool b, bool a) {return DL::COLOR_MASK|((r?1UL:0UL)<<3)|((g?1UL:0UL)<<2)|((b?1UL:0UL)<<1)|(a?1UL:0UL);} + inline uint32_t COLOR_RGB(uint8_t red,uint8_t green,uint8_t blue) + {return DL::COLOR_RGB|((red&255UL)<<16)|((green&255UL)<<8)|(blue&255UL);} + inline uint32_t COLOR_RGB(uint32_t rgb) {return DL::COLOR_RGB|rgb;} + /* inline uint32_t DISPLAY() {return (0UL<<24)) */ + inline uint32_t END() {return DL::END;} + inline uint32_t JUMP(uint16_t dest) {return DL::JUMP|(dest&65535UL);} + inline uint32_t LINE_WIDTH(uint16_t width) {return DL::LINE_WIDTH|(width&4095UL);} + inline uint32_t MACRO(uint8_t m) {return DL::MACRO|(m&1UL);} + inline uint32_t POINT_SIZE(uint16_t size) {return DL::POINT_SIZE|(size&8191UL);} + inline uint32_t RESTORE_CONTEXT() {return DL::RESTORE_CONTEXT;} + inline uint32_t RETURN () {return DL::RETURN;} + inline uint32_t SAVE_CONTEXT() {return DL::SAVE_CONTEXT;} + inline uint32_t SCISSOR_XY(uint16_t x,uint16_t y) { + return DL::SCISSOR_XY | + (FTDI::ftdi_chip >= 810 + ? ((x&2047UL)<<11)|(y&2047UL) + : ((x& 511UL)<<10)|(y&511UL)); + } + inline uint32_t SCISSOR_SIZE(uint16_t w,uint16_t h) { + return DL::SCISSOR_SIZE | + (FTDI::ftdi_chip >= 810 + ? ((w&4095UL)<<12)|(h&4095UL) + : ((w&1023UL)<<10)|(h&1023UL)); + } + inline uint32_t SCISSOR_XY() {return DL::SCISSOR_XY;} + inline uint32_t SCISSOR_SIZE() { + return DL::SCISSOR_SIZE | + (FTDI::ftdi_chip >= 810 + ? (2048UL<<12)|(2048UL) + : ( 512UL<<10)|( 512UL)); + } + inline uint32_t STENCIL_FUNC(uint16_t func, uint8_t ref, uint8_t mask) + {return DL::STENCIL_FUNC|((func&7UL)<<16)|((ref&255UL)<<8)|(mask&255UL);} + inline uint32_t STENCIL_MASK(uint8_t mask) {return DL::STENCIL_MASK|(mask&255UL);} + inline uint32_t STENCIL_OP(uint8_t sfail, uint8_t spass) {return DL::STENCIL_OP|(((sfail)&7UL)<<3)|(spass&7UL);} + inline uint32_t TAG(uint8_t s) {return DL::TAG|(s&255UL);} + inline uint32_t TAG_MASK(bool mask) {return DL::TAG_MASK|(mask?1:0);} + inline uint32_t VERTEX2F(uint16_t x, uint16_t y) {return DL::VERTEX2F|((x&32767UL)<<15)|(y&32767UL);} + inline uint32_t VERTEX2II(uint16_t x,uint16_t y, uint8_t handle = 0, uint8_t cell = 0) + {return DL::VERTEX2II|((x&511UL)<<21)|((y&511UL)<<12)|((handle&31UL)<<7)|(cell&127UL);} + + #if FTDI_API_LEVEL >= 810 + inline uint32_t VERTEX_FORMAT(uint8_t frac) {return DL::VERTEX_FORMAT|(frac&7UL);} + inline uint32_t VERTEX_TRANSLATE_X(int32_t x) {return DL::VERTEX_TRANSLATE_X|(x&131071UL);} + inline uint32_t VERTEX_TRANSLATE_Y(int32_t y) {return DL::VERTEX_TRANSLATE_Y|(y&131071UL);} + #endif +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/ftdi_basic.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/ftdi_basic.h new file mode 100644 index 000000000000..3d6541e7077a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/ftdi_basic.h @@ -0,0 +1,40 @@ +/**************** + * ftdi_basic.h * + ****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2019 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../compat.h" + +#if !defined(__MARLIN_FIRMWARE__) + #define FTDI_BASIC +#endif + +#ifdef FTDI_BASIC + #include "registers_ft800.h" + #include "registers_ft810.h" + #include "constants.h" + #include "boards.h" + #include "commands.h" + #include "spi.h" + #include "display_list.h" + #include "resolutions.h" +#endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft800.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft800.h new file mode 100644 index 000000000000..ff17d019d788 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft800.h @@ -0,0 +1,150 @@ +/********************* + * registers_ft800.h * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/**************************************************************************** + * This header defines registers for the FTDI FT800 LCD Driver chip. * + ****************************************************************************/ + +/******************************************************************************* + * FT810 * + * * + * START END ADDR SIZE NAME DESCRIPTION * + * * + * 0x000000 0x03FFFF 256 kB RAM_G Main Graphics RAM * + * * + * 0x0C0000 0x0C0003 4 B ROM_CHIPID [0:1] 0x800 Chip Id * + * [1:2] 0x0100 Vers ID * + * * + * 0x0BB23C 0x0FFFFB 275 kB ROM_FONT Font table and bitmap * + * * + * 0x0FFFFC 0x0FFFFF 4 B ROM_FONT_ADDR Font table pointer address * + * * + * 0x100000 0x101FFF 8 kB RAM_DL Display List RAM * + * * + * 0x102000 0x1023FF 1 kB RAM_PAL Palette RAM * + * * + * 0x102400 0x10257F 380 B * Registers * + * * + * 0x108000 0x108FFF 4 kB RAM_CMD Command Buffer * + * * + *******************************************************************************/ + +#pragma once + +namespace FTDI { + struct ft800_memory_map { + + // MEMORY LOCATIONS FT800 + static constexpr uint32_t RAM_G = 0x000000; // Main Graphics RAM + static constexpr uint32_t ROM_CHIPID = 0x0C0000; // Chip ID/Version ID + static constexpr uint32_t ROM_FONT = 0x0BB23C; // Font ROM + static constexpr uint32_t ROM_FONT_ADDR = 0x0FFFFC; // Font Table Pointer + static constexpr uint32_t RAM_DL = 0x100000; // Display List RAM + static constexpr uint32_t RAM_PAL = 0x102000; // Palette RAM + static constexpr uint32_t RAM_REG = 0x102400; // Registers + static constexpr uint32_t RAM_CMD = 0x108000; // Command Buffer + + static constexpr uint32_t RAM_G_SIZE = 256*1024l; // 256k + }; + + struct ft800_registers { + // REGISTERS AND ADDRESSES FT800 + + // REGISTER ADDRESS SIZE RESET VALUE TYPE DESCRIPTION + + static constexpr uint32_t ID = 0x102400; // 8 0x7C r Identification Register, Always 0x7C + static constexpr uint32_t FRAMES = 0x102404; // 32 0x00000000 r Frame Counter, Since Reset + static constexpr uint32_t CLOCK = 0x102408; // 32 0x00000000 r Clock cycles, Since Reset + static constexpr uint32_t FREQUENCY = 0x10240C; // 28 0x03938700 r/w Main Clock Frequency + static constexpr uint32_t RENDERMODE = 0x102410; // 1 0x00 r/w Rendering Mode: 0 = normal, 1 = single-line + static constexpr uint32_t SNAPY = 0x102414; // 11 0x0000 r/w Scan Line Select for RENDERMODE 1 + static constexpr uint32_t SNAPSHOT = 0x102418; // 1 - r Trigger for RENDERMODE 1 + static constexpr uint32_t CPURESET = 0x10241C; // 3 0x02 r/w RESET Bit2 Audio - Bit1 Touch - Bit0 Graphics + static constexpr uint32_t TAP_CRC = 0x102420; // 32 - r Live Video Tap + static constexpr uint32_t TAP_MASK = 0x102424; // 32 0xFFFFFFFF r/w Live Video Tap Mask + static constexpr uint32_t HCYCLE = 0x102428; // 12 0x224 r/w Horizontal Total Cycle Count + static constexpr uint32_t HOFFSET = 0x10242C; // 12 0x02B r/w Horizontal Display Start Offset + static constexpr uint32_t HSIZE = 0x102430; // 12 0x1E0 r/w Horizontal Display Pixel Count + static constexpr uint32_t HSYNC0 = 0x102434; // 12 0x000 r/w Horizontal Sync Fall Offset + static constexpr uint32_t HSYNC1 = 0x102438; // 12 0x029 r/w Horizontal Sync Rise Offset + static constexpr uint32_t VCYCLE = 0x10243C; // 12 0x124 r/w Vertical Total Cycle Count + static constexpr uint32_t VOFFSET = 0x102440; // 12 0x00C r/w Vertical Display Start Offset + static constexpr uint32_t VSIZE = 0x102444; // 12 0x110 r/w Vertical Display Line Count + static constexpr uint32_t VSYNC0 = 0x102448; // 10 0x000 r/w Vertical Sync Fall Offset + static constexpr uint32_t VSYNC1 = 0x10244C; // 10 0x00A r/w Vertical Sync Rise Offset + static constexpr uint32_t DLSWAP = 0x102450; // 2 0x00 r/w Display List Swap Control + static constexpr uint32_t ROTATE = 0x102454; // 3 0x00 r/w Screen 90,180, 270 degree rotate + static constexpr uint32_t OUTBITS = 0x102458; // 9 0x1B6 r/w Output Resolution, 3x3x3 Bits + static constexpr uint32_t DITHER = 0x10245C; // 1 0x01 r/w Output Dither Enable + static constexpr uint32_t SWIZZLE = 0x102460; // 4 0x00 r/w Output RGB Swizzle, Pin Change for PCB Routing + static constexpr uint32_t CSPREAD = 0x102464; // 1 0x01 r/w Output Clock Spreading Enable + static constexpr uint32_t PCLK_POL = 0x102468; // 1 0x00 r/w PCLK Polarity: 0 = Rising Edge, 1 = Falling Edge + static constexpr uint32_t PCLK = 0x10246C; // 8 0x00 r/w PCLK Frequency Divider, 0 = Disable Clock + static constexpr uint32_t TAG_X = 0x102470; // 11 0x000 r/w Tag Query X Coordinate + static constexpr uint32_t TAG_Y = 0x102474; // 11 0x000 r/w Tag Query Y Coordinate + static constexpr uint32_t TAG = 0x102478; // 8 0x00 r Tag Query Result + static constexpr uint32_t VOL_PB = 0x10247C; // 8 0xFF r/w Audio Playback Volume + static constexpr uint32_t VOL_SOUND = 0x102480; // 8 0xFF r/w Audio Synthesizer Volume + static constexpr uint32_t SOUND = 0x102484; // 16 0x0000 r/w Audio Sound Effect Select + static constexpr uint32_t PLAY = 0x102488; // 1 0x00 r/w Audio Start Effect Playback + static constexpr uint32_t GPIO_DIR = 0x10248C; // 8 0x80 r/w GPIO Pin Direction: 0 = Input , 1 = Output + static constexpr uint32_t GPIO = 0x102490; // 8 0x00 r/w GPIO Pin Values for 0, 1, 7 Drive Strength 2, 3, 4, 5, 6 + static constexpr uint32_t INT_FLAGS = 0x102498; // 8 0x00 r Interrupt Flags, Clear by Reading + static constexpr uint32_t INT_EN = 0x10249C; // 1 0x00 r/w Global Interrupt Enable + static constexpr uint32_t INT_MASK = 0x1024A0; // 8 0xFF r/w Interrupt Enable Mask + static constexpr uint32_t PLAYBACK_START = 0x1024A4; // 20 0x00000 r/w Audio Playback RAM Start Address + static constexpr uint32_t PLAYBACK_LENGTH = 0x1024A8; // 20 0x00000 r/w Audio Playback Sample Length (Bytes) + static constexpr uint32_t PLAYBACK_READPTR = 0x1024AC; // 20 - r Audio Playback Read Pointer + static constexpr uint32_t PLAYBACK_FREQ = 0x1024B0; // 16 0x1F40 r/w Audio Playback Frequency (Hz) + static constexpr uint32_t PLAYBACK_FORMAT = 0x1024B4; // 2 0x00 r/w Audio Playback Format + static constexpr uint32_t PLAYBACK_LOOP = 0x1024B8; // 1 0x00 r/w Audio Playback Loop Enable + static constexpr uint32_t PLAYBACK_PLAY = 0x1024BC; // 1 0x00 r Audio Start Playback + static constexpr uint32_t PWM_HZ = 0x1024C0; // 14 0x00FA r/w Backlight PWM Frequency (Hz) + static constexpr uint32_t PWM_DUTY = 0x1024C4; // 8 0x80 r/w Backlight PWM Duty Cycle: 0 = 0%, 128 = 100% + static constexpr uint32_t MACRO_0 = 0x1024C8; // 32 0x00000000 r/w Display List Macro Command 0 + static constexpr uint32_t MACRO_1 = 0x1024CC; // 32 0x00000000 r/w Display List Macro Command 1 + static constexpr uint32_t CMD_READ = 0x1024E4; // 12 0x000 r/w Command Buffer Read Pointer + static constexpr uint32_t CMD_WRITE = 0x1024E8; // 12 0x000 r/w Command Buffer Write Pointer + static constexpr uint32_t CMD_DL = 0x1024EC; // 13 0x0000 r/w Command Display List Offset + static constexpr uint32_t TOUCH_MODE = 0x1024F0; // 2 0x03 r/w Touch-Screen Sampling Mode + static constexpr uint32_t TOUCH_ADC_MODE = 0x1024F4; // 1 0x01 r/w Select Single Ended or Differential Sampling + static constexpr uint32_t TOUCH_CHARGE = 0x1024F8; // 16 0x1770 r/w Touch Screen Charge Time, n x 6 Clocks + static constexpr uint32_t TOUCH_SETTLE = 0x1024FC; // 4 0x03 r/w Touch-Screen Settle Time, n x 6 Clocks + static constexpr uint32_t TOUCH_OVERSAMPLE = 0x102500; // 4 0x07 r/w Touch-Screen Oversample Factor + static constexpr uint32_t TOUCH_RZTHRESH = 0x102504; // 16 0xFFFF r/w Touch-Screen Resistance Threshold + static constexpr uint32_t TOUCH_RAW_XY = 0x102508; // 32 - r Touch-Screen Raw (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_RZ = 0x10250C; // 16 - r Touch-Screen Resistance + static constexpr uint32_t TOUCH_SCREEN_XY = 0x102510; // 32 - r Touch-Screen Screen (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_TAG_XY = 0x102514; // 32 - r Touch-Screen Tag 0 Lookup (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_TAG = 0x102518; // 8 - r Touch-Screen Tag 0 Result + static constexpr uint32_t TOUCH_TRANSFORM_A = 0x10251C; // 32 0x00010000 r/w Touch-Screen Transform Coefficient A (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_B = 0x102520; // 32 0x00000000 r/w Touch-Screen Transform Coefficient B (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_C = 0x102524; // 32 0x00000000 r/w Touch-Screen Transform Coefficient C (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_D = 0x102528; // 32 0x00000000 r/w Touch-Screen Transform Coefficient D (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_E = 0x10252C; // 32 0x00010000 r/w Touch-Screen Transform Coefficient E (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_F = 0x102530; // 32 0x00000000 r/w Touch-Screen Transform Coefficient F (s15.16) + // Reserved Addresses 0x102434 - 0x102470 + static constexpr uint32_t TOUCH_DIRECT_XY = 0x102574; // 32 - r Touch-Screen Direct Conversions XY (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_DIRECT_Z1Z2 = 0x102578; // 32 - r Touch-Screen Direct Conversions Z (z1-MSB16; z2-LSB16) + static constexpr uint32_t TRACKER = 0x109000; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8) + }; +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft810.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft810.h new file mode 100644 index 000000000000..3e4044e1947d --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft810.h @@ -0,0 +1,187 @@ +/********************* + * registers_ft810.h * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/**************************************************************************** + * This header defines registers for the FTDI FT810 LCD Driver chip. * + ****************************************************************************/ + +/******************************************************************************* + * FT810 * + * * + * START END ADDR SIZE NAME DESCRIPTION * + * * + * 0x000000 0x0FFFFF 1024 kB RAM_G Main Graphics RAM (0 to 1048572) * + * * + * 0x0C0000 0x0C0003 4 B ROM_CHIPID [0:1] 0x800 Chip Id * + * [1:2] 0x0100 Vers ID * + * * + * 0x1E0000 0x2FFFFB 1152 kB ROM_FONT Font table and bitmap * + * * + * 0x201EE0 0x2029DC 2812 B ROM_FONT_ROOT ROM font table * + * * + * 0x2FFFFC 0x2FFFFF 4 B ROM_FONT_ADDR Font table pointer address * + * * + * 0x300000 0x301FFF 8 kB RAM_DL Display List RAM * + * * + * 0x302000 0x302FFF 4 kB * Registers * + * * + * 0x308000 0x308FFF 4 kB RAM_CMD Command Buffer * + * * + *******************************************************************************/ + +#pragma once + +namespace FTDI { + struct ft810_memory_map { + // MEMORY LOCATIONS FT810 + static constexpr uint32_t RAM_G = 0x000000; // Main Graphics RAM + static constexpr uint32_t ROM_CHIPID = 0x0C0000; // Chip ID/Version ID + static constexpr uint32_t ROM_FONT = 0x1E0000; // Font ROM + static constexpr uint32_t ROM_FONT_ADDR = 0x2FFFFC; // Font Table Pointer + static constexpr uint32_t RAM_DL = 0x300000; // Display List RAM + static constexpr uint32_t RAM_REG = 0x302000; // Registers + static constexpr uint32_t RAM_CMD = 0x308000; // Command Buffer + + static constexpr uint32_t RAM_G_SIZE = 1024*1024l; // 1024k + }; + + struct ft810_registers { + // REGISTERS AND ADDRESSES FT810 + + // REGISTER ADDRESS SIZE RESET VALUE TYPE DESCRIPTION + + static constexpr uint32_t ID = 0x302000; // 8 0x7C r Identification Register, Always 0x7C + static constexpr uint32_t FRAMES = 0x302004; // 32 0x00000000 r Frame Counter, Since Reset + static constexpr uint32_t CLOCK = 0x302008; // 32 0x00000000 r Clock cycles, Since Reset + static constexpr uint32_t FREQUENCY = 0x30200C; // 28 0x03938700 r/w Main Clock Frequency + static constexpr uint32_t RENDERMODE = 0x302010; // 1 0x00 r/w Rendering Mode: 0 = normal, 1 = single-line + static constexpr uint32_t SNAPY = 0x302014; // 11 0x0000 r/w Scan Line Select for RENDERMODE 1 + static constexpr uint32_t SNAPSHOT = 0x302018; // 1 - r Trigger for RENDERMODE 1 + static constexpr uint32_t SNAPFORMAT = 0x30201C; // 6 0x20 r/w Pixel Format for Scanline Readout + static constexpr uint32_t CPURESET = 0x302020; // 3 0x02 r/w RESET Bit2 Audio - Bit1 Touch - Bit0 Graphics + static constexpr uint32_t TAP_CRC = 0x302024; // 32 - r Live Video Tap + static constexpr uint32_t TAP_MASK = 0x302028; // 32 0xFFFFFFFF r/w Live Video Tap Mask + static constexpr uint32_t HCYCLE = 0x30202C; // 12 0x224 r/w Horizontal Total Cycle Count + static constexpr uint32_t HOFFSET = 0x302030; // 12 0x02B r/w Horizontal Display Start Offset + static constexpr uint32_t HSIZE = 0x302034; // 12 0x1E0 r/w Horizontal Display Pixel Count + static constexpr uint32_t HSYNC0 = 0x302038; // 12 0x000 r/w Horizontal Sync Fall Offset + static constexpr uint32_t HSYNC1 = 0x30203C; // 12 0x029 r/w Horizontal Sync Rise Offset + static constexpr uint32_t VCYCLE = 0x302040; // 12 0x124 r/w Vertical Total Cycle Count + static constexpr uint32_t VOFFSET = 0x302044; // 12 0x00C r/w Vertical Display Start Offset + static constexpr uint32_t VSIZE = 0x302048; // 12 0x110 r/w Vertical Display Line Count + static constexpr uint32_t VSYNC0 = 0x30204C; // 10 0x000 r/w Vertical Sync Fall Offset + static constexpr uint32_t VSYNC1 = 0x302050; // 10 0x00A r/w Vertical Sync Rise Offset + static constexpr uint32_t DLSWAP = 0x302054; // 2 0x00 r/w Display List Swap Control + static constexpr uint32_t ROTATE = 0x302058; // 3 0x00 r/w Screen 90,180, 270 degree rotate + static constexpr uint32_t OUTBITS = 0x30205C; // 9 0x1B6 r/w Output Resolution, 3x3x3 Bits + static constexpr uint32_t DITHER = 0x302060; // 1 0x01 r/w Output Dither Enable + static constexpr uint32_t SWIZZLE = 0x302064; // 4 0x00 r/w Output RGB Swizzle, Pin Change for PCB Routing + static constexpr uint32_t CSPREAD = 0x302068; // 1 0x01 r/w Output Clock Spreading Enable + static constexpr uint32_t PCLK_POL = 0x30206C; // 1 0x00 r/w PCLK Polarity: 0 = Rising Edge, 1 = Falling Edge + static constexpr uint32_t PCLK = 0x302070; // 8 0x00 r/w PCLK Frequency Divider, 0 = Disable Clock + static constexpr uint32_t TAG_X = 0x302074; // 11 0x000 r/w Tag Query X Coordinate + static constexpr uint32_t TAG_Y = 0x302078; // 11 0x000 r/w Tag Query Y Coordinate + static constexpr uint32_t TAG = 0x30207C; // 8 0x00 r Tag Query Result + static constexpr uint32_t VOL_PB = 0x302080; // 8 0xFF r/w Audio Playback Volume + static constexpr uint32_t VOL_SOUND = 0x302084; // 8 0xFF r/w Audio Synthesizer Volume + static constexpr uint32_t SOUND = 0x302088; // 16 0x0000 r/w Audio Sound Effect Select + static constexpr uint32_t PLAY = 0x30208C; // 1 0x00 r/w Audio Start Effect Playback + static constexpr uint32_t GPIO_DIR = 0x302090; // 8 0x80 r/w GPIO Pin Direction: 0 = Input , 1 = Output + static constexpr uint32_t GPIO = 0x302094; // 8 0x00 r/w GPIO Pin Values for 0, 1, 7 Drive Strength 2, 3, 4, 5, 6 + static constexpr uint32_t GPIOX_DIR = 0x302098; // 16 0x8000 r/w Extended GPIO Pin Direction + static constexpr uint32_t GPIOX = 0x30209C; // 16 0x0080 r/w Extended GPIO Pin Values + // Reserved Addr 0x3020A0 + // Reserved Addr 0x3020A4 + static constexpr uint32_t INT_FLAGS = 0x3020A8; // 8 0x00 r Interrupt Flags, Clear by Reading + static constexpr uint32_t INT_EN = 0x3020AC; // 1 0x00 r/w Global Interrupt Enable + static constexpr uint32_t INT_MASK = 0x3020B0; // 8 0xFF r/w Interrupt Enable Mask + static constexpr uint32_t PLAYBACK_START = 0x3020B4; // 20 0x00000 r/w Audio Playback RAM Start Address + static constexpr uint32_t PLAYBACK_LENGTH = 0x3020B8; // 20 0x00000 r/w Audio Playback Sample Length (Bytes) + static constexpr uint32_t PLAYBACK_READPTR = 0x3020BC; // 20 - r Audio Playback Read Pointer + static constexpr uint32_t PLAYBACK_FREQ = 0x3020C0; // 16 0x1F40 r/w Audio Playback Frequency (Hz) + static constexpr uint32_t PLAYBACK_FORMAT = 0x3020C4; // 2 0x00 r/w Audio Playback Format + static constexpr uint32_t PLAYBACK_LOOP = 0x3020C8; // 1 0x00 r/w Audio Playback Loop Enable + static constexpr uint32_t PLAYBACK_PLAY = 0x3020CC; // 1 0x00 r Audio Start Playback + static constexpr uint32_t PWM_HZ = 0x3020D0; // 14 0x00FA r/w Backlight PWM Frequency (Hz) + static constexpr uint32_t PWM_DUTY = 0x3020D4; // 8 0x80 r/w Backlight PWM Duty Cycle: 0 = 0%, 128 = 100% + static constexpr uint32_t MACRO_0 = 0x3020D8; // 32 0x00000000 r/w Display List Macro Command 0 + static constexpr uint32_t MACRO_1 = 0x3020DC; // 32 0x00000000 r/w Display List Macro Command 1 + // Reserved Addr 0x3020E0 + // Reserved Addr 0x3020E4 + // Reserved Addr 0x3020E8 + // Reserved Addr 0x3020EC + // Reserved Addr 0x3020F0 + // Reserved Addr 0x3020F4 + static constexpr uint32_t CMD_READ = 0x3020F8; // 12 0x000 r/w Command Buffer Read Pointer + static constexpr uint32_t CMD_WRITE = 0x3020FC; // 12 0x000 r/w Command Buffer Write Pointer + static constexpr uint32_t CMD_DL = 0x302100; // 13 0x0000 r/w Command Display List Offset + static constexpr uint32_t TOUCH_MODE = 0x302104; // 2 0x03 r/w Touch-Screen Sampling Mode + static constexpr uint32_t TOUCH_ADC_MODE = 0x302108; // 1 0x01 r/w Select Single Ended or Differential Sampling + static constexpr uint32_t TOUCH_CHARGE = 0x30210C; // 16 0x1770 r/w Touch Screen Charge Time, n x 6 Clocks + static constexpr uint32_t TOUCH_SETTLE = 0x302110; // 4 0x03 r/w Touch-Screen Settle Time, n x 6 Clocks + static constexpr uint32_t TOUCH_OVERSAMPLE = 0x302114; // 4 0x07 r/w Touch-Screen Oversample Factor + static constexpr uint32_t TOUCH_RZTHRESH = 0x302118; // 16 0xFFFF r/w Touch-Screen Resistance Threshold + static constexpr uint32_t TOUCH_RAW_XY = 0x30211C; // 32 - r Touch-Screen Raw (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_RZ = 0x302120; // 16 - r Touch-Screen Resistance + static constexpr uint32_t TOUCH_SCREEN_XY = 0x302124; // 32 - r Touch-Screen Screen (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_TAG_XY = 0x302128; // 32 - r Touch-Screen Tag 0 Lookup (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_TAG = 0x30212C; // 8 - r Touch-Screen Tag 0 Result + static constexpr uint32_t TOUCH_TAG1_XY = 0x302130; // 32 - r Touch-Screen Tag 1 Lookup + static constexpr uint32_t TOUCH_TAG1 = 0x302134; // 8 - r Touch-Screen Tag 1 Result + static constexpr uint32_t TOUCH_TAG2_XY = 0x302138; // 32 - r Touch-Screen Tag 2 Lookup + static constexpr uint32_t TOUCH_TAG2 = 0x30213C; // 8 - r Touch-Screen Tag 2 Result + static constexpr uint32_t TOUCH_TAG3_XY = 0x302140; // 32 - r Touch-Screen Tag 3 Lookup + static constexpr uint32_t TOUCH_TAG3 = 0x302144; // 8 - r Touch-Screen Tag 3 Result + static constexpr uint32_t TOUCH_TAG4_XY = 0x302148; // 32 - r Touch-Screen Tag 4 Lookup + static constexpr uint32_t TOUCH_TAG4 = 0x30214C; // 8 - r Touch-Screen Tag 4 Result + static constexpr uint32_t TOUCH_TRANSFORM_A = 0x302150; // 32 0x00010000 r/w Touch-Screen Transform Coefficient A (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_B = 0x302154; // 32 0x00000000 r/w Touch-Screen Transform Coefficient B (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_C = 0x302158; // 32 0x00000000 r/w Touch-Screen Transform Coefficient C (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_D = 0x30215C; // 32 0x00000000 r/w Touch-Screen Transform Coefficient D (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_E = 0x302160; // 32 0x00010000 r/w Touch-Screen Transform Coefficient E (s15.16) + static constexpr uint32_t TOUCH_TRANSFORM_F = 0x302164; // 32 0x00000000 r/w Touch-Screen Transform Coefficient F (s15.16) + static constexpr uint32_t TOUCH_CONFIG = 0x302168; // 16 0x8381 r/w Touch Configuration + static constexpr uint32_t CTOUCH_TOUCH4_X = 0x30216C; // 16 - r Extended Mode Touch Screen + // Reserved Addresses 0x302170 + static constexpr uint32_t BIST_EN = 0x302174; // 1 0 r/w BIST Memory Mapping Enable + // Reserved Addr 0x302178 + // Reserved Addr 0x30217C + static constexpr uint32_t TRIM = 0x302180; // 8 0 r/w Internal Clock Trimming + static constexpr uint32_t ANA_COMP = 0x302184; // 8 0 r/w Analog Control Register + static constexpr uint32_t SPI_WIDTH = 0x302188; // 3 0 r/w QSPI Bus Width Setting + static constexpr uint32_t TOUCH_DIRECT_XY = 0x30218C; // 32 - r Touch-Screen Direct Conversions XY (x-MSB16; y-LSB16) + static constexpr uint32_t TOUCH_DIRECT_Z1Z2 = 0x302190; // 32 - r Touch-Screen Direct Conversions Z (z1-MSB16; z2-LSB16) + // Reserved Addresses 0x302194 - 0x302560 + static constexpr uint32_t DATESTAMP = 0x320564; // 128 - r Stamp Date Code + static constexpr uint32_t CMDB_SPACE = 0x302574; // 12 0xFFC r/w Command DL Space Available + static constexpr uint32_t CMDB_WRITE = 0x302578; // 32 0 w Command DL Write + + static constexpr uint32_t TRACKER = 0x309000; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8) + static constexpr uint32_t TRACKER_1 = 0x309004; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8) + static constexpr uint32_t TRACKER_2 = 0x309008; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8) + static constexpr uint32_t TRACKER_3 = 0x30900C; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8) + static constexpr uint32_t TRACKER_4 = 0x309010; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8) + + static constexpr uint32_t MEDIAFIFO_READ = 0x309014; // 32 0x00000000 r/w Media FIFO read pointer + static constexpr uint32_t MEDIAFIFO_WRITE = 0x309018; // 32 0x00000000 r/w Media FIFO write pointer + }; +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/resolutions.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/resolutions.h new file mode 100644 index 000000000000..c7fb0c37fc09 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/resolutions.h @@ -0,0 +1,128 @@ +/***************** + * resolutions.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2019 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/*** + * The FT8xx has odd registers that don't correspond to timing values in + * display datasheets. This macro computes the register values using the + * formulas given in the document: + * + * Bridgetek Application Note + * AN_336 FT8xx + * Selecting an LCD Display + * Version 2.1 + * Issue Date: 2017-11-14 + * + */ +#define COMPUTE_REGS_FROM_DATASHEET \ + constexpr uint16_t Hoffset = thfp + thb - 1; \ + constexpr uint16_t Hcycle = th; \ + constexpr uint16_t Hsync0 = thfp - 1 ; \ + constexpr uint16_t Hsync1 = thfp + thpw - 1; \ + constexpr uint16_t Voffset = tvfp + tvb - 1; \ + constexpr uint16_t Vcycle = tv; \ + constexpr uint16_t Vsync0 = tvfp - 1; \ + constexpr uint16_t Vsync1 = tvfp + tvpw - 1; \ + static_assert(thfp + thb + Hsize == th, "Mismatch in display th"); \ + static_assert(tvfp + tvb + Vsize == tv, "Mismatch in display tv"); + +#ifdef TOUCH_UI_320x240 + namespace FTDI { + constexpr uint8_t Pclk = 8; + constexpr uint8_t Pclkpol = 0; + constexpr uint16_t Hsize = 320; + constexpr uint16_t Vsize = 240; + constexpr uint16_t Vsync0 = 0; + constexpr uint16_t Vsync1 = 2; + constexpr uint16_t Voffset = 13; + constexpr uint16_t Vcycle = 263; + constexpr uint16_t Hsync0 = 0; + constexpr uint16_t Hsync1 = 10; + constexpr uint16_t Hoffset = 70; + constexpr uint16_t Hcycle = 408; + + constexpr uint32_t default_transform_a = 0x000054ad; + constexpr uint32_t default_transform_b = 0xffffff52; + constexpr uint32_t default_transform_c = 0xfff7f6e4; + constexpr uint32_t default_transform_d = 0x00000065; + constexpr uint32_t default_transform_e = 0xffffbe3b; + constexpr uint32_t default_transform_f = 0x00f68e75; + } + +#elif defined(TOUCH_UI_480x272) + namespace FTDI { + constexpr uint8_t Pclk = 7; + constexpr uint8_t Pclkpol = 1; + constexpr uint16_t Hsize = 480; + constexpr uint16_t Vsize = 272; + + constexpr uint16_t th = 525; // One horizontal line + constexpr uint16_t thfp = 43; // HS Front porch + constexpr uint16_t thb = 2; // HS Back porch (blanking) + constexpr uint16_t thpw = 41; // HS pulse width + + constexpr uint16_t tv = 286; // Vertical period time + constexpr uint16_t tvfp = 12; // VS Front porch + constexpr uint16_t tvb = 2; // VS Back porch (blanking) + constexpr uint16_t tvpw = 10; // VS pulse width + + COMPUTE_REGS_FROM_DATASHEET + + constexpr uint32_t default_transform_a = 0x00008100; + constexpr uint32_t default_transform_b = 0x00000000; + constexpr uint32_t default_transform_c = 0xFFF18000; + constexpr uint32_t default_transform_d = 0x00000000; + constexpr uint32_t default_transform_e = 0xFFFFB100; + constexpr uint32_t default_transform_f = 0x0120D000; + } + +#elif defined(TOUCH_UI_800x480) + namespace FTDI { + constexpr uint8_t Pclk = 3; + constexpr uint8_t Pclkpol = 1; + constexpr uint16_t Hsize = 800; + constexpr uint16_t Vsize = 480; + + constexpr uint16_t th = 1056; // One horizontal line + constexpr uint16_t thfp = 210; // HS Front porch + constexpr uint16_t thb = 46; // HS Back porch (blanking) + constexpr uint16_t thpw = 23; // HS pulse width + + constexpr uint16_t tv = 525; // Vertical period time + constexpr uint16_t tvfp = 22; // VS Front porch + constexpr uint16_t tvb = 23; // VS Back porch (blanking) + constexpr uint16_t tvpw = 10; // VS pulse width + + COMPUTE_REGS_FROM_DATASHEET + + constexpr uint32_t default_transform_a = 0x0000D8B9; + constexpr uint32_t default_transform_b = 0x00000124; + constexpr uint32_t default_transform_c = 0xFFE23926; + constexpr uint32_t default_transform_d = 0xFFFFFF51; + constexpr uint32_t default_transform_e = 0xFFFF7E4F; + constexpr uint32_t default_transform_f = 0x01F0AF70; + } + +#else + #error Unknown or no LULZBOT_TOUCH_UI display resolution specified. To add a display resolution, modify "ftdi_eve_resolutions.h" +#endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.cpp new file mode 100644 index 000000000000..af33b5f055ee --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.cpp @@ -0,0 +1,178 @@ +/*********** + * spi.cpp * + ***********/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_basic.h" + +#ifdef FTDI_BASIC + +/********************************* SPI Functions *********************************/ + +namespace FTDI { + #if !defined(CLCD_USE_SOFT_SPI) + SPISettings SPI::spi_settings(SPI_FREQUENCY, MSBFIRST, SPI_MODE0); + #endif + + void SPI::spi_init (void) { + SET_OUTPUT(CLCD_MOD_RESET); // Module Reset (a.k.a. PD, not SPI) + WRITE(CLCD_MOD_RESET, 0); // start with module in power-down + + SET_OUTPUT(CLCD_SPI_CS); + WRITE(CLCD_SPI_CS, 1); + + #ifdef SPI_FLASH_SS + SET_OUTPUT(SPI_FLASH_SS); + WRITE(SPI_FLASH_SS, 1); + #endif + + #ifdef CLCD_USE_SOFT_SPI + SET_OUTPUT(CLCD_SOFT_SPI_MOSI); + WRITE(CLCD_SOFT_SPI_MOSI, 1); + + SET_OUTPUT(CLCD_SOFT_SPI_SCLK); + WRITE(CLCD_SOFT_SPI_SCLK, 0); + + SET_INPUT_PULLUP(CLCD_SOFT_SPI_MISO); + #else + ::SPI.begin(); + #endif + } + + #ifdef CLCD_USE_SOFT_SPI + uint8_t SPI::_soft_spi_xfer (uint8_t spiOutByte) { + uint8_t spiIndex = 0x80; + uint8_t spiInByte = 0; + uint8_t k; + + noInterrupts(); + for(k = 0; k <8; k++) { // Output and Read each bit of spiOutByte and spiInByte + if (spiOutByte & spiIndex) { // Output MOSI Bit + WRITE(CLCD_SOFT_SPI_MOSI, 1); + } + else { + WRITE(CLCD_SOFT_SPI_MOSI, 0); + } + WRITE(CLCD_SOFT_SPI_SCLK, 1); // Pulse Clock + WRITE(CLCD_SOFT_SPI_SCLK, 0); + + if (READ(CLCD_SOFT_SPI_MISO)) { + spiInByte |= spiIndex; + } + + spiIndex >>= 1; + } + interrupts(); + return spiInByte; + } + #endif + + #ifdef CLCD_USE_SOFT_SPI + void SPI::_soft_spi_send (uint8_t spiOutByte) { + uint8_t spiIndex = 0x80; + uint8_t k; + + noInterrupts(); + for(k = 0; k <8; k++) { // Output each bit of spiOutByte + if (spiOutByte & spiIndex) { // Output MOSI Bit + WRITE(CLCD_SOFT_SPI_MOSI, 1); + } + else { + WRITE(CLCD_SOFT_SPI_MOSI, 0); + } + WRITE(CLCD_SOFT_SPI_SCLK, 1); // Pulse Clock + WRITE(CLCD_SOFT_SPI_SCLK, 0); + + spiIndex >>= 1; + } + interrupts(); + } + #endif + + void SPI::spi_read_bulk (void *data, uint16_t len) { + uint8_t* p = (uint8_t *)data; + #if !defined(CLCD_USE_SOFT_SPI) + ::SPI.transfer(p, len); + #else + while (len--) *p++ = spi_recv(); + #endif + } + + bool SPI::spi_verify_bulk (const void *data, uint16_t len) { + const uint8_t* p = (const uint8_t *)data; + while (len--) if (*p++ != spi_recv()) return false; + return true; + } + + // CLCD SPI - Chip Select + void SPI::spi_ftdi_select (void) { + #if !defined(CLCD_USE_SOFT_SPI) + ::SPI.beginTransaction(spi_settings); + #endif + WRITE(CLCD_SPI_CS, 0); + delayMicroseconds(1); + } + + // CLCD SPI - Chip Deselect + void SPI::spi_ftdi_deselect (void) { + WRITE(CLCD_SPI_CS, 1); + #if !defined(CLCD_USE_SOFT_SPI) + ::SPI.endTransaction(); + #endif + } + + #ifdef SPI_FLASH_SS + // Serial SPI Flash SPI - Chip Select + void SPI::spi_flash_select () { + #if !defined(CLCD_USE_SOFT_SPI) + ::SPI.beginTransaction(spi_settings); + #endif + WRITE(SPI_FLASH_SS, 0); + delayMicroseconds(1); + } + + // Serial SPI Flash SPI - Chip Deselect + void SPI::spi_flash_deselect () { + WRITE(SPI_FLASH_SS, 1); + #if !defined(CLCD_USE_SOFT_SPI) + ::SPI.endTransaction(); + #endif + } + #endif + + // Not really a SPI signal... + void SPI::ftdi_reset (void) { + WRITE(CLCD_MOD_RESET, 0); + delay(6); /* minimum time for power-down is 5ms */ + WRITE(CLCD_MOD_RESET, 1); + delay(21); /* minimum time to allow from rising PD_N to first access is 20ms */ + } + + // Not really a SPI signal... + void SPI::test_pulse(void) + { + #ifdef CLCD_AUX_0 + WRITE(CLCD_AUX_0, 1); + delayMicroseconds(10); + WRITE(CLCD_AUX_0, 0); + #endif + } +} +#endif // FTDI_BASIC diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.h new file mode 100644 index 000000000000..c5564eda04ae --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.h @@ -0,0 +1,128 @@ +/********* + * spi.h * + *********/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#if !defined(CLCD_USE_SOFT_SPI) + #include +#endif + +namespace FTDI { + namespace SPI { + #if !defined(CLCD_USE_SOFT_SPI) + extern SPISettings spi_settings; + #endif + + uint8_t _soft_spi_xfer (uint8_t val); + void _soft_spi_send (uint8_t val); + + void spi_init (); + + void spi_ftdi_select (); + void spi_ftdi_deselect (); + + void spi_flash_select (); + void spi_flash_deselect (); + + inline uint8_t spi_recv() { + #ifdef CLCD_USE_SOFT_SPI + return _soft_spi_xfer(0x00); + #else + return ::SPI.transfer(0x00); + #endif + }; + + inline void spi_send (uint8_t val) { + #ifdef CLCD_USE_SOFT_SPI + _soft_spi_send(val); + #else + ::SPI.transfer(val); + #endif + }; + + inline void spi_write_8 (uint8_t val) {spi_send(val);}; + inline uint8_t spi_read_8 () {return spi_recv();}; + + namespace least_significant_byte_first { + inline void spi_write_16 (uint16_t val) {spi_send(val >> 0); + spi_send(val >> 8);}; + inline void spi_write_32 (uint32_t val) {spi_send(val >> 0); + spi_send(val >> 8); + spi_send(val >> 16); + spi_send(val >> 24);}; + + inline uint8_t spi_read_8 () {return spi_recv();}; + inline uint16_t spi_read_16 () {return (((uint16_t) spi_recv()) << 0) | + (((uint16_t) spi_recv()) << 8);}; + inline uint32_t spi_read_32 () {return (((uint32_t) spi_recv()) << 0) | + (((uint32_t) spi_recv()) << 8) | + (((uint32_t) spi_recv()) << 16) | + (((uint32_t) spi_recv()) << 24);}; + } + + namespace most_significant_byte_first { + inline void spi_write_16 (uint16_t val) {spi_send(val >> 8); + spi_send(val >> 0);}; + inline void spi_write_24 (uint32_t val) {spi_send(val >> 16); + spi_send(val >> 8); + spi_send(val >> 0);}; + inline void spi_write_32 (uint32_t val) {spi_send(val >> 24); + spi_send(val >> 16); + spi_send(val >> 8); + spi_send(val >> 0);}; + + inline uint16_t spi_read_16 () {return (((uint16_t) spi_recv()) << 8) | + (((uint16_t) spi_recv()) << 0);}; + inline uint32_t spi_read_32 () {return (((uint32_t) spi_recv()) << 24) | + (((uint32_t) spi_recv()) << 16) | + (((uint32_t) spi_recv()) << 8) | + (((uint32_t) spi_recv()) << 0);}; + } + + inline uint8_t ram_write(const uint8_t *p) {return *p;} + inline uint8_t pgm_write(const uint8_t *p) {return pgm_read_byte(p);} + + typedef uint8_t (*bulk_write_op)(const uint8_t*); + + // Generic template for function for writing multiple bytes, plus padding bytes. + // The template parameter op is an inlineable function which is applied to each byte. + + template + void spi_write_bulk(const void *data, uint16_t len, uint8_t padding) { + const uint8_t* p = (const uint8_t *)data; + while (len--) spi_send(byte_op(p++)); + while (padding--) spi_send(0); + } + + template + void spi_write_bulk(const void *data, uint16_t len) { + const uint8_t* p = (const uint8_t *)data; + while (len--) spi_send(byte_op(p++)); + } + + void spi_read_bulk( void *data, uint16_t len); + bool spi_verify_bulk(const void *data, uint16_t len); + + void ftdi_reset(void); + void test_pulse(void); + } +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h new file mode 100644 index 000000000000..bbce85c87a93 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h @@ -0,0 +1,222 @@ +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../config.h" + +#ifdef __MARLIN_FIRMWARE__ + + // Marlin will define the I/O functions for us + #if ENABLED(LULZBOT_TOUCH_UI) + #define FTDI_BASIC + #define FTDI_EXTENDED + #endif + +#else // !__MARLIN_FIRMWARE__ + + #include + + #if !defined(CLCD_USE_SOFT_SPI) + #include + #endif + + namespace fast_io { + + template + struct port_pin { + typedef port_t port; + static inline void set_high() {port::port() = (port::port() | bits);} + static inline void set_low() {port::port() = (port::port() & (~bits));} + static inline void set_input() {port::ddr() = (port::ddr() & (~bits));} + static inline void set_input_pullup() {set_input(); set_high();} + static inline void set_output() {port::ddr() = (port::ddr() | bits);} + static inline uint8_t read() {return port::pin() & bits;} + static inline void write(bool v) {if (v) set_high(); else set_low();} + }; + + #define MAKE_AVR_PORT_PINS(ID) \ + struct port_##ID { \ + static volatile uint8_t &pin() {return PIN##ID;}; \ + static volatile uint8_t &port() {return PORT##ID;}; \ + static volatile uint8_t &ddr() {return DDR##ID;}; \ + }; \ + typedef port_pin AVR_##ID##0; \ + typedef port_pin AVR_##ID##1; \ + typedef port_pin AVR_##ID##2; \ + typedef port_pin AVR_##ID##3; \ + typedef port_pin AVR_##ID##4; \ + typedef port_pin AVR_##ID##5; \ + typedef port_pin AVR_##ID##6; \ + typedef port_pin AVR_##ID##7; + + #ifdef PORTA + MAKE_AVR_PORT_PINS(A); + #endif + #ifdef PORTB + MAKE_AVR_PORT_PINS(B); + #endif + #ifdef PORTC + MAKE_AVR_PORT_PINS(C); + #endif + #ifdef PORTD + MAKE_AVR_PORT_PINS(D); + #endif + #ifdef PORTE + MAKE_AVR_PORT_PINS(E); + #endif + #ifdef PORTF + MAKE_AVR_PORT_PINS(F); + #endif + #ifdef PORTG + MAKE_AVR_PORT_PINS(G); + #endif + #ifdef PORTH + MAKE_AVR_PORT_PINS(H); + #endif + #ifdef PORTJ + MAKE_AVR_PORT_PINS(J); + #endif + #ifdef PORTK + MAKE_AVR_PORT_PINS(K); + #endif + #ifdef PORTL + MAKE_AVR_PORT_PINS(L); + #endif + #ifdef PORTQ + MAKE_AVR_PORT_PINS(Q); + #endif + #ifdef PORTR + MAKE_AVR_PORT_PINS(R); + #endif + + #undef MAKE_AVR_PORT_PINS + + template + struct arduino_digital_pin { + static constexpr uint8_t pin = p; + static inline void set_high() {digitalWrite(p, HIGH);} + static inline void set_low() {digitalWrite(p, LOW);} + static inline void set_input() {pinMode(p, INPUT);} + static inline void set_input_pullup() {pinMode(p, INPUT_PULLUP);} + static inline void set_output() {pinMode(p, OUTPUT);} + static inline uint8_t read() {return digitalRead(p);} + static inline void write(bool v) {digitalWrite(p, v ? HIGH : LOW);} + }; + + #define MAKE_ARDUINO_PINS(ID) typedef arduino_digital_pin ARDUINO_DIGITAL_##ID; + MAKE_ARDUINO_PINS( 0); + MAKE_ARDUINO_PINS( 1); + MAKE_ARDUINO_PINS( 2); + MAKE_ARDUINO_PINS( 3); + MAKE_ARDUINO_PINS( 4); + MAKE_ARDUINO_PINS( 5); + MAKE_ARDUINO_PINS( 6); + MAKE_ARDUINO_PINS( 7); + MAKE_ARDUINO_PINS( 8); + MAKE_ARDUINO_PINS( 9); + MAKE_ARDUINO_PINS(10); + MAKE_ARDUINO_PINS(11); + MAKE_ARDUINO_PINS(12); + MAKE_ARDUINO_PINS(13); + MAKE_ARDUINO_PINS(14); + MAKE_ARDUINO_PINS(15); + MAKE_ARDUINO_PINS(16); + MAKE_ARDUINO_PINS(17); + MAKE_ARDUINO_PINS(18); + MAKE_ARDUINO_PINS(19); + MAKE_ARDUINO_PINS(10); + MAKE_ARDUINO_PINS(21); + MAKE_ARDUINO_PINS(22); + MAKE_ARDUINO_PINS(23); + MAKE_ARDUINO_PINS(24); + MAKE_ARDUINO_PINS(25); + MAKE_ARDUINO_PINS(26); + MAKE_ARDUINO_PINS(27); + MAKE_ARDUINO_PINS(28); + MAKE_ARDUINO_PINS(29); + MAKE_ARDUINO_PINS(30); + MAKE_ARDUINO_PINS(31); + MAKE_ARDUINO_PINS(32); + MAKE_ARDUINO_PINS(33); + MAKE_ARDUINO_PINS(34); + MAKE_ARDUINO_PINS(35); + MAKE_ARDUINO_PINS(36); + MAKE_ARDUINO_PINS(37); + MAKE_ARDUINO_PINS(38); + MAKE_ARDUINO_PINS(39); + MAKE_ARDUINO_PINS(40); + MAKE_ARDUINO_PINS(41); + MAKE_ARDUINO_PINS(42); + MAKE_ARDUINO_PINS(43); + MAKE_ARDUINO_PINS(44); + MAKE_ARDUINO_PINS(45); + MAKE_ARDUINO_PINS(46); + MAKE_ARDUINO_PINS(47); + MAKE_ARDUINO_PINS(48); + MAKE_ARDUINO_PINS(49); + MAKE_ARDUINO_PINS(50); + MAKE_ARDUINO_PINS(51); + MAKE_ARDUINO_PINS(52); + MAKE_ARDUINO_PINS(53); + #undef MAKE_ARDUINO_PINS + } // namespace fast_io + + #define SET_INPUT(pin) fast_io::pin::set_input() + #define SET_INPUT_PULLUP(pin) fast_io::pin::set_input(); fast_io::pin::set_high() + #define SET_OUTPUT(pin) fast_io::pin::set_output() + #define READ(pin) fast_io::pin::read() + #define WRITE(pin, value) fast_io::pin::write(value) + + #ifndef pgm_read_word_far + #define pgm_read_word_far pgm_read_word + #endif + + #ifndef pgm_read_dword_far + #define pgm_read_dword_far pgm_read_dword + #endif + + #ifndef pgm_read_ptr_far + #define pgm_read_ptr_far pgm_read_ptr + #endif + + #define SERIAL_ECHO_START() + #define SERIAL_ECHOLNPGM(str) Serial.println(F(str)) + #define SERIAL_ECHOPGM(str) Serial.print(F(str)) + #define SERIAL_ECHOLNPAIR(str, val) {Serial.print(F(str)); Serial.println(val);} + #define SERIAL_ECHOPAIR(str, val) {Serial.print(F(str)); Serial.print(val);} + + #define safe_delay delay + + // Define macros for compatibility + + #define _CAT(a, ...) a ## __VA_ARGS__ + #define SWITCH_ENABLED_ 1 + #define ENABLED(b) _CAT(SWITCH_ENABLED_, b) + #define DISABLED(b) !ENABLED(b) + #define ANY(A,B) ENABLED(A) || ENABLED(B) + + // Remove compiler warning on an unused variable + #ifndef UNUSED + #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + #define UNUSED(X) (void)X + #else + #define UNUSED(x) ((void)(x)) + #endif + #endif + +#endif // !__MARLIN_FIRMWARE__ diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/bitmap_info.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/bitmap_info.h new file mode 100644 index 000000000000..2a095c344553 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/bitmap_info.h @@ -0,0 +1,49 @@ +/***************** + * bitmap_info.h * + *****************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#ifndef FORCEDINLINE + #define FORCEDINLINE __attribute__((always_inline)) inline +#endif + +namespace FTDI { + // The following functions *must* be inlined since we are relying on the compiler to do + // substitution of the constants from the data structure rather than actually storing + // it in PROGMEM (which would fail, since we are not using pgm_read to read them). + // Plus, by inlining, all the equations are evaluated at compile-time as everything + // should be a constant. + + typedef struct { + const uint8_t format; + const uint16_t linestride; + const uint8_t filter; + const uint8_t wrapx; + const uint8_t wrapy; + const uint32_t RAMG_offset; + const uint16_t width; + const uint16_t height; + } bitmap_info_t; + + FORCEDINLINE uint32_t BITMAP_SOURCE (const bitmap_info_t& info) {return BITMAP_SOURCE (ftdi_memory_map::RAM_G + info.RAMG_offset);}; + FORCEDINLINE uint32_t BITMAP_LAYOUT (const bitmap_info_t& info) {return BITMAP_LAYOUT (info.format, info.linestride, info.height);}; + FORCEDINLINE uint32_t BITMAP_SIZE (const bitmap_info_t& info) {return BITMAP_SIZE (info.filter, info.wrapx, info.wrapy, info.width, info.height);} +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.cpp new file mode 100644 index 000000000000..08d208202048 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.cpp @@ -0,0 +1,29 @@ +/************************* + * command_processor.cpp * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED + +CommandProcessor::btn_style_func_t *CommandProcessor::_btn_style_callback = CommandProcessor::default_button_style_func; +bool CommandProcessor::is_tracking = false; + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h new file mode 100644 index 000000000000..d2b0e309cc15 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h @@ -0,0 +1,348 @@ +/*********************** + * command_processor.h * + ***********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +typedef struct { + uint32_t bg; + uint32_t grad; + uint32_t fg; + uint32_t rgb; +} btn_colors; + +/**************************** Enhanced Command Processor **************************/ + +/* The CommandProcessor class wraps the CommandFifo with several features to make + * defining user interfaces much easier. + * + * - Implements chaining on all methods + * - Automatically adds text to button, toggle, text and keys. + * - Constrains all widgets to fit inside a box for ease of layout. + * - Font size is specified using a chained modifier. + * - Option argument is given the default OPT_3D value. + */ + +class CommandProcessor : public CLCD::CommandFifo { + public: + static constexpr uint8_t STYLE_DISABLED = 0x80; + + private: + static bool default_button_style_func(CommandProcessor &, uint8_t tag, uint8_t & /*style*/, uint16_t &options, bool) { + if (tag != 0 && FTDI::EventLoop::get_pressed_tag() == tag) { + options = FTDI::OPT_FLAT; + } + return false; + } + + typedef bool btn_style_func_t(CommandProcessor &cmd, uint8_t tag, uint8_t &style, uint16_t &options, bool post); + + static btn_style_func_t *_btn_style_callback; + static bool is_tracking; + int8_t _font = 26, _tag = 0; + uint8_t _style = 0; + + protected: + // Returns the cannonical thickness of a widget (i.e. the height of a toggle element) + uint16_t widget_thickness() { + CLCD::FontMetrics fm(_font); + return fm.height * 20.0/16; + } + + FORCEDINLINE void linear_widget_box(int16_t &x, int16_t &y, int16_t &w, int16_t &h, bool tracker = false) { + const uint16_t th = widget_thickness()/2; + if (w > h) { + x += tracker ? th * 2.5 : th; + y += h/2 - th/2; + w -= tracker ? th * 5.0 : th * 2; + h = th; + } else { + x += w/2 - th/2; + y += tracker ? th * 2.5 : th; + w = th; + h -= tracker ? th * 5.0 : th * 2; + } + } + + FORCEDINLINE uint16_t circular_widget_box(int16_t &x, int16_t &y, int16_t &w, int16_t &h) { + const uint16_t r = min(w,h)/2; + x += w/2; + y += h/2; + w = 1; + h = 1; + return r; + } + + public: + // Helper method for setting all colors at once + inline CommandProcessor& colors(const btn_colors &colors) { + cmd(FTDI::COLOR_RGB(colors.rgb)) + .gradcolor(colors.grad) + .fgcolor(colors.fg) + .bgcolor(colors.bg); + return *this; + } + + inline CommandProcessor& bitmap_size(uint8_t filter, uint8_t wrapx, uint8_t wrapy, uint16_t width, uint16_t height) { + cmd(FTDI::BITMAP_SIZE(filter, wrapx, wrapy, width, height)); + #if FTDI_API_LEVEL >= 810 + if (FTDI::ftdi_chip >= 810) + cmd(FTDI::BITMAP_SIZE_H(width >> 9, height >> 9)); + #endif + return *this; + } + + inline CommandProcessor& bitmap_layout(uint8_t format, uint16_t linestride, uint16_t height) { + cmd(FTDI::BITMAP_LAYOUT(format, linestride, height)); + #if FTDI_API_LEVEL >= 810 + if (FTDI::ftdi_chip >= 810) + cmd(FTDI::BITMAP_LAYOUT_H(linestride >> 10, height >> 9)); + #endif + return *this; + } + + inline CommandProcessor& set_button_style_callback(const btn_style_func_t *func) { + _btn_style_callback = func ? func : default_button_style_func; + return *this; + } + + inline CommandProcessor& tag (uint8_t tag) {_tag = tag; cmd(FTDI::TAG(tag)); return *this;} + + inline CommandProcessor& font (int16_t font) {_font = font; return *this;} + + inline CommandProcessor& enabled (bool enabled) { + if (enabled) + _style &= ~STYLE_DISABLED; + else + _style |= STYLE_DISABLED; + return *this; + } + + inline CommandProcessor& style (uint8_t style) { + _style = (_style & STYLE_DISABLED) | style; + return *this; + } + + // Wrap all the CommandFifo routines to allow method chaining + + inline CommandProcessor& cmd (uint32_t cmd32) {CLCD::CommandFifo::cmd(cmd32); return *this;} + inline CommandProcessor& cmd (void* data, uint16_t len) {CLCD::CommandFifo::cmd(data, len); return *this;} + inline CommandProcessor& execute() {CLCD::CommandFifo::execute(); return *this;} + + inline CommandProcessor& fgcolor (uint32_t rgb) {CLCD::CommandFifo::fgcolor(rgb); return *this;} + inline CommandProcessor& bgcolor (uint32_t rgb) {CLCD::CommandFifo::bgcolor(rgb); return *this;} + inline CommandProcessor& gradcolor(uint32_t rgb) {CLCD::CommandFifo::gradcolor(rgb); return *this;} + + inline CommandProcessor& snapshot (uint32_t ptr) {CLCD::CommandFifo::snapshot(ptr); return *this;} + + inline CommandProcessor& loadimage(uint32_t ptr, uint32_t options) + {CLCD::CommandFifo::loadimage(ptr, options); return *this;} + inline CommandProcessor& sketch (int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t ptr, uint16_t format) + {CLCD::CommandFifo::sketch(x, y, w, h, ptr, format); return *this;} + inline CommandProcessor& screensaver () {CLCD::CommandFifo::screensaver(); return *this;} + #if FTDI_API_LEVEL >= 810 + inline CommandProcessor& setbase (uint8_t base) {CLCD::CommandFifo::setbase(base); return *this;} + #endif + inline CommandProcessor& loadidentity () {CLCD::CommandFifo::loadidentity(); return *this;} + inline CommandProcessor& scale (int32_t sx, int32_t sy) {CLCD::CommandFifo::scale(sx,sy); return *this;} + inline CommandProcessor& rotate (int32_t a) {CLCD::CommandFifo::rotate(a); return *this;} + inline CommandProcessor& translate(int32_t tx, int32_t ty) {CLCD::CommandFifo::translate(tx,ty); return *this;} + inline CommandProcessor& setmatrix () {CLCD::CommandFifo::setmatrix(); return *this;} + inline CommandProcessor& stop () {CLCD::CommandFifo::stop(); return *this;} + + inline CommandProcessor& memzero (uint32_t ptr, uint32_t size) + {CLCD::CommandFifo::memzero(ptr, size); return *this;} + inline CommandProcessor& memset (uint32_t ptr, uint32_t val, uint32_t size) + {CLCD::CommandFifo::memset(ptr, val, size); return *this;} + inline CommandProcessor& memcpy (uint32_t src, uint32_t dst, uint32_t size) + {CLCD::CommandFifo::memcpy(src, dst, size); return *this;} + inline CommandProcessor& memcrc (uint32_t ptr, uint32_t num, uint32_t result) + {CLCD::CommandFifo::memcrc(ptr, num, result); return *this;} + inline CommandProcessor& memwrite (uint32_t ptr, uint32_t value) + {CLCD::CommandFifo::memwrite(ptr, value); return *this;} + inline CommandProcessor& inflate (uint32_t ptr) + {CLCD::CommandFifo::inflate(ptr); return *this;} + inline CommandProcessor& getptr (uint32_t result) + {CLCD::CommandFifo::getptr(result); return *this;} + inline CommandProcessor& getprops (uint32_t ptr, uint32_t width, uint32_t height) + {CLCD::CommandFifo::getprops(ptr, width, height); return *this;} + + #if FTDI_API_LEVEL >= 810 + inline CommandProcessor& setbitmap (uint32_t ptr, uint16_t fmt, uint16_t w, uint16_t h) + {CLCD::CommandFifo::setbitmap(ptr,fmt,w,h); return *this;} + inline CommandProcessor& snapshot2 (uint32_t fmt, uint32_t ptr, int16_t x, int16_t y, uint16_t w, uint16_t h) + {CLCD::CommandFifo::snapshot2(fmt,ptr,x,y,w,h); return *this;} + inline CommandProcessor& mediafifo (uint32_t p, uint32_t s) {CLCD::CommandFifo::mediafifo(p, s); return *this;} + inline CommandProcessor& playvideo(uint32_t options) {CLCD::CommandFifo::playvideo(options); return *this;} + inline CommandProcessor& romfont(uint8_t font, uint8_t slot) {CLCD::CommandFifo::romfont(font, slot); return *this;} + #endif + + inline CommandProcessor& gradient(int16_t x0, int16_t y0, uint32_t rgb0, int16_t x1, int16_t y1, uint32_t rgb1) + {CLCD::CommandFifo::gradient(x0,y0,rgb0,x1,y1,rgb1); return *this;} + + inline CommandProcessor& rectangle(int16_t x, int16_t y, int16_t w, int16_t h) { + using namespace FTDI; + CLCD::CommandFifo::cmd(BEGIN(RECTS)); + CLCD::CommandFifo::cmd(VERTEX2F(x*16,y*16)); + CLCD::CommandFifo::cmd(VERTEX2F((x+w)*16,(y+h)*16)); + return *this; + } + + template + FORCEDINLINE CommandProcessor& toggle(int16_t x, int16_t y, int16_t w, int16_t h, T text, bool state, uint16_t options = FTDI::OPT_3D) { + CLCD::FontMetrics fm(_font); + const int16_t widget_h = fm.height * 20.0/16; + //const int16_t outer_bar_r = widget_h / 2; + //const int16_t knob_r = outer_bar_r - 1.5; + // The y coordinate of the toggle is the baseline of the text, + // so we must introduce a fudge factor based on the line height to + // actually center the control. + const int16_t fudge_y = fm.height*5/16; + CLCD::CommandFifo::toggle(x + h/2, y + h/2 - widget_h/2 + fudge_y, w - h, _font, options, state); + CLCD::CommandFifo::str(text); + return *this; + } + + // Contrained drawing routines. These constrain the widget inside a box for easier layout. + // The FORCEDINLINE ensures that the code is inlined so that all the math is done at compile time. + + FORCEDINLINE CommandProcessor& track_linear(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) { + linear_widget_box(x, y, w, h, true); + CLCD::CommandFifo::track(x, y, w, h, tag); + is_tracking = true; + return *this; + } + + FORCEDINLINE CommandProcessor& track_circular(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) { + circular_widget_box(x,y, w, h); + CLCD::CommandFifo::track(x, y, w, h, tag); + is_tracking = true; + return *this; + } + + uint8_t track_tag (uint16_t &value) { + if (is_tracking) { + if (FTDI::EventLoop::is_touch_held()) { + return CLCD::get_tracker(value); + } else { + CLCD::CommandFifo::track(0, 0, 0, 0, 0); + CLCD::CommandFifo::execute(); + is_tracking = false; + } + } + return 0; + } + + FORCEDINLINE CommandProcessor& clock(int16_t x, int16_t y, int16_t w, int16_t h, int16_t hr, int16_t m, int16_t s, int16_t ms, uint16_t options = FTDI::OPT_3D) { + const uint16_t r = circular_widget_box(x, y, w, h); + CLCD::CommandFifo::clock(x, y, r, options, hr, m, s, ms); + return *this; + } + + FORCEDINLINE CommandProcessor& gauge(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t major, uint16_t minor, uint16_t val, uint16_t range, uint16_t options = FTDI::OPT_3D) { + const uint16_t r = circular_widget_box(x, y, w, h); + CLCD::CommandFifo::gauge(x, y, r, options, major, minor, val, range); + return *this; + } + + FORCEDINLINE CommandProcessor& dial(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t options = FTDI::OPT_3D) { + const uint16_t r = circular_widget_box(x, y, w, h); + CLCD::CommandFifo::dial(x, y, r, options, val); + return *this; + } + + FORCEDINLINE CommandProcessor& slider(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t range, uint16_t options = FTDI::OPT_3D) { + linear_widget_box(x, y, w, h); + CLCD::CommandFifo::slider(x, y, w, h, options, val, range); + return *this; + } + + FORCEDINLINE CommandProcessor& progress(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t range, uint16_t options = FTDI::OPT_3D) { + linear_widget_box(x, y, w, h); + CLCD::CommandFifo::progress(x, y, w, h, options, val, range); + return *this; + } + + FORCEDINLINE CommandProcessor& scrollbar(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t size, uint16_t range, uint16_t options = 0) { + linear_widget_box(x, y, w, h); + CLCD::CommandFifo::scrollbar(x, y, w, h, options, val, size, range); + return *this; + } + + CommandProcessor& number(int16_t x, int16_t y, int16_t w, int16_t h, int32_t n, uint16_t options = FTDI::OPT_CENTER) { + using namespace FTDI; + CLCD::CommandFifo::number( + x + ((options & OPT_CENTERX) ? w/2 : ((options & OPT_RIGHTX) ? w : 0)), + y + ((options & OPT_CENTERY) ? h/2 : h), + _font, options, n); + return *this; + } + + template FORCEDINLINE + CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) { + using namespace FTDI; + CLCD::CommandFifo::text( + x + ((options & OPT_CENTERX) ? w/2 : ((options & OPT_RIGHTX) ? w : 0)), + y + ((options & OPT_CENTERY) ? h/2 : h), + _font, options); + CLCD::CommandFifo::str(text); + return *this; + } + + FORCEDINLINE CommandProcessor& icon(int16_t x, int16_t y, int16_t w, int16_t h, const FTDI::bitmap_info_t& info, const float scale = 1) { + using namespace FTDI; + cmd(BEGIN(BITMAPS)); + if (scale != 1) { + cmd(BITMAP_TRANSFORM_A(uint32_t(float(256)/scale))); + cmd(BITMAP_TRANSFORM_E(uint32_t(float(256)/scale))); + } + cmd(BITMAP_SIZE(info.filter, info.wrapx, info.wrapy, info.width*scale, info.height*scale)); + cmd(VERTEX2F((x + w/2 - info.width*scale/2)*16, (y + h/2 - info.height*scale/2)*16)); + if (scale != 1) { + cmd(BITMAP_TRANSFORM_A(256)); + cmd(BITMAP_TRANSFORM_E(256)); + } + return *this; + } + + template + CommandProcessor& button(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_3D) { + using namespace FTDI; + bool styleModified = false; + if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false); + CLCD::CommandFifo::button(x, y, w, h, _font, options); + CLCD::CommandFifo::str(text); + if (_btn_style_callback && styleModified) _btn_style_callback(*this, _tag, _style, options, true); + return *this; + } + + template + CommandProcessor& keys(int16_t x, int16_t y, int16_t w, int16_t h, T keys, uint16_t options = FTDI::OPT_3D) { + CLCD::CommandFifo::keys(x, y, w, h, _font, options); + CLCD::CommandFifo::str(keys); + return *this; + } + + FORCEDINLINE CommandProcessor& spinner(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t style = 0, uint16_t scale = 0) { + circular_widget_box(x, y, w, h); + CLCD::CommandFifo::spinner(x, y, style, scale); + return *this; + } +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.cpp new file mode 100644 index 000000000000..fd6fde5f581d --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.cpp @@ -0,0 +1,176 @@ +/**************** + * dl_cache.cpp * + ****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED + +/* The Display List Cache mechanism stores the display list corresponding + * to a menu into RAM_G so that on subsequent calls drawing the menu does + * not require as much SPI traffic. + * + * Layout of Cache memory: + * + * The cache memory begins with a table at + * DL_CACHE_START: each table entry contains + * an address and size for a cached DL slot. + * + * Immediately following the table is the + * DL_FREE_ADDR, which points to free cache + * space; following this is occupied DL space, + * and after that free space that is yet to + * be used. + * + * location data sizeof + * + * DL_CACHE_START slot0_addr 4 + * slot0_size 4 + * slot1_addr 4 + * slot1_size 4 + * ... + * slotN_addr 4 + * slotN_size 4 + * DL_FREE_ADDR dl_free_ptr 4 + * cached data + * ... + * dl_free_ptr empty space + * ... + */ + +#define DL_CACHE_START MAP::RAM_G_SIZE - 0xFFFF +#define DL_FREE_ADDR DL_CACHE_START + DL_CACHE_SLOTS * 8 + +using namespace FTDI; + +// The init function ensures all cache locations are marked as empty + +void DLCache::init() { + CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4); + for(uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++) { + save_slot(slot, 0, 0); + } +} + +bool DLCache::has_data() { + return dl_size != 0; +} + +bool DLCache::wait_until_idle() { + const unsigned long startTime = millis(); + do { + if ((millis() - startTime) > 250) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Timeout on DL_Cache::Wait_Until_Idle()"); + CLCD::CommandFifo::reset(); + return false; + } + #ifdef __MARLIN_FIRMWARE__ + ExtUI::yield(); + #endif + } while (CLCD::CommandFifo::is_processing()); + return true; +} + +/* This caches the current display list in RAMG so + * that it can be appended later. The memory is + * dynamically allocated following DL_FREE_ADDR. + * + * If num_bytes is provided, then that many bytes + * will be reserved so that the cache may be re-written + * later with potentially a bigger DL. + */ + +bool DLCache::store(uint32_t num_bytes /* = 0*/) { + CLCD::CommandFifo cmd; + + // Execute any commands already in the FIFO + cmd.execute(); + if (!wait_until_idle()) + return false; + + // Figure out how long the display list is + uint32_t new_dl_size = CLCD::mem_read_32(REG::CMD_DL) & 0x1FFF; + uint32_t free_space = 0; + uint32_t dl_alloc = 0; + + if (dl_addr == 0) { + // If we are allocating new space... + dl_addr = CLCD::mem_read_32(DL_FREE_ADDR); + free_space = MAP::RAM_G_SIZE - dl_addr; + dl_alloc = num_bytes ? num_bytes : new_dl_size; + dl_size = new_dl_size; + } else { + // Otherwise, we can only store as much space + // as was previously allocated. + free_space = num_bytes ? num_bytes : dl_size; + dl_alloc = 0; + dl_size = new_dl_size; + } + + if (dl_size > free_space) { + // Not enough memory to cache the display list. + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Not enough space in GRAM to cache display list, free space: ", free_space); + SERIAL_ECHOLNPAIR(" Required: ", dl_size); + #endif + return false; + } else { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Saving DL to RAMG cache, bytes: ", dl_size); + SERIAL_ECHOLNPAIR(" Free space: ", free_space); + #endif + cmd.memcpy(dl_addr, MAP::RAM_DL, dl_size); + cmd.execute(); + save_slot(dl_slot, dl_addr, dl_size); + if (dl_alloc > 0) { + // If we allocated space dynamically, then adjust dl_free_addr. + CLCD::mem_write_32(DL_FREE_ADDR, dl_addr + dl_alloc); + } + return true; + } +} + +void DLCache::save_slot(uint8_t dl_slot, uint32_t dl_addr, uint32_t dl_size) { + CLCD::mem_write_32(DL_CACHE_START + dl_slot * 8 + 0, dl_addr); + CLCD::mem_write_32(DL_CACHE_START + dl_slot * 8 + 4, dl_size); +} + +void DLCache::load_slot() { + dl_addr = CLCD::mem_read_32(DL_CACHE_START + dl_slot * 8 + 0); + dl_size = CLCD::mem_read_32(DL_CACHE_START + dl_slot * 8 + 4); +} + +void DLCache::append() { + CLCD::CommandFifo cmd; + cmd.append(dl_addr, dl_size); + #ifdef UI_FRAMEWORK_DEBUG + cmd.execute(); + wait_until_idle(); + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Appending to DL from RAMG cache, bytes: ", dl_size); + SERIAL_ECHOLNPAIR(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL)); + #endif +} + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.h new file mode 100644 index 000000000000..f025b6a18d27 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.h @@ -0,0 +1,69 @@ +/************** + * dl_cache.h * + **************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/******************* DISPLAY LIST CACHE MANAGEMENT ************************/ +/* The Display List Cache mechanism stores the display list corresponding + * to a menu into RAM_G so that on subsequent calls drawing the menu does + * not require as much SPI traffic. Dynamic content, such as indicators, + * should not be cached. + * + * The DLCache can be used like so: + * + * void some_function() { + * DLCache dlcache(UNIQUE_ID); + * + * if (dlcache.hasData()) { + * dlcache.append(); + * } else { + * // Add stuff to the DL + * dlcache.store(); + * } + */ +class DLCache { + private: + typedef FTDI::ftdi_registers REG; + typedef FTDI::ftdi_memory_map MAP; + + uint8_t dl_slot; + uint32_t dl_addr; + uint16_t dl_size; + + void load_slot(); + static void save_slot(uint8_t dl_slot, uint32_t dl_addr, uint32_t dl_size); + + bool wait_until_idle(); + + public: + static void init(); + + DLCache(uint8_t slot) { + dl_slot = slot; + load_slot(); + } + + bool has_data(); + bool store(uint32_t num_bytes = 0); + void append(); +}; + +#define DL_CACHE_SLOTS 250 diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.cpp new file mode 100644 index 000000000000..a9194fdaba74 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.cpp @@ -0,0 +1,230 @@ +/****************** + * event_loop.cpp * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED +using namespace FTDI; + +enum { + UNPRESSED = 0x00 +}; + +tiny_timer_t touch_timer; +UIData::flags_t UIData::flags; +uint8_t pressed_tag = UNPRESSED; + +uint8_t UIData::get_persistent_data_mask() { + // A bit mask for flags that should be stored to the EEPROM. + // Others are considered temporarily values that need not be + // saved. + constexpr flags_t persistent_flags = { + bits: { + touch_start_sound: true, + touch_end_sound: true, + touch_repeat_sound: true, + show_animations: true + } + }; + return persistent_flags.value; +} + +void UIData::reset_persistent_data() { + // Default values for persistent data + constexpr flags_t default_flags = { + bits: { + touch_start_sound: true, + touch_end_sound: true, + touch_repeat_sound: true, + show_animations: true, + touch_debouncing: false, + ignore_unpress: false + } + }; + flags.value = default_flags.value; +} + +uint8_t UIData::get_persistent_data() { + return flags.value & get_persistent_data_mask(); +} + +void UIData::set_persistent_data(uint8_t value) { + flags.value = value & get_persistent_data_mask(); +} + + +void UIData::enable_touch_sounds(bool enabled) { + UIData::flags.bits.touch_start_sound = enabled; + UIData::flags.bits.touch_end_sound = enabled; + UIData::flags.bits.touch_repeat_sound = enabled; +} + +bool UIData::touch_sounds_enabled() { + return UIData::flags.bits.touch_start_sound || UIData::flags.bits.touch_end_sound || UIData::flags.bits.touch_repeat_sound; +} + +void UIData::enable_animations(bool enabled) { + UIData::flags.bits.show_animations = enabled; +} + +bool UIData::animations_enabled() { + return UIData::flags.bits.show_animations; +} + +namespace FTDI { + uint8_t EventLoop::get_pressed_tag() { + return pressed_tag; + } + + bool EventLoop::is_touch_held() { + return pressed_tag != 0; + } + + /** + * process_events(): Process events from the touch panel. + * + * This function consists of a state machine that accomplishes the following: + * + * - Reads the tag register from the touch panel + * - Dispatches onTouchStart and onTouchEnd events to the active screen. + * - Handles auto-repetition by sending onTouchHeld to the active screen periodically. + * - Plays touch feedback "click" sounds when appropriate. + * - Performs debouncing to supress spurious touch events. + * + */ + void EventLoop::process_events() { + // If the LCD is processing commands, don't check + // for tags since they may be changing and could + // cause spurious events. + if (!touch_timer.elapsed(TOUCH_UPDATE_INTERVAL) || CLCD::CommandFifo::is_processing()) { + return; + } + + const uint8_t tag = CLCD::get_tag(); + + switch (pressed_tag) { + case UNPRESSED: + if (tag != 0) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("Touch start: ", tag); + #endif + + pressed_tag = tag; + current_screen.onRefresh(); + + // When the user taps on a button, activate the onTouchStart handler + const uint8_t lastScreen = current_screen.getScreen(); + + if (current_screen.onTouchStart(tag)) { + touch_timer.start(); + if (UIData::flags.bits.touch_start_sound) sound.play(press_sound); + } + + if (lastScreen != current_screen.getScreen()) { + // In the case in which a touch event triggered a new screen to be + // drawn, we don't issue a touchEnd since it would be sent to the + // wrong screen. + UIData::flags.bits.ignore_unpress = true; + } else { + UIData::flags.bits.ignore_unpress = false; + } + } else { + touch_timer.start(); + } + break; + default: // PRESSED + if (!UIData::flags.bits.touch_debouncing) { + if (tag == pressed_tag) { + // The user is holding down a button. + if (touch_timer.elapsed(1000 / TOUCH_REPEATS_PER_SECOND) && current_screen.onTouchHeld(tag)) { + current_screen.onRefresh(); + if (UIData::flags.bits.touch_repeat_sound) sound.play(repeat_sound); + touch_timer.start(); + } + } + else if (tag == 0) { + touch_timer.start(); + UIData::flags.bits.touch_debouncing = true; + } + } + + else { + // Debouncing... + + if (tag == pressed_tag) { + // If while debouncing, we detect a press, then cancel debouncing. + UIData::flags.bits.touch_debouncing = false; + } + + else if (touch_timer.elapsed(DEBOUNCE_PERIOD)) { + UIData::flags.bits.touch_debouncing = false; + + if (UIData::flags.bits.ignore_unpress) { + UIData::flags.bits.ignore_unpress = false; + pressed_tag = UNPRESSED; + break; + } + + if (UIData::flags.bits.touch_end_sound) sound.play(unpress_sound); + + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("Touch end: ", tag); + #endif + + const uint8_t saved_pressed_tag = pressed_tag; + pressed_tag = UNPRESSED; + current_screen.onTouchEnd(saved_pressed_tag); + current_screen.onRefresh(); + } + } + break; + } // switch (pressed_tag) + + } // processEvents() + + void EventLoop::setup() { + CLCD::init(); + DLCache::init(); + UIData::reset_persistent_data(); + current_screen.start(); + } + + void EventLoop::loop() { + sound.onIdle(); + + /** + * Guard against re-entry of UI methods, which can + * crash. Re-entry can happen because some functions + * (e.g. planner.synchronize) call idle(). + */ + if (!UIData::flags.bits.prevent_reentry) { + UIData::flags.bits.prevent_reentry = true; + current_screen.onIdle(); + process_events(); + UIData::flags.bits.prevent_reentry = false; + } + } +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.h new file mode 100644 index 000000000000..7eeea9c8154a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.h @@ -0,0 +1,74 @@ +/**************** + * event_loop.h * + ****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define STATUS_UPDATE_INTERVAL 1000 +#define TOUCH_UPDATE_INTERVAL 50 +#define TOUCH_REPEATS_PER_SECOND 4 +#define DEBOUNCE_PERIOD 150 + +class UIData { + private: + typedef union { + struct { + uint8_t touch_start_sound : 1; + uint8_t touch_end_sound : 1; + uint8_t touch_repeat_sound : 1; + uint8_t show_animations : 1; + uint8_t touch_debouncing : 1; + uint8_t ignore_unpress : 1; + uint8_t prevent_reentry : 1; + } bits; + uint8_t value; + } flags_t; + + public: + static flags_t flags; + + static uint8_t get_persistent_data_mask(); + static uint8_t get_persistent_data(); + static void set_persistent_data(uint8_t value); + static void reset_persistent_data(); + + static void enable_touch_sounds(bool enabled); + static bool touch_sounds_enabled(); + static void enable_animations(bool enabled); + static bool animations_enabled(); +}; + +namespace FTDI { + class EventLoop { + private: + static constexpr FTDI::effect_t press_sound = FTDI::CHACK; + static constexpr FTDI::effect_t repeat_sound = FTDI::CHACK; + static constexpr FTDI::effect_t unpress_sound = FTDI::POP; + static void process_events(); + + public: + static void setup(); + static void loop(); + + static uint8_t get_pressed_tag(); + static bool is_touch_held(); + }; +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/ftdi_extended.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/ftdi_extended.h new file mode 100644 index 000000000000..43e390c1adea --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/ftdi_extended.h @@ -0,0 +1,45 @@ +/******************* + * ftdi_extended.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2019 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 201( - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../compat.h" +#include "../basic/ftdi_basic.h" + +#if !defined(__MARLIN_FIRMWARE__) + #define FTDI_EXTENDED +#endif + +#ifdef FTDI_EXTENDED + #include "rgb_t.h" + #include "bitmap_info.h" + #include "tiny_timer.h" + #include "grid_layout.h" + #include "dl_cache.h" + #include "screen_types.h" + #include "event_loop.h" + #include "command_processor.h" + #include "sound_player.h" + #include "sound_list.h" + #include "polygon.h" + #include "text_box.h" +#endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/grid_layout.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/grid_layout.h new file mode 100644 index 000000000000..ec8154b22f69 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/grid_layout.h @@ -0,0 +1,98 @@ +/***************** + * grid_layout.h * + *****************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/* The grid layout macros allow buttons to be arranged on a grid so + * that their locations become independent of the display size. The + * layout model is similar to that of HTML TABLEs. + * + * These macros are meant to be evaluated into constants at compile + * time, so resolution independence can be as efficient as using + * hard-coded coordinates. + */ + +// Margin defines the margin (in pixels) on each side of a button in +// the layout + +#ifdef TOUCH_UI_800x480 + #define MARGIN_L 5 + #define MARGIN_R 5 + #define MARGIN_T 5 + #define MARGIN_B 5 + #define MARGIN_DEFAULT 5 +#else + #define MARGIN_L 3 + #define MARGIN_R 3 + #define MARGIN_T 3 + #define MARGIN_B 3 + #define MARGIN_DEFAULT 3 +#endif + +// EDGE_R adds some black space on the right edge of the display +// This shifts some of the screens left to visually center them. + +#define EDGE_R 0 + +// GRID_X and GRID_Y computes the positions of the divisions on +// the layout grid. +#define GRID_X(x) ((x)*(FTDI::display_width-EDGE_R)/GRID_COLS) +#define GRID_Y(y) ((y)*FTDI::display_height/GRID_ROWS) + +// BTN_X, BTN_Y, BTN_W and BTN_X returns the top-left and width +// and height of a button, taking into account the button margins. + +#define BTN_X(x) (GRID_X((x)-1) + MARGIN_L) +#define BTN_Y(y) (GRID_Y((y)-1) + MARGIN_T) +#define BTN_W(w) (GRID_X(w) - MARGIN_L - MARGIN_R) +#define BTN_H(h) (GRID_Y(h) - MARGIN_T - MARGIN_B) + +// Abbreviations for common phrases, to allow a button to be +// defined in one line of source. +#define BTN_POS(x,y) BTN_X(x), BTN_Y(y) +#define BTN_SIZE(w,h) BTN_W(w), BTN_H(h) + +// Draw a reference grid for ease of spacing out widgets. +#define DRAW_LAYOUT_GRID \ + { \ + cmd.cmd(LINE_WIDTH(4)); \ + for(int i = 1; i <= GRID_COLS; i++) { \ + cmd.cmd(BEGIN(LINES)); \ + cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \ + cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \ + } \ + for(int i = 1; i < GRID_ROWS; i++) { \ + cmd.cmd(BEGIN(LINES)); \ + cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \ + cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \ + } \ + cmd.cmd(LINE_WIDTH(16)); \ + } + +namespace FTDI { + #ifdef TOUCH_UI_PORTRAIT + constexpr uint16_t display_width = Vsize; + constexpr uint16_t display_height = Hsize; + #else + constexpr uint16_t display_width = Hsize; + constexpr uint16_t display_height = Vsize; + #endif +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/polygon.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/polygon.h new file mode 100644 index 000000000000..4560996da76d --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/polygon.h @@ -0,0 +1,96 @@ +/************* + * polygon.h * + *************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/** + * The Polygon class helps drawing filled or stroked polygons on the FTDI EVE: + * + * CommandProcessor cmd; + * cmd.cmd(COLOR_RGB(0x00FF00)); + * + * Polygon p(cmd); + * p.begin_fill(); + * p.begin_loop(); + * p(10,10); + * p(20,10); + * p(20,20); + * p(10,20); + * p.end_loop(); + * p.begin_loop(); + * ... // Additional closed paths + * p.end_loop(); + * ... + * p.end_fill(); + * + * Based on the example from "Applicaton Note AN_334, FT801 Polygon Application": + * + * https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_334-FT801_Polygon_Application.pdf + */ + +namespace FTDI { + class Polygon { + private: + FTDI::begin_t path_initiator = FTDI::LINE_STRIP; + + public: + CommandProcessor &cmd; + + Polygon(CommandProcessor &c) : cmd(c) {} + + void begin_fill() { + using namespace FTDI; + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(TAG_MASK(0)); + cmd.cmd(CLEAR(0,1,0)); + cmd.cmd(COLOR_MASK(0,0,0,0)); + cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT)); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255)); + // Drawing the edge strip along scan lines + // seems to yield the best performance + #ifdef TOUCH_UI_PORTRAIT + path_initiator = EDGE_STRIP_B; + #else + path_initiator = EDGE_STRIP_R; + #endif + } + + // Specify a clipping rectangle to paint fewer pixels and reduce rendering time, otherwise all pixels will be painted. + void end_fill(const int16_t x1 = 0, const int16_t y1 = 0, const int16_t x2 = display_width * 16, const int16_t y2 = display_height * 16) { + using namespace FTDI; + cmd.cmd(RESTORE_CONTEXT()); + + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255)); + cmd.cmd(BEGIN(RECTS)); + cmd.cmd(VERTEX2F(x1, y1)); + cmd.cmd(VERTEX2F(x2, y2)); + cmd.cmd(RESTORE_CONTEXT()); + } + + void begin_stroke() {path_initiator = FTDI::LINE_STRIP;} + void begin_loop() {cmd.cmd(FTDI::BEGIN(path_initiator));} + void end_stroke() {} + void end_loop() {} + + void operator()(const uint16_t x, const uint16_t y) {cmd.cmd(FTDI::VERTEX2F(x, y));} + }; +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/rgb_t.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/rgb_t.h new file mode 100644 index 000000000000..07ee957f487c --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/rgb_t.h @@ -0,0 +1,44 @@ +/*********** + * rgb_t.h * + ***********/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +struct rgb_t { + union { + struct { + uint8_t b,g,r,a; + }; + uint32_t packed; + }; + + rgb_t() : packed(0) {} + rgb_t(uint32_t rgb) : packed(rgb) {} + rgb_t(uint8_t r, uint8_t g, uint8_t b) : b(b), g(g), r(r), a(0) {} + operator uint32_t() const {return packed;}; + + static void lerp(float t, const rgb_t a, const rgb_t b, rgb_t &c) { + c.r = a.r + t * (b.r - a.r); + c.g = a.g + t * (b.g - a.g); + c.b = a.b + t * (b.b - a.b); + } + + uint8_t luminance() const {return 0.299*r + 0.587*g + 0.114*b;} +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.cpp new file mode 100644 index 000000000000..7dba952a0a67 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.cpp @@ -0,0 +1,106 @@ +/****************** + * screen_types.h * + ******************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED + +/********************** VIRTUAL DISPATCH DATA TYPE ******************************/ + +uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) { + for(uint8_t type = 0; type < functionTableSize; type++) { + if (GET_METHOD(type, onRedraw) == onRedraw_ptr) { + return type; + } + } + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Screen not found: ", (uintptr_t) onRedraw_ptr); + #endif + return 0xFF; +} + +void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) { + uint8_t type = lookupScreen(onRedraw_ptr); + if (type != 0xFF) { + setType(type); + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("New screen: ", type); + #endif + } +} + +void ScreenRef::initializeAll() { + for(uint8_t type = 0; type < functionTableSize; type++) { + GET_METHOD(type, onStartup)(); + } +} + +/********************** SCREEN STACK ******************************/ + +void ScreenStack::start() { + initializeAll(); + onEntry(); +} + +void ScreenStack::push(onRedraw_func_t onRedraw_ptr) { + stack[3] = stack[2]; + stack[2] = stack[1]; + stack[1] = stack[0]; + stack[0] = lookupScreen(onRedraw_ptr); +} + +void ScreenStack::push() { + stack[3] = stack[2]; + stack[2] = stack[1]; + stack[1] = stack[0]; + stack[0] = getType(); +} + +void ScreenStack::pop() { + setType(stack[0]); + forget(); +} + +void ScreenStack::forget() { + stack[0] = stack[1]; + stack[1] = stack[2]; + stack[2] = stack[3]; + stack[3] = 0; +} + +void ScreenStack::goTo(onRedraw_func_t s) { + push(); + onExit(); + setScreen(s); + onEntry(); +} + +void ScreenStack::goBack() { + onExit(); + pop(); + onEntry(); +} + +ScreenStack current_screen; + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h new file mode 100644 index 000000000000..ede0a9218257 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h @@ -0,0 +1,216 @@ +/******************** + * screen_types.cpp * + ********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +typedef enum { + BACKGROUND = 1, + FOREGROUND = 2, + BOTH = 3 +} draw_mode_t; + + /********************** VIRTUAL DISPATCH DATA TYPE ******************************/ + +// True virtual classes are extremely expensive on the Arduino +// as the compiler stores the virtual function tables in RAM. +// We invent a data type called ScreenRef that gives us +// polymorphism by mapping an ID to virtual methods on various +// classes. This works by keeping a table in PROGMEM of pointers +// to static methods. + +#define DECL_SCREEN(className) { \ + className::onStartup, \ + className::onEntry, \ + className::onExit, \ + className::onIdle, \ + className::onRefresh, \ + className::onRedraw, \ + className::onTouchStart, \ + className::onTouchHeld, \ + className::onTouchEnd \ +} + +#define GET_METHOD(type, method) reinterpret_cast(pgm_read_ptr_far(&functionTable[type].method##_ptr)) +#define SCREEN_TABLE PROGMEM const ScreenRef::table_t ScreenRef::functionTable[] = +#define SCREEN_TABLE_POST const uint8_t ScreenRef::functionTableSize = sizeof(ScreenRef::functionTable)/sizeof(ScreenRef::functionTable[0]); + +class ScreenRef { + protected: + typedef void onStartup_func_t(void); + typedef void onEntry_func_t(void); + typedef void onExit_func_t(void); + typedef void onIdle_func_t(void); + typedef void onRefresh_func_t(void); + typedef void onRedraw_func_t(draw_mode_t); + typedef bool onTouchStart_func_t(uint8_t); + typedef bool onTouchHeld_func_t(uint8_t); + typedef bool onTouchEnd_func_t(uint8_t); + + private: + typedef struct { + onStartup_func_t *onStartup_ptr; + onEntry_func_t *onEntry_ptr; + onExit_func_t *onExit_ptr; + onIdle_func_t *onIdle_ptr; + onRefresh_func_t *onRefresh_ptr; + onRedraw_func_t *onRedraw_ptr; + onTouchStart_func_t *onTouchStart_ptr; + onTouchHeld_func_t *onTouchHeld_ptr; + onTouchEnd_func_t *onTouchEnd_ptr; + } table_t; + + uint8_t type = 0; + static PROGMEM const table_t functionTable[]; + static const uint8_t functionTableSize; + + public: + uint8_t getType() {return type;} + + void setType(uint8_t t) { + type = t; + } + + uint8_t lookupScreen(onRedraw_func_t onRedraw_ptr); + + void setScreen(onRedraw_func_t onRedraw_ptr); + + void onStartup() {GET_METHOD(type, onStartup)();} + void onEntry() {GET_METHOD(type, onEntry)();} + void onExit() {GET_METHOD(type, onExit)();} + void onIdle() {GET_METHOD(type, onIdle)();} + void onRefresh() {GET_METHOD(type, onRefresh)();} + void onRedraw(draw_mode_t dm) {GET_METHOD(type, onRedraw)(dm);} + bool onTouchStart(uint8_t tag) {return GET_METHOD(type, onTouchStart)(tag);} + bool onTouchHeld(uint8_t tag) {return GET_METHOD(type, onTouchHeld)(tag);} + bool onTouchEnd(uint8_t tag) {return GET_METHOD(type, onTouchEnd)(tag);} + + void initializeAll(); +}; + +/********************** SCREEN STACK ******************************/ + +// To conserve dynamic memory, the screen stack is hard-coded to +// have four values, allowing a menu of up to four levels. + +class ScreenStack : public ScreenRef { + private: + uint8_t stack[4]; + + public: + void start(); + void push(onRedraw_func_t); + void push(); + void pop(); + void forget(); + void goTo(onRedraw_func_t); + void goBack(); + + uint8_t peek() {return stack[0];} + uint8_t getScreen() {return getType();} +}; + +extern ScreenStack current_screen; + +/********************** BASE SCREEN CLASS ******************************/ + +/* UIScreen is the base class for all user interface screens. + */ +class UIScreen { + public: + static void onStartup() {} + static void onEntry() {current_screen.onRefresh();} + static void onExit() {} + static void onIdle() {} + static bool onTouchStart(uint8_t) {return true;} + static bool onTouchHeld(uint8_t) {return false;} + static bool onTouchEnd(uint8_t) {return true;} +}; + +#define PUSH_SCREEN(screen) current_screen.push(screen::onRedraw); +#define GOTO_SCREEN(screen) current_screen.goTo(screen::onRedraw); +#define GOTO_PREVIOUS() current_screen.goBack(); +#define AT_SCREEN(screen) (current_screen.getType() == current_screen.lookupScreen(screen::onRedraw)) +#define IS_PARENT_SCREEN(screen) (current_screen.peek() == current_screen.lookupScreen(screen::onRedraw)) + +/************************** CACHED VS UNCHACHED SCREENS ***************************/ + +class UncachedScreen { + public: + static void onRefresh() { + using namespace FTDI; + CLCD::CommandFifo cmd; + cmd.cmd(CMD_DLSTART); + + current_screen.onRedraw(BOTH); + + cmd.cmd(DL::DL_DISPLAY); + cmd.cmd(CMD_SWAP); + cmd.execute(); + } +}; + +template +class CachedScreen { + protected: + static bool storeBackground() { + DLCache dlcache(DL_SLOT); + if (!dlcache.store(DL_SIZE)) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("CachedScreen::storeBackground() failed: not enough DL cache space"); + return false; + } + return true; + } + + static void repaintBackground() { + using namespace FTDI; + DLCache dlcache(DL_SLOT); + CLCD::CommandFifo cmd; + + cmd.cmd(CMD_DLSTART); + current_screen.onRedraw(BACKGROUND); + + dlcache.store(DL_SIZE); + } + + public: + static void onRefresh() { + using namespace FTDI; + DLCache dlcache(DL_SLOT); + CLCD::CommandFifo cmd; + + cmd.cmd(CMD_DLSTART); + + if (dlcache.has_data()) { + dlcache.append(); + } + else { + current_screen.onRedraw(BACKGROUND); + dlcache.store(DL_SIZE); + } + + current_screen.onRedraw(FOREGROUND); + + cmd.cmd(DL::DL_DISPLAY); + cmd.cmd(CMD_SWAP); + cmd.execute(); + } +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_list.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_list.h new file mode 100644 index 000000000000..a53ed95159fa --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_list.h @@ -0,0 +1,38 @@ +/**************** + * sound_list.h * + ****************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +class SoundList { + private: + static PROGMEM const struct list_t { + const char *const PROGMEM name; + const FTDI::SoundPlayer::sound_t* data; + } list[]; + public: + static const uint8_t n; + static inline const char* name(uint8_t val) { + return (const char* ) pgm_read_ptr_near(&list[val].name); + } + static inline FTDI::SoundPlayer::sound_t* data(uint8_t val) { + return (FTDI::SoundPlayer::sound_t*) pgm_read_ptr_near(&list[val].data); + } +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.cpp new file mode 100644 index 000000000000..e8c5e881c529 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.cpp @@ -0,0 +1,111 @@ +/******************** + * sound_player.cpp * + ********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED + +namespace FTDI { + SoundPlayer sound; // Global sound player object + + void SoundPlayer::set_volume(uint8_t vol) { + CLCD::mem_write_8(REG::VOL_SOUND, vol); + } + + uint8_t SoundPlayer::get_volume() { + return CLCD::mem_read_8(REG::VOL_SOUND); + } + + void SoundPlayer::play(effect_t effect, note_t note) { + + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Playing note ", note); + SERIAL_ECHOLNPAIR(", instrument ", effect); + #endif + + // Play the note + CLCD::mem_write_16(REG::SOUND, (note == REST) ? 0 : (((note ? note : NOTE_C4) << 8) | effect)); + CLCD::mem_write_8(REG::PLAY, 1); + } + + note_t SoundPlayer::frequency_to_midi_note(const uint16_t frequency_hz) { + const float f0 = 440; + return note_t(NOTE_A4 + (log(frequency_hz)-log(f0))*12/log(2) + 0.5); + } + + // Plays a tone of a given frequency and duration. Since the FTDI FT810 only + // supports MIDI notes, we round down to the nearest note. + + void SoundPlayer::play_tone(const uint16_t frequency_hz, const uint16_t duration_ms) { + play(ORGAN, frequency_to_midi_note(frequency_hz)); + + // Schedule silence to squelch the note after the duration expires. + sequence = silence; + wait = duration_ms; + timer.start(); + } + + void SoundPlayer::play(const sound_t* seq, play_mode_t mode) { + sequence = seq; + wait = 250; // Adding this delay causes the note to not be clipped, not sure why. + timer.start(); + + if (mode == PLAY_ASYNCHRONOUS) return; + + // If playing synchronously, then play all the notes here + + while (has_more_notes()) { + onIdle(); + #ifdef EXTENSIBLE_UI + ExtUI::yield(); + #endif + } + } + + bool SoundPlayer::is_sound_playing() { + return CLCD::mem_read_8( REG::PLAY ) & 0x1; + } + + void SoundPlayer::onIdle() { + if (!sequence) return; + + const bool ready_for_next_note = (wait == 0) ? !is_sound_playing() : timer.elapsed(wait); + + if (ready_for_next_note) { + const effect_t fx = effect_t(pgm_read_byte(&sequence->effect)); + const note_t nt = note_t(pgm_read_byte(&sequence->note)); + const uint32_t ms = uint32_t(pgm_read_byte(&sequence->sixteenths)) * 1000 / 16; + + if (ms == 0 && fx == SILENCE && nt == END_SONG) { + sequence = 0; + play(SILENCE, REST); + } else { + wait = ms; + timer.start(); + play(fx, nt); + sequence++; + } + } + } +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.h new file mode 100644 index 000000000000..e177ec57dfb9 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.h @@ -0,0 +1,70 @@ +/****************** + * sound_player.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace FTDI { + typedef enum { + PLAY_ASYNCHRONOUS, + PLAY_SYNCHRONOUS + } play_mode_t; + + class SoundPlayer { + typedef FTDI::ftdi_registers REG; + typedef FTDI::ftdi_memory_map MAP; + + public: + struct sound_t { + effect_t effect; // The sound effect number + note_t note; // The MIDI note value + uint16_t sixteenths; // Duration of note, in sixteeths of a second, or zero to play to completion + }; + + const uint8_t WAIT = 0; + + private: + const sound_t *sequence; + tiny_timer_t timer; + tiny_time_t wait; + + note_t frequency_to_midi_note(const uint16_t frequency); + + public: + static void set_volume(uint8_t volume); + static uint8_t get_volume(); + + static void play(effect_t effect, note_t note = NOTE_C4); + static bool is_sound_playing(); + + void play(const sound_t* seq, play_mode_t mode = PLAY_SYNCHRONOUS); + void play_tone(const uint16_t frequency_hz, const uint16_t duration_ms); + bool has_more_notes() {return sequence != 0;}; + + void onIdle(); + }; + + extern SoundPlayer sound; + + const PROGMEM SoundPlayer::sound_t silence[] = { + {SILENCE, END_SONG, 0} + }; +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.cpp new file mode 100644 index 000000000000..69b3b7d7a636 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.cpp @@ -0,0 +1,129 @@ +/**************** + * text_box.cpp * + ****************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED + +namespace FTDI { + /** + * Given a str, end will be set to the position at which a line needs to + * be broken so that the display width is less than w. The line will also + * be broken after a '\n'. Returns the display width of the line. + */ + static uint16_t find_line_break(const CLCD::FontMetrics &fm, uint16_t w, const char *str, const char *&end) { + const char *p = str; + end = str + strlen(str); + uint16_t width = fm.get_text_width(str); + for(;;) { + // Find next tentative line break. + char delim = *(p); + while (delim && delim != ' ' && delim != '\n') { + delim = *(++p); + } + // Check to see whether to break the line. + const uint16_t margin = fm.get_text_width(" "); + const uint16_t lw = p > str ? fm.get_text_width(str, p - str) + margin : 0; + if (lw < w) { + width = lw; + switch (delim) { + case '\0': + end = p; + break; + case '\n': + end = ++p; + break; + case ' ': + end = ++p; + continue; + } + } + return width; + } + } + + /** + * This function returns a measurements of the word-wrapped text box. + */ + static void measure_text_box(const CLCD::FontMetrics &fm, const char *str, uint16_t &width, uint16_t &height) { + const char *line_start = (const char*)str; + const char *line_end; + const uint16_t wrap_width = width; + width = height = 0; + for(;;) { + uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end); + if (line_end == line_start) break; + width = max(width, line_width); + height += fm.height; + line_start = line_end; + } + } + + /** + * This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit. + */ + void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options, uint8_t font) { + CLCD::FontMetrics fm(font); + + uint16_t box_width, box_height; + + for(;;) { + box_width = w; + measure_text_box(fm, str, box_width, box_height); + if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break; + fm.load(--font); + if (font == 26) break; + } + + const uint16_t dx = (options & OPT_RIGHTX) ? w : (options & OPT_CENTERX) ? w/2 : 0; + const uint16_t dy = (options & OPT_CENTERY) ? (h - box_height)/2 : 0; + + const char *line_start = str; + const char *line_end; + for(;;) { + find_line_break(fm, w, line_start, line_end); + if (line_end == line_start) break; + + const size_t line_len = line_end - line_start; + if (line_len) { + char line[line_len + 1]; + strncpy(line, line_start, line_len); + line[line_len] = 0; + if (line[line_len - 1] == '\n' || line[line_len - 1] == ' ') + line[line_len - 1] = 0; + + cmd.CLCD::CommandFifo::text(x + dx, y + dy, font, options & ~OPT_CENTERY); + cmd.CLCD::CommandFifo::str(line); + } + y += fm.height; + + line_start = line_end; + } + } + + void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, progmem_str pstr, uint16_t options, uint8_t font) { + char str[strlen_P((const char*)pstr) + 1]; + strcpy_P(str, (const char*)pstr); + draw_text_box(cmd, x, y, w, h, (const char*) str, options, font); + } +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.h new file mode 100644 index 000000000000..a0f99c6b08f3 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.h @@ -0,0 +1,30 @@ +/************** + * text_box.h * + **************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/** + * This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit. + */ +namespace FTDI { + void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, progmem_str str, uint16_t options = 0, uint8_t font = 31); + void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options = 0, uint8_t font = 31); +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.cpp new file mode 100644 index 000000000000..c7b35e92dfef --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.cpp @@ -0,0 +1,51 @@ +/****************** + * tiny_timer.cpp * + ******************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#ifdef FTDI_EXTENDED + +bool tiny_timer_t::elapsed(tiny_time_t duration) { + uint8_t now = tiny_time_t::tiny_time( + #ifdef __MARLIN_FIRMWARE__ + ExtUI::safe_millis() + #else + millis() + #endif + ); + uint8_t elapsed = now - _start; + if (elapsed >= duration._duration) { + return true; + } else { + return false; + } +} + +void tiny_timer_t::start() { + _start = tiny_time_t::tiny_time( + #ifdef __MARLIN_FIRMWARE__ + ExtUI::safe_millis() + #else + millis() + #endif + ); +} +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.h new file mode 100644 index 000000000000..9db912752966 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.h @@ -0,0 +1,56 @@ +/**************** + * tiny_timer.h * + ****************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/* Helpful Reference: + * + * https://arduino.stackexchange.com/questions/12587/how-can-i-handle-the-millis-rollover + */ + +/* tiny_interval_t downsamples a 32-bit millis() value + into a 8-bit value which can record periods of + a few seconds with a rougly 1/16th of second + resolution. This allows us to measure small + intervals without needing to use four-byte counters. + */ +class tiny_time_t { + private: + friend class tiny_timer_t; + uint8_t _duration; + + static uint8_t tiny_time(uint32_t ms) {return ceil(float(ms) / 64);}; + + public: + tiny_time_t() : _duration(0) {} + tiny_time_t(uint32_t ms) : _duration(tiny_time(ms)) {} + tiny_time_t & operator= (uint32_t ms) {_duration = tiny_time(ms); return *this;} + bool operator == (uint32_t ms) {return _duration == tiny_time(ms);} +}; + +class tiny_timer_t { + private: + uint8_t _start; + + public: + void start(); + bool elapsed(tiny_time_t interval); +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/circular_progress.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/circular_progress.h new file mode 100644 index 000000000000..412da5b36104 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/circular_progress.h @@ -0,0 +1,100 @@ +/*********************** + * circular_progress.h * + ***********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/* This function draws a circular progress "ring" */ + +void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, uint8_t percent, uint32_t bgcolor, uint32_t fgcolor, float rim = 0.3) { + using namespace FTDI; + + const float a = float(percent)/100.0*2.0*PI; + const float a1 = min(PI/2, a); + const float a2 = min(PI/2, a-a1); + const float a3 = min(PI/2, a-a1-a2); + const float a4 = min(PI/2, a-a1-a2-a3); + + const int ro = min(w,h) * 8; + const int rr = ro * rim; + const int cx = x * 16 + w * 8; + const int cy = y * 16 + h * 8; + + // Load a rim shape into stencil buffer + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(TAG_MASK(0)); + cmd.cmd(CLEAR(0,1,0)); + cmd.cmd(COLOR_MASK(0,0,0,0)); + cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT)); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255)); + cmd.cmd(BEGIN(POINTS)); + cmd.cmd(POINT_SIZE(ro)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(POINT_SIZE(ro - rr)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(RESTORE_CONTEXT()); + + // Mask further drawing by stencil buffer + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255)); + + // Fill the background + cmd.cmd(COLOR_RGB(bgcolor)); + cmd.cmd(BEGIN(POINTS)); + cmd.cmd(POINT_SIZE(ro)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(COLOR_RGB(fgcolor)); + + // Paint upper-right quadrant + cmd.cmd(BEGIN(EDGE_STRIP_A)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8)); + + // Paint lower-right quadrant + if (a > PI/2) { + cmd.cmd(BEGIN(EDGE_STRIP_R)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16)); + } + + // Paint lower-left quadrant + if (a > PI) { + cmd.cmd(BEGIN(EDGE_STRIP_B)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3))); + } + + // Paint upper-left quadrant + if (a > 1.5*PI) { + cmd.cmd(BEGIN(EDGE_STRIP_L)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4))); + } + cmd.cmd(RESTORE_CONTEXT()); + + // Draw the text + char str[5]; + sprintf(str,"%d\%%",percent); + + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(COLOR_RGB(fgcolor)); + cmd.text(x,y,w,h,str, OPT_CENTERX | OPT_CENTERY); + cmd.cmd(RESTORE_CONTEXT()); +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/poly_ui.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/poly_ui.h new file mode 100644 index 000000000000..52146510c50a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/poly_ui.h @@ -0,0 +1,395 @@ +/************* + * poly_ui.h * + *************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/** + * The PolyReader class iterates over an array of (x,y) pairs. + * For supporting polygons with holes an end-of-loop marker may + * be embedded into the data stream: + * + * const PROGMEM uint16_t data[] = { + * x, y, x, y, ..., eol, + * ... + * x, y, x, y, ..., eol + * } + * + * The PolyReader object can be used to iterate over the points. + * + * PolyReader r(data, N_ELEMENTS(data)); + * + * for(r.start();r.has_more(); r.next()) { + * uint16_t x = r.x; + * uint16_t y = r.y; + * + * // Do something with the point + * ... + * + * // Do something else if this point + * // closes a loop. + * if (r.end_of_loop()) { + * ... + * } + * } + * + */ + +class PolyReader { + private: + typedef uint16_t type_t; + + static constexpr type_t eol = 0xFFFF; + + const type_t *p, *top, *end; + type_t start_x, start_y; + + void close_loop() { + x = start_x; + y = start_y; + start_x = eol; + start_y = eol; + } + + public: + type_t x, y; + + // Begin reading a polygon data structure + PolyReader(const uint16_t data[], const size_t n_elements) : top(data), end(data + n_elements) { + start(); + } + + void start() { + p = top; + start_x = eol; + next(); + } + + // Reads the next point in the polygon data structure + void next() { + if (!p) return; + + if (p == end) { + if (start_x != eol) + close_loop(); + else + p = NULL; + } else { + x = pgm_read_word_far(p++); + if (x == eol) + close_loop(); + else { + y = pgm_read_word_far(p++); + if (start_x == eol) { + start_x = x; + start_y = y; + } + } + } + } + + bool has_more() {return p != NULL;} + bool end_of_loop() {return start_x == eol;} +}; + +/** + * The TransformedPolyReader class works like the PolyReader, + * but the (x,y) input is assumed to be normalized onto a + * unit square and then mapped to the full 16-bits, i.e. + * (0.0,1.0) => (0x0000,0xFFFE). This class will scale the + * data to fit the entire display, a bounding box, or apply + * some arbitrary affine transform. + * + * This class is suitable for reading data from "svg2cpp.py" + */ +class TransformedPolyReader : public PolyReader { + private: + /** + * Fixed point type for fast transformations, supports + * values from 0 to 1024, with 1/32 precision. + */ + static constexpr uint8_t fract_bits = 5; + typedef int16_t fix_t; + fix_t makefix(float f) {return f * (1 << fract_bits);} + + // First two rows of 3x3 transformation matrix + fix_t a, b, c; + fix_t d, e, f; + + void transform() { + /** + * Values from PolyReader vary from 0 to FFFE. + * As an approximation to dividing by FFFE, + * we perform a bit shift right by 16. + */ + const int32_t px = PolyReader::x; + const int32_t py = PolyReader::y; + const int32_t round = 1 << (fract_bits-1); + x = (((((a * px) + (b * py)) >> 16) + c) + round) >> fract_bits; + y = (((((d * px) + (e * py)) >> 16) + f) + round) >> fract_bits; + } + + void set_transform( + fix_t A, fix_t B, fix_t C, + fix_t D, fix_t E, fix_t F + ) { + a = A; b = B; c = C; + d = D; e = E; f = F; + } + + public: + typedef int16_t type_t; + + type_t x, y; + + TransformedPolyReader(const uint16_t data[], const size_t n) : PolyReader(data, n) { + scale_to_fit(); + transform(); + } + + // Set an arbitrary affine transform + void set_transform( + float A, float B, float C, + float D, float E, float F + ) { + set_transform( + makefix(A), makefix(B), makefix(C), + makefix(D), makefix(E), makefix(F) + ); + } + + // Scale the data to fit a specified bounding box + void scale_to_fit(type_t x_min, type_t y_min, type_t x_max, type_t y_max) { + fix_t sx = makefix(x_max - x_min); + fix_t sy = makefix(y_max - y_min); + fix_t tx = makefix(x_min); + fix_t ty = makefix(y_min); + set_transform( + sx, 0, tx, + 0, sy, ty + ); + } + + // Scale to fit the entire display (default) + void scale_to_fit() { + scale_to_fit(0, 0, FTDI::display_width, FTDI::display_height); + } + + void next() { + PolyReader::next(); + transform(); + } +}; + +/** + * The DeduplicatedPolyReader wraps around another PolyReader + * class to remove repeated points from the data. This could + * happen when scaling down using TransformedPolyReader, for + * example. + */ +template +class DeduplicatedPolyReader : public POLY_READER { + private: + typename POLY_READER::type_t last_x, last_y; + + static constexpr typename POLY_READER::type_t eol = 0xFFFF; + + public: + DeduplicatedPolyReader(const uint16_t data[], const size_t n) : POLY_READER(data, n) { + last_x = POLY_READER::x; + last_y = POLY_READER::y; + } + + void next() { + do { + if (!POLY_READER::has_more()) return; + POLY_READER::next(); + } while (POLY_READER::x == last_x && POLY_READER::y == last_y && !POLY_READER::end_of_loop()); + if (POLY_READER::end_of_loop()) { + last_x = last_y = eol; + } else { + last_x = POLY_READER::x; + last_y = POLY_READER::y; + } + } +}; + +/** + * The helper class allows you to build an interface based on arbitrary + * shapes. + */ +template> +class GenericPolyUI { + private: + CommandProcessor &cmd; + + // Attributes used to paint buttons + + uint32_t btn_fill_color = 0x000000; + uint32_t btn_shadow_color = 0xF3E0E0; + uint8_t btn_shadow_depth = 5; + uint32_t btn_stroke_color = 0x000000; + uint8_t btn_stroke_width = 28; + + draw_mode_t mode; + + public: + typedef POLY_READER poly_reader_t; + + GenericPolyUI(CommandProcessor &c, draw_mode_t what = BOTH) : cmd(c), mode(what) {} + + // Fills a polygon with the current COLOR_RGB + void fill(poly_reader_t r, bool clip = true) { + using namespace FTDI; + int16_t x, y, w, h; + + if (clip) { + // Clipping reduces the number of pixels that are + // filled, allowing more complex shapes to be drawn + // in the alloted time. + bounds(r, x, y, w, h); + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(SCISSOR_XY(x, y)); + cmd.cmd(SCISSOR_SIZE(w, h)); + } + + Polygon p(cmd); + p.begin_fill(); + p.begin_loop(); + for(r.start();r.has_more();r.next()) { + p(r.x * 16, r.y * 16); + if (r.end_of_loop()) { + p.end_loop(); + p.begin_loop(); + } + } + p.end_loop(); + p.end_fill(); + if (clip) + cmd.cmd(RESTORE_CONTEXT()); + } + + void shadow(poly_reader_t r, uint8_t offset) { + #if FTDI_API_LEVEL >= 810 + using namespace FTDI; + cmd.cmd(VERTEX_TRANSLATE_X(offset * 16)); + cmd.cmd(VERTEX_TRANSLATE_Y(offset * 16)); + fill(r, false); + cmd.cmd(VERTEX_TRANSLATE_X(0)); + cmd.cmd(VERTEX_TRANSLATE_Y(0)); + #endif + } + + // Strokes a polygon with the current COLOR_RGB + void stroke(poly_reader_t r) { + using namespace FTDI; + Polygon p(cmd); + p.begin_stroke(); + p.begin_loop(); + for(r.start();r.has_more(); r.next()) { + p(r.x * 16, r.y * 16); + if (r.end_of_loop()) { + p.end_loop(); + p.begin_loop(); + } + } + p.end_loop(); + p.end_stroke(); + } + + // Compute the bounds of a polygon + void bounds(poly_reader_t r, int16_t &x, int16_t &y, int16_t &w, int16_t &h) { + int16_t x_min = INT16_MAX; + int16_t y_min = INT16_MAX; + int16_t x_max = INT16_MIN; + int16_t y_max = INT16_MIN; + for(r.start(); r.has_more(); r.next()) { + x_min = min(x_min, r.x); + x_max = max(x_max, r.x); + y_min = min(y_min, r.y); + y_max = max(y_max, r.y); + } + x = x_min; + y = y_min; + w = x_max - x_min; + h = y_max - y_min; + } + + /** + * Draw shaped buttons. Buttons are drawn out of a polygon which is + * filled and stroked on top of a drop shadow. The button will + * become "pushed" when touched. + */ + + void button_fill(const uint32_t color) { + btn_fill_color = color; + } + + void button_stroke(const uint32_t color, const uint8_t width) { + btn_stroke_color = color; + btn_stroke_width = width; + } + + void button_shadow(const uint32_t color, const uint8_t depth) { + btn_shadow_color = color; + btn_shadow_depth = depth; + } + + void button(const uint8_t tag, poly_reader_t r) { + using namespace FTDI; + // Draw the shadow + #if FTDI_API_LEVEL >= 810 + if (mode & BACKGROUND) { + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(TAG(tag)); + cmd.cmd(VERTEX_TRANSLATE_X(btn_shadow_depth * 16)); + cmd.cmd(VERTEX_TRANSLATE_Y(btn_shadow_depth * 16)); + cmd.cmd(COLOR_RGB(btn_shadow_color)); + fill(r, false); + cmd.cmd(RESTORE_CONTEXT()); + } + #endif + + if (mode & FOREGROUND) { + cmd.cmd(SAVE_CONTEXT()); + #if FTDI_API_LEVEL >= 810 + if (EventLoop::get_pressed_tag() == tag) { + // "Push" the button + cmd.cmd(VERTEX_TRANSLATE_X(btn_shadow_depth * 16)); + cmd.cmd(VERTEX_TRANSLATE_Y(btn_shadow_depth * 16)); + } + #endif + // Draw the fill and stroke + cmd.cmd(TAG(tag)); + cmd.cmd(COLOR_RGB(btn_fill_color)); + fill(r, false); + cmd.cmd(COLOR_RGB(btn_stroke_color)); + cmd.cmd(LINE_WIDTH(btn_stroke_width)); + stroke(r); + cmd.cmd(RESTORE_CONTEXT()); + } + } + + void color(const uint32_t color) { + cmd.cmd(FTDI::COLOR_RGB(color)); + } +}; + +typedef GenericPolyUI<> PolyUI; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py new file mode 100755 index 000000000000..6a8d074916db --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py @@ -0,0 +1,278 @@ +#!/usr/bin/python + +# Written By Marcio Teixeira 2018 - Aleph Objects, Inc. +# +# 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. +# +# To view a copy of the GNU General Public License, go to the following +# location: . + +from __future__ import print_function +import argparse, re, sys + +usage = ''' +This program extracts line segments from a SVG file and writes +them as coordinates in a C array. The x and y values will be +scaled from 0x0000 to 0xFFFE. 0xFFFF is used as path separator. + +This program can only interpret straight segments, not curves. +It also cannot handle SVG transform attributes. To convert an +SVG file into the proper format, use the following procedure: + + - Load SVG file into Inkscape + - Convert all Objects to Paths (Path -> Object to Path) + - Convert all Strokes to Paths (Path -> Stroke to Path) + - Combine all paths into one (Path -> Combine) [1] + - Convert all curves into short line segments + (Extensions -> Modify Paths -> Flatten Beziers...) + - Save as new SVG + - Convert into a header file using this utility + - To give paths individual names, break apart paths and + use the XML Editor to set the "id" attributes. + +[1] Combining paths is necessary to remove transforms. You +could also use inkscape-applytransforms Inkscape extension. + +''' + +header = ''' +/**************************************************************************** + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/** + * This file was auto-generated using "svg2cpp.pl" + * + * The encoding consists of x,y pairs with the min and max scaled to + * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the + * start of a new closed path. + */ + +#pragma once +''' + +class ComputeBoundingBox: + def reset(self): + self.x_min = float(" inf") + self.y_min = float(" inf") + self.x_max = float("-inf") + self.y_max = float("-inf") + self.n_points = 0 + self.n_paths = 0 + + def command(self, type, x, y): + self.x_min = min(self.x_min, x) + self.x_max = max(self.x_max, x) + self.y_min = min(self.y_min, y) + self.y_max = max(self.y_max, y) + + if type == "M": + self.n_paths += 1 + self.n_points += 1 + + def scale(self, x, y): + x -= self.x_min + y -= self.y_min + x /= self.x_max - self.x_min + y /= self.y_max - self.y_min + #y = 1 - y # Flip upside down + return (x, y) + + def path_finished(self, id): + pass + + def write(self): + print("constexpr float x_min = %f;\n" % self.x_min) + print("constexpr float x_max = %f;\n" % self.x_max) + print("constexpr float y_min = %f;\n" % self.y_min) + print("constexpr float y_max = %f;\n" % self.y_max) + + def from_svg_view_box(self, svg): + s = re.search(']+>', svg); + if s: + m = re.search('viewBox="([0-9-.]+) ([0-9-.]+) ([0-9-.]+) ([0-9-.]+)"', svg) + if m: + self.x_min = float(m.group(1)) + self.y_min = float(m.group(2)) + self.x_max = float(m.group(3)) + self.y_max = float(m.group(4)) + return True + return False + +class WriteDataStructure: + def __init__(self, bounding_box): + self.bounds = bounding_box + + def reset(self, ): + self.hex_words = [] + + def push(self, value): + self.hex_words.append("0x%04X" % value) + + def command(self, type, x, y): + if type == "M": + self.push(0xFFFF) + x, y = self.bounds.scale(x,y) + self.push(x * 0xFFFE) + self.push(y * 0xFFFE) + + def path_finished(self, id): + if self.hex_words and self.hex_words[0] == "0xFFFF": + self.hex_words.pop(0) + print("const PROGMEM uint16_t", id + "[] = {" + ", ".join (self.hex_words) + "};\n") + self.hex_words = [] + +class Parser: + def __init__(self, op): + self.op = op + self.reset() + + def reset(self): + self.last_x = 0 + self.last_y = 0 + self.initial_x = 0 + self.initial_y = 0 + + def process_svg_path_L_or_M(self, cmd, x, y): + self.op.command(cmd, x, y) + self.last_x = x + self.last_y = y + if cmd == "M": + self.initial_x = x + self.initial_y = y + + def process_svg_path_data_cmd(self, id, cmd, a, b): + """Converts the various types of moves into L or M commands + and dispatches to process_svg_path_L_or_M for futher processing.""" + if cmd == "Z" or cmd == "z": + self.process_svg_path_L_or_M("L", self.initial_x, self.initial_y) + elif cmd == "H": + self.process_svg_path_L_or_M("L", a, self.last_y) + elif cmd == "V": + self.process_svg_path_L_or_M("L", self.last_x, a) + elif cmd == "h": + self.process_svg_path_L_or_M("L", self.last_x + a, self.last_y) + elif cmd == "v": + self.process_svg_path_L_or_M("L", self.last_x, self.last_y + a) + elif cmd == "L": + self.process_svg_path_L_or_M("L", a, b) + elif cmd == "l": + self.process_svg_path_L_or_M("L", self.last_x + a, self.last_y + b) + elif cmd == "M": + self.process_svg_path_L_or_M("M", a, b) + elif cmd == "m": + self.process_svg_path_L_or_M("M", self.last_x + a, self.last_y + b) + else: + print("Unsupported path data command:", cmd, "in path", id, "\n", file=sys.stderr) + quit() + + def eat_token(self, regex): + """Looks for a token at the start of self.d. + If found, the token is removed.""" + self.m = re.match(regex,self.d) + if self.m: + self.d = self.d[self.m.end():] + return self.m + + def process_svg_path_data(self, id, d): + """Breaks up the "d" attribute into individual commands + and calls "process_svg_path_data_cmd" for each""" + + self.d = d + while (self.d): + if self.eat_token('\s+'): + pass # Just eat the spaces + + elif self.eat_token('([LMHVZlmhvz])'): + cmd = self.m.group(1) + # The following commands take no arguments + if cmd == "Z" or cmd == "z": + self.process_svg_path_data_cmd(id, cmd, 0, 0) + + elif self.eat_token('([CScsQqTtAa])'): + print("Unsupported path data command:", self.m.group(1), "in path", id, "\n", file=sys.stderr) + quit() + + elif self.eat_token('([ ,]*[-0-9e.]+)+'): + # Process list of coordinates following command + coords = re.split('[ ,]+', self.m.group(0)) + # The following commands take two arguments + if cmd == "L" or cmd == "l": + while coords: + self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), float(coords.pop(0))) + elif cmd == "M": + while coords: + self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), float(coords.pop(0))) + # If a MOVETO has multiple points, the subsequent ones are assumed to be LINETO + cmd = "L" + elif cmd == "m": + while coords: + self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), float(coords.pop(0))) + # If a MOVETO has multiple points, the subsequent ones are assumed to be LINETO + cmd = "l" + # Assume all other commands are single argument + else: + while coords: + self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), 0) + else: + print("Syntax error:", d, "in path", id, "\n", file=sys.stderr) + quit() + + def process_svg_paths(self, svg): + self.op.reset() + for path in re.findall(']+>', svg): + id = "" + m = re.search(' id="(.*)"', path) + if m: + id = m.group(1) + + m = re.search(' transform="(.*)"', path) + if m: + print("Found transform in path", id, "! Cannot process file!", file=sys.stderr) + quit() + + m = re.search(' d="(.*)"', path) + if m: + self.process_svg_path_data(id, m.group(1)) + self.op.path_finished(id) + self.reset() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("filename") + args = parser.parse_args() + + f = open(args.filename, "r") + data = f.read() + + print(header) + + b = ComputeBoundingBox() + if not b.from_svg_view_box(data): + # Can't find the view box, so use the bounding box of the elements themselves. + p = Parser(b) + p.process_svg_paths(data) + b.write() + + w = WriteDataStructure(b) + p = Parser(w) + p.process_svg_paths(data) diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/ftdi_eve_lib.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/ftdi_eve_lib.h new file mode 100644 index 000000000000..5a7d3c960bba --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/ftdi_eve_lib.h @@ -0,0 +1,27 @@ +/****************** + * ftdi_eve_lib.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2019 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "compat.h" +#include "basic/ftdi_basic.h" +#include "extended/ftdi_extended.h" diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp new file mode 100644 index 000000000000..4318ae0a04e3 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp @@ -0,0 +1,128 @@ +/********************* + * marlin_events.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "compat.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens/screens.h" + +namespace ExtUI { + using namespace Theme; + using namespace FTDI; + + void onStartup() { + EventLoop::setup(); + } + + void onIdle() { + EventLoop::loop(); + } + + void onPrinterKilled(PGM_P lcd_msg) { + KillScreen::show(progmem_str(lcd_msg)); + } + + void onMediaInserted() { + if (AT_SCREEN(StatusScreen)) + StatusScreen::setStatusMessage(F(MSG_MEDIA_INSERTED)); + sound.play(media_inserted, PLAY_ASYNCHRONOUS); + } + + void onMediaRemoved() { + if (AT_SCREEN(StatusScreen)) + StatusScreen::setStatusMessage(F(MSG_MEDIA_REMOVED)); + sound.play(media_removed, PLAY_ASYNCHRONOUS); + if (AT_SCREEN(FilesScreen)) { + GOTO_SCREEN(StatusScreen) + } + } + + void onMediaError() { + sound.play(sad_trombone, PLAY_ASYNCHRONOUS); + AlertDialogBox::showError(F("Unable to read media.")); + } + + void onStatusChanged(const char* lcd_msg) { + StatusScreen::setStatusMessage(lcd_msg); + } + + void onStatusChanged(progmem_str lcd_msg) { + StatusScreen::setStatusMessage(lcd_msg); + } + + void onPrintTimerStarted() { + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_STARTED); + } + + void onPrintTimerStopped() { + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FINISHED); + } + + void onPrintTimerPaused() { + } + + void onFilamentRunout(const extruder_t extruder) { + char lcd_msg[30]; + sprintf_P(lcd_msg, PSTR("Extruder %d Filament Error"), extruder + 1); + StatusScreen::setStatusMessage(lcd_msg); + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED); + } + + void onFactoryReset() { + InterfaceSettingsScreen::defaultSettings(); + } + + void onStoreSettings(char *buff) { + InterfaceSettingsScreen::saveSettings(buff); + } + + void onLoadSettings(const char *buff) { + InterfaceSettingsScreen::loadSettings(buff); + } + + void onConfigurationStoreWritten(bool success) { + #ifdef LULZBOT_EEPROM_BACKUP_SIZE + if (success && InterfaceSettingsScreen::backupEEPROM()) { + SERIAL_ECHOLNPGM("Made backup of EEPROM to SPI Flash"); + } + #else + UNUSED(success); + #endif + } + + void onConfigurationStoreRead(bool) { + } + + void onPlayTone(const uint16_t frequency, const uint16_t duration) { + sound.play_tone(frequency, duration); + } + + void onUserConfirmRequired(const char * const msg) { + if (msg) + ConfirmUserRequestAlertBox::show(msg); + else + ConfirmUserRequestAlertBox::hide(); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h new file mode 100644 index 000000000000..c2818570f1ba --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h @@ -0,0 +1,142 @@ +/****************** + * pin_mappings.h * + ******************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/* This file defines mappings from the ULTRA_LCD pins functions to new + * functions for the FTDI display. These mappings allows any board that + * support ULTRA_LCD via EXP1 and EXP2 connectors to use FTDI modules + * without adding new pin definitions to the board. + */ + +#ifdef CR10_TFT_PINMAP + #ifndef __MARLIN_FIRMWARE__ + #error This pin mapping requires Marlin. + #endif + + #define CLCD_USE_SOFT_SPI + #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6 + #define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8 + #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7 + #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2 + #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3 + #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5 + #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1 +#endif + +/** + * The AlephObjects pinout for re-purposing the UltraLCD + * connector EXP1 for software SPI (rev B, obsolete) + */ + +#ifdef AO_EXP1_DEPRECATED_PINMAP + #ifndef __MARLIN_FIRMWARE__ + #error This pin mapping requires Marlin. + #endif + + #define CLCD_MOD_RESET LCD_PINS_D4 + #define CLCD_SPI_CS LCD_PINS_D5 + + #define CLCD_AUX_0 LCD_PINS_ENABLE + #define CLCD_AUX_1 BTN_ENC + #define CLCD_AUX_2 BEEPER_PIN + + #define CLCD_USE_SOFT_SPI + #define CLCD_SOFT_SPI_SCLK LCD_PINS_D7 + #define CLCD_SOFT_SPI_MOSI LCD_PINS_D6 + #define CLCD_SOFT_SPI_MISO LCD_PINS_RS +#endif + +/** + * AO_EXP1_PINMAP + * + * The AlephObjects mapping for re-purposing the UltraLCD + * connector EXP1 for software SPI for display (rev C): + * + * EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD: + * 1 MISO MISO MISO --> BEEPER + * 2 SCLK SCLK SCLK --> BTN_ENC + * 3 PD_N - - --> LCDE + * 4 - CS_N CS_N --> LCDRS + * 5 CS_N - - --> LCD4 + * 6 MOSI MOSI MOSI --> LCD5 + * 7 - SD_DET INT --> LCD6 + * 8 RESET - RESET --> LCD4 + * 9 GND GND GND --> GND + * 10 5V 5V 5V --> 5V + * + * [1] At the moment, Marlin does not support SD or USB + * functionality over software SPI. + */ + +#ifdef AO_EXP1_PINMAP + #ifndef __MARLIN_FIRMWARE__ + #error This pin mapping requires Marlin. + #endif + + #define CLCD_MOD_RESET LCD_PINS_ENABLE + #define CLCD_SPI_CS LCD_PINS_D4 + + #define CLCD_USE_SOFT_SPI + #define CLCD_SOFT_SPI_SCLK BTN_ENC + #define CLCD_SOFT_SPI_MOSI LCD_PINS_D5 + #define CLCD_SOFT_SPI_MISO BEEPER_PIN +#endif + +/** + * AO_EXP2_PINMAP + * + * The AlephObjects mapping for re-purposing the UltraLCD + * connector EXP2 for hardware SPI for display and SD card + * or USB (rev C): + * + * EXP2: FTDI: SD -or- USB: ULTRA_LCD: + * 1 MISO MISO MISO --> MISO + * 2 SCLK SCLK SCLK --> SCLK + * 3 PD_N - - --> BTN_EN2 + * 4 - CS_N CS_N --> SD_CSEL + * 5 CS_N - - --> BTN_EN1 + * 6 MOSI MOSI MOSI --> MOSI + * 7 - SD_DET INT --> SD_DET + * 8 RESET - RESET --> RESET + * 9 GND GND GND --> GND + * 10 5V 5V 5V --> KILL [3] + * + * [1] This configuration is not compatible with the + * EinsyRetro 1.1a because there is a level shifter + * on MISO enabled by SD/USB chip select. + * + * [2] This configuration allows daisy-chaining of the + * display and SD/USB on EXP2. + * + * [3] Archim Rambo provides 5V on this pin. On any other + * board, divert this wire from the ribbon cable and + * connect it to 5V at an endstop. + */ + +#ifdef AO_EXP2_PINMAP + #ifndef __MARLIN_FIRMWARE__ + #error This pin mapping requires Marlin. + #endif + + #define CLCD_SPI_CS BTN_EN1 + #define CLCD_MOD_RESET BTN_EN2 +#endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/about_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/about_screen.cpp new file mode 100644 index 000000000000..f27d1401fcd7 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/about_screen.cpp @@ -0,0 +1,80 @@ +/******************** + * about_screen.cpp * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +#define GRID_COLS 4 +#define GRID_ROWS 9 + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void AboutScreen::onEntry() { + BaseScreen::onEntry(); + sound.play(chimes, PLAY_ASYNCHRONOUS); +} + +void AboutScreen::onRedraw(draw_mode_t) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + + draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(4,1), F( + #ifdef LULZBOT_LCD_MACHINE_NAME + LULZBOT_LCD_MACHINE_NAME + #else + "Color Touch Panel" + #endif + ), OPT_CENTER, font_xlarge); + + cmd.tag(2); + draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3), F( + #ifdef LULZBOT_LCD_TOOLHEAD_NAME + "Firmware for toolhead:\n" LULZBOT_LCD_TOOLHEAD_NAME "\n\n" + #endif + "(C) 2019 Aleph Objects, Inc.\n\nwww.lulzbot.com" + ), OPT_CENTER, font_medium); + + cmd.tag(0); + draw_text_box(cmd, BTN_POS(1,6), BTN_SIZE(4,2), progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium); + + cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), F("Okay")); +} + +bool AboutScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; +#if ENABLED(DEVELOPER_SCREENS) + case 2: GOTO_SCREEN(DeveloperMenu); return true; +#endif + default: return false; + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp new file mode 100644 index 000000000000..18159a5bdb3f --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp @@ -0,0 +1,191 @@ +/***************************** + * advance_settings_menu.cpp * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(Theme::font_medium) + #ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 9 + #define GRID_COLS 2 + #if HAS_BED_PROBE + .enabled(1) + #else + .enabled(0) + #endif + .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Z Offset ")) + .enabled(1) + .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm")) + #if HAS_TRINAMIC + .enabled(1) + #else + .enabled(0) + #endif + .tag(13).button( BTN_POS(1,5), BTN_SIZE(1,1), F("Motor mA")) + #if HAS_TRINAMIC + .enabled(1) + #else + .enabled(0) + #endif + .tag(14).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Bump Sense")) + #if HOTENDS > 1 + .enabled(1) + #else + .enabled(0) + #endif + .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Nozzle Offset")) + #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + .enabled(1) + #else + .enabled(0) + #endif + .tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), F("Filament")) + .tag(12).button( BTN_POS(1,6), BTN_SIZE(1,1), F("Endstops")) + .tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), F("Display")) + .tag(9) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Interface Settings")) + .tag(10).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Restore Factory Defaults")) + .tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity ")) + .tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration")) + #if ENABLED(JUNCTION_DEVIATION) + .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev")) + #else + .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk")) + #endif + #if ENABLED(BACKLASH_GCODE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Backlash")) + .colors(action_btn) + .tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS + #else + #define GRID_ROWS 6 + #define GRID_COLS 3 + #if HAS_BED_PROBE + .enabled(1) + #else + .enabled(0) + #endif + .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,2), F("Z Offset ")) + .enabled(1) + .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm")) + #if HAS_TRINAMIC + .enabled(1) + #else + .enabled(0) + #endif + .tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), F("Motor mA")) + #if HAS_TRINAMIC + .enabled(1) + #else + .enabled(0) + #endif + .tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), F("Bump Sense")) + #if ENABLED(BACKLASH_GCODE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(8).button( BTN_POS(3,3), BTN_SIZE(1,1), F("Backlash")) + #if HOTENDS > 1 + .enabled(1) + #else + .enabled(0) + #endif + .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Nozzle Offsets")) + .tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), F("Endstops")) + .tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity ")) + .tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration")) + #if ENABLED(JUNCTION_DEVIATION) + .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev")) + #else + .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk")) + #endif + .tag(11).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Filament")) + .tag(15).button( BTN_POS(3,5), BTN_SIZE(1,1), F("Display")) + .tag(9) .button( BTN_POS(1,5), BTN_SIZE(2,1), F("Interface Settings")) + .tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Restore Defaults")) + .colors(action_btn) + .tag(1) .button( BTN_POS(3,6), BTN_SIZE(1,1), F("Back")); + #endif + } +} + +bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + #if HAS_BED_PROBE + case 2: GOTO_SCREEN(ZOffsetScreen); break; + #endif + case 3: GOTO_SCREEN(StepsScreen); break; + #if HOTENDS > 1 + case 4: GOTO_SCREEN(NozzleOffsetScreen); break; + #endif + case 5: GOTO_SCREEN(MaxVelocityScreen); break; + case 6: GOTO_SCREEN(DefaultAccelerationScreen); break; + case 7: + #if ENABLED(JUNCTION_DEVIATION) + GOTO_SCREEN(JunctionDeviationScreen); + #else + GOTO_SCREEN(JerkScreen); + #endif + break; + #if ENABLED(BACKLASH_GCODE) + case 8: GOTO_SCREEN(BacklashCompensationScreen); break; + #endif + case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break; + case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break; + #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + case 11: GOTO_SCREEN(FilamentMenu); break; + #endif + case 12: GOTO_SCREEN(EndstopStatesScreen); break; + #if HAS_TRINAMIC + case 13: GOTO_SCREEN(StepperCurrentScreen); break; + case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; + #endif + case 15: GOTO_SCREEN(DisplayTuningScreen); break; + default: return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/alert_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/alert_dialog_box.cpp new file mode 100644 index 000000000000..dfc119601084 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/alert_dialog_box.cpp @@ -0,0 +1,70 @@ +/************************ + * alert_dialog_box.cpp * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace Theme; + +void AlertDialogBox::onEntry() { + BaseScreen::onEntry(); + sound.play(screen_data.AlertDialogBox.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS); +} + +void AlertDialogBox::onRedraw(draw_mode_t what) { + if (what & FOREGROUND) { + drawOkayButton(); + } +} + +template +void AlertDialogBox::show(const T message) { + drawMessage(message); + storeBackground(); + screen_data.AlertDialogBox.isError = false; + GOTO_SCREEN(AlertDialogBox); +} + +template +void AlertDialogBox::showError(const T message) { + drawMessage(message); + storeBackground(); + screen_data.AlertDialogBox.isError = true; + GOTO_SCREEN(AlertDialogBox); +} + +void AlertDialogBox::hide() { + if (AT_SCREEN(AlertDialogBox)) + GOTO_PREVIOUS(); +} + +template void AlertDialogBox::show(const char *); +template void AlertDialogBox::show(const progmem_str); +template void AlertDialogBox::showError(const char *); +template void AlertDialogBox::showError(const progmem_str); + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp new file mode 100644 index 000000000000..a09b84b1b0c7 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp @@ -0,0 +1,72 @@ +/************************************ + * backlash_compensation_screen.cpp * + ************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BACKLASH_GCODE) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void BacklashCompensationScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2).units(PSTR("mm")); + w.heading( PSTR("Axis Backlash")); + w.color(x_axis).adjuster(2, PSTR("X:"), getAxisBacklash_mm(X)); + w.color(y_axis).adjuster(4, PSTR("Y:"), getAxisBacklash_mm(Y)); + w.color(z_axis).adjuster(6, PSTR("Z:"), getAxisBacklash_mm(Z)); + #if ENABLED(CALIBRATION_GCODE) + w.button(12, PSTR("Measure automatically")); + #endif + w.color(other).adjuster(8, PSTR("Smoothing:"), getBacklashSmoothing_mm()); + w.precision(0).units(PSTR("%")) + .adjuster(10, PSTR("Correction:"), getBacklashCorrection_percent()); + w.precision(2).increments(); +} + +bool BacklashCompensationScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(AxisBacklash_mm, X); break; + case 3: UI_INCREMENT(AxisBacklash_mm, X); break; + case 4: UI_DECREMENT(AxisBacklash_mm, Y); break; + case 5: UI_INCREMENT(AxisBacklash_mm, Y); break; + case 6: UI_DECREMENT(AxisBacklash_mm, Z); break; + case 7: UI_INCREMENT(AxisBacklash_mm, Z); break; + case 8: UI_DECREMENT(BacklashSmoothing_mm); break; + case 9: UI_INCREMENT(BacklashSmoothing_mm); break; + case 10: UI_DECREMENT_BY(BacklashCorrection_percent, increment*100); break; + case 11: UI_INCREMENT_BY(BacklashCorrection_percent, increment*100); break; + #if ENABLED(CALIBRATION_GCODE) + case 12: GOTO_SCREEN(ConfirmAutoCalibrationDialogBox); return true; + #endif + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_numeric_adjustment_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_numeric_adjustment_screen.cpp new file mode 100644 index 000000000000..2fb5c98cba27 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_numeric_adjustment_screen.cpp @@ -0,0 +1,342 @@ +/************************************** + * base_numeric_adjustment_screen.cpp * + **************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace Theme; + +#ifdef TOUCH_UI_PORTRAIT + #define GRID_COLS 13 + #define GRID_ROWS 10 +#else + #define GRID_COLS 18 + #define GRID_ROWS 7 +#endif + +BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.font(font_medium) + .colors(action_btn) + #ifdef TOUCH_UI_PORTRAIT + .tag(1).button( BTN_POS(1,10), BTN_SIZE(13,1), F("Back")) + #else + .tag(1).button( BTN_POS(15,7), BTN_SIZE(4,1), F("Back")) + #endif + .colors(normal_btn); + } + + _line = 1; + _units = PSTR(""); +} + +BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::precision(uint8_t decimals, precision_default_t initial) { + _decimals = decimals; + if (screen_data.BaseNumericAdjustmentScreen.increment == 0) { + screen_data.BaseNumericAdjustmentScreen.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals; + } + return *this; +} + +void BaseNumericAdjustmentScreen::widgets_t::heading(const char *label) { + CommandProcessor cmd; + cmd.font(font_medium).cmd(COLOR_RGB(bg_text_enabled)); + if (_what & BACKGROUND) { + #ifdef TOUCH_UI_PORTRAIT + cmd.tag(0).fgcolor(bg_color).button( BTN_POS(1, _line), BTN_SIZE(12,1), progmem_str(label), OPT_FLAT); + #else + cmd.tag(0).fgcolor(bg_color).button( BTN_POS(5, _line), BTN_SIZE(8,1), progmem_str(label), OPT_FLAT); + #endif + } + + _line++; +} + +#ifdef TOUCH_UI_PORTRAIT + #ifdef TOUCH_UI_800x480 + #undef EDGE_R + #define EDGE_R 20 + #else + #undef EDGE_R + #define EDGE_R 10 + #endif +#endif + +void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(uint8_t, const uint8_t tag) { + CommandProcessor cmd; + const char *label = PSTR("?"); + uint8_t pos; + uint8_t & increment = screen_data.BaseNumericAdjustmentScreen.increment; + + if (increment == 0) { + increment = tag; // Set the default value to be the first. + } + + switch (tag) { + case 240: label = PSTR( ".001"); pos = _decimals - 3; break; + case 241: label = PSTR( ".01" ); pos = _decimals - 2; break; + case 242: label = PSTR( "0.1" ); pos = _decimals - 1; break; + case 243: label = PSTR( "1" ); pos = _decimals + 0; break; + case 244: label = PSTR( "10" ); pos = _decimals + 1; break; + default: label = PSTR("100" ); pos = _decimals + 2; break; + } + + cmd.tag(tag) + .colors(increment == tag ? action_btn : normal_btn) + #ifdef TOUCH_UI_PORTRAIT + .font(font_small); + #else + .font(font_medium); + #endif + switch (pos) { + #ifdef TOUCH_UI_PORTRAIT + case 0: cmd.button( BTN_POS(5,_line), BTN_SIZE(2,1), progmem_str(label)); break; + case 1: cmd.button( BTN_POS(7,_line), BTN_SIZE(2,1), progmem_str(label)); break; + case 2: cmd.button( BTN_POS(9,_line), BTN_SIZE(2,1), progmem_str(label)); break; + #else + case 0: cmd.button( BTN_POS(15,2), BTN_SIZE(4,1), progmem_str(label)); break; + case 1: cmd.button( BTN_POS(15,3), BTN_SIZE(4,1), progmem_str(label)); break; + case 2: cmd.button( BTN_POS(15,4), BTN_SIZE(4,1), progmem_str(label)); break; + #endif + } + cmd.colors(normal_btn); +} + + +void BaseNumericAdjustmentScreen::widgets_t::increments() { + if (_what & BACKGROUND) { + CommandProcessor cmd; + cmd.fgcolor(bg_color) + .tag(0) + #ifdef TOUCH_UI_PORTRAIT + .font(font_small).button( BTN_POS(1, _line), BTN_SIZE(4,1), F("Increment:"), OPT_FLAT); + #else + .font(font_medium).button( BTN_POS(15,1), BTN_SIZE(4,1), F("Increment:"), OPT_FLAT); + #endif + } + + if (_what & FOREGROUND) { + _draw_increment_btn(_line+1, 245 - _decimals); + _draw_increment_btn(_line+1, 244 - _decimals); + _draw_increment_btn(_line+1, 243 - _decimals); + } + + #ifdef TOUCH_UI_PORTRAIT + _line++; + #endif +} + +void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, const char *label, const char *value, bool is_enabled) { + CommandProcessor cmd; + + if (_what & BACKGROUND) { + cmd.enabled(1) + .font(font_small) + .fgcolor(_color) .tag(0).button( BTN_POS(5,_line), BTN_SIZE(5,1), F(""), OPT_FLAT) + .cmd(COLOR_RGB(bg_text_enabled)) + .fgcolor(bg_color) .tag(0).button( BTN_POS(1,_line), BTN_SIZE(4,1), (progmem_str) label, OPT_FLAT); + } + + if (_what & FOREGROUND) { + cmd.colors(normal_btn) + .font(font_medium) + .tag(is_enabled ? tag : 0).enabled(is_enabled).button( BTN_POS(10,_line), BTN_SIZE(2,1), F("-")) + .tag(is_enabled ? tag+1 : 0).enabled(is_enabled).button( BTN_POS(12,_line), BTN_SIZE(2,1), F("+")) + .tag(0).font(font_small) .text ( BTN_POS(5,_line), BTN_SIZE(5,1), is_enabled ? value : "-"); + } + + _line++; +} + +void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *label, const char *value, bool is_enabled) { + if (_what & BACKGROUND) { + adjuster_sram_val(tag, label, nullptr); + } + + if (_what & FOREGROUND) { + char b[strlen_P(value)+1]; + strcpy_P(b,value); + adjuster_sram_val(tag, label, b, is_enabled); + } +} + +void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *label, float value, bool is_enabled) { + if (_what & BACKGROUND) { + adjuster_sram_val(tag, label, nullptr); + } + + if (_what & FOREGROUND) { + char b[32]; + dtostrf(value, 5, _decimals, b); + strcat_P(b, PSTR(" ")); + strcat_P(b, (const char*) _units); + adjuster_sram_val(tag, label, b, is_enabled); + } +} + +void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, const char *label, bool is_enabled) { + if (_what & FOREGROUND) { + CommandProcessor cmd; + cmd.colors(normal_btn) + .tag(is_enabled ? tag : 0) + .enabled(is_enabled) + #ifdef TOUCH_UI_PORTRAIT + .font(font_small) + #else + .font(font_medium) + #endif + .button(BTN_POS(5,_line), BTN_SIZE(9,1), progmem_str(label)); + } + + _line++; +} + +void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, const char *label, const char *value, bool is_enabled) { + CommandProcessor cmd; + + if (_what & BACKGROUND) { + cmd.enabled(1) + .font(font_small) + .cmd(COLOR_RGB(bg_text_enabled)) + .fgcolor(_color).tag(0).button( BTN_POS(5,_line), BTN_SIZE(9,1), F(""), OPT_FLAT) + .fgcolor(bg_color) .tag(0).button( BTN_POS(1,_line), BTN_SIZE(4,1), (progmem_str) label, OPT_FLAT); + } + + if (_what & FOREGROUND) { + cmd.colors(normal_btn) + .font(font_medium) + .tag(tag).font(font_small).text ( BTN_POS(5,_line), BTN_SIZE(9,1), is_enabled ? value : "-"); + } + + _line++; +} + +void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, const char *label1, uint8_t tag2, const char *label2, bool is_enabled) { + if (_what & FOREGROUND) { + CommandProcessor cmd; + cmd.enabled(is_enabled) + #ifdef TOUCH_UI_PORTRAIT + .font(font_small) + #else + .font(font_medium) + #endif + .tag(is_enabled ? tag1: 0).button(BTN_POS(5,_line), BTN_SIZE(4.5,1), progmem_str(label1)) + .tag(is_enabled ? tag2: 0).button(BTN_POS(9.5,_line), BTN_SIZE(4.5,1), progmem_str(label2)); + } + + _line++; +} + +void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, const char *label, const char *text, bool value, bool is_enabled) { + if (_what & BACKGROUND) { + CommandProcessor cmd; + cmd.fgcolor(bg_color) + .tag(0) + .font(font_small) + #ifdef TOUCH_UI_PORTRAIT + .button( BTN_POS(1, _line), BTN_SIZE( 8,1), progmem_str(label), OPT_FLAT); + #else + .button( BTN_POS(1, _line), BTN_SIZE(10,1), progmem_str(label), OPT_FLAT); + #endif + } + + if (_what & FOREGROUND) { + CommandProcessor cmd; + cmd.tag(is_enabled ? tag : 0) + .enabled(is_enabled) + .font(font_small) + .colors(ui_toggle) + #ifdef TOUCH_UI_PORTRAIT + .toggle(BTN_POS( 9,_line), BTN_SIZE(5,1), progmem_str(text), value); + #else + .toggle(BTN_POS(10,_line), BTN_SIZE(4,1), progmem_str(text), value); + #endif + } + + _line++; +} + +void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) { + if (_what & BACKGROUND) { + CommandProcessor cmd; + cmd.fgcolor(bg_color) + .tag(0) + .font(font_small) + .button( BTN_POS(1, _line), BTN_SIZE(4,1), F("Home:"), OPT_FLAT); + } + + if (_what & FOREGROUND) { + CommandProcessor cmd; + cmd + #ifdef TOUCH_UI_PORTRAIT + .font(font_small) + #else + .font(font_medium) + #endif + .tag(tag+0).button(BTN_POS(5,_line), BTN_SIZE(2,1), F("X")) + .tag(tag+1).button(BTN_POS(7,_line), BTN_SIZE(2,1), F("Y")) + .tag(tag+2).button(BTN_POS(9,_line), BTN_SIZE(2,1), F("Z")) + .tag(tag+3).button(BTN_POS(11,_line), BTN_SIZE(3,1), F("All")); + } + + _line++; +} + +void BaseNumericAdjustmentScreen::onEntry() { + screen_data.BaseNumericAdjustmentScreen.increment = 0; // This will force the increment to be picked while drawing. + BaseScreen::onEntry(); +} + +bool BaseNumericAdjustmentScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + case 240 ... 245: screen_data.BaseNumericAdjustmentScreen.increment = tag; break; + default: return current_screen.onTouchHeld(tag); + } + return true; +} + +float BaseNumericAdjustmentScreen::getIncrement() { + switch (screen_data.BaseNumericAdjustmentScreen.increment) { + case 240: return 0.001; + case 241: return 0.01; + case 242: return 0.1; + case 243: return 1.0; + case 244: return 10.0; + case 245: return 100.0; + default: return 0.0; + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp new file mode 100644 index 000000000000..3dc356c530e7 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp @@ -0,0 +1,83 @@ +/******************* + * base_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void BaseScreen::onEntry() { + CommandProcessor cmd; + cmd.set_button_style_callback(buttonStyleCallback); + UIScreen::onEntry(); +} + +bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t &style, uint16_t &options, bool post) { + if (post) { + cmd.colors(normal_btn); + return false; + } + + #ifdef LCD_TIMEOUT_TO_STATUS + if (EventLoop::get_pressed_tag() != 0) { + reset_menu_timeout(); + } + #endif + + if (tag != 0 && EventLoop::get_pressed_tag() == tag) { + options = OPT_FLAT; + } + + if (style & cmd.STYLE_DISABLED) { + cmd.tag(0); + style &= ~cmd.STYLE_DISABLED; + cmd.colors(disabled_btn); + return true; // Call me again to reset the colors + } + return false; +} + +void BaseScreen::onIdle() { + #ifdef LCD_TIMEOUT_TO_STATUS + const uint32_t elapsed = millis() - last_interaction; + if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS)) { + reset_menu_timeout(); + GOTO_SCREEN(StatusScreen); + } + #endif +} + +void BaseScreen::reset_menu_timeout() { + #ifdef LCD_TIMEOUT_TO_STATUS + last_interaction = millis(); + #endif +} + +#ifdef LCD_TIMEOUT_TO_STATUS + uint32_t BaseScreen::last_interaction; +#endif + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp new file mode 100644 index 000000000000..1fddbd6541cd --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp @@ -0,0 +1,137 @@ +/***************************** + * bio_advanced_settings.cpp * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(Theme::font_medium) + #define GRID_ROWS 9 + #define GRID_COLS 2 + + .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Display")) + #if HAS_TRINAMIC + .enabled(1) + #else + .enabled(0) + #endif + .tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Motor mA")) + #if HAS_TRINAMIC + .enabled(1) + #else + .enabled(0) + #endif + .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Bump Sense")) + .tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Endstops")) + #if HOTENDS > 1 + .enabled(1) + #else + .enabled(0) + #endif + .tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Nozzle Offset")) + + + .tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm")) + .tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity ")) + .tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration")) + #if ENABLED(JUNCTION_DEVIATION) + .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev")) + #else + .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk")) + #endif + #if ENABLED(BACKLASH_GCODE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(11) .button( BTN_POS(2,5), BTN_SIZE(1,1), F("Backlash")) + #if ENABLED(LIN_ADVANCE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), F("Linear Advance")) + .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Interface Settings")) + .tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), F("Restore Factory Defaults")) + .colors(action_btn) + .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS + } +} + +bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { + using namespace ExtUI; + + switch (tag) { + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + case 2: GOTO_SCREEN(DisplayTuningScreen); break; + #if HAS_TRINAMIC + case 3: GOTO_SCREEN(StepperCurrentScreen); break; + case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break; + #endif + case 5: GOTO_SCREEN(EndstopStatesScreen); break; + #if HOTENDS > 1 + case 6: GOTO_SCREEN(NozzleOffsetScreen); break; + #endif + + case 7: GOTO_SCREEN(StepsScreen); break; + case 8: GOTO_SCREEN(MaxVelocityScreen); break; + case 9: GOTO_SCREEN(DefaultAccelerationScreen); break; + case 10: + #if ENABLED(JUNCTION_DEVIATION) + GOTO_SCREEN(JunctionDeviationScreen); + #else + GOTO_SCREEN(JerkScreen); + #endif + break; + #if ENABLED(BACKLASH_GCODE) + case 11: GOTO_SCREEN(BacklashCompensationScreen); break; + #endif + #if ENABLED(LIN_ADVANCE) + case 12: GOTO_SCREEN(LinearAdvanceScreen); break; + #endif + case 13: GOTO_SCREEN(InterfaceSettingsScreen); break; + case 14: GOTO_SCREEN(RestoreFailsafeDialogBox); break; + + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_e.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_e.cpp new file mode 100644 index 000000000000..c106db242233 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_e.cpp @@ -0,0 +1,56 @@ +/**************************** + * bio_confirm_home_xyz.cpp * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; + +void BioConfirmHomeE::onRedraw(draw_mode_t) { + drawMessage(F("About to re-home plunger and auto-level. Remove syringe prior to proceeding.\n\nContinue?")); + drawYesNoButtons(1); +} + +bool BioConfirmHomeE::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + SpinnerDialogBox::enqueueAndWait_P(F( + "G112\n" /* Home extruder */ + LULZBOT_AXIS_LEVELING_COMMANDS /* Level X axis */ + "G0 X115 Z50 F6000\n" /* Goto loading position */ + "M400\n" /* Wait for moves to finish */ + "M18 X Y" /* Unlock motors */ + )); + current_screen.forget(); + break; + case 2: + GOTO_SCREEN(StatusScreen); + break; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } + return true; +} +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_xyz.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_xyz.cpp new file mode 100644 index 000000000000..dbd04fc3595f --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_xyz.cpp @@ -0,0 +1,53 @@ +/**************************** + * bio_confirm_home_xyz.cpp * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; + +void BioConfirmHomeXYZ::onRedraw(draw_mode_t) { + drawMessage(F("About to home to loading position.\nEnsure the top and the bed of the printer are clear.\n\nContinue?")); + drawYesNoButtons(1); +} + +bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + SpinnerDialogBox::enqueueAndWait_P(F( + "G28 X Y Z\n" /* Home all axis */ + "G0 X115 Z50 F6000" /* Move to park position */ + )); + current_screen.forget(); + break; + case 2: + GOTO_SCREEN(StatusScreen); + break; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } + return true; +} +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_main_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_main_menu.cpp new file mode 100644 index 000000000000..0a42bc580461 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_main_menu.cpp @@ -0,0 +1,79 @@ +/********************* + * bio_main_menu.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void MainMenu::onRedraw(draw_mode_t what) { + #define GRID_ROWS 8 + #define GRID_COLS 2 + + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.cmd(COLOR_RGB(bg_text_enabled)) + .font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), F("Main Menu")) + .colors(normal_btn) + .font(font_medium) + .tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Load Syringe")) + .tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Unlock XY Axis")) + .tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Bed Temperature")) + .tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Interface Settings")) + .tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Advanced Settings")) + .tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), F("About Printer")) + .colors(action_btn) + .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back")); + } + + #undef GRID_COLS + #undef GRID_ROWS +} + +bool MainMenu::onTouchEnd(uint8_t tag) { + using namespace ExtUI; + + switch (tag) { + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break; + case 3: StatusScreen::unlockMotors(); break; + case 4: GOTO_SCREEN(TemperatureScreen); break; + case 5: GOTO_SCREEN(InterfaceSettingsScreen); break; + case 6: GOTO_SCREEN(AdvancedSettingsMenu); break; + case 7: GOTO_SCREEN(AboutScreen); break; + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui.h new file mode 100644 index 000000000000..6ff6c8a467a8 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui.h @@ -0,0 +1,75 @@ + +/**************************************************************************** + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/** + * This file was auto-generated using "svg2cpp.pl" + * + * The encoding consists of x,y pairs with the min and max scaled to + * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the + * start of a new closed path. + */ + +#pragma once + +constexpr float x_min = 0.000000; + +constexpr float x_max = 272.000000; + +constexpr float y_min = 0.000000; + +constexpr float y_max = 480.000000; + +const PROGMEM uint16_t z_neg[] = {0xC9B1, 0x96B3, 0xD990, 0x96B3, 0xD990, 0xA8D0, 0xE17F, 0xA8D0, 0xD1A0, 0xB1DF, 0xC1C2, 0xA8D0, 0xC9B1, 0xA8D0, 0xC9B1, 0x96B3}; + +const PROGMEM uint16_t z_pos[] = {0xC9B1, 0x8DA4, 0xD990, 0x8DA4, 0xD990, 0x7B86, 0xE17F, 0x7B86, 0xD1A0, 0x7277, 0xC1C2, 0x7B86, 0xC9B1, 0x7B86, 0xC9B1, 0x8DA4}; + +const PROGMEM uint16_t y_neg[] = {0x5037, 0x9979, 0x6264, 0x9979, 0x5529, 0xA92A, 0x5E3F, 0xA92A, 0x4575, 0xB103, 0x39E6, 0xA92A, 0x42FC, 0xA92A, 0x5037, 0x9979}; + +const PROGMEM uint16_t y_pos[] = {0x5D72, 0x89C7, 0x6F9F, 0x89C7, 0x7CDA, 0x7A15, 0x85F0, 0x7A15, 0x7A61, 0x723D, 0x6197, 0x7A15, 0x6AAD, 0x7A15, 0x5D72, 0x89C7}; + +const PROGMEM uint16_t x_neg[] = {0x513D, 0x8DB3, 0x4AA0, 0x958C, 0x2647, 0x958C, 0x22F8, 0x9979, 0x1769, 0x91A0, 0x3033, 0x89C7, 0x2CE4, 0x8DB3, 0x513D, 0x8DB3}; + +const PROGMEM uint16_t x_pos[] = {0x7566, 0x8DB3, 0x6EC9, 0x958C, 0x9322, 0x958C, 0x8FD4, 0x9979, 0xA89E, 0x91A0, 0x9D0E, 0x89C7, 0x99C0, 0x8DB3, 0x7566, 0x8DB3}; + +const PROGMEM uint16_t syringe_fluid[] = {0x7D1D, 0x4A0F, 0x87FC, 0x4C0E, 0x8CF4, 0x4C0E, 0x9801, 0x4A0F, 0x9801, 0x1AA2, 0x7D1D, 0x1AA2, 0x7D1D, 0x4A0F}; + +const PROGMEM uint16_t syringe[] = {0x83C2, 0x42AA, 0x83C2, 0x43FF, 0x8D2C, 0x43FF, 0x8D2C, 0x42AA, 0xFFFF, 0x83C2, 0x3D54, 0x83C2, 0x3EAA, 0x8D2C, 0x3EAA, 0x8D2C, 0x3D54, 0xFFFF, 0x83C2, 0x37FF, 0x83C2, 0x3954, 0x8D2C, 0x3954, 0x8D2C, 0x37FF, 0xFFFF, 0x83C2, 0x32AA, 0x83C2, 0x33FF, 0x8D2C, 0x33FF, 0x8D2C, 0x32AA, 0xFFFF, 0x83C2, 0x2D54, 0x83C2, 0x2EAA, 0x8D2C, 0x2EAA, 0x8D2C, 0x2D54, 0xFFFF, 0x83C2, 0x27FF, 0x83C2, 0x2955, 0x8D2C, 0x2955, 0x8D2C, 0x27FF, 0xFFFF, 0x83C2, 0x22AA, 0x83C2, 0x23FF, 0x8D2C, 0x23FF, 0x8D2C, 0x22AA, 0xFFFF, 0x7AC7, 0x0F4B, 0x7AC7, 0x134A, 0x855B, 0x134A, 0x855B, 0x1949, 0x7AC7, 0x1949, 0x7AC7, 0x4B40, 0x855B, 0x4D40, 0x855B, 0x533F, 0x88E2, 0x533F, 0x88E2, 0x653C, 0x8C69, 0x673C, 0x8C69, 0x533F, 0x8FF0, 0x533F, 0x8FF0, 0x4D40, 0x9A85, 0x4B40, 0x9A85, 0x1949, 0x8FF0, 0x1949, 0x8FF0, 0x134A, 0x9A85, 0x134A, 0x9A85, 0x0F4B, 0xFFFF, 0x88E2, 0x134A, 0x8C69, 0x134A, 0x8C69, 0x1949, 0x88E2, 0x1949, 0x88E2, 0x134A, 0xFFFF, 0x7E4D, 0x1B49, 0x96FE, 0x1B49, 0x96FE, 0x4941, 0x8C69, 0x4B40, 0x88E2, 0x4B40, 0x7E4D, 0x4941, 0x7E4D, 0x1B49}; + +const PROGMEM uint16_t syringe_outline[] = {0x7AC7, 0x0F4B, 0x7AC7, 0x134A, 0x855B, 0x134A, 0x855B, 0x1949, 0x7AC7, 0x1949, 0x7AC7, 0x4B40, 0x855B, 0x4D40, 0x855B, 0x533F, 0x88E2, 0x533F, 0x88E2, 0x653C, 0x8C69, 0x673C, 0x8C69, 0x533F, 0x8FF0, 0x533F, 0x8FF0, 0x4D40, 0x9A85, 0x4B40, 0x9A85, 0x1949, 0x8FF0, 0x1949, 0x8FF0, 0x134A, 0x9A85, 0x134A, 0x9A85, 0x0F4B, 0x7AC7, 0x0F4B}; + +const PROGMEM uint16_t padlock[] = {0x645A, 0x8017, 0x5F9E, 0x80A1, 0x5BBA, 0x821B, 0x5911, 0x844A, 0x580A, 0x86F7, 0x580A, 0x8931, 0x5970, 0x8A98, 0x5C49, 0x8A98, 0x5DB0, 0x8931, 0x5DB0, 0x8703, 0x5E3C, 0x858E, 0x5FAA, 0x845F, 0x61C5, 0x8394, 0x645A, 0x834A, 0x66F0, 0x8394, 0x690C, 0x845F, 0x6A7A, 0x858D, 0x6B07, 0x8703, 0x6B07, 0x8F23, 0x57C8, 0x8F23, 0x551E, 0x8FC3, 0x5404, 0x9145, 0x5404, 0x9C8F, 0x551E, 0x9E11, 0x57C8, 0x9EB1, 0x70EE, 0x9EB1, 0x7398, 0x9E11, 0x74B2, 0x9C8F, 0x74B2, 0x9145, 0x7398, 0x8FC3, 0x70EE, 0x8F23, 0x70AC, 0x86FA, 0x6FA5, 0x844A, 0x6CFD, 0x821B, 0x6917, 0x80A1}; + +const PROGMEM uint16_t home_z[] = {0xD6C9, 0x80CC, 0xBB53, 0x905B, 0xC231, 0x905B, 0xC231, 0x9FEB, 0xCFEC, 0x9FEB, 0xCFEC, 0x9823, 0xDDA7, 0x9823, 0xDDA7, 0x9FEB, 0xEB62, 0x9FEB, 0xEB62, 0x905B, 0xF240, 0x905B, 0xE7A3, 0x8A58, 0xE7A3, 0x82CD, 0xE0C6, 0x82CD, 0xE0C6, 0x8674}; + +const PROGMEM uint16_t home_e[] = {0xB94F, 0x25AA, 0x9DD8, 0x353A, 0xA4B6, 0x353A, 0xA4B6, 0x44C9, 0xB271, 0x44C9, 0xB271, 0x3D02, 0xC02C, 0x3D02, 0xC02C, 0x44C9, 0xCDE7, 0x44C9, 0xCDE7, 0x353A, 0xD4C5, 0x353A, 0xCA28, 0x2F36, 0xCA28, 0x27AB, 0xC34B, 0x27AB, 0xC34B, 0x2B53}; + +const PROGMEM uint16_t bed_icon[] = {0x1764, 0x2C4C, 0x6135, 0x2C4C, 0x6135, 0x40A8, 0x1764, 0x40A8}; + +const PROGMEM uint16_t actual_temp[] = {0x1764, 0x466F, 0x6135, 0x466F, 0x6135, 0x5ACB, 0x1764, 0x5ACB}; + +const PROGMEM uint16_t target_temp[] = {0x1764, 0x1228, 0x6135, 0x1228, 0x6135, 0x2684, 0x1764, 0x2684}; + +const PROGMEM uint16_t fine_label[] = {0x1AA7, 0xC6D2, 0x9387, 0xC6D2, 0x9387, 0xD316, 0x1AA7, 0xD316}; + +const PROGMEM uint16_t fine_toggle[] = {0x9C10, 0xC6D2, 0xE4A3, 0xC6D2, 0xE4A3, 0xD316, 0x9C10, 0xD316}; + +const PROGMEM uint16_t usb_btn[] = {0x0B68, 0xE880, 0x7B1A, 0xE880, 0x7B1A, 0xF94B, 0x0B68, 0xF94B, 0x0B68, 0xE880}; + +const PROGMEM uint16_t menu_btn[] = {0x84E3, 0xE880, 0xF495, 0xE880, 0xF495, 0xF94B, 0x84E3, 0xF94B, 0x84E3, 0xE880}; + +const PROGMEM uint16_t e_pos[] = {0xC9B1, 0x3B2D, 0xD990, 0x3B2D, 0xD990, 0x4D4B, 0xE17F, 0x4D4B, 0xD1A0, 0x565A, 0xC1C2, 0x4D4B, 0xC9B1, 0x4D4B, 0xC9B1, 0x3B2D}; + +const PROGMEM uint16_t e_neg[] = {0xC9B1, 0x321E, 0xD990, 0x321E, 0xD990, 0x2000, 0xE17F, 0x2000, 0xD1A0, 0x16F1, 0xC1C2, 0x2000, 0xC9B1, 0x2000, 0xC9B1, 0x321E}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printing_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printing_dialog_box.cpp new file mode 100644 index 000000000000..e77f0478481a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printing_dialog_box.cpp @@ -0,0 +1,155 @@ +/******************************* + * bio_printing_dialog_box.cpp * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +#include "../ftdi_eve_lib/extras/circular_progress.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define GRID_COLS 2 +#define GRID_ROWS 9 + +void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char* message) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(COLOR_RGB(bg_text_enabled)); + draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(2,2), message, OPT_CENTER, font_large); + } +} + +void BioPrintingDialogBox::draw_progress(draw_mode_t what) { + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.font(font_large) + .text(BTN_POS(1,1), BTN_SIZE(2,2), isPrinting() ? F("Printing...") : F("Finished.")) + .tag(1) + .font(font_xlarge); + + draw_circular_progress(cmd, BTN_POS(1,4), BTN_SIZE(2,3), getProgress_percent(), theme_dark, theme_darkest); + } +} + +void BioPrintingDialogBox::draw_time_remaining(draw_mode_t what) { + if (what & FOREGROUND) { + const uint32_t elapsed = getProgress_seconds_elapsed(); + const uint8_t hrs = elapsed/3600; + const uint8_t min = (elapsed/60)%60; + + char time_str[10]; + sprintf_P(time_str, PSTR("%02dh %02dm"), hrs, min); + + CommandProcessor cmd; + cmd.font(font_large) + .text(BTN_POS(1,7), BTN_SIZE(2,2), time_str); + } +} + +void BioPrintingDialogBox::draw_interaction_buttons(draw_mode_t what) { + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_medium) + .colors(isPrinting() ? action_btn : normal_btn) + .tag(2).button(BTN_POS(1,9), BTN_SIZE(1,1), F("Menu")) + #if ENABLED(SDSUPPORT) + .enabled(isPrinting() ? isPrintingFromMedia() : 1) + #else + .enabled(isPrinting() ? 0 : 1) + #endif + .tag(3) + .colors(isPrinting() ? normal_btn : action_btn) + .button( BTN_POS(2,9), BTN_SIZE(1,1), isPrinting() ? F("Cancel") : F("Back")); + } +} + +void BioPrintingDialogBox::onRedraw(draw_mode_t what) { + if (what & FOREGROUND) { + draw_progress(FOREGROUND); + draw_time_remaining(FOREGROUND); + draw_interaction_buttons(FOREGROUND); + } +} + +bool BioPrintingDialogBox::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_SCREEN(FeedratePercentScreen); break; + case 2: GOTO_SCREEN(TuneMenu); break; + case 3: + if (isPrinting()) { + GOTO_SCREEN(ConfirmAbortPrintDialogBox); + } else { + GOTO_SCREEN(StatusScreen); + } + break; + default: return false; + } + return true; +} + +void BioPrintingDialogBox::setStatusMessage(progmem_str message) { + char buff[strlen_P((const char * const)message)+1]; + strcpy_P(buff, (const char * const) message); + setStatusMessage(buff); +} + +void BioPrintingDialogBox::setStatusMessage(const char* message) { + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)); + + draw_status_message(BACKGROUND, message); + draw_progress(BACKGROUND); + draw_time_remaining(BACKGROUND); + draw_interaction_buttons(BACKGROUND); + storeBackground(); + + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("New status message: ", message); + #endif + + if (AT_SCREEN(BioPrintingDialogBox)) { + current_screen.onRefresh(); + } +} + +void BioPrintingDialogBox::onIdle() { + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + } + BaseScreen::onIdle(); +} + +void BioPrintingDialogBox::show() { + GOTO_SCREEN(BioPrintingDialogBox); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp new file mode 100644 index 000000000000..7e119a5e179a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp @@ -0,0 +1,349 @@ +/************************* + * bio_status_screen.cpp * + *************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +#include "../ftdi_eve_lib/extras/poly_ui.h" +#include "bio_printer_ui.h" + +#define E_TRAVEL_LIMIT 60 + +#define GRID_COLS 2 +#define GRID_ROWS 9 + +#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) + +#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) + #include "../../../../sd/cardreader.h" +#endif + +const uint8_t shadow_depth = 5; + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +float StatusScreen::increment; +bool StatusScreen::jog_xy; +bool StatusScreen::fine_motion; + +void StatusScreen::unlockMotors() { + injectCommands_P(PSTR("M84 XY")); + jog_xy = false; +} + +void StatusScreen::draw_temperature(draw_mode_t what) { + CommandProcessor cmd; + PolyUI ui(cmd, what); + + int16_t x, y, h, v; + + cmd.tag(15); + + if (what & BACKGROUND) { + cmd.cmd(COLOR_RGB(bg_color)); + + // Draw touch surfaces + ui.bounds(POLY(target_temp), x, y, h, v); + cmd.rectangle(x, y, h, v); + ui.bounds(POLY(actual_temp), x, y, h, v); + cmd.rectangle(x, y, h, v); + ui.bounds(POLY(bed_icon), x, y, h, v); + cmd.rectangle(x, y, h, v); + + // Draw bed icon + cmd.cmd(BITMAP_SOURCE(Bed_Heat_Icon_Info)) + .cmd(BITMAP_LAYOUT(Bed_Heat_Icon_Info)) + .cmd(BITMAP_SIZE (Bed_Heat_Icon_Info)) + .cmd(COLOR_RGB(shadow_rgb)) + .icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2) + .cmd(COLOR_RGB(bg_text_enabled)) + .icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2); + } + + if (what & FOREGROUND) { + char bed_str[15]; + + cmd.font(font_xlarge) + .cmd(COLOR_RGB(bg_text_enabled)); + + if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) { + sprintf_P(bed_str, PSTR("%-3d C"), ROUND(getTargetTemp_celsius(BED))); + ui.bounds(POLY(target_temp), x, y, h, v); + cmd.text(x, y, h, v, bed_str); + } + + sprintf_P(bed_str, PSTR("%-3d C"), ROUND(getActualTemp_celsius(BED))); + ui.bounds(POLY(actual_temp), x, y, h, v); + cmd.text(x, y, h, v, bed_str); + } +} + +void StatusScreen::draw_syringe(draw_mode_t what) { + int16_t x, y, h, v; + const float fill_level = 1.0 - min(1.0, max(0.0, getAxisPosition_mm(E0) / E_TRAVEL_LIMIT)); + const bool e_homed = isAxisPositionKnown(E0); + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + if (what & BACKGROUND) { + // Paint the shadow for the syringe + ui.color(shadow_rgb); + ui.shadow(POLY(syringe_outline), shadow_depth); + } + + if (what & FOREGROUND && e_homed) { + // Paint the syringe icon + ui.color(syringe_rgb); + ui.fill(POLY(syringe_outline)); + + ui.color(fill_rgb); + ui.bounds(POLY(syringe_fluid), x, y, h, v); + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(SCISSOR_XY(x,y + v * (1.0 - fill_level))); + cmd.cmd(SCISSOR_SIZE(h, v * fill_level)); + ui.fill(POLY(syringe_fluid), false); + cmd.cmd(RESTORE_CONTEXT()); + + ui.color(stroke_rgb); + ui.fill(POLY(syringe)); + } +} + +void StatusScreen::draw_arrows(draw_mode_t what) { + const bool e_homed = isAxisPositionKnown(E0); + const bool z_homed = isAxisPositionKnown(Z); + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + ui.button_fill (fill_rgb); + ui.button_stroke(stroke_rgb, 28); + ui.button_shadow(shadow_rgb, shadow_depth); + + if ((what & BACKGROUND) || jog_xy) { + ui.button(1, POLY(x_neg)); + ui.button(2, POLY(x_pos)); + ui.button(3, POLY(y_neg)); + ui.button(4, POLY(y_pos)); + } + + if ((what & BACKGROUND) || z_homed) { + ui.button(5, POLY(z_neg)); + ui.button(6, POLY(z_pos)); + } + + if ((what & BACKGROUND) || e_homed) { + ui.button(7, POLY(e_neg)); + ui.button(8, POLY(e_pos)); + } +} + +void StatusScreen::draw_fine_motion(draw_mode_t what) { + int16_t x, y, h, v; + CommandProcessor cmd; + PolyUI ui(cmd, what); + + cmd.font(font_medium) + .tag(16); + + if (what & BACKGROUND) { + + ui.bounds(POLY(fine_label), x, y, h, v); + cmd.cmd(COLOR_RGB(bg_text_enabled)) + .text(x, y, h, v, F("Fine motion:")); + } + + if (what & FOREGROUND) { + ui.bounds(POLY(fine_toggle), x, y, h, v); + cmd.colors(ui_toggle) + .toggle(x, y, h, v, F("no\xFFyes"), fine_motion); + } +} + +void StatusScreen::draw_overlay_icons(draw_mode_t what) { + const bool e_homed = isAxisPositionKnown(E0); + const bool z_homed = isAxisPositionKnown(Z); + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + if (what & FOREGROUND) { + ui.button_fill (fill_rgb); + ui.button_stroke(stroke_rgb, 28); + ui.button_shadow(shadow_rgb, shadow_depth); + + if (!jog_xy) { + ui.button(12, POLY(padlock)); + } + + if (!e_homed) { + ui.button(13, POLY(home_e)); + } + + if (!z_homed) { + ui.button(14, POLY(home_z)); + } + } +} + +void StatusScreen::draw_buttons(draw_mode_t) { + const bool has_media = isMediaInserted() && !isPrintingFromMedia(); + + CommandProcessor cmd; + + cmd.font(font_medium) + .colors(normal_btn) + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) + .enabled(!Sd2Card::ready() || has_media) + #else + .enabled(has_media) + #endif + .colors(has_media ? action_btn : normal_btn) + .tag(9).button(BTN_POS(1,9), BTN_SIZE(1,1), + isPrintingFromMedia() ? + F("Printing") : + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #ifdef LULZBOT_MANUAL_USB_STARTUP + (Sd2Card::ready() ? F("USB Drive") : F("Enable USB")) + #else + F("USB Drive") + #endif + #else + F("SD Card") + #endif + ); + + cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), F("Menu")); +} + +void StatusScreen::onStartup() { + // Load the bitmaps for the status screen + constexpr uint32_t base = ftdi_memory_map::RAM_G; + CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon)); +} + +void StatusScreen::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)); + cmd.cmd(CLEAR(true,true,true)); + } + + draw_syringe(what); + draw_temperature(what); + draw_arrows(what); + draw_overlay_icons(what); + draw_buttons(what); + draw_fine_motion(what); +} + +bool StatusScreen::onTouchStart(uint8_t) { + increment = fine_motion ? 0.25 : 1; + return true; +} + +bool StatusScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + case 2: + case 3: + case 4: + case 12: + if (!jog_xy) { + jog_xy = true; + injectCommands_P(PSTR("M17")); + } + break; + case 9: + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) + if (!Sd2Card::ready()) { + StatusScreen::setStatusMessage(F("Insert USB drive...")); + Sd2Card::usbStartup(); + } else { + GOTO_SCREEN(FilesScreen); + } + #else + GOTO_SCREEN(FilesScreen); + #endif + break; + case 10: GOTO_SCREEN(MainMenu); break; + case 13: SpinnerDialogBox::enqueueAndWait_P(F("G112")); break; + case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28 Z")); break; + case 15: GOTO_SCREEN(TemperatureScreen); break; + case 16: fine_motion = !fine_motion; break; + default: return false; + } + // If a passcode is enabled, the LockScreen will prevent the + // user from proceeding. + LockScreen::check_passcode(); + return true; +} + +bool StatusScreen::onTouchHeld(uint8_t tag) { + if (tag >= 1 && tag <= 4 && !jog_xy) return false; + if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate + #define UI_INCREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis); + #define UI_DECREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis); + switch (tag) { + case 1: UI_DECREMENT_AXIS(X); break; + case 2: UI_INCREMENT_AXIS(X); break; + case 4: UI_DECREMENT_AXIS(Y); break; // NOTE: Y directions inverted because bed rather than needle moves + case 3: UI_INCREMENT_AXIS(Y); break; + case 5: UI_DECREMENT_AXIS(Z); break; + case 6: UI_INCREMENT_AXIS(Z); break; + case 7: UI_DECREMENT_AXIS(E0); break; + case 8: UI_INCREMENT_AXIS(E0); break; + default: return false; + } + #undef UI_DECREMENT_AXIS + #undef UI_INCREMENT_AXIS + if (increment < 10 && !fine_motion) + increment += 0.5; + current_screen.onRefresh(); + return false; +} + +void StatusScreen::setStatusMessage(progmem_str pstr) { + BioPrintingDialogBox::setStatusMessage(pstr); +} + +void StatusScreen::setStatusMessage(const char * const str) { + BioPrintingDialogBox::setStatusMessage(str); +} + +void StatusScreen::onIdle() { + if (isPrintingFromMedia()) + BioPrintingDialogBox::show(); + + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_tune_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_tune_menu.cpp new file mode 100644 index 000000000000..09aedbd337b1 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_tune_menu.cpp @@ -0,0 +1,87 @@ +/********************* + * bio_tune_menu.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void TuneMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .font(font_medium); + } + + #define GRID_ROWS 8 + #define GRID_COLS 2 + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.cmd(COLOR_RGB(bg_text_enabled)) + .font(font_large).text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Print Menu")) + .colors(normal_btn) + .font(font_medium) + .enabled(!isPrinting()).tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), isPrinting() ? F("Printing...") : F("Print Again")) + .enabled( isPrinting()).tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Print Speed")) + .tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Bed Temperature")) + #if ENABLED(BABYSTEPPING) + .enabled(true) + #else + .enabled(false) + #endif + .tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Nudge Nozzle")) + .enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Load Syringe")) + .enabled(!isPrinting()).tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), F("Unlock XY Axis")) + .colors(action_btn) .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back")); + } + #undef GRID_COLS + #undef GRID_ROWS +} + +bool TuneMenu::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + case 2: { + FileList files; + printFile(files.shortFilename()); + GOTO_PREVIOUS(); + break; + } + case 3: GOTO_SCREEN(FeedratePercentScreen); break; + case 4: GOTO_SCREEN(TemperatureScreen); break; + case 5: GOTO_SCREEN(NudgeNozzleScreen); break; + case 6: GOTO_SCREEN(BioConfirmHomeXYZ); break; + case 7: StatusScreen::unlockMotors(); break; + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp new file mode 100644 index 000000000000..b2f65848d140 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp @@ -0,0 +1,113 @@ +/******************* + * boot_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +#include "../ftdi_eve_lib/extras/poly_ui.h" +#include "../archim2-flash/flash_storage.h" + +#ifdef TOUCH_UI_PORTRAIT + #include "../theme/bootscreen_logo_portrait.h" +#else + #include "../theme/bootscreen_logo_landscape.h" +#endif + +using namespace FTDI; + +void BootScreen::onRedraw(draw_mode_t) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(0x000000)); + cmd.cmd(CLEAR(true,true,true)); + + CLCD::turn_on_backlight(); + SoundPlayer::set_volume(255); +} + +void BootScreen::onIdle() { + if (CLCD::is_touching()) { + // If the user is touching the screen at startup, then + // assume the user wants to re-calibrate the screen. + // This gives the user the ability to recover a + // miscalibration that has been stored to EEPROM. + + // Also reset display parameters to defaults, just + // in case the display is borked. + InterfaceSettingsScreen::failSafeSettings(); + + GOTO_SCREEN(TouchCalibrationScreen); + current_screen.forget(); + PUSH_SCREEN(StatusScreen); + } else { + if (!UIFlashStorage::is_valid()) { + SpinnerDialogBox::show(F("Please wait...")); + UIFlashStorage::format_flash(); + SpinnerDialogBox::hide(); + } + + if (UIData::animations_enabled()) { + // If there is a startup video in the flash SPI, play + // that, otherwise show a static splash screen. + if (!MediaPlayerScreen::playBootMedia()) + showSplashScreen(); + } + #ifdef LULZBOT_USE_BIOPRINTER_UI + GOTO_SCREEN(BioConfirmHomeXYZ); + current_screen.forget(); + PUSH_SCREEN(StatusScreen); + PUSH_SCREEN(BioConfirmHomeE); + #else + GOTO_SCREEN(StatusScreen); + #endif + } +} + +void BootScreen::showSplashScreen() { + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART); + cmd.cmd(CLEAR_COLOR_RGB(0xDEEA5C)); + cmd.cmd(CLEAR(true,true,true)); + + #define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) + + PolyUI ui(cmd); + + cmd.cmd(COLOR_RGB(0xC1D82F)); + ui.fill(POLY(logo_green)); + cmd.cmd(COLOR_RGB(0x000000)); + ui.fill(POLY(logo_black)); + ui.fill(POLY(logo_type)); + ui.fill(POLY(logo_mark)); + cmd.cmd(COLOR_RGB(0xFFFFFF)); + ui.fill(POLY(logo_white)); + + cmd.cmd(DL::DL_DISPLAY); + cmd.cmd(CMD_SWAP); + cmd.execute(); + + ExtUI::delay_ms(2500); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/change_filament_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/change_filament_screen.cpp new file mode 100644 index 000000000000..8945aeb43dd4 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/change_filament_screen.cpp @@ -0,0 +1,323 @@ +/****************************** + * change_filament_screen.cpp * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace ExtUI; +using namespace FTDI; +using namespace Theme; + +#define COOL_TEMP 40 +#define LOW_TEMP 180 +#define MED_TEMP 200 +#define HIGH_TEMP 220 + +/****************** COLOR SCALE ***********************/ + +uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) { + rgb_t R0, R1, mix; + + float t; + if (temp < cool) { + R0 = cool_rgb; + R1 = low_rgb; + t = 0; + } + else if (temp < low) { + R0 = cool_rgb; + R1 = low_rgb; + t = (float(temp)-cool)/(low-cool); + } + else if (temp < med) { + R0 = low_rgb; + R1 = med_rgb; + t = (float(temp)-low)/(med-low); + } + else if (temp < high) { + R0 = med_rgb; + R1 = high_rgb; + t = (float(temp)-med)/(high-med); + } + else if (temp >= high) { + R0 = med_rgb; + R1 = high_rgb; + t = 1; + } + rgb_t::lerp(t, R0, R1, mix); + return mix; +} + +void ChangeFilamentScreen::drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + CommandProcessor cmd; + cmd.cmd(SCISSOR_XY (x, y)) + .cmd(SCISSOR_SIZE (w, h/2)) + .gradient (x, y, high_rgb, x, y+h/2, med_rgb) + .cmd(SCISSOR_XY (x, y+h/2)) + .cmd(SCISSOR_SIZE (w, h/2)) + .gradient (x, y+h/2, med_rgb, x, y+h, low_rgb) + .cmd(SCISSOR_XY ()) + .cmd(SCISSOR_SIZE ()); +} + +void ChangeFilamentScreen::onEntry() { + screen_data.ChangeFilamentScreen.e_tag = ExtUI::getActiveTool() + 10; + screen_data.ChangeFilamentScreen.t_tag = 0; + screen_data.ChangeFilamentScreen.repeat_tag = 0; + screen_data.ChangeFilamentScreen.saved_extruder = getActiveTool(); +} + +void ChangeFilamentScreen::onExit() { + setActiveTool(screen_data.ChangeFilamentScreen.saved_extruder, true); +} + +void ChangeFilamentScreen::onRedraw(draw_mode_t what) { + CommandProcessor cmd; + + #ifdef TOUCH_UI_PORTRAIT + #define GRID_COLS 2 + #define GRID_ROWS 11 + #else + #define GRID_COLS 4 + #define GRID_ROWS 6 + #endif + + if (what & BACKGROUND) { + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0) + #ifdef TOUCH_UI_PORTRAIT + .font(font_large) + #else + .font(font_medium) + #endif + .text(BTN_POS(1,1), BTN_SIZE(2,1), F("Extruder Selection:")) + #ifdef TOUCH_UI_PORTRAIT + .text(BTN_POS(1,7), BTN_SIZE(1,1), F("Current Temp:")) + #else + .text(BTN_POS(3,1), BTN_SIZE(2,1), F("Current Temp:")) + .font(font_small) + #endif + .text(BTN_POS(1,3), BTN_SIZE(2,1), F("Removal Temp:")); + drawTempGradient(BTN_POS(1,4), BTN_SIZE(1,3)); + } + + if (what & FOREGROUND) { + char e_str[15]; + + const char *idle = PSTR("%-3d C / idle"); + const char *not_idle = PSTR("%-3d / %-3d C"); + + sprintf_P( + e_str, + isHeaterIdle(getExtruder()) ? idle : not_idle, + ROUND(getActualTemp_celsius(getExtruder())), + ROUND(getTargetTemp_celsius(getExtruder())) + ); + + const rgb_t tcol = getWarmColor(getActualTemp_celsius(getExtruder()), COOL_TEMP, LOW_TEMP, MED_TEMP, HIGH_TEMP); + cmd.cmd(COLOR_RGB(tcol)) + .tag(15) + #ifdef TOUCH_UI_PORTRAIT + .rectangle(BTN_POS(2,7), BTN_SIZE(1,1)) + #else + .rectangle(BTN_POS(3,2), BTN_SIZE(2,1)) + #endif + .cmd(COLOR_RGB(tcol.luminance() > 128 ? 0x000000 : 0xFFFFFF)) + .font(font_medium) + #ifdef TOUCH_UI_PORTRAIT + .text(BTN_POS(2,7), BTN_SIZE(1,1), e_str) + #else + .text(BTN_POS(3,2), BTN_SIZE(2,1), e_str) + #endif + .colors(normal_btn); + + const bool t_ok = getActualTemp_celsius(getExtruder()) > getSoftenTemp() - 10; + + if (screen_data.ChangeFilamentScreen.t_tag && !t_ok) { + cmd.text(BTN_POS(1,6), BTN_SIZE(1,1), F("Heating...")); + } else if (getActualTemp_celsius(getExtruder()) > 100) { + cmd.cmd(COLOR_RGB(0xFF0000)) + .text(BTN_POS(1,4), BTN_SIZE(1,1), F("Caution:")) + .colors(normal_btn) + .text(BTN_POS(1,6), BTN_SIZE(1,1), F("Hot!")); + } + + #define TOG_STYLE(A) colors(A ? action_btn : normal_btn) + + const bool tog2 = screen_data.ChangeFilamentScreen.t_tag == 2; + const bool tog3 = screen_data.ChangeFilamentScreen.t_tag == 3; + const bool tog4 = screen_data.ChangeFilamentScreen.t_tag == 4; + const bool tog10 = screen_data.ChangeFilamentScreen.e_tag == 10; + #if HOTENDS > 1 + const bool tog11 = screen_data.ChangeFilamentScreen.e_tag == 11; + #endif + + #ifdef TOUCH_UI_PORTRAIT + cmd.font(font_large) + #else + cmd.font(font_medium) + #endif + .TOG_STYLE(tog10) + .tag(10) .button (BTN_POS(1,2), BTN_SIZE(1,1), F("1")) + #if HOTENDS < 2 + .enabled(false) + #else + .TOG_STYLE(tog11) + #endif + .tag(11) .button (BTN_POS(2,2), BTN_SIZE(1,1), F("2")); + + if (!t_ok) reset_menu_timeout(); + + const bool tog7 = screen_data.ChangeFilamentScreen.repeat_tag == 7; + const bool tog8 = screen_data.ChangeFilamentScreen.repeat_tag == 8; + + #ifdef TOUCH_UI_PORTRAIT + cmd.font(font_large) + #else + cmd.font(font_small) + #endif + .tag(2) .TOG_STYLE(tog2) .button (BTN_POS(2,6), BTN_SIZE(1,1), F( STRINGIFY(LOW_TEMP) "C (PLA)")) + .tag(3) .TOG_STYLE(tog3) .button (BTN_POS(2,5), BTN_SIZE(1,1), F( STRINGIFY(MED_TEMP) "C (ABS)")) + .tag(4) .TOG_STYLE(tog4) .button (BTN_POS(2,4), BTN_SIZE(1,1), F( STRINGIFY(HIGH_TEMP) "C (High)")) + .colors(normal_btn) + + // Add tags to color gradient + .cmd(COLOR_MASK(0,0,0,0)) + .tag(2) .rectangle(BTN_POS(1,6), BTN_SIZE(1,1)) + .tag(3) .rectangle(BTN_POS(1,5), BTN_SIZE(1,1)) + .tag(4) .rectangle(BTN_POS(1,4), BTN_SIZE(1,1)) + .cmd(COLOR_MASK(1,1,1,1)) + + .cmd(COLOR_RGB(t_ok ? bg_text_enabled : bg_text_disabled)) + #ifdef TOUCH_UI_PORTRAIT + .font(font_large) + .tag(0) .text (BTN_POS(1,8), BTN_SIZE(1,1), F("Unload")) + .text (BTN_POS(2,8), BTN_SIZE(1,1), F("Load/Extrude")) + .tag(5) .enabled(t_ok).button (BTN_POS(1,9), BTN_SIZE(1,1), F("Momentary")) + .tag(6) .enabled(t_ok).button (BTN_POS(2,9), BTN_SIZE(1,1), F("Momentary")) + .tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(1,10), BTN_SIZE(1,1), F("Continuous")) + .tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(2,10), BTN_SIZE(1,1), F("Continuous")) + .tag(1).colors(action_btn) .button (BTN_POS(1,11), BTN_SIZE(2,1), F("Back")); + #else + .font(font_small) + .tag(0) .text (BTN_POS(3,3), BTN_SIZE(1,1), F("Unload")) + .text (BTN_POS(4,3), BTN_SIZE(1,1), F("Load/Extrude")) + .tag(5) .enabled(t_ok).button (BTN_POS(3,4), BTN_SIZE(1,1), F("Momentary")) + .tag(6) .enabled(t_ok).button (BTN_POS(4,4), BTN_SIZE(1,1), F("Momentary")) + .tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(3,5), BTN_SIZE(1,1), F("Continuous")) + .tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(4,5), BTN_SIZE(1,1), F("Continuous")) + .font(font_medium) + .tag(1).colors(action_btn) .button (BTN_POS(3,6), BTN_SIZE(2,1), F("Back")); + #endif + } + #undef GRID_COLS + #undef GRID_ROWS +} + +uint8_t ChangeFilamentScreen::getSoftenTemp() { + switch (screen_data.ChangeFilamentScreen.t_tag) { + case 2: return LOW_TEMP; + case 3: return MED_TEMP; + case 4: return HIGH_TEMP; + default: return EXTRUDE_MINTEMP; + } +} + +ExtUI::extruder_t ChangeFilamentScreen::getExtruder() { + switch (screen_data.ChangeFilamentScreen.e_tag) { + case 13: return ExtUI::E3; + case 12: return ExtUI::E2; + case 11: return ExtUI::E1; + default: return ExtUI::E0; + } +} + +bool ChangeFilamentScreen::onTouchStart(uint8_t tag) { + // Make the Momentary and Continuous buttons slightly more responsive + switch (tag) { + case 5: case 6: case 7: case 8: + return ChangeFilamentScreen::onTouchHeld(tag); + default: + return false; + } +} + +bool ChangeFilamentScreen::onTouchEnd(uint8_t tag) { + using namespace ExtUI; + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + case 2: + case 3: + case 4: + // Change temperature + screen_data.ChangeFilamentScreen.t_tag = tag; + setTargetTemp_celsius(getSoftenTemp(), getExtruder()); + break; + case 7: + screen_data.ChangeFilamentScreen.repeat_tag = (screen_data.ChangeFilamentScreen.repeat_tag == 7) ? 0 : 7; + break; + case 8: + screen_data.ChangeFilamentScreen.repeat_tag = (screen_data.ChangeFilamentScreen.repeat_tag == 8) ? 0 : 8; + break; + case 10: + case 11: + // Change extruder + screen_data.ChangeFilamentScreen.e_tag = tag; + screen_data.ChangeFilamentScreen.t_tag = 0; + screen_data.ChangeFilamentScreen.repeat_tag = 0; + setActiveTool(getExtruder(), true); + break; + case 15: GOTO_SCREEN(TemperatureScreen); break; + } + return true; +} + +bool ChangeFilamentScreen::onTouchHeld(uint8_t tag) { + if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate + constexpr float increment = 1; + #define UI_INCREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis); + #define UI_DECREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis); + switch (tag) { + case 5: case 7: UI_DECREMENT_AXIS(getExtruder()); break; + case 6: case 8: UI_INCREMENT_AXIS(getExtruder()); break; + default: return false; + } + #undef UI_DECREMENT_AXIS + #undef UI_INCREMENT_AXIS + return false; +} + +void ChangeFilamentScreen::onIdle() { + if (screen_data.ChangeFilamentScreen.repeat_tag) onTouchHeld(screen_data.ChangeFilamentScreen.repeat_tag); + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + } + BaseScreen::onIdle(); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_abort_print_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_abort_print_dialog_box.cpp new file mode 100644 index 000000000000..77d4fcfaca21 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_abort_print_dialog_box.cpp @@ -0,0 +1,47 @@ +/************************************** + * confirm_abort_print_dialog_box.cpp * + **************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace ExtUI; + +void ConfirmAbortPrintDialogBox::onRedraw(draw_mode_t) { + drawMessage(F("Are you sure you want to cancel the print?")); + drawYesNoButtons(); +} + +bool ConfirmAbortPrintDialogBox::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + GOTO_PREVIOUS(); + stopPrint(); + return true; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_auto_calibration_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_auto_calibration_dialog_box.cpp new file mode 100644 index 000000000000..f367918f50b1 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_auto_calibration_dialog_box.cpp @@ -0,0 +1,48 @@ +/******************************************* + * confirm_auto_calibration_dialog_box.cpp * + *******************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(CALIBRATION_GCODE) + +#include "screens.h" + +using namespace ExtUI; +using namespace Theme; + +void ConfirmAutoCalibrationDialogBox::onRedraw(draw_mode_t) { + drawMessage(F("For best results, unload the filament and clean the hotend prior to starting calibration. Continue?")); + drawYesNoButtons(); +} + +bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + GOTO_SCREEN(StatusScreen); + injectCommands_P(PSTR(LULZBOT_CALIBRATION_COMMANDS)); + return true; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_erase_flash_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_erase_flash_dialog_box.cpp new file mode 100644 index 000000000000..2da592fe3fc0 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_erase_flash_dialog_box.cpp @@ -0,0 +1,54 @@ +/************************************** + * confirm_erase_flash_dialog_box.cpp * + **************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) + +#include "screens.h" + +#include "../archim2-flash/flash_storage.h" + +using namespace FTDI; + +void ConfirmEraseFlashDialogBox::onRedraw(draw_mode_t) { + drawMessage(F("Are you sure? SPI flash will be erased.")); + drawYesNoButtons(); +} + +bool ConfirmEraseFlashDialogBox::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + SpinnerDialogBox::show(F("Erasing...")); + UIFlashStorage::format_flash(); + SpinnerDialogBox::hide(); + AlertDialogBox::show(F("SPI flash erased")); + // Remove ConfirmEraseFlashDialogBox from the stack + // so the alert box doesn't return to me. + current_screen.forget(); + return true; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_user_request_alert_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_user_request_alert_box.cpp new file mode 100644 index 000000000000..82f92de21c0c --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_user_request_alert_box.cpp @@ -0,0 +1,58 @@ +/************************************** + * confirm_user_request_alert_box.cpp * + **************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; + +void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) { + AlertDialogBox::onRedraw(mode); // Required for the GOTO_SCREEN function to work +} + +bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + ExtUI::setUserConfirmed(); + GOTO_PREVIOUS(); + return true; + case 2: GOTO_PREVIOUS(); return true; + default: return false; + } +} + +void ConfirmUserRequestAlertBox::show(const char* msg) { + drawMessage(msg); + storeBackground(); + screen_data.AlertDialogBox.isError = false; + GOTO_SCREEN(ConfirmUserRequestAlertBox); +} + +void ConfirmUserRequestAlertBox::hide() { + if (AT_SCREEN(ConfirmUserRequestAlertBox)) + GOTO_PREVIOUS(); +} +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/default_acceleration_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/default_acceleration_screen.cpp new file mode 100644 index 000000000000..1e1cb8457a0a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/default_acceleration_screen.cpp @@ -0,0 +1,63 @@ +/*********************************** + * default_acceleration_screen.cpp * + ***********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void DefaultAccelerationScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0); + w.units(PSTR("mm/s^2")); + w.heading( PSTR("Default Acceleration")); + w.color(other); + w.adjuster( 2, PSTR("Printing:"), getPrintingAcceleration_mm_s2() ); + w.adjuster( 4, PSTR("Travel:"), getTravelAcceleration_mm_s2() ); + w.adjuster( 6, PSTR("Retraction:"), getRetractAcceleration_mm_s2() ); + w.increments(); + w.button( 8, PSTR("Set Axis Maximum")); +} + +bool DefaultAccelerationScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(PrintingAcceleration_mm_s2); break; + case 3: UI_INCREMENT(PrintingAcceleration_mm_s2); break; + case 4: UI_DECREMENT(TravelAcceleration_mm_s2); break; + case 5: UI_INCREMENT(TravelAcceleration_mm_s2); break; + case 6: UI_DECREMENT(RetractAcceleration_mm_s2); break; + case 7: UI_INCREMENT(RetractAcceleration_mm_s2); break; + case 8: GOTO_SCREEN(MaxAccelerationScreen); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/developer_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/developer_menu.cpp new file mode 100644 index 000000000000..9bec9bf55f5c --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/developer_menu.cpp @@ -0,0 +1,150 @@ +/********************** + * developer_menu.cpp * + **********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) + +#include "screens.h" + +#include "../archim2-flash/flash_storage.h" + +using namespace FTDI; +using namespace Theme; + +void DeveloperMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .font(font_medium) + .tag(0); + + #ifdef SPI_FLASH_SS + constexpr bool has_flash = true; + #else + constexpr bool has_flash = false; + #endif + + #if ENABLED(SDSUPPORT) + constexpr bool has_media = true; + #else + constexpr bool has_media = false; + #endif + + cmd.cmd(COLOR_RGB(bg_text_enabled)); + #ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 10 + #define GRID_COLS 1 + cmd.font(font_large) .text ( BTN_POS(1,1), BTN_SIZE(1,1), F("Developer Menu")) + .colors(normal_btn) + .tag(2).font(font_medium) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Show All Widgets")) + .tag(3) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Stress Test")) + .tag(4) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Show Touch Registers")) + .tag(5) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Play Song")) + .tag(6).enabled(has_media).button( BTN_POS(1,6), BTN_SIZE(1,1), F("Play Video from Media")) + .tag(7).enabled(has_flash).button( BTN_POS(1,7), BTN_SIZE(1,1), F("Play Video from SPI Flash")) + .tag(8).enabled(has_flash).button( BTN_POS(1,8), BTN_SIZE(1,1), F("Load Video to SPI Flash")) + .tag(9).enabled(has_flash).button( BTN_POS(1,9), BTN_SIZE(1,1), F("Erase SPI Flash")) + + .tag(1).colors(action_btn) + .button( BTN_POS(1,10), BTN_SIZE(1,1), F("Back")); + #else + #define GRID_ROWS 6 + #define GRID_COLS 2 + cmd.font(font_medium) .text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Developer Menu")) + .colors(normal_btn) + .tag(2).font(font_small) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Show All Widgets")) + .tag(3) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Show Touch Registers")) + .tag(9) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Show Pin States")) + .tag(4) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Play Song")) + .tag(5).enabled(has_media).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Play Video from Media")) + .tag(6).enabled(has_flash).button( BTN_POS(2,3), BTN_SIZE(1,1), F("Play Video from SPI Flash")) + .tag(7).enabled(has_flash).button( BTN_POS(2,4), BTN_SIZE(1,1), F("Load Video to SPI Flash")) + .tag(8).enabled(has_flash).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Erase SPI Flash")) + .tag(1).colors(action_btn) + .button( BTN_POS(1,6), BTN_SIZE(2,1), F("Back")); + #endif + } +} + +bool DeveloperMenu::onTouchEnd(uint8_t tag) { + using namespace Theme; + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + case 2: GOTO_SCREEN(WidgetsScreen); break; + case 3: + PUSH_SCREEN(StressTestScreen); + AlertDialogBox::show(F("Please do not run this test unattended as it may cause your printer to malfunction.")); + current_screen.forget(); + break; + case 4: GOTO_SCREEN(TouchRegistersScreen); break; + case 5: sound.play(js_bach_joy, PLAY_ASYNCHRONOUS); break; + #if ENABLED(SDSUPPORT) + case 6: + if (!MediaPlayerScreen::playCardMedia()) + AlertDialogBox::showError(F("Cannot open STARTUP.AVI")); + break; + #endif + #ifdef SPI_FLASH_SS + case 7: + if (!MediaPlayerScreen::playBootMedia()) + AlertDialogBox::showError(F("No boot media available")); + break; + case 8: + { + SpinnerDialogBox::show(F("Saving...")); + UIFlashStorage::error_t res = UIFlashStorage::write_media_file(F("STARTUP.AVI")); + SpinnerDialogBox::hide(); + reset_menu_timeout(); + switch (res) { + case UIFlashStorage::SUCCESS: + AlertDialogBox::show(F("File copied!")); + break; + + case UIFlashStorage::READ_ERROR: + AlertDialogBox::showError(F("Failed to read file")); + break; + + case UIFlashStorage::VERIFY_ERROR: + AlertDialogBox::showError(F("Failed to verify file")); + break; + + case UIFlashStorage::FILE_NOT_FOUND: + AlertDialogBox::showError(F("Cannot open STARTUP.AVI")); + break; + + case UIFlashStorage::WOULD_OVERWRITE: + AlertDialogBox::showError(F("Cannot overwrite existing media.")); + break; + } + break; + } + case 9: GOTO_SCREEN(ConfirmEraseFlashDialogBox); break; + #endif + case 10: GOTO_SCREEN(EndstopStatesScreen); break; + default: return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/dialog_box_base_class.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/dialog_box_base_class.cpp new file mode 100644 index 000000000000..6178a71e940d --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/dialog_box_base_class.cpp @@ -0,0 +1,83 @@ +/***************************** + * dialog_box_base_class.cpp * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +#define GRID_COLS 2 +#define GRID_ROWS 8 + +template +void DialogBoxBaseClass::drawMessage(const T message, int16_t font) { + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), message, OPT_CENTER, font ? font : font_large); + cmd.colors(normal_btn); +} + +template void DialogBoxBaseClass::drawMessage(const char *, int16_t font); +template void DialogBoxBaseClass::drawMessage(const progmem_str, int16_t font); + +void DialogBoxBaseClass::drawYesNoButtons(uint8_t default_btn) { + CommandProcessor cmd; + cmd.font(font_medium) + .colors(default_btn == 1 ? action_btn : normal_btn).tag(1).button( BTN_POS(1,8), BTN_SIZE(1,1), F("Yes")) + .colors(default_btn == 2 ? action_btn : normal_btn).tag(2).button( BTN_POS(2,8), BTN_SIZE(1,1), F("No")); +} + +void DialogBoxBaseClass::drawOkayButton() { + CommandProcessor cmd; + cmd.font(font_medium) + .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Okay")); +} + +void DialogBoxBaseClass::drawButton(const progmem_str label) { + CommandProcessor cmd; + cmd.font(font_medium) + .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), label); +} + +void DialogBoxBaseClass::drawSpinner() { + CommandProcessor cmd; + cmd.cmd(COLOR_RGB(bg_text_enabled)) + .spinner(BTN_POS(1,4), BTN_SIZE(2,3)).execute(); +} + +bool DialogBoxBaseClass::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + case 2: GOTO_PREVIOUS(); return true; + default: return false; + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/display_tuning_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/display_tuning_screen.cpp new file mode 100644 index 000000000000..7af436a5c7a8 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/display_tuning_screen.cpp @@ -0,0 +1,61 @@ +/***************************** + * display_tuning_screen.cpp * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void DisplayTuningScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0, BaseNumericAdjustmentScreen::DEFAULT_LOWEST); + w.units(PSTR("")); + w.heading( PSTR("Display Tuning")); + w.color(other); + w.adjuster( 2, PSTR("H Offset:"), CLCD::mem_read_16(CLCD::REG::HOFFSET) ); + w.adjuster( 4, PSTR("V Offset:"), CLCD::mem_read_16(CLCD::REG::VOFFSET) ); + w.increments(); + w.heading( PSTR("Touch Screen")); + w.button(6, PSTR("Calibrate")); +} + +bool DisplayTuningScreen::onTouchHeld(uint8_t tag) { + #define REG_INCREMENT(a,i) CLCD::mem_write_16(CLCD::REG::a, CLCD::mem_read_16(CLCD::REG::a) + i) + const float increment = getIncrement(); + switch (tag) { + case 2: REG_INCREMENT(HOFFSET, -increment); break; + case 3: REG_INCREMENT(HOFFSET, increment); break; + case 4: REG_INCREMENT(VOFFSET, -increment); break; + case 5: REG_INCREMENT(VOFFSET, increment); break; + case 6: GOTO_SCREEN(TouchCalibrationScreen); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp new file mode 100644 index 000000000000..f1e13d3a9a6c --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp @@ -0,0 +1,149 @@ +/**************************** + * endstop_state_screen.cpp * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void EndstopStatesScreen::onEntry() { + BaseScreen::onEntry(); +} + +void EndstopStatesScreen::onExit() { + BaseScreen::onExit(); +} + +void EndstopStatesScreen::onRedraw(draw_mode_t) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(COLOR_RGB(bg_text_enabled)) + .cmd(CLEAR(true,true,true)) + .tag(0); + + #define GRID_ROWS 7 + #define GRID_COLS 6 + + #define PIN_BTN(X,Y,PIN,LABEL) button(BTN_POS(X,Y), BTN_SIZE(2,1), F(LABEL)) + #define PIN_ENABLED(LABEL,PIN,INV,X,Y) cmd.enabled(1).colors(READ(PIN##_PIN) != INV ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL); + #define PIN_DISABLED(LABEL,PIN,INV,X,Y) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL); + + #ifdef TOUCH_UI_PORTRAIT + cmd.font(font_large) + #else + cmd.font(font_medium) + #endif + .text(BTN_POS(1,1), BTN_SIZE(6,1), F("Endstop States:")) + .font(font_tiny); + #if PIN_EXISTS(X_MAX) + PIN_ENABLED ("X Max", X_MAX,X_MAX_ENDSTOP_INVERTING,1,2) + #else + PIN_DISABLED("X Max",X_MAX,X_MAX_ENDSTOP_INVERTING,1,2) + #endif + #if PIN_EXISTS(Y_MAX) + PIN_ENABLED ("Y Max",Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2) + #else + PIN_DISABLED("Y Max",Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2) + #endif + #if PIN_EXISTS(Z_MAX) + PIN_ENABLED ("Z Max",Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2) + #else + PIN_DISABLED("Z Max",Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2) + #endif + #if PIN_EXISTS(X_MIN) + PIN_ENABLED ("X Min",X_MIN,X_MIN_ENDSTOP_INVERTING,1,3) + #else + PIN_DISABLED("X Min",X_MIN,X_MIN_ENDSTOP_INVERTING,1,3) + #endif + #if PIN_EXISTS(Y_MIN) + PIN_ENABLED ("Y Min",Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3) + #else + PIN_DISABLED("Y Min",Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3) + #endif + #if PIN_EXISTS(Z_MIN) + PIN_ENABLED ("Z Min",Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3) + #else + PIN_DISABLED("Z Min",Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3) + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT) + PIN_ENABLED ("Runout 1",FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4) + #else + PIN_DISABLED("Runout 1",FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4) + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2) + PIN_ENABLED ("Runout 2",FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4) + #else + PIN_DISABLED("Runout 2",FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4) + #endif + #if PIN_EXISTS(Z_MIN_PROBE) + PIN_ENABLED ("Z Probe",Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4) + #else + PIN_DISABLED("Z Probe",Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4) + #endif + + #if HAS_SOFTWARE_ENDSTOPS + #undef EDGE_R + #define EDGE_R 30 + cmd.font(font_small) + .text (BTN_POS(1,5), BTN_SIZE(3,1), F("Soft Limits:"), OPT_RIGHTX | OPT_CENTERY) + .colors(ui_toggle) + .tag(2).toggle(BTN_POS(4,5), BTN_SIZE(3,1), F("off\xFFon"), getSoftEndstopState()); + #undef EDGE_R + #define EDGE_R 0 + #endif + + cmd.font(font_medium) + .colors(action_btn) + .tag(1).button( BTN_POS(1,7), BTN_SIZE(6,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS +} + +bool EndstopStatesScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + #if HAS_SOFTWARE_ENDSTOPS + case 2: setSoftEndstopState(!getSoftEndstopState()); + #endif + default: + return false; + } + return true; +} + +void EndstopStatesScreen::onIdle() { + constexpr uint32_t DIAGNOSTICS_UPDATE_INTERVAL = 100; + + if (refresh_timer.elapsed(DIAGNOSTICS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + reset_menu_timeout(); + } + BaseScreen::onIdle(); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/feedrate_percent_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/feedrate_percent_screen.cpp new file mode 100644 index 000000000000..e9f527ef969d --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/feedrate_percent_screen.cpp @@ -0,0 +1,52 @@ +/******************************* + * feedrate_percent_screen.cpp * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; + +void FeedratePercentScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0).units(PSTR("%")); + + w.heading(PSTR("Print Speed")); + w.adjuster(4, PSTR("Speed"), getFeedrate_percent()); + w.increments(); +} + +bool FeedratePercentScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 4: UI_DECREMENT(Feedrate_percent); break; + case 5: UI_INCREMENT(Feedrate_percent); break; + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_menu.cpp new file mode 100644 index 000000000000..55280859af20 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_menu.cpp @@ -0,0 +1,101 @@ +/********************* + * filament_menu.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void FilamentMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.font(font_large) + #ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 9 + #define GRID_COLS 2 + .text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Filament Options:")) + .font(font_medium).colors(normal_btn) + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + .enabled(1) + #else + .enabled(0) + #endif + .tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Runout Sensor")) + #if ENABLED(LIN_ADVANCE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Linear Advance")) + .colors(action_btn) + .tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS + #else + #define GRID_ROWS 6 + #define GRID_COLS 3 + .text ( BTN_POS(1,1), BTN_SIZE(3,1), F("Filament Options:")) + .font(font_medium).colors(normal_btn) + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + .enabled(1) + #else + .enabled(0) + #endif + .tag(2).button( BTN_POS(1,2), BTN_SIZE(3,1), F("Filament Runout")) + #if ENABLED(LIN_ADVANCE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(3).button( BTN_POS(1,3), BTN_SIZE(3,1), F("Linear Advance")) + .colors(action_btn) + .tag(1) .button( BTN_POS(1,6), BTN_SIZE(3,1), F("Back")); + #endif + } +} + +bool FilamentMenu::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + case 2: GOTO_SCREEN(FilamentRunoutScreen); break; + #endif + #if ENABLED(LIN_ADVANCE) + case 3: GOTO_SCREEN(LinearAdvanceScreen); break; + #endif + default: return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp new file mode 100644 index 000000000000..570f83835f41 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp @@ -0,0 +1,65 @@ +/****************************** + * filament_runout_screen.cpp * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(FILAMENT_RUNOUT_SENSOR) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void FilamentRunoutScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.heading( PSTR("Runout Detection:")); + w.toggle( 2, PSTR("Filament Sensor:"), PSTR("off\xFFon"), getFilamentRunoutEnabled()); + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + w.heading(PSTR("Detection Threshold:")); + w.units(PSTR("mm")); + w.precision(0); + w.color(e_axis); + w.adjuster( 10, PSTR("Distance:"), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled()); + w.increments(); + #endif +} + +bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) { + using namespace ExtUI; + const float increment = getIncrement(); + switch (tag) { + case 2: setFilamentRunoutEnabled(!getFilamentRunoutEnabled()); break; + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + case 10: UI_DECREMENT(FilamentRunoutDistance_mm); break; + case 11: UI_INCREMENT(FilamentRunoutDistance_mm); break; + #endif + default: + return false; + } + + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/files_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/files_screen.cpp new file mode 100644 index 000000000000..e8aaf36ff7ff --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/files_screen.cpp @@ -0,0 +1,264 @@ +/******************** + * files_screen.cpp * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void FilesScreen::onEntry() { + screen_data.FilesScreen.cur_page = 0; + screen_data.FilesScreen.selected_tag = 0xFF; + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP); + #endif + gotoPage(0); + BaseScreen::onEntry(); +} + +const char *FilesScreen::getSelectedShortFilename() { + FileList files; + files.seek(getFileForTag(screen_data.FilesScreen.selected_tag), true); + return files.shortFilename(); +} + +const char *FilesScreen::getSelectedLongFilename() { + FileList files; + files.seek(getFileForTag(screen_data.FilesScreen.selected_tag), true); + return files.longFilename(); +} + +void FilesScreen::drawSelectedFile() { + FileList files; + files.seek(getFileForTag(screen_data.FilesScreen.selected_tag), true); + screen_data.FilesScreen.flags.is_dir = files.isDir(); + drawFileButton( + files.filename(), + screen_data.FilesScreen.selected_tag, + screen_data.FilesScreen.flags.is_dir, + true + ); +} + +uint16_t FilesScreen::getFileForTag(uint8_t tag) { + return screen_data.FilesScreen.cur_page * files_per_page + tag - 2; +} + +#ifdef TOUCH_UI_PORTRAIT + #define GRID_COLS 6 + #define GRID_ROWS (files_per_page + header_h + footer_h) +#else + #define GRID_COLS 6 + #define GRID_ROWS (files_per_page + header_h + footer_h) +#endif + +void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted) { + const uint8_t line = getLineForTag(tag)+1; + CommandProcessor cmd; + cmd.tag(tag); + cmd.cmd(COLOR_RGB(is_highlighted ? fg_action : bg_color)); + cmd.font(font_medium) + .rectangle( 0, BTN_Y(header_h+line), display_width, BTN_H(1)); + cmd.cmd(COLOR_RGB(is_highlighted ? normal_btn.rgb : bg_text_enabled)); + #if ENABLED(SCROLL_LONG_FILENAMES) + if (is_highlighted) { + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(MACRO(0)); + } + #endif + cmd.text (BTN_POS(1,header_h+line), BTN_SIZE(6,1), filename, OPT_CENTERY); + if (is_dir) { + cmd.text(BTN_POS(1,header_h+line), BTN_SIZE(6,1), F("> "), OPT_CENTERY | OPT_RIGHTX); + } + #if ENABLED(SCROLL_LONG_FILENAMES) + if (is_highlighted) { + cmd.cmd(RESTORE_CONTEXT()); + } + #endif +} + +void FilesScreen::drawFileList() { + FileList files; + screen_data.FilesScreen.num_page = max(1,(ceil)(float(files.count()) / files_per_page)); + screen_data.FilesScreen.cur_page = min(screen_data.FilesScreen.cur_page, screen_data.FilesScreen.num_page-1); + screen_data.FilesScreen.flags.is_root = files.isAtRootDir(); + + #undef MARGIN_T + #undef MARGIN_B + #define MARGIN_T 0 + #define MARGIN_B 0 + uint16_t fileIndex = screen_data.FilesScreen.cur_page * files_per_page; + for(uint8_t i = 0; i < files_per_page; i++, fileIndex++) { + if (files.seek(fileIndex)) { + drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false); + } else { + break; + } + } +} + +void FilesScreen::drawHeader() { + const bool prev_enabled = screen_data.FilesScreen.cur_page > 0; + const bool next_enabled = screen_data.FilesScreen.cur_page < (screen_data.FilesScreen.num_page - 1); + + #undef MARGIN_T + #undef MARGIN_B + #define MARGIN_T 0 + #define MARGIN_B 2 + + char str[16]; + sprintf_P(str, PSTR("Page %d of %d"), + screen_data.FilesScreen.cur_page + 1, screen_data.FilesScreen.num_page); + + + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_small) + .tag(0).button( BTN_POS(2,1), BTN_SIZE(4,header_h), str, OPT_CENTER | OPT_FLAT) + .font(font_medium) + .colors(action_btn) + .tag(241).enabled(prev_enabled).button( BTN_POS(1,1), BTN_SIZE(1,header_h), F("<")) + .tag(242).enabled(next_enabled).button( BTN_POS(6,1), BTN_SIZE(1,header_h), F(">")); +} + +void FilesScreen::drawFooter() { + #undef MARGIN_T + #undef MARGIN_B + #ifdef TOUCH_UI_PORTRAIT + #define MARGIN_T 15 + #define MARGIN_B 5 + #else + #define MARGIN_T 5 + #define MARGIN_B 5 + #endif + const bool has_selection = screen_data.FilesScreen.selected_tag != 0xFF; + const uint8_t back_tag = screen_data.FilesScreen.flags.is_root ? 240 : 245; + const uint8_t y = GRID_ROWS - footer_h + 1; + const uint8_t h = footer_h; + + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_medium) + .colors(has_selection ? normal_btn : action_btn) + .tag(back_tag).button( BTN_POS(4,y), BTN_SIZE(3,h), F("Back")) + .enabled(has_selection) + .colors(has_selection ? action_btn : normal_btn); + if (screen_data.FilesScreen.flags.is_dir) { + cmd.tag(244).button( BTN_POS(1, y), BTN_SIZE(3,h), F("Open")); + } else { + cmd.tag(243).button( BTN_POS(1, y), BTN_SIZE(3,h), F("Print")); + } +} + +void FilesScreen::onRedraw(draw_mode_t what) { + if (what & FOREGROUND) { + drawHeader(); + drawSelectedFile(); + drawFooter(); + } +} + +void FilesScreen::gotoPage(uint8_t page) { + screen_data.FilesScreen.selected_tag = 0xFF; + screen_data.FilesScreen.cur_page = page; + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .colors(normal_btn); + drawFileList(); + storeBackground(); +} + +bool FilesScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 240: GOTO_PREVIOUS(); return true; + case 241: + if (screen_data.FilesScreen.cur_page > 0) { + gotoPage(screen_data.FilesScreen.cur_page-1); + } + break; + case 242: + if (screen_data.FilesScreen.cur_page < (screen_data.FilesScreen.num_page-1)) { + gotoPage(screen_data.FilesScreen.cur_page+1); + } + break; + case 243: + printFile(getSelectedShortFilename()); + StatusScreen::setStatusMessage(F("Print Starting")); + GOTO_SCREEN(StatusScreen); + return true; + case 244: + { + FileList files; + files.changeDir(getSelectedShortFilename()); + gotoPage(0); + } + break; + case 245: + { + FileList files; + files.upDir(); + gotoPage(0); + } + break; + default: + if (tag < 240) { + screen_data.FilesScreen.selected_tag = tag; + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + if (FTDI::ftdi_chip >= 810) { + const char *longFilename = getSelectedLongFilename(); + if (longFilename[0]) { + CLCD::FontMetrics fm(font_medium); + uint16_t text_width = fm.get_text_width(longFilename); + screen_data.FilesScreen.scroll_pos = 0; + if (text_width > display_width) + screen_data.FilesScreen.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R; + else + screen_data.FilesScreen.scroll_max = 0; + } + } + #endif + } + break; + } + return true; +} + +void FilesScreen::onIdle() { + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + if (FTDI::ftdi_chip >= 810) { + CLCD::mem_write_32(CLCD::REG::MACRO_0, + VERTEX_TRANSLATE_X(-int32_t(screen_data.FilesScreen.scroll_pos))); + if (screen_data.FilesScreen.scroll_pos < screen_data.FilesScreen.scroll_max * 16) + screen_data.FilesScreen.scroll_pos++; + } + #endif +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_settings_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_settings_screen.cpp new file mode 100644 index 000000000000..265d0e103aa1 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_settings_screen.cpp @@ -0,0 +1,285 @@ +/********************************* + * interface_settings_screen.cpp * + *********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +#include "../archim2-flash/flash_storage.h" + +#include "../../../../../module/configuration_store.h" + +#if ENABLED(LULZBOT_PRINTCOUNTER) + #include "../../../../../module/printcounter.h" +#endif + +bool restoreEEPROM(); + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +constexpr bool PERSISTENT_STORE_SUCCESS = false; // persistentStore uses true for error + +void InterfaceSettingsScreen::onStartup() { +} + +void InterfaceSettingsScreen::onEntry() { + screen_data.InterfaceSettingsScreen.brightness = CLCD::get_brightness(); + screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume(); + BaseScreen::onEntry(); +} + +void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { + CommandProcessor cmd; + + if (what & BACKGROUND) { + + #define GRID_COLS 4 + #ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 7 + #else + #define GRID_ROWS 6 + #endif + + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0) + .font(font_medium) + .text(BTN_POS(1,1), BTN_SIZE(4,1), F("Interface Settings")) + #undef EDGE_R + #define EDGE_R 30 + .font(font_small) + .tag(0) + .text(BTN_POS(1,2), BTN_SIZE(2,1), F("LCD brightness:"), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,3), BTN_SIZE(2,1), F("Sound volume:"), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,4), BTN_SIZE(2,1), F("Screen lock:"), OPT_RIGHTX | OPT_CENTERY); + cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), F("Boot screen:"), OPT_RIGHTX | OPT_CENTERY); + #undef EDGE_R + } + + if (what & FOREGROUND) { + #ifdef TOUCH_UI_PORTRAIT + constexpr uint8_t w = 2; + #else + constexpr uint8_t w = 1; + #endif + + cmd.font(font_medium) + #define EDGE_R 30 + .colors(ui_slider) + .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.brightness, 128) + .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF) + .colors(ui_toggle) + .tag(4).toggle(BTN_POS(3,4), BTN_SIZE(w,1), F("off\xFFon"), LockScreen::is_enabled()) + .tag(5).toggle(BTN_POS(3,5), BTN_SIZE(w,1), F("off\xFFon"), UIData::animations_enabled()) + #undef EDGE_R + #define EDGE_R 0 + #ifdef TOUCH_UI_PORTRAIT + .colors(normal_btn) + .tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), F("Customize Sounds")) + .colors(action_btn) + .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), F("Back")); + #else + .tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), F("Customize Sounds")) + .colors(action_btn) + .tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), F("Back")); + #endif + } +} + +bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + case 4: + if (!LockScreen::is_enabled()) + LockScreen::enable(); + else + LockScreen::disable(); + break; + case 5: UIData::enable_animations(!UIData::animations_enabled());; break; + case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +bool InterfaceSettingsScreen::onTouchStart(uint8_t tag) { + #undef EDGE_R + #define EDGE_R 30 + CommandProcessor cmd; + switch (tag) { + case 2: cmd.track_linear(BTN_POS(3,3), BTN_SIZE(2,1), 2).execute(); break; + case 3: cmd.track_linear(BTN_POS(3,4), BTN_SIZE(2,1), 3).execute(); break; + default: break; + } + #undef EDGE_R + #define EDGE_R 0 + #undef GRID_COLS + #undef GRID_ROWS + return true; +} + +void InterfaceSettingsScreen::onIdle() { + if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) { + refresh_timer.start(); + + uint16_t value; + CommandProcessor cmd; + switch (cmd.track_tag(value)) { + case 2: + screen_data.InterfaceSettingsScreen.brightness = float(value) * 128 / 0xFFFF; + CLCD::set_brightness(screen_data.InterfaceSettingsScreen.brightness); + SaveSettingsDialogBox::settingsChanged(); + break; + case 3: + screen_data.InterfaceSettingsScreen.volume = value >> 8; + SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume); + SaveSettingsDialogBox::settingsChanged(); + break; + default: + return; + } + onRefresh(); + } + BaseScreen::onIdle(); +} + +void InterfaceSettingsScreen::failSafeSettings() { + // Reset settings that may make the printer interface + // unusable. + CLCD::mem_write_32(CLCD::REG::ROTATE, 0); + CLCD::default_touch_transform(); + CLCD::default_display_orientation(); + CLCD::set_brightness(255); + UIData::reset_persistent_data(); + CLCD::mem_write_16(CLCD::REG::HOFFSET, FTDI::Hoffset); + CLCD::mem_write_16(CLCD::REG::VOFFSET, FTDI::Voffset); +} + +void InterfaceSettingsScreen::defaultSettings() { + LockScreen::passcode = 0; + SoundPlayer::set_volume(255); + CLCD::set_brightness(255); + UIData::reset_persistent_data(); + InterfaceSoundsScreen::defaultSettings(); + CLCD::mem_write_16(CLCD::REG::HOFFSET, FTDI::Hoffset); + CLCD::mem_write_16(CLCD::REG::VOFFSET, FTDI::Voffset); +} + +void InterfaceSettingsScreen::saveSettings(char *buff) { + static_assert( + ExtUI::eeprom_data_size >= sizeof(persistent_data_t), + "Insufficient space in EEPROM for UI parameters" + ); + + SERIAL_ECHOLNPGM("Writing setting to EEPROM"); + + persistent_data_t eeprom; + + eeprom.passcode = LockScreen::passcode; + eeprom.sound_volume = SoundPlayer::get_volume(); + eeprom.display_brightness = CLCD::get_brightness(); + eeprom.bit_flags = UIData::get_persistent_data(); + eeprom.touch_transform_a = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_A); + eeprom.touch_transform_b = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_B); + eeprom.touch_transform_c = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_C); + eeprom.touch_transform_d = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_D); + eeprom.touch_transform_e = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_E); + eeprom.touch_transform_f = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F); + eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset; + eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset; + for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++) + eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i]; + + memcpy(buff, &eeprom, sizeof(eeprom)); +} + +void InterfaceSettingsScreen::loadSettings(const char *buff) { + static_assert( + ExtUI::eeprom_data_size >= sizeof(persistent_data_t), + "Insufficient space in EEPROM for UI parameters" + ); + + persistent_data_t eeprom; + memcpy(&eeprom, buff, sizeof(eeprom)); + + SERIAL_ECHOLNPGM("Loading setting from EEPROM"); + + LockScreen::passcode = eeprom.passcode; + SoundPlayer::set_volume(eeprom.sound_volume); + UIData::set_persistent_data(eeprom.bit_flags); + CLCD::set_brightness(eeprom.display_brightness); + CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_A, eeprom.touch_transform_a); + CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_B, eeprom.touch_transform_b); + CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_C, eeprom.touch_transform_c); + CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_D, eeprom.touch_transform_d); + CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_E, eeprom.touch_transform_e); + CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f); + CLCD::mem_write_16(CLCD::REG::HOFFSET, eeprom.display_h_offset_adj + FTDI::Hoffset); + CLCD::mem_write_16(CLCD::REG::VOFFSET, eeprom.display_v_offset_adj + FTDI::Voffset); + for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++) + InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i]; + + #if ENABLED(DEVELOPER_SCREENS) + StressTestScreen::startupCheck(); + #endif +} + +#ifdef LULZBOT_EEPROM_BACKUP_SIZE + #include "../../../../../HAL/shared/persistent_store_api.h" + + bool restoreEEPROM() { + uint8_t data[LULZBOT_EEPROM_BACKUP_SIZE]; + + bool success = UIFlashStorage::read_config_data(data, LULZBOT_EEPROM_BACKUP_SIZE); + + if (success) + success = persistentStore.write_data(0, data, LULZBOT_EEPROM_BACKUP_SIZE) == PERSISTENT_STORE_SUCCESS; + + if (success) + StatusScreen::setStatusMessage(F("Settings restored from backup")); + else + StatusScreen::setStatusMessage(F("Settings restored to default")); + + return success; + } + + bool InterfaceSettingsScreen::backupEEPROM() { + uint8_t data[LULZBOT_EEPROM_BACKUP_SIZE]; + + if (persistentStore.read_data(0, data, LULZBOT_EEPROM_BACKUP_SIZE) != PERSISTENT_STORE_SUCCESS) + return false; + + UIFlashStorage::write_config_data(data, LULZBOT_EEPROM_BACKUP_SIZE); + + return true; + } +#endif + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_sounds_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_sounds_screen.cpp new file mode 100644 index 000000000000..a1a05d080649 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_sounds_screen.cpp @@ -0,0 +1,160 @@ +/******************************* + * interface_sounds_screen.cpp * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +uint8_t InterfaceSoundsScreen::event_sounds[]; + +const char* InterfaceSoundsScreen::getSoundSelection(event_t event) { + return SoundList::name(event_sounds[event]); +} + +void InterfaceSoundsScreen::toggleSoundSelection(event_t event) { + event_sounds[event] = (event_sounds[event]+1) % SoundList::n; + playEventSound(event); +} + +void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) { + for(uint8_t i = 0; i < SoundList::n; i++) + if (SoundList::data(i) == sound) + event_sounds[event] = i; +} + +void InterfaceSoundsScreen::playEventSound(event_t event, play_mode_t mode) { + sound.play(SoundList::data(event_sounds[event]), mode); +} + +void InterfaceSoundsScreen::defaultSettings() { + setSoundSelection(PRINTING_STARTED, twinkle); + setSoundSelection(PRINTING_FINISHED, fanfare); + setSoundSelection(PRINTING_FAILED, sad_trombone); +} + +void InterfaceSoundsScreen::onRedraw(draw_mode_t what) { + CommandProcessor cmd; + + if (what & BACKGROUND) { + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0) + + #define GRID_COLS 4 + #define GRID_ROWS 9 + + .font(font_medium) + .text(BTN_POS(1,1), BTN_SIZE(4,1), F("Interface Sounds")) + #undef EDGE_R + #define EDGE_R 30 + .font(font_small) + .tag(0).text (BTN_POS(1,2), BTN_SIZE(2,1), F("Sound volume:"), OPT_RIGHTX | OPT_CENTERY) + .text (BTN_POS(1,3), BTN_SIZE(2,1), F("Click sounds:"), OPT_RIGHTX | OPT_CENTERY) + .text (BTN_POS(1,5), BTN_SIZE(2,1), F("Print starting:"), OPT_RIGHTX | OPT_CENTERY) + .text (BTN_POS(1,6), BTN_SIZE(2,1), F("Print finished:"), OPT_RIGHTX | OPT_CENTERY) + .text (BTN_POS(1,7), BTN_SIZE(2,1), F("Print error:"), OPT_RIGHTX | OPT_CENTERY); + #undef EDGE_R + } + + if (what & FOREGROUND) { + #ifdef TOUCH_UI_PORTRAIT + constexpr uint8_t w = 2; + #else + constexpr uint8_t w = 1; + #endif + + cmd.font(font_medium) + .colors(ui_slider) + #define EDGE_R 30 + .tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF) + .colors(ui_toggle) + .tag(3).toggle (BTN_POS(3,3), BTN_SIZE(w,1), F("off\xFFon"), UIData::touch_sounds_enabled()) + #undef EDGE_R + .colors(normal_btn) + #define EDGE_R 0 + .tag(4).button (BTN_POS(3,5), BTN_SIZE(2,1), getSoundSelection(PRINTING_STARTED)) + .tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED)) + .tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED)) + .colors(action_btn) + .tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), F("Back")); + } +} + +void InterfaceSoundsScreen::onEntry() { + screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume(); + BaseScreen::onEntry(); +} + +bool InterfaceSoundsScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + case 3: UIData::enable_touch_sounds(!UIData::touch_sounds_enabled()); break; + case 4: toggleSoundSelection(PRINTING_STARTED); break; + case 5: toggleSoundSelection(PRINTING_FINISHED); break; + case 6: toggleSoundSelection(PRINTING_FAILED); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +bool InterfaceSoundsScreen::onTouchStart(uint8_t tag) { + CommandProcessor cmd; + #undef EDGE_R + #define EDGE_R 30 + switch (tag) { + case 2: cmd.track_linear(BTN_POS(3,2), BTN_SIZE(2,1), 2).execute(); break; + default: break; + } + return true; +} + +void InterfaceSoundsScreen::onIdle() { + if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) { + refresh_timer.start(); + + uint16_t value; + CommandProcessor cmd; + switch (cmd.track_tag(value)) { + case 2: + screen_data.InterfaceSettingsScreen.volume = value >> 8; + SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume); + SaveSettingsDialogBox::settingsChanged(); + break; + default: + return; + } + onRefresh(); + } + BaseScreen::onIdle(); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/jerk_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/jerk_screen.cpp new file mode 100644 index 000000000000..7ffb4c5ddff8 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/jerk_screen.cpp @@ -0,0 +1,65 @@ +/******************* + * jerk_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && DISABLED(JUNCTION_DEVIATION) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void JerkScreen::onRedraw(draw_mode_t what) { + + widgets_t w(what); + w.precision(1); + w.units(PSTR("mm/s")); + w.heading( PSTR("Maximum Jerk")); + w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxJerk_mm_s(X) ); + w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxJerk_mm_s(Y) ); + w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxJerk_mm_s(Z) ); + w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisMaxJerk_mm_s(E0) ); + w.increments(); +} + +bool JerkScreen::onTouchHeld(uint8_t tag) { + using namespace ExtUI; + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(AxisMaxJerk_mm_s, X); break; + case 3: UI_INCREMENT(AxisMaxJerk_mm_s, X); break; + case 4: UI_DECREMENT(AxisMaxJerk_mm_s, Y); break; + case 5: UI_INCREMENT(AxisMaxJerk_mm_s, Y); break; + case 6: UI_DECREMENT(AxisMaxJerk_mm_s, Z); break; + case 7: UI_INCREMENT(AxisMaxJerk_mm_s, Z); break; + case 8: UI_DECREMENT(AxisMaxJerk_mm_s, E0); break; + case 9: UI_INCREMENT(AxisMaxJerk_mm_s, E0); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/junction_deviation_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/junction_deviation_screen.cpp new file mode 100644 index 000000000000..806055ded5b3 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/junction_deviation_screen.cpp @@ -0,0 +1,54 @@ +/******************* + * boot_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(JUNCTION_DEVIATION) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void JunctionDeviationScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2); + w.units(PSTR("mm")); + w.heading( PSTR("Junction Deviation")); + w.color(other) .adjuster( 2, PSTR(""), getJunctionDeviation_mm() ); + w.increments(); +} + +bool JunctionDeviationScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(JunctionDeviation_mm); break; + case 3: UI_INCREMENT(JunctionDeviation_mm); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/kill_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/kill_screen.cpp new file mode 100644 index 000000000000..84cbd583cd5a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/kill_screen.cpp @@ -0,0 +1,62 @@ +/******************* + * kill_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; + +// The kill screen is an oddball that happens after Marlin has killed the events +// loop. So we only have a show() method rather than onRedraw(). The KillScreen +// should not be used as a model for other UI screens as it is an exception. + +void KillScreen::show(progmem_str message) { + CommandProcessor cmd; + + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0); + + #define GRID_COLS 4 + #define GRID_ROWS 8 + + cmd.font(Theme::font_large) + .cmd(COLOR_RGB(Theme::bg_text_enabled)) + .text(BTN_POS(1,2), BTN_SIZE(4,1), message) + .text(BTN_POS(1,3), BTN_SIZE(4,1), F("PRINTER HALTED")) + .text(BTN_POS(1,6), BTN_SIZE(4,1), F("Please reset")); + + #undef GRID_COLS + #undef GRID_ROWS + + cmd.cmd(DL::DL_DISPLAY) + .cmd(CMD_SWAP) + .execute(); + + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, PLAY_SYNCHRONOUS); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/linear_advance_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/linear_advance_screen.cpp new file mode 100644 index 000000000000..499b9db5956b --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/linear_advance_screen.cpp @@ -0,0 +1,77 @@ +/***************************** + * linear_advance_screen.cpp * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(LIN_ADVANCE) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void LinearAdvanceScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2, DEFAULT_LOWEST).color(e_axis); + w.heading( PSTR("Linear Advance:")); + #if EXTRUDERS == 1 + w.adjuster( 2, PSTR("K:"), getLinearAdvance_mm_mm_s(E0) ); + #else + w.adjuster( 2, PSTR("K E1:"), getLinearAdvance_mm_mm_s(E0) ); + w.adjuster( 4, PSTR("K E2:"), getLinearAdvance_mm_mm_s(E1) ); + #if EXTRUDERS > 2 + w.adjuster( 6, PSTR("K E3:"), getLinearAdvance_mm_mm_s(E2) ); + #if EXTRUDERS > 3 + w.adjuster( 8, PSTR("K E4:"), getLinearAdvance_mm_mm_s(E3) ); + #endif + #endif + #endif + w.increments(); +} + +bool LinearAdvanceScreen::onTouchHeld(uint8_t tag) { + using namespace ExtUI; + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(LinearAdvance_mm_mm_s, E0); break; + case 3: UI_INCREMENT(LinearAdvance_mm_mm_s, E0); break; + #if EXTRUDERS > 1 + case 4: UI_DECREMENT(LinearAdvance_mm_mm_s, E1); break; + case 5: UI_INCREMENT(LinearAdvance_mm_mm_s, E1); break; + #if EXTRUDERS > 2 + case 6: UI_DECREMENT(LinearAdvance_mm_mm_s, E2); break; + case 7: UI_INCREMENT(LinearAdvance_mm_mm_s, E2); break; + #if EXTRUDERS > 3 + case 8: UI_DECREMENT(LinearAdvance_mm_mm_s, E3); break; + case 9: UI_INCREMENT(LinearAdvance_mm_mm_s, E3); break; + #endif + #endif + #endif + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp new file mode 100644 index 000000000000..99b78933acba --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp @@ -0,0 +1,214 @@ +/******************* + * lock_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace Theme; + +uint16_t LockScreen::passcode = 0; + +void LockScreen::onEntry() { + const uint8_t siz = sizeof(screen_data.LockScreen.passcode); + memset(screen_data.LockScreen.passcode, '_', siz-1); + screen_data.LockScreen.passcode[siz-1] = '\0'; + BaseScreen::onEntry(); +} + +void LockScreen::onRedraw(draw_mode_t what) { + CommandProcessor cmd; + + if (what & BACKGROUND) { + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0); + } + + if (what & FOREGROUND) { + #ifdef TOUCH_UI_PORTRAIT + #define GRID_COLS 1 + #define GRID_ROWS 10 + #else + #define GRID_COLS 1 + #define GRID_ROWS 7 + #endif + + #undef MARGIN_T + #undef MARGIN_B + #define MARGIN_T 3 + #define MARGIN_B 3 + + progmem_str message; + switch (message_style()) { + case 'w': + message = F("Wrong passcode!"); + break; + case 'g': + message = F("Passcode accepted!"); + break; + default: + if (passcode == 0) { + message = F("Select Passcode:"); + } else { + message = F("Enter Passcode:"); + } + } + message_style() = '\0'; // Terminate the string. + + #ifdef TOUCH_UI_PORTRAIT + constexpr uint8_t l = 6; + #else + constexpr uint8_t l = 3; + #endif + + const uint8_t pressed = EventLoop::get_pressed_tag(); + + cmd.font(font_large) + .cmd(COLOR_RGB(bg_text_enabled)) + #ifdef TOUCH_UI_PORTRAIT + .text(BTN_POS(1,2), BTN_SIZE(1,1), message) + .font(font_xlarge) + .text(BTN_POS(1,4), BTN_SIZE(1,1), screen_data.LockScreen.passcode) + #else + .text(BTN_POS(1,1), BTN_SIZE(1,1), message) + .font(font_xlarge) + .text(BTN_POS(1,2), BTN_SIZE(1,1), screen_data.LockScreen.passcode) + #endif + .font(font_large) + .colors(normal_btn) + #ifdef TOUCH_UI_PASSCODE + .keys(BTN_POS(1,l+1), BTN_SIZE(1,1), F("123"), pressed) + .keys(BTN_POS(1,l+2), BTN_SIZE(1,1), F("456"), pressed) + .keys(BTN_POS(1,l+3), BTN_SIZE(1,1), F("789"), pressed) + .keys(BTN_POS(1,l+4), BTN_SIZE(1,1), F("0.<"), pressed); + #else + .keys(BTN_POS(1,l+1), BTN_SIZE(1,1), F("1234567890"), pressed) + .keys(BTN_POS(1,l+2), BTN_SIZE(1,1), F("qwertyuiop"), pressed) + .keys(BTN_POS(1,l+3), BTN_SIZE(1,1), F("asdfghjkl "), pressed) + .keys(BTN_POS(1,l+4), BTN_SIZE(1,1), F("zxcvbnm!?<"), pressed); + #endif + + #undef MARGIN_T + #undef MARGIN_B + #define MARGIN_T MARGIN_DEFAULT + #define MARGIN_B MARGIN_DEFAULT + + #undef GRID_COLS + #undef GRID_ROWS + } +} + +char &LockScreen::message_style() { + // We use the last byte of the passcode string as a flag to indicate, + // which message to show. + constexpr uint8_t last_char = sizeof(screen_data.LockScreen.passcode)-1; + return screen_data.LockScreen.passcode[last_char]; +} + +void LockScreen::onPasscodeEntered() { + if (passcode == 0) { + // We are defining a passcode + message_style() = 0; + onRefresh(); + sound.play(twinkle, PLAY_SYNCHRONOUS); + passcode = compute_checksum(); + GOTO_PREVIOUS(); + } else { + // We are verifying a passcode + if (passcode == compute_checksum()) { + message_style() = 'g'; + onRefresh(); + sound.play(twinkle, PLAY_SYNCHRONOUS); + GOTO_PREVIOUS(); + } else { + message_style() = 'w'; + onRefresh(); + sound.play(sad_trombone, PLAY_SYNCHRONOUS); + current_screen.forget(); // Discard the screen the user was trying to go to. + GOTO_PREVIOUS(); + } + } +} + +bool LockScreen::onTouchEnd(uint8_t tag) { + char *c = strchr(screen_data.LockScreen.passcode,'_'); + if (c) { + if (tag == '<') { + if (c != screen_data.LockScreen.passcode) { + // Backspace deletes previous entered characters. + *--c = '_'; + } + } else { + // Append character to passcode + *c++ = tag; + if (*c == '\0') { + // If at last character, then process the code. + onPasscodeEntered(); + } + } + } + return true; +} + +uint16_t LockScreen::compute_checksum() { + uint16_t checksum = 0; + const char* c = screen_data.LockScreen.passcode; + while (*c) { + checksum = (checksum << 2) ^ *c++; + } + if (checksum == 0) checksum = 0xFFFF; // Prevent a zero checksum + return checksum; +} + +// This function should be called *after* calling GOTO_SCREEN +// to move to new screen. If a passcode is enabled, it will +// immediately jump to the keypad screen, pushing the previous +// screen onto the stack. If the code is entered correctly, +// the stack will be popped, allowing the user to proceed to +// the new screen. Otherwise it will be popped twice, taking +// the user back to where they were before. +void LockScreen::check_passcode() { + if (passcode == 0) return; + message_style() = 0; + GOTO_SCREEN(LockScreen); +} + +bool LockScreen::is_enabled() { + return passcode != 0; +} + +void LockScreen::disable() { + passcode = 0; +} + +void LockScreen::enable() { + message_style() = 0; + passcode = 0; + GOTO_SCREEN(LockScreen); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp new file mode 100644 index 000000000000..9c6a3f4c2dff --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp @@ -0,0 +1,123 @@ +/***************** + * main_menu.cpp * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void MainMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(Theme::font_medium) + #ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 8 + #define GRID_COLS 2 + .tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), F("Auto Home")) + #ifdef NOZZLE_CLEAN_FEATURE + .enabled(1) + #else + .enabled(0) + #endif + .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), F("Clean Nozzle")) + .tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Move Axis")) + .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Motors Off")) + .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Temperature")) + .tag(7).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Change Filament")) + .tag(8).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Advanced Settings")) + #ifdef PRINTCOUNTER + .enabled(1) + #else + .enabled(0) + #endif + .tag(9).button( BTN_POS(1,7), BTN_SIZE(2,1), F("Printer Statistics")) + .tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), F("About Printer")) + .colors(action_btn) + .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS + #else + #define GRID_ROWS 5 + #define GRID_COLS 2 + .tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), F("Auto Home")) + #if ENABLED(NOZZLE_CLEAN_FEATURE) + .enabled(1) + #else + .enabled(0) + #endif + .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), F("Clean Nozzle")) + .tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Move Axis")) + .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Motors Off")) + .tag(6).button( BTN_POS(1,3), BTN_SIZE(1,1), F("Temperature")) + .tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), F("Change Filament")) + .tag(8).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Advanced Settings")) + #ifdef PRINTCOUNTER + .enabled(1) + #else + .enabled(0) + #endif + .tag(9).button( BTN_POS(2,4), BTN_SIZE(1,1), F("Printer Statistics")) + .tag(10).button( BTN_POS(1,5), BTN_SIZE(1,1), F("About Printer")) + .colors(action_btn) + .tag(1).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS + #endif + } +} + +bool MainMenu::onTouchEnd(uint8_t tag) { + using namespace ExtUI; + + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + case 2: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break; + #if ENABLED(NOZZLE_CLEAN_FEATURE) + case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; + #endif + case 4: GOTO_SCREEN(MoveAxisScreen); break; + case 5: injectCommands_P(PSTR("M84")); break; + case 6: GOTO_SCREEN(TemperatureScreen); break; + case 7: GOTO_SCREEN(ChangeFilamentScreen); break; + case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; +#if ENABLED(PRINTCOUNTER) + case 9: GOTO_SCREEN(StatisticsScreen); break; +#endif + case 10: GOTO_SCREEN(AboutScreen); break; + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_acceleration_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_acceleration_screen.cpp new file mode 100644 index 000000000000..ccc58b5a3c51 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_acceleration_screen.cpp @@ -0,0 +1,85 @@ +/******************************* + * max_acceleration_screen.cpp * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void MaxAccelerationScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0); + w.units(PSTR("mm/s^2")); + w.heading( PSTR("Maximum Acceleration")); + w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxAcceleration_mm_s2(X) ); + w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxAcceleration_mm_s2(Y) ); + w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxAcceleration_mm_s2(Z) ); + #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS) + w.color(e_axis).adjuster( 8, PSTR("E:"), getAxisMaxAcceleration_mm_s2(E0) ); + #elif EXTRUDERS > 1 + w.color(e_axis).adjuster( 8, PSTR("E1:"), getAxisMaxAcceleration_mm_s2(E0) ); + w.color(e_axis).adjuster(10, PSTR("E2:"), getAxisMaxAcceleration_mm_s2(E1) ); + #if EXTRUDERS > 2 + w.color(e_axis).adjuster(12, PSTR("E3:"), getAxisMaxAcceleration_mm_s2(E2) ); + #endif + #if EXTRUDERS > 3 + w.color(e_axis).adjuster(14, PSTR("E4:"), getAxisMaxAcceleration_mm_s2(E3) ); + #endif + #endif + w.increments(); +} + +bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(AxisMaxAcceleration_mm_s2, X ); break; + case 3: UI_INCREMENT(AxisMaxAcceleration_mm_s2, X ); break; + case 4: UI_DECREMENT(AxisMaxAcceleration_mm_s2, Y ); break; + case 5: UI_INCREMENT(AxisMaxAcceleration_mm_s2, Y ); break; + case 6: UI_DECREMENT(AxisMaxAcceleration_mm_s2, Z ); break; + case 7: UI_INCREMENT(AxisMaxAcceleration_mm_s2, Z ); break; + case 8: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E0); break; + case 9: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E0); break; + #if EXTRUDERS > 1 && ENABLED(DISTINCT_E_FACTORS) + case 10: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E1); break; + case 11: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E1); break; + #endif + #if EXTRUDERS > 2 && ENABLED(DISTINCT_E_FACTORS) + case 12: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E2); break; + case 13: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E2); break; + #endif + #if EXTRUDERS > 3 && ENABLED(DISTINCT_E_FACTORS) + case 14: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E3); break; + case 15: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E3); break; + #endif + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_velocity_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_velocity_screen.cpp new file mode 100644 index 000000000000..e147bfe4e1bc --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_velocity_screen.cpp @@ -0,0 +1,87 @@ +/*************************** + * max_velocity_screen.cpp * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void MaxVelocityScreen::onRedraw(draw_mode_t what) { + using namespace ExtUI; + widgets_t w(what); + w.precision(0); + w.units(PSTR("mm/s")); + w.heading( PSTR("Maximum Velocity")); + w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxFeedrate_mm_s(X) ); + w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxFeedrate_mm_s(Y) ); + w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxFeedrate_mm_s(Z) ); + #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS) + w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisMaxFeedrate_mm_s(E0) ); + #elif EXTRUDERS > 1 + w.color(e_axis) .adjuster( 8, PSTR("E1:"), getAxisMaxFeedrate_mm_s(E0) ); + w.color(e_axis) .adjuster( 10, PSTR("E2:"), getAxisMaxFeedrate_mm_s(E1) ); + #if EXTRUDERS > 2 + w.color(e_axis).adjuster( 12, PSTR("E3:"), getAxisMaxFeedrate_mm_s(E2) ); + #endif + #if EXTRUDERS > 3 + w.color(e_axis).adjuster( 14, PSTR("E4:"), getAxisMaxFeedrate_mm_s(E3) ); + #endif + #endif + w.increments(); +} + +bool MaxVelocityScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(AxisMaxFeedrate_mm_s, X); break; + case 3: UI_INCREMENT(AxisMaxFeedrate_mm_s, X); break; + case 4: UI_DECREMENT(AxisMaxFeedrate_mm_s, Y); break; + case 5: UI_INCREMENT(AxisMaxFeedrate_mm_s, Y); break; + case 6: UI_DECREMENT(AxisMaxFeedrate_mm_s, Z); break; + case 7: UI_INCREMENT(AxisMaxFeedrate_mm_s, Z); break; + case 8: UI_DECREMENT(AxisMaxFeedrate_mm_s, E0); break; + case 9: UI_INCREMENT(AxisMaxFeedrate_mm_s, E0); break; + #if EXTRUDERS > 1 && ENABLED(DISTINCT_E_FACTORS) + case 10: UI_DECREMENT(AxisMaxFeedrate_mm_s, E1); break; + case 11: UI_INCREMENT(AxisMaxFeedrate_mm_s, E1); break; + #endif + #if EXTRUDERS > 2 && ENABLED(DISTINCT_E_FACTORS) + case 12: UI_DECREMENT(AxisMaxFeedrate_mm_s, E2); break; + case 13: UI_INCREMENT(AxisMaxFeedrate_mm_s, E2); break; + #endif + #if EXTRUDERS > 3 && ENABLED(DISTINCT_E_FACTORS) + case 14: UI_DECREMENT(AxisMaxFeedrate_mm_s, E3); break; + case 15: UI_INCREMENT(AxisMaxFeedrate_mm_s, E3); break; + #endif + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp new file mode 100644 index 000000000000..5db38bec0975 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp @@ -0,0 +1,169 @@ +/*************************** + * media_player_screen.cpp * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +/** + * The MediaPlayerScreen allows an AVI to be played. + * + * It requires a special AVI file. The following video + * and audio codecs must be used: + * + * -vcodec mjpeg -pix_fmt yuvj420p + * -acodec adpcm_ima_wav + * + * To generate a 2 second static screen from a png file: + * + * ffmpeg -i startup.png -vcodec mjpeg -pix_fmt yuvj420p -r 1 video.avi + * sox -n -r 44100 -b 8 -c 2 -L silence.wav trim 0.0 2.000 + * ffmpeg -i silence.wav -acodec adpcm_ima_wav silence.avi + * ffmpeg -i video.avi -i silence.wav -c copy -map 0:v:0 -map 1:a:0 startup.avi + */ + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +#include "../archim2-flash/flash_storage.h" +#include "../archim2-flash/media_file_reader.h" + +using namespace FTDI; + +void MediaPlayerScreen::onEntry() { + BaseScreen::onEntry(); + CLCD::turn_on_backlight(); + SoundPlayer::set_volume(255); +} + +void MediaPlayerScreen::onRedraw(draw_mode_t) { +} + +bool MediaPlayerScreen::playCardMedia() { + #if ENABLED(SDSUPPORT) + char fname[15]; + strcpy_P(fname, PSTR("STARTUP.AVI")); + + MediaFileReader reader; + if (!reader.open(fname)) + return false; + + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Starting to play STARTUP.AVI"); + playStream(&reader, MediaFileReader::read); + reader.close(); + #endif + return true; +} + +// Attempt to play media from the onboard SPI flash chip +bool MediaPlayerScreen::playBootMedia() { + UIFlashStorage::BootMediaReader reader; + if (!reader.isAvailable()) return false; + + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Starting to play boot video"); + playStream(&reader, UIFlashStorage::BootMediaReader::read); + return true; +} + +void MediaPlayerScreen::playStream(void *obj, media_streamer_func_t *data_stream) { + #if FTDI_API_LEVEL >= 810 + if (FTDI::ftdi_chip >= 810) { + // Set up the media FIFO on the end of RAMG, as the top of RAMG + // will be used as the framebuffer. + + uint8_t buf[512]; + const uint32_t block_size = 512; + const uint32_t fifo_size = block_size * 2; + const uint32_t fifo_start = CLCD::MAP::RAM_G + CLCD::MAP::RAM_G_SIZE - fifo_size; + + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(0x000000)) + .cmd(CLEAR(true,true,true)) + .cmd(DL::DL_DISPLAY) + .cmd(CMD_SWAP) + .execute() + .cmd(CMD_DLSTART) + .mediafifo(fifo_start, fifo_size) + .playvideo(OPT_FULLSCREEN | OPT_MEDIAFIFO | OPT_NOTEAR | OPT_SOUND) + .cmd(DL::DL_DISPLAY) + .cmd(CMD_SWAP) + .execute(); + + uint32_t writePtr = 0; + int16_t nBytes; + + uint32_t t = millis(); + uint8_t timeouts; + + spiInit(SPI_HALF_SPEED); // Boost SPI speed for video playback + + do { + // Write block n + nBytes = (*data_stream)(obj, buf, block_size); + if (nBytes == -1) break; + + if (millis() - t > 10) { + ExtUI::yield(); + t = millis(); + } + + CLCD::mem_write_bulk (fifo_start + writePtr, buf, nBytes); + + // Wait for FTDI810 to finish playing block n-1 + timeouts = 20; + do { + if (millis() - t > 10) { + ExtUI::yield(); + t = millis(); + timeouts--; + if (timeouts == 0) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Timeout playing video"); + cmd.reset(); + goto exit; + } + } + } while (CLCD::mem_read_32(CLCD::REG::MEDIAFIFO_READ) != writePtr); + + // Start playing block n + writePtr = (writePtr + nBytes) % fifo_size; + CLCD::mem_write_32(CLCD::REG::MEDIAFIFO_WRITE, writePtr); + } while (nBytes == block_size); + + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Done playing video"); + + exit: + spiInit(SPI_SPEED); // Restore default speed + + // Since playing media overwrites RAMG, we need to reinitialize + // everything that is stored in RAMG. + cmd.cmd(CMD_DLSTART).execute(); + DLCache::init(); + StatusScreen::onStartup(); + } + #endif // FTDI_API_LEVEL >= 810 +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp new file mode 100644 index 000000000000..60229907b9ac --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp @@ -0,0 +1,132 @@ +/************************ + * move_axis_screen.cpp * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace ExtUI; + +void MoveAxisScreen::onEntry() { + // Since Marlin keeps only one absolute position for all the extruders, + // we have to keep track of the relative motion of individual extruders + // ourselves. The relative distances are reset to zero whenever this + // screen is entered. + + for(uint8_t i = 0; i < ExtUI::extruderCount; i++) { + screen_data.MoveAxisScreen.e_rel[i] = 0; + } + BaseNumericAdjustmentScreen::onEntry(); +} + +void MoveAxisScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(1); + w.units(PSTR("mm")); + w.heading( PSTR("Move Axis")); + w.home_buttons(20); + w.color(Theme::x_axis ) .adjuster( 2, PSTR("X:"), getAxisPosition_mm(X), canMove(X)); + w.color(Theme::y_axis ) .adjuster( 4, PSTR("Y:"), getAxisPosition_mm(Y), canMove(Y)); + w.color(Theme::z_axis ) .adjuster( 6, PSTR("Z:"), getAxisPosition_mm(Z), canMove(Z)); + + #if EXTRUDERS == 1 + w.color(Theme::e_axis) .adjuster( 8, PSTR("E:"), screen_data.MoveAxisScreen.e_rel[0], canMove(E0)); + #elif EXTRUDERS > 1 + w.color(Theme::e_axis) .adjuster( 8, PSTR("E1:"), screen_data.MoveAxisScreen.e_rel[0], canMove(E0)); + w.color(Theme::e_axis) .adjuster( 10, PSTR("E2:"), screen_data.MoveAxisScreen.e_rel[1], canMove(E1)); + #if EXTRUDERS > 2 + w.color(Theme::e_axis) .adjuster( 12, PSTR("E3:"), screen_data.MoveAxisScreen.e_rel[2], canMove(E2)); + #endif + #if EXTRUDERS > 3 + w.color(Theme::e_axis) .adjuster( 14, PSTR("E4:"), screen_data.MoveAxisScreen.e_rel[3], canMove(E3)); + #endif + #endif + w.increments(); +} + +bool MoveAxisScreen::onTouchHeld(uint8_t tag) { + #define UI_INCREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis); + #define UI_DECREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis); + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT_AXIS(X); break; + case 3: UI_INCREMENT_AXIS(X); break; + case 4: UI_DECREMENT_AXIS(Y); break; + case 5: UI_INCREMENT_AXIS(Y); break; + case 6: UI_DECREMENT_AXIS(Z); break; + case 7: UI_INCREMENT_AXIS(Z); break; + // For extruders, also update relative distances. + case 8: UI_DECREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] -= increment; break; + case 9: UI_INCREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] += increment; break; + #if EXTRUDERS > 1 + case 10: UI_DECREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] -= increment; break; + case 11: UI_INCREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] += increment; break; + #endif + #if EXTRUDERS > 2 + case 12: UI_DECREMENT_AXIS(E2); screen_data.MoveAxisScreen.e_rel[2] -= increment; break; + case 13: UI_INCREMENT_AXIS(E2); screen_data.MoveAxisScreen.e_rel[2] += increment; break; + #endif + #if EXTRUDERS > 3 + case 14: UI_DECREMENT_AXIS(E3); screen_data.MoveAxisScreen.e_rel[3] -= increment; break; + case 15: UI_INCREMENT_AXIS(E3); screen_data.MoveAxisScreen.e_rel[3] += increment; break; + #endif + case 20: injectCommands_P(PSTR("G28 X")); break; + case 21: injectCommands_P(PSTR("G28 Y")); break; + case 22: injectCommands_P(PSTR("G28 Z")); break; + case 23: injectCommands_P(PSTR("G28")); break; + default: + return false; + } + #undef UI_DECREMENT_AXIS + #undef UI_INCREMENT_AXIS + return true; +} + +float MoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) { + // Compute feedrate so that the tool lags the adjuster when it is + // being held down, this allows enough margin for the planner to + // connect segments and even out the motion. + constexpr float max_manual_feedrate[XYZE] = MAX_MANUAL_FEEDRATE; + return min(max_manual_feedrate[axis]/60, abs(increment_mm * TOUCH_REPEATS_PER_SECOND * 0.80)); +} + +void MoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) { + ExtUI::setFeedrate_mm_s(getManualFeedrate(X_AXIS + (axis - ExtUI::X), increment_mm)); +} + +void MoveAxisScreen::setManualFeedrate(ExtUI::extruder_t, float increment_mm) { + ExtUI::setFeedrate_mm_s(getManualFeedrate(E_AXIS, increment_mm)); +} + +void MoveAxisScreen::onIdle() { + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + } + BaseScreen::onIdle(); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nozzle_offsets_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nozzle_offsets_screen.cpp new file mode 100644 index 000000000000..558c1acfce10 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nozzle_offsets_screen.cpp @@ -0,0 +1,73 @@ +/***************************** + * nozzle_offsets_screen.cpp * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && HOTENDS > 1 + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; + +void NozzleOffsetScreen::onEntry() { + // Since we don't allow the user to edit the offsets for E0, + // make sure they are all zero. + normalizeNozzleOffset(X); + normalizeNozzleOffset(Y); + normalizeNozzleOffset(Z); +} + +void NozzleOffsetScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2).units(PSTR("mm")); + + w.heading( PSTR("Nozzle Offset")); + w.color(Theme::x_axis).adjuster(2, PSTR("X:"), ExtUI::getNozzleOffset_mm(X, E1)); + w.color(Theme::y_axis).adjuster(4, PSTR("Y:"), ExtUI::getNozzleOffset_mm(Y, E1)); + w.color(Theme::z_axis).adjuster(6, PSTR("Z:"), ExtUI::getNozzleOffset_mm(Z, E1)); + #if ENABLED(CALIBRATION_GCODE) + w.button(8, PSTR("Measure automatically"), !isPrinting()); + #endif + w.increments(); +} + +bool NozzleOffsetScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(NozzleOffset_mm, X, E1); break; + case 3: UI_INCREMENT(NozzleOffset_mm, X, E1); break; + case 4: UI_DECREMENT(NozzleOffset_mm, Y, E1); break; + case 5: UI_INCREMENT(NozzleOffset_mm, Y, E1); break; + case 6: UI_DECREMENT(NozzleOffset_mm, Z, E1); break; + case 7: UI_INCREMENT(NozzleOffset_mm, Z, E1); break; + #if ENABLED(CALIBRATION_GCODE) + case 8: GOTO_SCREEN(ConfirmAutoCalibrationDialogBox); return true; + #endif + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp new file mode 100644 index 000000000000..99badde0b4da --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp @@ -0,0 +1,128 @@ +/******************** + * nudge_nozzle.cpp * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BABYSTEPPING) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void NudgeNozzleScreen::onEntry() { + screen_data.NudgeNozzleScreen.show_offsets = false; + #if EXTRUDERS > 1 + screen_data.NudgeNozzleScreen.link_nozzles = true; + #endif + LOOP_XYZ(i) { + screen_data.NudgeNozzleScreen.rel[i] = 0; + } + BaseNumericAdjustmentScreen::onEntry(); +} + +void NudgeNozzleScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(PSTR("mm")); + + w.heading( PSTR("Nudge Nozzle")); + #if ENABLED(BABYSTEP_XY) + w.color(x_axis).adjuster(2, PSTR("X:"), screen_data.NudgeNozzleScreen.rel[0] / getAxisSteps_per_mm(X)); + w.color(y_axis).adjuster(4, PSTR("Y:"), screen_data.NudgeNozzleScreen.rel[1] / getAxisSteps_per_mm(Y)); + #endif + w.color(z_axis).adjuster(6, PSTR("Z:"), screen_data.NudgeNozzleScreen.rel[2] / getAxisSteps_per_mm(Z)); + w.increments(); + #if EXTRUDERS > 1 + w.toggle (8, PSTR("Adjust Both Nozzles:"), PSTR("no\xFFyes"), screen_data.NudgeNozzleScreen.link_nozzles, PSTR("Yes\nNo")); + #endif + + #if EXTRUDERS > 1 || HAS_BED_PROBE + w.toggle (9, PSTR("Show Offsets:"), PSTR("no\xFFyes"), screen_data.NudgeNozzleScreen.show_offsets, PSTR("Yes\nNo")); + + if (screen_data.NudgeNozzleScreen.show_offsets) { + char str[19], num1[7]; + + w.draw_mode(BOTH); + w.color(other); + + #if HAS_BED_PROBE + dtostrf(getZOffset_mm(), 4, 2, num1); + sprintf_P(str, PSTR("%s mm"), num1); + w.text_field (0, PSTR("Z Offset"), str); + #endif + + #if EXTRUDERS > 1 + char num2[7], num3[7]; + dtostrf(getNozzleOffset_mm(X, E1), 4, 2, num1); + dtostrf(getNozzleOffset_mm(Y, E1), 4, 2, num2); + dtostrf(getNozzleOffset_mm(Z, E1), 4, 2, num3); + sprintf_P(str, PSTR("%s; %s; %s mm"), num1, num2, num3); + w.text_field (0, PSTR("Noz. Offset"), str); + #endif + } + #endif +} + +bool NudgeNozzleScreen::onTouchHeld(uint8_t tag) { + const float inc = getIncrement(); + #if EXTRUDERS > 1 + const bool link = screen_data.NudgeNozzleScreen.link_nozzles; + #else + constexpr bool link = true; + #endif + int16_t steps; + switch (tag) { + case 2: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps(-steps, X, link); screen_data.NudgeNozzleScreen.rel[0] -= steps; break; + case 3: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps( steps, X, link); screen_data.NudgeNozzleScreen.rel[0] += steps; break; + case 4: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps(-steps, Y, link); screen_data.NudgeNozzleScreen.rel[1] -= steps; break; + case 5: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps( steps, Y, link); screen_data.NudgeNozzleScreen.rel[1] += steps; break; + case 6: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps(-steps, Z, link); screen_data.NudgeNozzleScreen.rel[2] -= steps; break; + case 7: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps( steps, Z, link); screen_data.NudgeNozzleScreen.rel[2] += steps; break; + #if EXTRUDERS > 1 + case 8: screen_data.NudgeNozzleScreen.link_nozzles = !link; break; + #endif + case 9: screen_data.NudgeNozzleScreen.show_offsets = !screen_data.NudgeNozzleScreen.show_offsets; break; + default: + return false; + } + #if EXTRUDERS > 1 || HAS_BED_PROBE + SaveSettingsDialogBox::settingsChanged(); + #endif + return true; +} + +bool NudgeNozzleScreen::onTouchEnd(uint8_t tag) { + if (tag == 1) { + SaveSettingsDialogBox::promptToSaveSettings(); + return true; + } else { + return BaseNumericAdjustmentScreen::onTouchEnd(tag); + } +} + +void NudgeNozzleScreen::onIdle() { + reset_menu_timeout(); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/restore_failsafe_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/restore_failsafe_dialog_box.cpp new file mode 100644 index 000000000000..a93727cd8d0a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/restore_failsafe_dialog_box.cpp @@ -0,0 +1,51 @@ +/*********************************** + * restore_failsafe_dialog_box.cpp * + ***********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace ExtUI; + +void RestoreFailsafeDialogBox::onRedraw(draw_mode_t) { + drawMessage(F("Are you sure? Customizations will be lost.")); + drawYesNoButtons(); +} + +bool RestoreFailsafeDialogBox::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + ExtUI::injectCommands_P(PSTR("M502\nM117 Factory settings restored.")); + AlertDialogBox::show(F("Factory settings restored.")); + // Remove RestoreFailsafeDialogBox from the stack + // so the alert box doesn't return to it. + current_screen.forget(); + SaveSettingsDialogBox::settingsChanged(); + return true; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/save_settings_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/save_settings_dialog_box.cpp new file mode 100644 index 000000000000..8a58af119c3f --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/save_settings_dialog_box.cpp @@ -0,0 +1,65 @@ +/******************************** + * save_settings_dialog_box.cpp * + ********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace ExtUI; + +bool SaveSettingsDialogBox::needs_save = false; + +void SaveSettingsDialogBox::onRedraw(draw_mode_t) { + drawMessage(F("Do you wish to save these settings as defaults?")); + drawYesNoButtons(); +} + +bool SaveSettingsDialogBox::onTouchEnd(uint8_t tag) { + needs_save = false; + switch (tag) { + case 1: + injectCommands_P(PSTR("M500")); + AlertDialogBox::show(F("Settings saved!")); + // Remove SaveSettingsDialogBox from the stack + // so the alert box doesn't return to me. + current_screen.forget(); + return true; + default: + return DialogBoxBaseClass::onTouchEnd(tag); + } +} + +void SaveSettingsDialogBox::promptToSaveSettings() { + if (needs_save) { + // Remove current screen from the stack + // so SaveSettingsDialogBox doesn't return here. + GOTO_SCREEN(SaveSettingsDialogBox); + current_screen.forget(); + } else { + // No save needed. + GOTO_PREVIOUS(); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screen_data.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screen_data.h new file mode 100644 index 000000000000..ed50a8bc3f40 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screen_data.h @@ -0,0 +1,77 @@ +/***************** + * screen_data.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../ftdi_eve_lib/ftdi_eve_lib.h" + +// To save RAM, store state information related to a particular screen +// in a union. The values should be initialized in the onEntry method. + +struct base_numeric_adjustment_t {uint8_t increment;}; + +union screen_data_t { + struct base_numeric_adjustment_t BaseNumericAdjustmentScreen; + struct {uint8_t volume; uint8_t brightness;} InterfaceSettingsScreen; + struct {char passcode[5];} LockScreen; + struct {bool isError;} AlertDialogBox; + struct {bool auto_hide;} SpinnerDialogBox; + struct { + uint8_t e_tag, t_tag, repeat_tag; + ExtUI::extruder_t saved_extruder; + } ChangeFilamentScreen; + struct { + struct { + uint8_t is_dir : 1; + uint8_t is_root : 1; + } flags; + uint8_t selected_tag; + uint8_t num_page; + uint8_t cur_page; + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + uint16_t scroll_pos; + uint16_t scroll_max; + #endif + } FilesScreen; + struct { + struct base_numeric_adjustment_t placeholder; + float e_rel[ExtUI::extruderCount]; + } MoveAxisScreen; +#if ENABLED(DEVELOPER_SCREENS) + struct { + uint32_t next_watchdog_trigger; + const char* message; + } StressTestScreen; +#endif +#if ENABLED(BABYSTEPPING) + struct { + struct base_numeric_adjustment_t placeholder; + int16_t rel[XYZ]; + #if EXTRUDERS > 1 + bool link_nozzles; + #endif + bool show_offsets; + } NudgeNozzleScreen; +#endif +}; + +extern screen_data_t screen_data; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp new file mode 100644 index 000000000000..fa53a0130bcb --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp @@ -0,0 +1,113 @@ +/*************** + * screens.cpp * + ***************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) +#include "screens.h" +#include "screen_data.h" + +tiny_timer_t refresh_timer; +screen_data_t screen_data; + +SCREEN_TABLE { + DECL_SCREEN(BootScreen), + DECL_SCREEN(TouchCalibrationScreen), + DECL_SCREEN(StatusScreen), + DECL_SCREEN(MainMenu), + DECL_SCREEN(TuneMenu), + DECL_SCREEN(AdvancedSettingsMenu), + DECL_SCREEN(AlertDialogBox), + DECL_SCREEN(ConfirmUserRequestAlertBox), + DECL_SCREEN(RestoreFailsafeDialogBox), + DECL_SCREEN(SaveSettingsDialogBox), + DECL_SCREEN(ConfirmAbortPrintDialogBox), +#if ENABLED(CALIBRATION_GCODE) + DECL_SCREEN(ConfirmAutoCalibrationDialogBox), +#endif + DECL_SCREEN(SpinnerDialogBox), + DECL_SCREEN(AboutScreen), +#if ENABLED(PRINTCOUNTER) + DECL_SCREEN(StatisticsScreen), +#endif +#if ENABLED(BABYSTEPPING) + DECL_SCREEN(NudgeNozzleScreen), +#endif + DECL_SCREEN(MoveAxisScreen), + DECL_SCREEN(StepsScreen), +#if HAS_TRINAMIC + DECL_SCREEN(StepperCurrentScreen), + DECL_SCREEN(StepperBumpSensitivityScreen), +#endif +#if HAS_BED_PROBE + DECL_SCREEN(ZOffsetScreen), +#endif +#if HOTENDS > 1 + DECL_SCREEN(NozzleOffsetScreen), +#endif +#if ENABLED(BACKLASH_GCODE) + DECL_SCREEN(BacklashCompensationScreen), +#endif + DECL_SCREEN(FeedratePercentScreen), + DECL_SCREEN(MaxVelocityScreen), + DECL_SCREEN(MaxAccelerationScreen), + DECL_SCREEN(DefaultAccelerationScreen), +#if ENABLED(JUNCTION_DEVIATION) + DECL_SCREEN(JunctionDeviationScreen), +#else + DECL_SCREEN(JerkScreen), +#endif +#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + DECL_SCREEN(FilamentMenu), +#endif +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + DECL_SCREEN(FilamentRunoutScreen), +#endif +#if ENABLED(LIN_ADVANCE) + DECL_SCREEN(LinearAdvanceScreen), +#endif + DECL_SCREEN(TemperatureScreen), + DECL_SCREEN(ChangeFilamentScreen), + DECL_SCREEN(InterfaceSettingsScreen), + DECL_SCREEN(InterfaceSoundsScreen), + DECL_SCREEN(LockScreen), + DECL_SCREEN(FilesScreen), + DECL_SCREEN(EndstopStatesScreen), +#ifdef LULZBOT_USE_BIOPRINTER_UI + DECL_SCREEN(BioPrintingDialogBox), + DECL_SCREEN(BioConfirmHomeXYZ), + DECL_SCREEN(BioConfirmHomeE), +#endif +#if ENABLED(DEVELOPER_SCREENS) + DECL_SCREEN(DeveloperMenu), + DECL_SCREEN(ConfirmEraseFlashDialogBox), + DECL_SCREEN(WidgetsScreen), + DECL_SCREEN(TouchRegistersScreen), + DECL_SCREEN(StressTestScreen), +#endif + DECL_SCREEN(MediaPlayerScreen), + DECL_SCREEN(DisplayTuningScreen) +}; + +SCREEN_TABLE_POST + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h new file mode 100644 index 000000000000..d8c48de9eda1 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h @@ -0,0 +1,712 @@ +/************* + * screens.h * + *************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../ftdi_eve_lib/ftdi_eve_lib.h" +#include "../theme/theme.h" + +#define ROUND(val) uint16_t((val)+0.5) + +extern tiny_timer_t refresh_timer; + +/********************************* DL CACHE SLOTS ******************************/ + +// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This +// is done using the CLCD::DLCache class, which takes a unique ID for each +// cache location. These IDs are defined here: + +enum { + STATUS_SCREEN_CACHE, + MENU_SCREEN_CACHE, + TUNE_SCREEN_CACHE, + ADJUST_OFFSETS_SCREEN_CACHE, + ALERT_BOX_CACHE, + SPINNER_CACHE, + ADVANCED_SETTINGS_SCREEN_CACHE, + MOVE_AXIS_SCREEN_CACHE, + TEMPERATURE_SCREEN_CACHE, + STEPS_SCREEN_CACHE, + STEPPER_CURRENT_SCREEN_CACHE, + STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE, + ZOFFSET_SCREEN_CACHE, + NOZZLE_OFFSET_SCREEN_CACHE, + BACKLASH_COMPENSATION_SCREEN_CACHE, + MAX_FEEDRATE_SCREEN_CACHE, + MAX_VELOCITY_SCREEN_CACHE, + MAX_ACCELERATION_SCREEN_CACHE, + DEFAULT_ACCELERATION_SCREEN_CACHE, +#if ENABLED(JUNCTION_DEVIATION) + JUNC_DEV_SCREEN_CACHE, +#else + JERK_SCREEN_CACHE, +#endif +#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + FILAMENT_MENU_CACHE, +#endif +#if ENABLED(LIN_ADVANCE) + LINEAR_ADVANCE_SCREEN_CACHE, +#endif +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + FILAMENT_RUNOUT_SCREEN_CACHE, +#endif +#ifdef LULZBOT_USE_BIOPRINTER_UI + PRINTING_SCREEN_CACHE, +#endif + CHANGE_FILAMENT_SCREEN_CACHE, + INTERFACE_SETTINGS_SCREEN_CACHE, + INTERFACE_SOUNDS_SCREEN_CACHE, + LOCK_SCREEN_CACHE, + FILES_SCREEN_CACHE, + DISPLAY_TIMINGS_SCREEN_CACHE +}; + +// To save MCU RAM, the status message is "baked" in to the status screen +// cache, so we reserve a large chunk of memory for the DL cache + +#define STATUS_SCREEN_DL_SIZE 2048 +#define ALERT_BOX_DL_SIZE 3072 +#define SPINNER_DL_SIZE 3072 +#define FILE_SCREEN_DL_SIZE 3072 +#define PRINTING_SCREEN_DL_SIZE 2048 + +/************************* MENU SCREEN DECLARATIONS *************************/ + +class BaseScreen : public UIScreen { + protected: + #ifdef LCD_TIMEOUT_TO_STATUS + static uint32_t last_interaction; + #endif + + public: + static bool buttonStyleCallback(CommandProcessor &, uint8_t, uint8_t &, uint16_t &, bool); + + static void reset_menu_timeout(); + + static void onEntry(); + static void onIdle(); +}; + +class BootScreen : public BaseScreen, public UncachedScreen { + private: + static void showSplashScreen(); + public: + static void onRedraw(draw_mode_t); + static void onIdle(); +}; + +class AboutScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +#if ENABLED(PRINTCOUNTER) + class StatisticsScreen : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + }; +#endif + +class KillScreen { + // The KillScreen is behaves differently than the + // others, so we do not bother extending UIScreen. + public: + static void show(progmem_str msg); +}; + +class DialogBoxBaseClass : public BaseScreen { + protected: + template static void drawMessage(const T, int16_t font = 0); + static void drawYesNoButtons(uint8_t default_btn = 0); + static void drawOkayButton(); + static void drawSpinner(); + static void drawButton(const progmem_str); + + static void onRedraw(draw_mode_t) {}; + public: + static bool onTouchEnd(uint8_t tag); +}; + +class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + template static void show(T); + template static void showError(T); + static void hide(); +}; + +class RestoreFailsafeDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +class SaveSettingsDialogBox : public DialogBoxBaseClass, public UncachedScreen { + private: + static bool needs_save; + + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + + static void promptToSaveSettings(); + static void settingsChanged() {needs_save = true;} +}; + +class ConfirmAbortPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +#if ENABLED(CALIBRATION_GCODE) +class ConfirmAutoCalibrationDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; +#endif + +class ConfirmUserRequestAlertBox : public AlertDialogBox { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t); + static void hide(); + static void show(const char*); +}; + +class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static void onIdle(); + + static void show(const progmem_str); + static void hide(); + static void enqueueAndWait_P(const progmem_str commands); + static void enqueueAndWait_P(const progmem_str message, const progmem_str commands); +}; + +#if !defined(LULZBOT_USE_BIOPRINTER_UI) +class StatusScreen : public BaseScreen, public CachedScreen { + private: + static void draw_axis_position(draw_mode_t); + static void draw_temperature(draw_mode_t); + static void draw_progress(draw_mode_t); + static void draw_interaction_buttons(draw_mode_t); + static void draw_status_message(draw_mode_t, const char * const); + + public: + static void setStatusMessage(const char *); + static void setStatusMessage(progmem_str); + static void onRedraw(draw_mode_t); + static void onStartup(); + static void onEntry(); + static void onIdle(); + static bool onTouchEnd(uint8_t tag); +}; +#else + class StatusScreen : public BaseScreen, public CachedScreen { + private: + static float increment; + static bool jog_xy; + static bool fine_motion; + + static void draw_temperature(draw_mode_t what); + static void draw_syringe(draw_mode_t what); + static void draw_arrows(draw_mode_t what); + static void draw_overlay_icons(draw_mode_t what); + static void draw_fine_motion(draw_mode_t what); + static void draw_buttons(draw_mode_t what); + public: + static void unlockMotors(); + + static void setStatusMessage(const char *); + static void setStatusMessage(progmem_str); + + static void onStartup(); + static void onRedraw(draw_mode_t); + + static bool onTouchStart(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); + + }; + + class BioPrintingDialogBox : public BaseScreen, public CachedScreen { + private: + static void draw_status_message(draw_mode_t, const char * const); + static void draw_progress(draw_mode_t); + static void draw_time_remaining(draw_mode_t); + static void draw_interaction_buttons(draw_mode_t); + public: + static void onRedraw(draw_mode_t); + + static void show(); + + static void setStatusMessage(const char *); + static void setStatusMessage(progmem_str); + + static void onIdle(); + static bool onTouchEnd(uint8_t tag); + }; + + class BioConfirmHomeXYZ : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + }; + + class BioConfirmHomeE : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + }; +#endif + +class MainMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +class TuneMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +class TouchCalibrationScreen : public BaseScreen, public UncachedScreen { + public: + static void onRefresh(); + static void onEntry(); + static void onRedraw(draw_mode_t); + static void onIdle(); +}; + +class TouchRegistersScreen : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +class AdvancedSettingsMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +class ChangeFilamentScreen : public BaseScreen, public CachedScreen { + private: + static uint8_t getSoftenTemp(); + static ExtUI::extruder_t getExtruder(); + static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + static uint32_t getTempColor(uint32_t temp); + public: + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static void onIdle(); +}; + +class BaseNumericAdjustmentScreen : public BaseScreen { + public: + enum precision_default_t { + DEFAULT_LOWEST, + DEFAULT_MIDRANGE, + DEFAULT_HIGHEST + }; + + protected: + class widgets_t { + private: + draw_mode_t _what; + uint8_t _line; + uint32_t _color; + uint8_t _decimals; + const char *_units; + + protected: + void _draw_increment_btn(uint8_t line, const uint8_t tag); + + public: + widgets_t(draw_mode_t); + + widgets_t &color(uint32_t color) {_color = color; return *this;} + widgets_t &units(const char *units) {_units = units; return *this;} + widgets_t &draw_mode(draw_mode_t what) {_what = what; return *this;} + widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST); + + void heading (const char *label); + void adjuster_sram_val (uint8_t tag, const char *label, const char *value, bool is_enabled = true); + void adjuster (uint8_t tag, const char *label, const char *value, bool is_enabled = true); + void adjuster (uint8_t tag, const char *label, float value=0, bool is_enabled = true); + void button (uint8_t tag, const char *label, bool is_enabled = true); + void text_field (uint8_t tag, const char *label, const char *value, bool is_enabled = true); + void two_buttons (uint8_t tag1, const char *label1, + uint8_t tag2, const char *label2, bool is_enabled = true); + void toggle (uint8_t tag, const char *label, const char *text, bool value, bool is_enabled = true); + void home_buttons (uint8_t tag); + void increments (); + }; + + static float getIncrement(); + + public: + static void onEntry(); + static bool onTouchEnd(uint8_t tag); +}; + +class MoveAxisScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + private: + static float getManualFeedrate(uint8_t axis, float increment_mm); + public: + static void setManualFeedrate(ExtUI::axis_t, float increment_mm); + static void setManualFeedrate(ExtUI::extruder_t, float increment_mm); + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + static void onIdle(); +}; + +class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +#if HAS_TRINAMIC + class StepperCurrentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; + + class StepperBumpSensitivityScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +#if HAS_BED_PROBE + class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +#if HOTENDS > 1 + class NozzleOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +#if ENABLED(BABYSTEPPING) + class NudgeNozzleScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static void onIdle(); + }; +#endif + +#if ENABLED(BACKLASH_GCODE) + class BacklashCompensationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +class FeedratePercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +class MaxVelocityScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +class MaxAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +#if ENABLED(JUNCTION_DEVIATION) + class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#else + class JerkScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + }; +#endif + +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + class FilamentRunoutScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +#if ENABLED(LIN_ADVANCE) + class LinearAdvanceScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + +class TemperatureScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +class InterfaceSoundsScreen : public BaseScreen, public CachedScreen { + public: + enum event_t { + PRINTING_STARTED = 0, + PRINTING_FINISHED = 1, + PRINTING_FAILED = 2, + + NUM_EVENTS + }; + + private: + friend class InterfaceSettingsScreen; + + static uint8_t event_sounds[NUM_EVENTS]; + + static const char* getSoundSelection(event_t); + static void toggleSoundSelection(event_t); + static void setSoundSelection(event_t, const FTDI::SoundPlayer::sound_t*); + + public: + static void playEventSound(event_t, FTDI::play_mode_t = FTDI::PLAY_ASYNCHRONOUS); + + static void defaultSettings(); + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; + +class InterfaceSettingsScreen : public BaseScreen, public CachedScreen { + private: + struct persistent_data_t { + uint32_t touch_transform_a; + uint32_t touch_transform_b; + uint32_t touch_transform_c; + uint32_t touch_transform_d; + uint32_t touch_transform_e; + uint32_t touch_transform_f; + uint16_t passcode; + uint8_t display_brightness; + int8_t display_h_offset_adj; + int8_t display_v_offset_adj; + uint8_t sound_volume; + uint8_t bit_flags; + uint8_t event_sounds[InterfaceSoundsScreen::NUM_EVENTS]; + }; + + public: + #ifdef LULZBOT_EEPROM_BACKUP_SIZE + static bool backupEEPROM(); + #endif + + static void saveSettings(char *); + static void loadSettings(const char *); + static void defaultSettings(); + static void failSafeSettings(); + + static void onStartup(); + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; + +class LockScreen : public BaseScreen, public CachedScreen { + private: + friend InterfaceSettingsScreen; + + static uint16_t passcode; + + static char & message_style(); + static uint16_t compute_checksum(); + static void onPasscodeEntered(); + public: + static bool is_enabled(); + static void check_passcode(); + static void enable(); + static void disable(); + + static void set_hash(uint16_t pass) {passcode = pass;}; + static uint16_t get_hash() {return passcode;}; + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; + +class FilesScreen : public BaseScreen, public CachedScreen { + private: + #ifdef TOUCH_UI_PORTRAIT + static constexpr uint8_t header_h = 2; + static constexpr uint8_t footer_h = 2; + static constexpr uint8_t files_per_page = 11; + #else + static constexpr uint8_t header_h = 1; + static constexpr uint8_t footer_h = 1; + static constexpr uint8_t files_per_page = 6; + #endif + + static uint8_t getTagForLine(uint8_t line) {return line + 2;} + static uint8_t getLineForTag(uint8_t tag) {return tag - 2;} + static uint16_t getFileForTag(uint8_t tag); + + static const char *getSelectedShortFilename(); + static const char *getSelectedLongFilename(); + + static void drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted); + static void drawFileList(); + static void drawHeader(); + static void drawFooter(); + static void drawSelectedFile(); + + static void gotoPage(uint8_t); + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; + +class EndstopStatesScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; + +class DisplayTuningScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; + +#if ENABLED(DEVELOPER_SCREENS) + class DeveloperMenu : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + }; + + class ConfirmEraseFlashDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + }; + + class WidgetsScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static void onIdle(); + }; + + class StressTestScreen : public BaseScreen, public UncachedScreen { + private: + static void drawDots(uint16_t x, uint16_t y, uint16_t h, uint16_t v); + static bool watchDogTestNow(); + static void recursiveLockup(); + static void iterativeLockup(); + static void runTestOnBootup(bool enable); + + public: + static void startupCheck(); + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); + }; +#endif + +class MediaPlayerScreen : public BaseScreen, public UncachedScreen { + private: + typedef int16_t media_streamer_func_t(void *obj, void *buff, size_t bytes); + + public: + static bool playCardMedia(); + static bool playBootMedia(); + + static void onEntry(); + static void onRedraw(draw_mode_t); + + static void playStream(void *obj, media_streamer_func_t*); +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/spinner_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/spinner_dialog_box.cpp new file mode 100644 index 000000000000..971bd5e5ba20 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/spinner_dialog_box.cpp @@ -0,0 +1,67 @@ +/************************** + * spinner_dialog_box.cpp * + **************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" +#include "screen_data.h" + +using namespace FTDI; +using namespace ExtUI; + +void SpinnerDialogBox::onRedraw(draw_mode_t) { +} + +void SpinnerDialogBox::show(const progmem_str message) { + drawMessage(message); + drawSpinner(); + storeBackground(); + screen_data.SpinnerDialogBox.auto_hide = false; +} + +void SpinnerDialogBox::hide() { + CommandProcessor cmd; + cmd.stop().execute(); +} + +void SpinnerDialogBox::enqueueAndWait_P(const progmem_str commands) { + enqueueAndWait_P(F("Please wait..."), commands); +} + +void SpinnerDialogBox::enqueueAndWait_P(const progmem_str message, const progmem_str commands) { + show(message); + GOTO_SCREEN(SpinnerDialogBox); + ExtUI::injectCommands_P((const char*)commands); + screen_data.SpinnerDialogBox.auto_hide = true; +} + +void SpinnerDialogBox::onIdle() { + if (screen_data.SpinnerDialogBox.auto_hide && !commandsInQueue()) { + screen_data.SpinnerDialogBox.auto_hide = false; + hide(); + GOTO_PREVIOUS(); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp new file mode 100644 index 000000000000..efc1cc38f325 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp @@ -0,0 +1,77 @@ +/************************* + * statistics_screen.cpp * + *************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(PRINTCOUNTER) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define GRID_COLS 4 +#define GRID_ROWS 7 + +void StatisticsScreen::onRedraw(draw_mode_t what) { + CommandProcessor cmd; + + if (what & BACKGROUND) { + char buffer[21]; + + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0) + + .font(Theme::font_medium) + .text(BTN_POS(1,1), BTN_SIZE(4,1), F("Printer Statistics")) + .font(Theme::font_small) + .tag(0) + .text(BTN_POS(1,2), BTN_SIZE(2,1), F("Total Prints:"), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,3), BTN_SIZE(2,1), F("Finished Prints:"), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,4), BTN_SIZE(2,1), F("Total Print Time:"), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,5), BTN_SIZE(2,1), F("Longest Print:"), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,6), BTN_SIZE(2,1), F("Filament Used:"), OPT_RIGHTX | OPT_CENTERY); + // Don't chain the following, it causes strange issues with evaluation ordering! + cmd.text(BTN_POS(3,2), BTN_SIZE(2,1), getTotalPrints_str(buffer)); + cmd.text(BTN_POS(3,3), BTN_SIZE(2,1), getFinishedPrints_str(buffer)); + cmd.text(BTN_POS(3,4), BTN_SIZE(2,1), getTotalPrintTime_str(buffer)); + cmd.text(BTN_POS(3,5), BTN_SIZE(2,1), getLongestPrint_str(buffer)); + cmd.text(BTN_POS(3,6), BTN_SIZE(2,1), getFilamentUsed_str(buffer)); + } + + if (what & FOREGROUND) { + cmd.font(Theme::font_medium) + .colors(action_btn) + .tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), F("Back")); + } +} + +bool StatisticsScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + default: return false; + } +} + +#endif // LULZBOT_TOUCH_UI && PRINTCOUNTER diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp new file mode 100644 index 000000000000..420ac2b43096 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp @@ -0,0 +1,446 @@ +/********************* + * status_screen.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" +#include "screen_data.h" + +#include "../archim2-flash/flash_storage.h" + +#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) + #include "../../../../../sd/cardreader.h" +#endif + +using namespace FTDI; +using namespace Theme; + +#ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 8 +#else + #define GRID_ROWS 8 +#endif + +void StatusScreen::draw_axis_position(draw_mode_t what) { + CommandProcessor cmd; + + #define GRID_COLS 3 + + if (what & BACKGROUND) { + cmd.tag(6) + #ifdef TOUCH_UI_PORTRAIT + .fgcolor(Theme::axis_label) + .font(Theme::font_large) + .button( BTN_POS(1,5), BTN_SIZE(2,1), F(""), OPT_FLAT) + .button( BTN_POS(1,6), BTN_SIZE(2,1), F(""), OPT_FLAT) + .button( BTN_POS(1,7), BTN_SIZE(2,1), F(""), OPT_FLAT) + + .font(Theme::font_small) + .text ( BTN_POS(1,5), BTN_SIZE(1,1), F("X")) + .text ( BTN_POS(1,6), BTN_SIZE(1,1), F("Y")) + .text ( BTN_POS(1,7), BTN_SIZE(1,1), F("Z")) + + .font(Theme::font_medium) + .fgcolor(Theme::x_axis) .button( BTN_POS(2,5), BTN_SIZE(2,1), F(""), OPT_FLAT) + .fgcolor(Theme::y_axis) .button( BTN_POS(2,6), BTN_SIZE(2,1), F(""), OPT_FLAT) + .fgcolor(Theme::z_axis) .button( BTN_POS(2,7), BTN_SIZE(2,1), F(""), OPT_FLAT); + #else + .fgcolor(Theme::axis_label) + .font(Theme::font_large) + .button( BTN_POS(1,5), BTN_SIZE(1,2), F(""), OPT_FLAT) + .button( BTN_POS(2,5), BTN_SIZE(1,2), F(""), OPT_FLAT) + .button( BTN_POS(3,5), BTN_SIZE(1,2), F(""), OPT_FLAT) + + .font(Theme::font_small) + .text ( BTN_POS(1,5), BTN_SIZE(1,1), F("X")) + .text ( BTN_POS(2,5), BTN_SIZE(1,1), F("Y")) + .text ( BTN_POS(3,5), BTN_SIZE(1,1), F("Z")) + .font(Theme::font_medium) + + .fgcolor(Theme::x_axis) .button( BTN_POS(1,6), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(Theme::y_axis) .button( BTN_POS(2,6), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(Theme::z_axis) .button( BTN_POS(3,6), BTN_SIZE(1,1), F(""), OPT_FLAT); + #endif + } + + if (what & FOREGROUND) { + using namespace ExtUI; + char x_str[15]; + char y_str[15]; + char z_str[15]; + + if (isAxisPositionKnown(X)) { + dtostrf(getAxisPosition_mm(X), 5, 1, x_str); + strcat_P(x_str, PSTR(" mm")); + } else { + strcpy_P(x_str, PSTR("?")); + } + + if (isAxisPositionKnown(Y)) { + dtostrf(getAxisPosition_mm(Y), 5, 1, y_str); + strcat_P(y_str, PSTR(" mm")); + } else { + strcpy_P(y_str, PSTR("?")); + } + + if (isAxisPositionKnown(Z)) { + dtostrf(getAxisPosition_mm(Z), 5, 1, z_str); + strcat_P(z_str, PSTR(" mm")); + } else { + strcpy_P(z_str, PSTR("?")); + } + + cmd.tag(6).font(Theme::font_medium) + #ifdef TOUCH_UI_PORTRAIT + .text ( BTN_POS(2,5), BTN_SIZE(2,1), x_str) + .text ( BTN_POS(2,6), BTN_SIZE(2,1), y_str) + .text ( BTN_POS(2,7), BTN_SIZE(2,1), z_str); + #else + .text ( BTN_POS(1,6), BTN_SIZE(1,1), x_str) + .text ( BTN_POS(2,6), BTN_SIZE(1,1), y_str) + .text ( BTN_POS(3,6), BTN_SIZE(1,1), z_str); + #endif + } + + #undef GRID_COLS +} + +#ifdef TOUCH_UI_PORTRAIT + #define GRID_COLS 8 +#else + #define GRID_COLS 12 +#endif + +void StatusScreen::draw_temperature(draw_mode_t what) { + using namespace Theme; + + CommandProcessor cmd; + + if (what & BACKGROUND) { + cmd.font(Theme::font_small) + #ifdef TOUCH_UI_PORTRAIT + .tag(5) + .fgcolor(temp) .button( BTN_POS(1,1), BTN_SIZE(4,2), F(""), OPT_FLAT) + .button( BTN_POS(1,1), BTN_SIZE(8,1), F(""), OPT_FLAT) + .fgcolor(fan_speed) .button( BTN_POS(5,2), BTN_SIZE(4,1), F(""), OPT_FLAT) + .tag(0) + .fgcolor(progress) .button( BTN_POS(1,3), BTN_SIZE(4,1), F(""), OPT_FLAT) + .button( BTN_POS(5,3), BTN_SIZE(4,1), F(""), OPT_FLAT); + #else + .tag(5) + .fgcolor(temp) .button( BTN_POS(1,1), BTN_SIZE(4,2), F(""), OPT_FLAT) + .button( BTN_POS(1,1), BTN_SIZE(8,1), F(""), OPT_FLAT) + .fgcolor(fan_speed) .button( BTN_POS(5,2), BTN_SIZE(4,1), F(""), OPT_FLAT) + .tag(0) + .fgcolor(progress) .button( BTN_POS(9,1), BTN_SIZE(4,1), F(""), OPT_FLAT) + .button( BTN_POS(9,2), BTN_SIZE(4,1), F(""), OPT_FLAT); + #endif + + // Draw Extruder Bitmap on Extruder Temperature Button + + cmd.tag(5) + .cmd(BITMAP_SOURCE(Extruder_Icon_Info)) + .cmd(BITMAP_LAYOUT(Extruder_Icon_Info)) + .cmd(BITMAP_SIZE (Extruder_Icon_Info)) + .icon (BTN_POS(1,1), BTN_SIZE(1,1), Extruder_Icon_Info, icon_scale) + .icon (BTN_POS(5,1), BTN_SIZE(1,1), Extruder_Icon_Info, icon_scale); + + // Draw Bed Heat Bitmap on Bed Heat Button + cmd.cmd(BITMAP_SOURCE(Bed_Heat_Icon_Info)) + .cmd(BITMAP_LAYOUT(Bed_Heat_Icon_Info)) + .cmd(BITMAP_SIZE (Bed_Heat_Icon_Info)) + .icon (BTN_POS(1,2), BTN_SIZE(1,1), Bed_Heat_Icon_Info, icon_scale); + + // Draw Fan Percent Bitmap on Bed Heat Button + + cmd.cmd(BITMAP_SOURCE(Fan_Icon_Info)) + .cmd(BITMAP_LAYOUT(Fan_Icon_Info)) + .cmd(BITMAP_SIZE (Fan_Icon_Info)) + .icon (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale); + } + + if (what & FOREGROUND) { + using namespace ExtUI; + char e0_str[15]; + char e1_str[15]; + char bed_str[15]; + char fan_str[15]; + + sprintf_P( + fan_str, + PSTR("%-3d %%"), + int8_t(getActualFan_percent(FAN0)) + ); + + const char *idle = PSTR("%-3d C / idle"); + const char *not_idle = PSTR("%-3d / %-3d C"); + + sprintf_P( + bed_str, + isHeaterIdle(BED) ? idle : not_idle, + ROUND(getActualTemp_celsius(BED)), + ROUND(getTargetTemp_celsius(BED)) + ); + + sprintf_P( + e0_str, + isHeaterIdle(H0) ? idle : not_idle, + ROUND(getActualTemp_celsius(H0)), + ROUND(getTargetTemp_celsius(H0)) + ); + + #if EXTRUDERS == 2 + sprintf_P( + e1_str, + isHeaterIdle(H1) ? idle : not_idle, + ROUND(getActualTemp_celsius(H1)), + ROUND(getTargetTemp_celsius(H1)) + ); + #else + strcpy_P( + e1_str, + PSTR("-") + ); + #endif + + cmd.tag(5) + .font(font_medium) + .text(BTN_POS(2,1), BTN_SIZE(3,1), e0_str) + .text(BTN_POS(6,1), BTN_SIZE(3,1), e1_str) + .text(BTN_POS(2,2), BTN_SIZE(3,1), bed_str) + .text(BTN_POS(6,2), BTN_SIZE(3,1), fan_str); + } +} + +void StatusScreen::draw_progress(draw_mode_t what) { + using namespace ExtUI; + using namespace Theme; + + CommandProcessor cmd; + + if (what & BACKGROUND) { + cmd.tag(0).font(font_medium) + #ifdef TOUCH_UI_PORTRAIT + .fgcolor(progress) .button(BTN_POS(1,3), BTN_SIZE(4,1), F(""), OPT_FLAT) + .button(BTN_POS(5,3), BTN_SIZE(4,1), F(""), OPT_FLAT); + #else + .fgcolor(progress) .button(BTN_POS(9,1), BTN_SIZE(4,1), F(""), OPT_FLAT) + .button(BTN_POS(9,2), BTN_SIZE(4,1), F(""), OPT_FLAT); + #endif + } + + if (what & FOREGROUND) { + const uint32_t elapsed = getProgress_seconds_elapsed(); + const uint8_t hrs = elapsed/3600; + const uint8_t min = (elapsed/60)%60; + + char time_str[10]; + char progress_str[10]; + + sprintf_P(time_str, PSTR(" %02d : %02d"), hrs, min); + sprintf_P(progress_str, PSTR("%-3d %%"), getProgress_percent() ); + + cmd.font(font_medium) + #ifdef TOUCH_UI_PORTRAIT + .tag(0).text(BTN_POS(1,3), BTN_SIZE(4,1), time_str) + .text(BTN_POS(5,3), BTN_SIZE(4,1), progress_str); + #else + .tag(0).text(BTN_POS(9,1), BTN_SIZE(4,1), time_str) + .text(BTN_POS(9,2), BTN_SIZE(4,1), progress_str); + #endif + } +} + +#undef GRID_COLS + + +void StatusScreen::draw_interaction_buttons(draw_mode_t what) { + #define GRID_COLS 4 + if (what & FOREGROUND) { + using namespace ExtUI; + + const bool has_media = isMediaInserted() && !isPrintingFromMedia(); + + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(Theme::font_medium) + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) + .enabled(!Sd2Card::ready() || has_media) + #else + .enabled(has_media) + #endif + .colors(has_media ? action_btn : normal_btn) + #ifdef TOUCH_UI_PORTRAIT + .tag(3).button( BTN_POS(1,8), BTN_SIZE(2,1), + #else + .tag(3).button( BTN_POS(1,7), BTN_SIZE(2,2), + #endif + isPrintingFromMedia() ? F("Printing") : + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #ifdef LULZBOT_MANUAL_USB_STARTUP + (Sd2Card::ready() ? F("USB Drive") : F("Enable USB")) + #else + F("USB Drive") + #endif + ) + #else + F("SD Card")) + #endif + .colors(!has_media ? action_btn : normal_btn) + #ifdef TOUCH_UI_PORTRAIT + .tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), F("MENU")); + #else + .tag(4).button( BTN_POS(3,7), BTN_SIZE(2,2), F("MENU")); + #endif + } + #undef GRID_COLS +} + +void StatusScreen::draw_status_message(draw_mode_t what, const char* message) { + #define GRID_COLS 1 + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.fgcolor(Theme::status_msg) + .tag(0) + #ifdef TOUCH_UI_PORTRAIT + .button( BTN_POS(1,4), BTN_SIZE(1,1), F(""), OPT_FLAT); + #else + .button( BTN_POS(1,3), BTN_SIZE(1,2), F(""), OPT_FLAT); + #endif + + draw_text_box(cmd, + #ifdef TOUCH_UI_PORTRAIT + BTN_POS(1,4), BTN_SIZE(1,1), + #else + BTN_POS(1,3), BTN_SIZE(1,2), + #endif + message, OPT_CENTER, font_large); + } + #undef GRID_COLS +} + +void StatusScreen::setStatusMessage(progmem_str message) { + char buff[strlen_P((const char * const)message)+1]; + strcpy_P(buff, (const char * const) message); + setStatusMessage((const char *) buff); +} + +void StatusScreen::setStatusMessage(const char* message) { + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)); + + draw_temperature(BACKGROUND); + draw_progress(BACKGROUND); + draw_axis_position(BACKGROUND); + draw_status_message(BACKGROUND, message); + draw_interaction_buttons(BACKGROUND); + storeBackground(); + + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("New status message: ", message); + #endif + + if (AT_SCREEN(StatusScreen)) { + current_screen.onRefresh(); + } +} + +void StatusScreen::onStartup() { + // Load the bitmaps for the status screen + + using namespace Theme; + constexpr uint32_t base = ftdi_memory_map::RAM_G; + CLCD::mem_write_pgm(base + TD_Icon_Info.RAMG_offset, TD_Icon, sizeof(TD_Icon)); + CLCD::mem_write_pgm(base + Extruder_Icon_Info.RAMG_offset, Extruder_Icon, sizeof(Extruder_Icon)); + CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon)); + CLCD::mem_write_pgm(base + Fan_Icon_Info.RAMG_offset, Fan_Icon, sizeof(Fan_Icon)); + + setStatusMessage(F(WELCOME_MSG)); + + UIFlashStorage::initialize(); +} + +void StatusScreen::onRedraw(draw_mode_t what) { + if (what & FOREGROUND) { + draw_temperature(FOREGROUND); + draw_progress(FOREGROUND); + draw_axis_position(FOREGROUND); + draw_interaction_buttons(FOREGROUND); + } +} + +void StatusScreen::onEntry() { + onRefresh(); +} + +void StatusScreen::onIdle() { + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + } + BaseScreen::onIdle(); +} + +bool StatusScreen::onTouchEnd(uint8_t tag) { + using namespace ExtUI; + + switch (tag) { + case 3: + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP) + if (!Sd2Card::ready()) { + StatusScreen::setStatusMessage(F("Insert USB drive...")); + Sd2Card::usbStartup(); + } else { + GOTO_SCREEN(FilesScreen); + } + #else + GOTO_SCREEN(FilesScreen); + #endif + break; + case 4: + if (isPrinting()) { + GOTO_SCREEN(TuneMenu); + } else { + GOTO_SCREEN(MainMenu); + } + break; + case 5: GOTO_SCREEN(TemperatureScreen); break; + case 6: + if (!isPrinting()) { + GOTO_SCREEN(MoveAxisScreen); + } + break; + default: + return true; + } + // If a passcode is enabled, the LockScreen will prevent the + // user from proceeding. + LockScreen::check_passcode(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_bump_sensitivity_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_bump_sensitivity_screen.cpp new file mode 100644 index 000000000000..651bfa8d5c02 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_bump_sensitivity_screen.cpp @@ -0,0 +1,77 @@ +/************************************** + * stepper_bump_sensiivity_screen.cpp * + **************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && HAS_TRINAMIC + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void StepperBumpSensitivityScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0, BaseNumericAdjustmentScreen::DEFAULT_LOWEST); + w.heading( PSTR("TMC Bump Sensitivity")); + w.color(x_axis) .adjuster( 2, PSTR("X:"), getTMCBumpSensitivity(X), + #if X_SENSORLESS && AXIS_HAS_STALLGUARD(X) + true + #else + false + #endif + ); + w.color(y_axis) .adjuster( 4, PSTR("Y:"), getTMCBumpSensitivity(Y), + #if Y_SENSORLESS && AXIS_HAS_STALLGUARD(Y) + true + #else + false + #endif + ); + w.color(z_axis) .adjuster( 6, PSTR("Z:"), getTMCBumpSensitivity(Z), + #if Z_SENSORLESS && AXIS_HAS_STALLGUARD(Z) + true + #else + false + #endif + ); + w.increments(); +} + +bool StepperBumpSensitivityScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(TMCBumpSensitivity, X ); break; + case 3: UI_INCREMENT(TMCBumpSensitivity, X ); break; + case 4: UI_DECREMENT(TMCBumpSensitivity, Y ); break; + case 5: UI_INCREMENT(TMCBumpSensitivity, Y ); break; + case 6: UI_DECREMENT(TMCBumpSensitivity, Z ); break; + case 7: UI_INCREMENT(TMCBumpSensitivity, Z ); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI && HAS_TRINAMIC diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_current_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_current_screen.cpp new file mode 100644 index 000000000000..edeed6825145 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_current_screen.cpp @@ -0,0 +1,86 @@ +/****************************** + * stepper_current_screen.cpp * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && HAS_TRINAMIC + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void StepperCurrentScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0); + w.units(PSTR("mA")); + w.heading( PSTR("Stepper Current")); + w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisCurrent_mA(X) ); + w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisCurrent_mA(Y) ); + w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisCurrent_mA(Z) ); + #if EXTRUDERS == 1 + w.color(e_axis).adjuster( 8, PSTR("E:"), getAxisCurrent_mA(E0) ); + #elif EXTRUDERS > 1 + w.color(e_axis).adjuster( 8, PSTR("E1:"), getAxisCurrent_mA(E0) ); + w.color(e_axis).adjuster(10, PSTR("E2:"), getAxisCurrent_mA(E1) ); + #if EXTRUDERS > 2 + w.color(e_axis).adjuster(12, PSTR("E3:"), getAxisCurrent_mA(E2) ); + #endif + #if EXTRUDERS > 3 + w.color(e_axis).adjuster(14, PSTR("E4:"), getAxisCurrent_mA(E3) ); + #endif + #endif + w.increments(); +} + +bool StepperCurrentScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(AxisCurrent_mA, X ); break; + case 3: UI_INCREMENT(AxisCurrent_mA, X ); break; + case 4: UI_DECREMENT(AxisCurrent_mA, Y ); break; + case 5: UI_INCREMENT(AxisCurrent_mA, Y ); break; + case 6: UI_DECREMENT(AxisCurrent_mA, Z ); break; + case 7: UI_INCREMENT(AxisCurrent_mA, Z ); break; + case 8: UI_DECREMENT(AxisCurrent_mA, E0); break; + case 9: UI_INCREMENT(AxisCurrent_mA, E0); break; + #if EXTRUDERS > 1 + case 10: UI_DECREMENT(AxisCurrent_mA, E1); break; + case 11: UI_INCREMENT(AxisCurrent_mA, E1); break; + #endif + #if EXTRUDERS > 2 + case 12: UI_DECREMENT(AxisCurrent_mA, E2); break; + case 13: UI_INCREMENT(AxisCurrent_mA, E2); break; + #endif + #if EXTRUDERS > 3 + case 14: UI_DECREMENT(AxisCurrent_mA, E3); break; + case 15: UI_INCREMENT(AxisCurrent_mA, E3); break; + #endif + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/steps_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/steps_screen.cpp new file mode 100644 index 000000000000..f368b3b4258a --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/steps_screen.cpp @@ -0,0 +1,86 @@ +/******************** + * steps_screen.cpp * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void StepsScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0); + w.units(PSTR("st/mm")); + w.heading( PSTR("Steps/mm")); + w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisSteps_per_mm(X) ); + w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisSteps_per_mm(Y) ); + w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisSteps_per_mm(Z) ); + #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS) + w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisSteps_per_mm(E0) ); + #elif EXTRUDERS > 1 + w.color(e_axis) .adjuster( 8, PSTR("E1:"), getAxisSteps_per_mm(E0) ); + w.color(e_axis) .adjuster(10, PSTR("E2:"), getAxisSteps_per_mm(E1) ); + #if EXTRUDERS > 2 + w.color(e_axis) .adjuster(12, PSTR("E3:"), getAxisSteps_per_mm(E2) ); + #endif + #if EXTRUDERS > 3 + w.color(e_axis) .adjuster(14, PSTR("E4:"), getAxisSteps_per_mm(E3) ); + #endif + #endif + w.increments(); +} + +bool StepsScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 2: UI_DECREMENT(AxisSteps_per_mm, X); break; + case 3: UI_INCREMENT(AxisSteps_per_mm, X); break; + case 4: UI_DECREMENT(AxisSteps_per_mm, Y); break; + case 5: UI_INCREMENT(AxisSteps_per_mm, Y); break; + case 6: UI_DECREMENT(AxisSteps_per_mm, Z); break; + case 7: UI_INCREMENT(AxisSteps_per_mm, Z); break; + case 8: UI_DECREMENT(AxisSteps_per_mm, E0); break; + case 9: UI_INCREMENT(AxisSteps_per_mm, E0); break; + #if EXTRUDERS > 1 + case 10: UI_DECREMENT(AxisSteps_per_mm, E1); break; + case 11: UI_INCREMENT(AxisSteps_per_mm, E1); break; + #endif + #if EXTRUDERS > 2 + case 12: UI_DECREMENT(AxisSteps_per_mm, E2); break; + case 13: UI_INCREMENT(AxisSteps_per_mm, E2); break; + #endif + #if EXTRUDERS > 3 + case 14: UI_DECREMENT(AxisSteps_per_mm, E3); break; + case 15: UI_INCREMENT(AxisSteps_per_mm, E3); break; + #endif + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stress_test_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stress_test_screen.cpp new file mode 100644 index 000000000000..5ef833147369 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stress_test_screen.cpp @@ -0,0 +1,151 @@ +/************************** + * stress_test_screen.cpp * + **************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) + +#include "screens.h" +#include "screen_data.h" + +#define STRESS_TEST_CHANGE_INTERVAL 6000 + +#define GRID_COLS 4 +#define GRID_ROWS 9 + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + CommandProcessor cmd; + for(uint8_t i = 0; i < 100; i++) { + cmd.cmd(BEGIN(POINTS)) + .cmd(POINT_SIZE(20*16)) + .cmd(COLOR_RGB(random(0xFFFFFF))) + .cmd(VERTEX2F((x + random(w)) * 16,(y + random(h)) * 16)); + } +} + +bool StressTestScreen::watchDogTestNow() { + return screen_data.StressTestScreen.next_watchdog_trigger && + ELAPSED(millis(), screen_data.StressTestScreen.next_watchdog_trigger); +} + +void StressTestScreen::onRedraw(draw_mode_t) { + using namespace ExtUI; + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .font(font_medium) + .text(BTN_POS(1,1), BTN_SIZE(4,1), progmem_str(screen_data.StressTestScreen.message)); + + drawDots(BTN_POS(1,3), BTN_SIZE(4,4)); + + cmd.font(font_medium).enabled(!watchDogTestNow()).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), F("Exit")); +} + +bool StressTestScreen::onTouchEnd(uint8_t tag) { + CommandProcessor cmd; + switch (tag) { + case 1: + runTestOnBootup(false); + GOTO_SCREEN(StatusScreen); + break; + default: + return false; + } + return true; +} + +void StressTestScreen::runTestOnBootup(bool enable) { + // Use a magic value in passcode to indicate + // whether or not we need to re-run the test + // at startup. + LockScreen::set_hash(enable ? 0xDEAD : 0); + injectCommands_P(PSTR("M500")); +} + +void StressTestScreen::startupCheck() { + if (LockScreen::get_hash() == 0xDEAD) { + GOTO_SCREEN(StressTestScreen); + } +} + +void StressTestScreen::onEntry() { + screen_data.StressTestScreen.next_watchdog_trigger = millis() + 10000 + random(40000); + screen_data.StressTestScreen.message = PSTR("Test 1: Stress testing..."); + + // Turn off heaters. + setTargetTemp_celsius(0, E0); + setTargetTemp_celsius(0, E1); + setTargetTemp_celsius(0, BED); + + runTestOnBootup(true); +} + +void StressTestScreen::recursiveLockup() { + screen_data.StressTestScreen.message = PSTR("Test 2: Printer will restart."); + current_screen.onRefresh(); + recursiveLockup(); +} + +void StressTestScreen::iterativeLockup() { + screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart."); + for(;;) current_screen.onRefresh(); +} + +void StressTestScreen::onIdle() { + current_screen.onRefresh(); + reset_menu_timeout(); + + if (!commandsInQueue()) { + if (!isPositionKnown()) { + injectCommands_P(PSTR("G28")); + } else { + injectCommands_P(PSTR( + "G0 X100 Y100 Z100 F6000\n" + "T0\nG4 S1" + #if EXTRUDERS > 1 + "\nT1\nG4 S1" + #endif + "\nG0 X150 Y150 Z150" + )); + } + } + + if (refresh_timer.elapsed(STRESS_TEST_CHANGE_INTERVAL)) { + setTargetFan_percent(random(100),FAN0); + } + + if (watchDogTestNow()) { + if (random(2) % 2) + iterativeLockup(); + else + recursiveLockup(); + } + + BaseScreen::onIdle(); +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/temperature_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/temperature_screen.cpp new file mode 100644 index 000000000000..126562d0180c --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/temperature_screen.cpp @@ -0,0 +1,111 @@ +/******************* + * boot_screen.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void TemperatureScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(0).color(temp).units(PSTR("C")); + w.heading( PSTR("Temperature:")); + w.button(30, PSTR("Cooldown (All Off)")); + #ifndef LULZBOT_DISABLE_TOOLHEAD_HEATER + #if HOTENDS == 1 + w.adjuster( 2, PSTR("Hot End:"), getTargetTemp_celsius(E0)); + #else + w.adjuster( 2, PSTR("Hot End 1:"), getTargetTemp_celsius(E0)); + w.adjuster( 4, PSTR("Hot End 2:"), getTargetTemp_celsius(E1)); + #if HOTENDS > 2 + w.adjuster( 6, PSTR("Hot End 3:"), getTargetTemp_celsius(E2)); + #endif + #if HOTENDS > 3 + w.adjuster( 8, PSTR("Hot End 4:"), getTargetTemp_celsius(E3)); + #endif + #endif + #endif + #if HAS_HEATED_BED + w.adjuster( 20, PSTR("Bed:"), getTargetTemp_celsius(BED)); + #endif + #if FAN_COUNT > 0 + w.color(fan_speed).units(PSTR("%")); + w.adjuster( 10, PSTR("Fan Speed:"), getTargetFan_percent(FAN0)); + #endif + w.increments(); +} + +bool TemperatureScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 20: UI_DECREMENT(TargetTemp_celsius, BED); break; + case 21: UI_INCREMENT(TargetTemp_celsius, BED); break; + #ifndef LULZBOT_DISABLE_TOOLHEAD_HEATER + case 2: UI_DECREMENT(TargetTemp_celsius, E0); break; + case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; + #endif + #if HOTENDS > 1 + case 4: UI_DECREMENT(TargetTemp_celsius, E1); break; + case 5: UI_INCREMENT(TargetTemp_celsius, E1); break; + #endif + #if HOTENDS > 2 + case 6: UI_DECREMENT(TargetTemp_celsius, E2); break; + case 7: UI_INCREMENT(TargetTemp_celsius, E2); break; + #endif + #if HOTENDS > 3 + case 8: UI_DECREMENT(TargetTemp_celsius, E3); break; + case 9: UI_INCREMENT(TargetTemp_celsius, E3); break; + #endif + #if FAN_COUNT > 0 + case 10: UI_DECREMENT(TargetFan_percent, FAN0); break; + case 11: UI_INCREMENT(TargetFan_percent, FAN0); break; + #endif + case 30: + setTargetTemp_celsius(0,E0); + #if HOTENDS > 1 + setTargetTemp_celsius(0,E1); + #if HOTENDS > 2 + setTargetTemp_celsius(0,E2); + #if HOTENDS > 3 + setTargetTemp_celsius(0,E4); + #endif + #endif + #endif + #if HAS_HEATED_BED + setTargetTemp_celsius(0,BED); + #endif + #if FAN_COUNT > 0 + setTargetFan_percent(0,FAN0); + #endif + break; + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_calibration_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_calibration_screen.cpp new file mode 100644 index 000000000000..0adf2885b0e7 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_calibration_screen.cpp @@ -0,0 +1,116 @@ +/******************************** + * touch_calibration_screen.cpp * + ********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +#define GRID_COLS 4 +#define GRID_ROWS 16 + +void TouchCalibrationScreen::onEntry() { + CommandProcessor cmd; + + BaseScreen::onEntry(); + + if (CLCD::is_touching()) { + // Ask the user to release the touch before starting, + // as otherwise the first calibration point could + // be misinterpreted. + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + #ifdef TOUCH_UI_PORTRAIT + .font(font_large) + .text ( BTN_POS(1,8), BTN_SIZE(4,1), F("Release to begin")) + .text ( BTN_POS(1,9), BTN_SIZE(4,1), F("screen calibration")) + #else + .font( + #ifdef TOUCH_UI_800x480 + font_large + #else + font_medium + #endif + ) + .text ( BTN_POS(1,1), BTN_SIZE(4,16), F("Release to calibrate")) + #endif + .cmd(DL::DL_DISPLAY) + .cmd(CMD_SWAP) + .execute(); + + while (CLCD::is_touching()) { + #ifdef UI_FRAMEWORK_DEBUG + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM("Waiting for touch release"); + #endif + } + } + + // Force a refresh + cmd.cmd(CMD_DLSTART); + onRedraw(FOREGROUND); + cmd.cmd(DL::DL_DISPLAY); + cmd.execute(); +} + +void TouchCalibrationScreen::onRefresh() { + // Don't do the regular refresh, as this would + // cause the calibration be restarted on every + // touch. +} + +void TouchCalibrationScreen::onRedraw(draw_mode_t) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + + #ifdef TOUCH_UI_PORTRAIT + .font(font_large) + .text ( BTN_POS(1,8), BTN_SIZE(4,1), F("Touch the dots")) + .text ( BTN_POS(1,9), BTN_SIZE(4,1), F("to calibrate")) + #else + .font( + #ifdef TOUCH_UI_800x480 + font_large + #else + font_medium + #endif + ) + .text ( BTN_POS(1,1), BTN_SIZE(4,16), F("Touch the dots to calibrate")) + #endif + .cmd(CMD_CALIBRATE); +} + +void TouchCalibrationScreen::onIdle() { + if (!CLCD::is_touching() && !CommandProcessor::is_processing()) { + GOTO_PREVIOUS(); + } +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_registers_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_registers_screen.cpp new file mode 100644 index 000000000000..4cb63077d882 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_registers_screen.cpp @@ -0,0 +1,86 @@ +/****************************** + * touch_registers_screen.cpp * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void TouchRegistersScreen::onRedraw(draw_mode_t) { + const uint32_t T_Transform_A = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_A); + const uint32_t T_Transform_B = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_B); + const uint32_t T_Transform_C = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_C); + const uint32_t T_Transform_D = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_D); + const uint32_t T_Transform_E = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_E); + const uint32_t T_Transform_F = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F); + char b[20]; + + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0); + + #define GRID_ROWS 7 + #define GRID_COLS 2 + cmd.tag(0) + .font(font_xsmall) + .fgcolor(transformA) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("TOUCH_XFORM_A")) + .fgcolor(transformB) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("TOUCH_XFORM_B")) + .fgcolor(transformC) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("TOUCH_XFORM_C")) + .fgcolor(transformD) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("TOUCH_XFORM_D")) + .fgcolor(transformE) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("TOUCH_XFORM_E")) + .fgcolor(transformF) .button( BTN_POS(1,6), BTN_SIZE(1,1), F("TOUCH_XFORM_F")) + + .fgcolor(transformVal).button( BTN_POS(2,1), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(transformVal).button( BTN_POS(2,2), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(transformVal).button( BTN_POS(2,3), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(transformVal).button( BTN_POS(2,4), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(transformVal).button( BTN_POS(2,5), BTN_SIZE(1,1), F(""), OPT_FLAT) + .fgcolor(transformVal).button( BTN_POS(2,6), BTN_SIZE(1,1), F(""), OPT_FLAT); + + sprintf_P(b, PSTR("0x%08lX"), T_Transform_A); cmd.text( BTN_POS(2,1), BTN_SIZE(1,1), b); + sprintf_P(b, PSTR("0x%08lX"), T_Transform_B); cmd.text( BTN_POS(2,2), BTN_SIZE(1,1), b); + sprintf_P(b, PSTR("0x%08lX"), T_Transform_C); cmd.text( BTN_POS(2,3), BTN_SIZE(1,1), b); + sprintf_P(b, PSTR("0x%08lX"), T_Transform_D); cmd.text( BTN_POS(2,4), BTN_SIZE(1,1), b); + sprintf_P(b, PSTR("0x%08lX"), T_Transform_E); cmd.text( BTN_POS(2,5), BTN_SIZE(1,1), b); + sprintf_P(b, PSTR("0x%08lX"), T_Transform_F); cmd.text( BTN_POS(2,6), BTN_SIZE(1,1), b); + + cmd.colors(action_btn).font(font_medium) + .tag(1).button( BTN_POS(2,7), BTN_SIZE(1,1), F("Back")); + #undef GRID_COLS + #undef GRID_ROWS + } + + bool TouchRegistersScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + default: + return false; + } + return true; + } + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp new file mode 100644 index 000000000000..37b60ed88cf0 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp @@ -0,0 +1,167 @@ +/******************* + * tune_menu.cpp * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI) + +#include "screens.h" + +using namespace FTDI; +using namespace Theme; + +void TuneMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .font(font_medium); + } + + #ifdef TOUCH_UI_PORTRAIT + #define GRID_ROWS 8 + #define GRID_COLS 2 + #else + #define GRID_ROWS 4 + #define GRID_COLS 2 + #endif + + if (what & FOREGROUND) { + using namespace ExtUI; + + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_medium) + #ifdef TOUCH_UI_PORTRAIT + .tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), F("Temperature")) + .tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Change Filament")) + #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + .enabled(1) + #else + .enabled(0) + #endif + .tag(9).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Filament Options")) + #if ENABLED(BABYSTEPPING) + .tag(4).enabled(1) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Nudge Nozzle")) + #else + #if HAS_BED_PROBE + .enabled(1) + #else + .enabled(0) + #endif + .tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Adjust Z-Offset")) + #endif + .tag(5).enabled(1) .button( BTN_POS(1,5), BTN_SIZE(2,1), F("Print Speed")) + .tag(isPrintingFromMediaPaused() ? 7 : 6) + #if ENABLED(SDSUPPORT) + .enabled(isPrintingFromMedia()) + #else + .enabled(0) + #endif + .button( BTN_POS(1,6), BTN_SIZE(2,1), isPrintingFromMediaPaused() ? F("Resume Print") : F("Pause Print")) + #if ENABLED(SDSUPPORT) + .enabled(isPrintingFromMedia()) + #else + .enabled(0) + #endif + .tag(8) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Cancel Print")) + .tag(1).colors(action_btn) + .button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back")); + #else // TOUCH_UI_PORTRAIT + .tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Temperature")) + .tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Change Filament")) + #if ENABLED(BABYSTEPPING) + .enabled(1) + #else + .enabled(0) + #endif + #if ENABLED(BABYSTEPPING) + .tag(4) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Nudge Nozzle")) + #else + #if HAS_BED_PROBE + .enabled(1) + #else + .enabled(0) + #endif + .tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Adjust Z-Offset")) + #endif + .tag(5).enabled(1) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Print Speed")) + .tag(isPrintingFromMediaPaused() ? 7 : 6) + #if ENABLED(SDSUPPORT) + .enabled(isPrintingFromMedia()) + #else + .enabled(0) + #endif + .button( BTN_POS(1,3), BTN_SIZE(1,1), isPrintingFromMediaPaused() ? F("Resume Print") : F("Pause Print")) + #if ENABLED(SDSUPPORT) + .enabled(isPrintingFromMedia()) + #else + .enabled(0) + #endif + .tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), F("Cancel Print")) + #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + .enabled(1) + #else + .enabled(0) + #endif + .tag(9).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Filament Options")) + .tag(1).colors(action_btn) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Back")); + #endif + } + #undef GRID_COLS + #undef GRID_ROWS +} + +bool TuneMenu::onTouchEnd(uint8_t tag) { + using namespace Theme; + using namespace ExtUI; + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + case 2: GOTO_SCREEN(TemperatureScreen); break; + case 3: GOTO_SCREEN(ChangeFilamentScreen); break; + case 4: + #if ENABLED(BABYSTEPPING) + GOTO_SCREEN(NudgeNozzleScreen); + #else + #if HAS_BED_PROBE + GOTO_SCREEN(ZOffsetScreen); + #endif + #endif + break; + case 5: GOTO_SCREEN(FeedratePercentScreen); break; + case 6: sound.play(twinkle, PLAY_ASYNCHRONOUS); ExtUI::pausePrint(); GOTO_SCREEN(StatusScreen); break; + case 7: sound.play(twinkle, PLAY_ASYNCHRONOUS); ExtUI::resumePrint(); GOTO_SCREEN(StatusScreen); break; + case 8: + GOTO_SCREEN(ConfirmAbortPrintDialogBox); + current_screen.forget(); + PUSH_SCREEN(StatusScreen); + break; + #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) + case 9: GOTO_SCREEN(FilamentMenu); break; + #endif + default: + return false; + } + return true; +} + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/widget_demo_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/widget_demo_screen.cpp new file mode 100644 index 000000000000..a3988ed5326c --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/widget_demo_screen.cpp @@ -0,0 +1,158 @@ +/************************** + * widget_demo_screen.cpp * + **************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +uint16_t slider_val; +bool show_grid; + +void WidgetsScreen::onEntry() { + BaseScreen::onEntry(); + CLCD::turn_on_backlight(); + SoundPlayer::set_volume(255); +} + +void WidgetsScreen::onRedraw(draw_mode_t) { + using namespace ExtUI; + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + + const uint16_t hrs = (slider_val*12/0xFFFFU); + const uint16_t m = (slider_val*12*60/0xFFFFU)%60; + const uint16_t s = (slider_val*12*60*60/0xFFFFU)%60; + + #ifdef TOUCH_UI_PORTRAIT + #define GRID_COLS 3 + #define GRID_ROWS 8 + cmd.font(font_large) + .cmd(COLOR_RGB(bg_text_enabled)) + .text (BTN_POS(1,1), BTN_SIZE(3,1), F("Sample Widgets")) + .tag(0).text (BTN_POS(2,6), BTN_SIZE(1,1), F("Show grid:")) + .colors(ui_toggle) + .tag(2).dial (BTN_POS(1,2), BTN_SIZE(1,2), slider_val) + .tag(0).clock (BTN_POS(1,4), BTN_SIZE(1,2), hrs, m, s, 0) + .gauge (BTN_POS(1,6), BTN_SIZE(1,2), 5, 4, slider_val, 0xFFFFU) + .font(font_medium) + .colors(ui_slider) + .tag(4).slider (BTN_POS(2,3), BTN_SIZE(2,1), slider_val, 0xFFFFU) + .tag(5).progress (BTN_POS(2,4), BTN_SIZE(2,1), slider_val, 0xFFFFU) + .tag(6).scrollbar (BTN_POS(2,5), BTN_SIZE(2,1), slider_val, 1000, 0xFFFFU) + .font(font_small) + .colors(ui_toggle) + .tag(7).toggle (BTN_POS(3,6), BTN_SIZE(1,1), F("no\xFFyes"), show_grid) + .colors(normal_btn) + .font(font_medium) + .tag(1) + .button (BTN_POS(2, 8), BTN_SIZE(1,1), F("1")) + .button (BTN_POS(3, 8), BTN_SIZE(1,1), F("2")) + .colors(action_btn) + .button (BTN_POS(1, 8), BTN_SIZE(1,1), F("Back")); + #else + #define GRID_COLS 4 + #define GRID_ROWS 8 + + cmd.font(font_large) + .text (BTN_POS(1,1), BTN_SIZE(4,1), F("Sample Widgets")) + .tag(0).text (BTN_POS(3,6), BTN_SIZE(1,1), F("Show grid:")) + .colors(ui_toggle) + .tag(2).dial (BTN_POS(1,2), BTN_SIZE(1,3), slider_val) + .tag(3).dial (BTN_POS(1,5), BTN_SIZE(1,3), slider_val) + .tag(0).clock (BTN_POS(2,2), BTN_SIZE(1,3), hrs, m, s, 0) + .gauge (BTN_POS(2,5), BTN_SIZE(1,3), 5, 4, slider_val, 0xFFFFU) + .font(font_medium) + .colors(ui_slider) + .tag(4).slider (BTN_POS(3,3), BTN_SIZE(2,1), slider_val, 0xFFFFU) + .tag(5).progress (BTN_POS(3,4), BTN_SIZE(2,1), slider_val, 0xFFFFU) + .tag(6).scrollbar (BTN_POS(3,5), BTN_SIZE(2,1), slider_val, 1000, 0xFFFFU) + .font(font_small) + .colors(ui_toggle) + .tag(7).toggle (BTN_POS(4,6), BTN_SIZE(1,1), F("no\xFFyes"), show_grid) + .colors(normal_btn) + .font(font_medium) + .tag(1).button (BTN_POS(3, 8), BTN_SIZE(1,1), F("1")) + .button (BTN_POS(4, 8), BTN_SIZE(1,1), F("2")) + .colors(action_btn) + .button (BTN_POS(1, 8), BTN_SIZE(2,1), F("Back")); + #endif + + cmd.cmd(COLOR_RGB(bg_text_enabled)); + if (show_grid) DRAW_LAYOUT_GRID +} + +bool WidgetsScreen::onTouchStart(uint8_t tag) { + CommandProcessor cmd; + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + #ifdef TOUCH_UI_PORTRAIT + case 2: cmd.track_circular (BTN_POS(1,2), BTN_SIZE(1,2), 2).execute(); break; + case 4: cmd.track_linear (BTN_POS(2,3), BTN_SIZE(2,1), 4).execute(); break; + case 5: cmd.track_linear (BTN_POS(2,4), BTN_SIZE(2,1), 5).execute(); break; + case 6: cmd.track_linear (BTN_POS(2,5), BTN_SIZE(2,1), 6).execute(); break; + #else + case 2: cmd.track_circular (BTN_POS(1,2), BTN_SIZE(1,3), 2).execute(); break; + case 3: cmd.track_circular (BTN_POS(1,5), BTN_SIZE(1,3), 3).execute(); break; + case 4: cmd.track_linear (BTN_POS(3,3), BTN_SIZE(2,1), 4).execute(); break; + case 5: cmd.track_linear (BTN_POS(3,4), BTN_SIZE(2,1), 5).execute(); break; + case 6: cmd.track_linear (BTN_POS(3,5), BTN_SIZE(2,1), 6).execute(); break; + #endif + case 7: show_grid = !show_grid; break; + default: + return false; + } + + return true; +} + +void WidgetsScreen::onIdle() { + if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) { + refresh_timer.start(); + + uint16_t value; + CommandProcessor cmd; + switch (cmd.track_tag(value)) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + slider_val = value; break; + default: + return; + } + onRefresh(); + } + BaseScreen::onIdle(); +} + +#endif // LULZBOT_TOUCH_UI && DEVELOPER_SCREENS diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/z_offset_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/z_offset_screen.cpp new file mode 100644 index 000000000000..5b26bb5394a7 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/z_offset_screen.cpp @@ -0,0 +1,54 @@ +/*********************** + * z_offset_screen.cpp * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(LULZBOT_TOUCH_UI) && HAS_BED_PROBE + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void ZOffsetScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(PSTR("mm")); + + w.heading( PSTR("Z Offset")); + w.color(z_axis).adjuster(4, PSTR("Z Offset:"), getZOffset_mm()); + w.increments(); +} + +bool ZOffsetScreen::onTouchHeld(uint8_t tag) { + const float increment = getIncrement(); + switch (tag) { + case 4: UI_DECREMENT(ZOffset_mm); break; + case 5: UI_INCREMENT(ZOffset_mm); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // LULZBOT_TOUCH_UI && HAS_BED_PROBE diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h new file mode 100644 index 000000000000..da6188ab9d07 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h @@ -0,0 +1,181 @@ +/************* + * bitmaps.h * + *************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace Theme { + using namespace FTDI; + + constexpr PROGMEM bitmap_info_t Extruder_Icon_Info = { + .format = L1, + .linestride = 3, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8000, + .width = 24, + .height = 23, + }; + + constexpr PROGMEM unsigned char Extruder_Icon[] = { + 0x3F, 0xFF, 0xFC, + 0x7F, 0xFF, 0xFE, + 0xC0, 0x00, 0x03, + 0xC0, 0x00, 0x03, + 0xC0, 0x00, 0x03, + 0xC0, 0x00, 0x03, + 0x7F, 0xFF, 0xFE, + 0x3F, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFC, + 0x7F, 0xFF, 0xFE, + 0xC0, 0x00, 0x03, + 0xC0, 0x00, 0x03, + 0xC0, 0x00, 0x03, + 0xC0, 0x00, 0x03, + 0x7F, 0xFF, 0xFE, + 0x7F, 0xFF, 0xFE, + 0x07, 0xFF, 0xE0, + 0x03, 0xFF, 0xC0, + 0x01, 0x81, 0x80, + 0x00, 0xC3, 0x00, + 0x00, 0x66, 0x00, + 0x00, 0x3C, 0x00, + 0x00, 0x3C, 0x00 + }; + + constexpr PROGMEM bitmap_info_t Bed_Heat_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8100, + .width = 32, + .height = 23, + }; + + constexpr PROGMEM unsigned char Bed_Heat_Icon[] = { + 0x01, 0x81, 0x81, 0x80, + 0x01, 0x81, 0x81, 0x80, + 0x00, 0xC0, 0xC0, 0xC0, + 0x00, 0xC0, 0xC0, 0xC0, + 0x00, 0x60, 0x60, 0x60, + 0x00, 0x60, 0x60, 0x60, + 0x00, 0xC0, 0xC0, 0xC0, + 0x00, 0xC0, 0xC0, 0xC0, + 0x01, 0x81, 0x81, 0x80, + 0x01, 0x81, 0x81, 0x80, + 0x03, 0x03, 0x03, 0x00, + 0x03, 0x03, 0x03, 0x00, + 0x06, 0x06, 0x06, 0x00, + 0x06, 0x06, 0x06, 0x00, + 0x03, 0x03, 0x03, 0x00, + 0x03, 0x03, 0x03, 0x00, + 0x01, 0x81, 0x81, 0x80, + 0x01, 0x81, 0x81, 0x80, + 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xC0, 0x00, 0x00, 0x03, + 0xFF, 0xFF, 0xFF, 0xFF + }; + + constexpr PROGMEM bitmap_info_t Fan_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8300, + .width = 32, + .height = 32, + }; + + constexpr PROGMEM unsigned char Fan_Icon[] = { + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xF8, 0x00, 0x00, 0x1F, + 0xF0, 0x03, 0xF8, 0x0F, + 0xE0, 0x07, 0xF0, 0x07, + 0xC0, 0x0F, 0xE0, 0x03, + 0xC0, 0x1F, 0xE0, 0x03, + 0xC0, 0x1F, 0xE0, 0x03, + 0xC0, 0x0F, 0xE0, 0x03, + 0xC0, 0x07, 0xE0, 0x03, + 0xC0, 0x03, 0xC0, 0x03, + 0xD0, 0x00, 0x00, 0xC3, + 0xD8, 0x03, 0xC1, 0xE3, + 0xDF, 0xC7, 0xE3, 0xF3, + 0xDF, 0xEF, 0xF7, 0xFB, + 0xDF, 0xEF, 0xF7, 0xFB, + 0xDF, 0xEF, 0xF7, 0xFB, + 0xDF, 0xEF, 0xF7, 0xFB, + 0xCF, 0xC7, 0xE3, 0xFB, + 0xC7, 0x83, 0xC0, 0x1B, + 0xC3, 0x00, 0x00, 0x0B, + 0xC0, 0x03, 0xC0, 0x03, + 0xC0, 0x07, 0xE0, 0x03, + 0xC0, 0x07, 0xF0, 0x03, + 0xC0, 0x07, 0xF8, 0x03, + 0xC0, 0x07, 0xF8, 0x03, + 0xC0, 0x07, 0xF0, 0x03, + 0xE0, 0x0F, 0xE0, 0x07, + 0xF0, 0x1F, 0xC0, 0x0F, + 0xF8, 0x00, 0x00, 0x1F, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF + }; + + constexpr PROGMEM bitmap_info_t TD_Icon_Info = { + .format = L1, + .linestride = 7, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 9000, + .width = 50, + .height = 20, + }; + + constexpr PROGMEM unsigned char TD_Icon[] = { + 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, // Thumb Drive Widget + 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80, + 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00 + }; +}; // namespace Theme diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bootscreen_logo_landscape.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bootscreen_logo_landscape.h new file mode 100644 index 000000000000..8593c14e8b41 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bootscreen_logo_landscape.h @@ -0,0 +1,43 @@ + +/**************************************************************************** + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/** + * This file was auto-generated using "svg2cpp.pl" + * + * The encoding consists of x,y pairs with the min and max scaled to + * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the + * start of a new closed path. + */ + +#pragma once + +constexpr float x_min = 0.000000; + +constexpr float x_max = 480.000000; + +constexpr float y_min = 0.000000; + +constexpr float y_max = 272.000000; + +const PROGMEM uint16_t logo_green[] = {0x7E30, 0x2358, 0x4C02, 0xBCAA, 0xB05C, 0xBCAA}; + +const PROGMEM uint16_t logo_mark[] = {0xB1F2, 0xD5EE, 0xB146, 0xD62A, 0xB0B5, 0xD6D9, 0xB052, 0xD7DC, 0xB030, 0xD90B, 0xB052, 0xDA38, 0xB0B5, 0xDB3A, 0xB146, 0xDBE9, 0xB1F2, 0xDC22, 0xB29E, 0xDBE9, 0xB330, 0xDB3A, 0xB392, 0xDA3A, 0xB3B4, 0xD90B, 0xB392, 0xD7D9, 0xB330, 0xD6D9, 0xB29E, 0xD62A, 0xFFFF, 0xB1F2, 0xD56F, 0xB2B9, 0xD5B3, 0xB362, 0xD67F, 0xB3D4, 0xD7A9, 0xB3FB, 0xD90B, 0xB3D4, 0xDA68, 0xB362, 0xDB91, 0xB2B9, 0xDC5E, 0xB1F2, 0xDCA2, 0xB12B, 0xDC5E, 0xB082, 0xDB91, 0xB00E, 0xDA68, 0xAFE9, 0xD90B, 0xB00E, 0xD7A9, 0xB082, 0xD67F, 0xB12B, 0xD5B3, 0xFFFF, 0xB1DF, 0xD770, 0xB188, 0xD770, 0xB188, 0xD8C7, 0xB1DF, 0xD8C7, 0xB24A, 0xD8A2, 0xB269, 0xD81D, 0xB24A, 0xD798, 0xFFFF, 0xB1E3, 0xD6F0, 0xB29C, 0xD73A, 0xB2D9, 0xD81A, 0xB2B4, 0xD8CD, 0xB24C, 0xD925, 0xB274, 0xD960, 0xB2AD, 0xD9EB, 0xB30D, 0xDAFE, 0xB294, 0xDAFE, 0xB23A, 0xD9FC, 0xB1F7, 0xD966, 0xB1B6, 0xD944, 0xB188, 0xD944, 0xB188, 0xDAFE, 0xB11C, 0xDAFE, 0xB11C, 0xD6F0}; + +const PROGMEM uint16_t logo_type[] = {0xB05D, 0xC9B7, 0xB042, 0xCA2D, 0xAFFF, 0xCA5F, 0xAD38, 0xCA5F, 0xACF5, 0xCA8B, 0xACD9, 0xCAFE, 0xACD9, 0xDBFC, 0xACC0, 0xDC74, 0xAC7F, 0xDCA5, 0xA9C8, 0xDCA5, 0xA984, 0xDC74, 0xA969, 0xDBFC, 0xA969, 0xCAFE, 0xA950, 0xCA8B, 0xA90F, 0xCA60, 0xA649, 0xCA60, 0xA605, 0xCA2E, 0xA5EA, 0xC9B8, 0xA5EA, 0xC52A, 0xA649, 0xC482, 0xAFFF, 0xC482, 0xB042, 0xC4B3, 0xB05D, 0xC52A, 0xFFFF, 0x99EB, 0xD6D1, 0x9E82, 0xD6D1, 0x9E82, 0xCA60, 0x99EB, 0xCA60, 0xFFFF, 0xA1D0, 0xC7F5, 0xA1EB, 0xC88B, 0xA1F8, 0xC92A, 0xA1F8, 0xD7FD, 0xA1EB, 0xD89C, 0xA1D0, 0xD933, 0xA004, 0xDC5E, 0x9FAC, 0xDC93, 0x9F50, 0xDCA5, 0x991E, 0xDCA5, 0x98C4, 0xDC93, 0x986F, 0xDC5E, 0x96A3, 0xD933, 0x9685, 0xD89C, 0x967B, 0xD7FD, 0x967B, 0xC92A, 0x9685, 0xC88B, 0x96A3, 0xC7F5, 0x986F, 0xC4C9, 0x98C4, 0xC498, 0x991E, 0xC482, 0x9F50, 0xC482, 0x9FAC, 0xC498, 0xA004, 0xC4C9, 0xFFFF, 0x8928, 0xD75F, 0x8E6A, 0xD75F, 0x8E6A, 0xD2AE, 0x8928, 0xD2AE, 0x8928, 0xD75F, 0xFFFF, 0x8928, 0xCE0F, 0x8E6A, 0xCE0F, 0x8E6A, 0xC9C0, 0x8928, 0xC9C0, 0xFFFF, 0x9162, 0xC7F5, 0x917D, 0xC88F, 0x918A, 0xC932, 0x918A, 0xCD06, 0x9178, 0xCDA1, 0x914D, 0xCE2A, 0x9077, 0xD00F, 0x9060, 0xD094, 0x907C, 0xD10F, 0x9149, 0xD2C9, 0x9176, 0xD352, 0x918A, 0xD3EC, 0x918A, 0xD7FD, 0x917D, 0xD89C, 0x9162, 0xD933, 0x8F96, 0xDC5E, 0x8F3E, 0xDC93, 0x8EE2, 0xDCA5, 0x866C, 0xDCA5, 0x860D, 0xDBFC, 0x860D, 0xC52A, 0x8628, 0xC4B3, 0x866C, 0xC482, 0x8EE2, 0xC482, 0x8F3E, 0xC498, 0x8F96, 0xC4C9, 0xFFFF, 0x80FE, 0xC983, 0x80E9, 0xCA19, 0x80BD, 0xCA9D, 0x7A63, 0xD73B, 0x809F, 0xD73B, 0x80E2, 0xD76C, 0x80FE, 0xD7E3, 0x80FE, 0xDBFC, 0x80E2, 0xDC74, 0x809F, 0xDCA5, 0x76E9, 0xDCA5, 0x768A, 0xDBFC, 0x768A, 0xD7AD, 0x769B, 0xD713, 0x76C6, 0xD68B, 0x7D42, 0xC9EC, 0x7707, 0xC9EC, 0x76C4, 0xC9BB, 0x76A8, 0xC945, 0x76A8, 0xC52A, 0x76C4, 0xC4B3, 0x7707, 0xC482, 0x809F, 0xC482, 0x80E2, 0xC4B3, 0x80FE, 0xC52A, 0xFFFF, 0x725C, 0xD6C8, 0x729D, 0xD6F9, 0x72B6, 0xD770, 0x72B6, 0xDBFC, 0x729D, 0xDC74, 0x725C, 0xDCA5, 0x69EB, 0xDCA5, 0x698C, 0xDBFC, 0x698C, 0xC52A, 0x69EB, 0xC482, 0x6C9D, 0xC482, 0x6CFD, 0xC52A, 0x6CFD, 0xD62A, 0x6D18, 0xD69C, 0x6D5B, 0xD6C8, 0xFFFF, 0x6466, 0xC4B3, 0x6482, 0xC52A, 0x6482, 0xD818, 0x647D, 0xD818, 0x6473, 0xD8AE, 0x645A, 0xD933, 0x628E, 0xDC5E, 0x6236, 0xDC93, 0x61D9, 0xDCA5, 0x5BA8, 0xDCA5, 0x5B4E, 0xDC93, 0x5AF9, 0xDC5E, 0x592D, 0xD933, 0x590F, 0xD89C, 0x5905, 0xD7FD, 0x5905, 0xC52A, 0x5921, 0xC4B3, 0x5964, 0xC482, 0x5C16, 0xC482, 0x5C5A, 0xC4B3, 0x5C76, 0xC52A, 0x5C76, 0xD62A, 0x5C91, 0xD6A0, 0x5CD4, 0xD6D1, 0x60B3, 0xD6D1, 0x60F4, 0xD6A0, 0x610D, 0xD62A, 0x610D, 0xC52A, 0x6128, 0xC4B3, 0x616C, 0xC482, 0x6423, 0xC482, 0xFFFF, 0x54D2, 0xD6C8, 0x5513, 0xD6F9, 0x552C, 0xD770, 0x552C, 0xDBFD, 0x5513, 0xDC74, 0x54D2, 0xDCA5, 0x4C62, 0xDCA5, 0x4C02, 0xDBFD, 0x4C02, 0xC52A, 0x4C62, 0xC482, 0x4F14, 0xC482, 0x4F73, 0xC52A, 0x4F73, 0xD62A, 0x4F8E, 0xD69C, 0x4FD2, 0xD6C8}; + +const PROGMEM uint16_t logo_black[] = {0x7E30, 0x37DF, 0x842F, 0x4A34, 0x7830, 0x4A34, 0xFFFF, 0x7E30, 0x336E, 0x7602, 0x4C6C, 0x865E, 0x4C6C, 0x7E30, 0x336E, 0xFFFF, 0x5C26, 0xA020, 0x6225, 0xB275, 0x5626, 0xB275, 0xFFFF, 0x5C26, 0x9BAF, 0x53F8, 0xB4AE, 0x6453, 0xB4AE, 0xFFFF, 0xA02A, 0xA020, 0xA629, 0xB275, 0x9A2A, 0xB275, 0xFFFF, 0xA02A, 0x9BAF, 0x97FC, 0xB4AE, 0xA857, 0xB4AE, 0xFFFF, 0x7E2E, 0x5CEA, 0x7DB3, 0x5D3D, 0x7D3E, 0x5EF3, 0x7C7D, 0x613A, 0x7B56, 0x6244, 0x7A14, 0x61C8, 0x7903, 0x5FEC, 0x7850, 0x5E78, 0x77CE, 0x5E60, 0x7764, 0x5EE8, 0x7734, 0x60C6, 0x76D0, 0x6353, 0x75DA, 0x64DA, 0x7490, 0x64F7, 0x733F, 0x639E, 0x7258, 0x6281, 0x71D6, 0x62A5, 0x7184, 0x6359, 0x71A0, 0x6545, 0x71A3, 0x67F2, 0x70EF, 0x69DB, 0x6FB4, 0x6A8D, 0x6E36, 0x69CC, 0x6D27, 0x6913, 0x6CAF, 0x6970, 0x6C7A, 0x6A43, 0x6CE3, 0x6C21, 0x6D50, 0x6EC4, 0x6CEB, 0x70EF, 0x6BD5, 0x722C, 0x6A51, 0x7225, 0x693A, 0x71F5, 0x68D4, 0x7286, 0x68C0, 0x736A, 0x6961, 0x7502, 0x6A24, 0x7756, 0x6A13, 0x799D, 0x6936, 0x7B4C, 0x67C3, 0x7BFC, 0x66B4, 0x7C51, 0x6667, 0x7D0B, 0x6674, 0x7DF1, 0x6747, 0x7F2D, 0x6855, 0x810F, 0x689A, 0x8349, 0x6803, 0x8550, 0x66B9, 0x86A5, 0x65C0, 0x8773, 0x6592, 0x884B, 0x65C0, 0x8922, 0x66B9, 0x89F3, 0x6803, 0x8B47, 0x689A, 0x8D4F, 0x6854, 0x8F89, 0x6745, 0x916A, 0x6673, 0x92A5, 0x6665, 0x938B, 0x66B2, 0x9446, 0x67C1, 0x949C, 0x6933, 0x954B, 0x6A11, 0x96FC, 0x6A21, 0x9943, 0x695E, 0x9B96, 0x68BC, 0x9D2E, 0x68D0, 0x9E13, 0x6936, 0x9EA3, 0x6A4E, 0x9E74, 0x6BD1, 0x9E6D, 0x6CE7, 0x9FAA, 0x6D4C, 0xA1D6, 0x6CDE, 0xA479, 0x6C75, 0xA657, 0x6CAA, 0xA72A, 0x6D21, 0xA788, 0x6E31, 0xA6CF, 0x6FAF, 0xA60E, 0x70EA, 0xA6C1, 0x719D, 0xA8AC, 0x7199, 0xAB57, 0x717D, 0xAD44, 0x71D0, 0xADF8, 0x7251, 0xAE1C, 0x7339, 0xACFF, 0x748A, 0xABA7, 0x75D4, 0xABC5, 0x76C9, 0xAD4D, 0x772D, 0xAFDA, 0x775D, 0xB1B9, 0x77C7, 0xB240, 0x7848, 0xB228, 0x78FC, 0xB0B5, 0x7A0D, 0xAED8, 0x7B50, 0xAE5F, 0x7C76, 0xAF69, 0x7D37, 0xB1B0, 0x7DAC, 0xB366, 0x7E26, 0xB3BA, 0x7EA0, 0xB367, 0x7F16, 0xB1B0, 0x7FD7, 0xAF69, 0x80FE, 0xAE60, 0x8240, 0xAEDB, 0x8351, 0xB0B8, 0x8404, 0xB22B, 0x8486, 0xB244, 0x84F0, 0xB1BD, 0x8521, 0xAFDE, 0x8584, 0xAD51, 0x867A, 0xABC9, 0x87C4, 0xABAD, 0x8915, 0xAD05, 0x89FD, 0xAE22, 0x8A7D, 0xADFF, 0x8AD0, 0xAD4C, 0x8AB5, 0xAB5E, 0x8AB1, 0xA8B2, 0x8B65, 0xA6C8, 0x8CA0, 0xA616, 0x8E1E, 0xA6D9, 0x8F2D, 0xA792, 0x8FA5, 0xA733, 0x8FDA, 0xA661, 0x8F71, 0xA481, 0x8F04, 0xA1DF, 0x8F69, 0x9FB4, 0x907F, 0x9E78, 0x9203, 0x9E7E, 0x931A, 0x9EB0, 0x9380, 0x9E1E, 0x9394, 0x9D3A, 0x92F3, 0x9BA1, 0x9230, 0x994E, 0x9241, 0x9707, 0x931F, 0x9557, 0x9491, 0x94A7, 0x95A0, 0x9452, 0x95ED, 0x9398, 0x95DF, 0x92B3, 0x950D, 0x9176, 0x93FF, 0x8F94, 0x93BA, 0x8D5A, 0x9451, 0x8B53, 0x959B, 0x89FF, 0x9693, 0x8930, 0x96C3, 0x8859, 0x9693, 0x8781, 0x959B, 0x86B2, 0x9451, 0x855C, 0x93BA, 0x8355, 0x9400, 0x811B, 0x950F, 0x7F3A, 0x95E1, 0x7DFF, 0x95EF, 0x7D19, 0x95A2, 0x7C5E, 0x9493, 0x7C09, 0x9321, 0x7B58, 0x9243, 0x79A7, 0x9233, 0x7760, 0x92F6, 0x750D, 0x9397, 0x7375, 0x9383, 0x7291, 0x931E, 0x7200, 0x9207, 0x7230, 0x9083, 0x7236, 0x8F6D, 0x70F9, 0x8F08, 0x6ECE, 0x8F76, 0x6C2C, 0x8FDF, 0x6A4D, 0x8FAA, 0x697A, 0x8F33, 0x691C, 0x8E23, 0x69D5, 0x8CA5, 0x6A96, 0x8B6A, 0x69E3, 0x8AB7, 0x67F9, 0x8ABB, 0x654C, 0x8AD6, 0x635F, 0x8A84, 0x62AB, 0x8A03, 0x6287, 0x891C, 0x63A5, 0x87CA, 0x64FC, 0x8680, 0x64DF, 0x858B, 0x6358, 0x8527, 0x60CA, 0x84F7, 0x5EEB, 0x848E, 0x5E62, 0x840B, 0x5E7B, 0x8358, 0x5FEE, 0x8247, 0x61CB, 0x8104, 0x6246, 0x7FDE, 0x613B, 0x7F1E, 0x5EF4, 0x7EA8, 0x5D3E, 0x7E2E, 0x5CEA, 0x7E2E, 0x5CEA, 0xFFFF, 0x7E2F, 0x627C, 0x7F09, 0x631B, 0x7F64, 0x649C, 0x7F09, 0x661D, 0x7E2F, 0x66BC, 0x7D55, 0x661D, 0x7CFB, 0x649C, 0x7D55, 0x631B, 0x7E2F, 0x627C, 0x7E2F, 0x627C, 0xFFFF, 0x7E2A, 0x689C, 0x81B4, 0x6938, 0x850D, 0x6B02, 0x8823, 0x6DEA, 0x8AE0, 0x71E3, 0x8D2D, 0x76DC, 0x8ED1, 0x7C60, 0x8FCE, 0x8242, 0x9022, 0x8852, 0x8FCD, 0x8E62, 0x8ED1, 0x9443, 0x8D2C, 0x99C7, 0x8ADF, 0x9EC0, 0x8822, 0xA2BA, 0x850D, 0xA5A2, 0x81B3, 0xA76C, 0x7E2A, 0xA807, 0x7AA0, 0xA76C, 0x7747, 0xA5A2, 0x7431, 0xA2BA, 0x7174, 0x9EC0, 0x6F34, 0x99EB, 0x6D8E, 0x947A, 0x6C8B, 0x8E91, 0x6C32, 0x8852, 0x6C8A, 0x8214, 0x6D8D, 0x7C2B, 0x6F33, 0x76BA, 0x7174, 0x71E4, 0x7431, 0x6DEA, 0x7747, 0x6B02, 0x7AA0, 0x6938, 0x7E2A, 0x689C, 0x7E2A, 0x689C, 0xFFFF, 0x7E2A, 0x69AA, 0x7AD3, 0x6A3B, 0x779F, 0x6BE9, 0x748F, 0x6EC1, 0x71E0, 0x72A3, 0x6FA7, 0x7771, 0x6E11, 0x7CC6, 0x6D1D, 0x8276, 0x6CCB, 0x8852, 0x6D1D, 0x8E2F, 0x6E11, 0x93DE, 0x6FA7, 0x9933, 0x71E0, 0x9E02, 0x748F, 0xA1E3, 0x779F, 0xA4BC, 0x7AD3, 0xA669, 0x7E2A, 0xA6F9, 0x7E2A, 0xA6F9, 0x8180, 0xA669, 0x84B5, 0xA4BC, 0x87C4, 0xA1E3, 0x8A73, 0x9E01, 0x8CA7, 0x9944, 0x8E44, 0x93DE, 0x8F37, 0x8E36, 0x8F89, 0x8852, 0x8F37, 0x826E, 0x8E44, 0x7CC6, 0x8CA7, 0x7760, 0x8A74, 0x72A3, 0x87C4, 0x6EC1, 0x84B5, 0x6BE9, 0x8180, 0x6A3B, 0x7E2A, 0x69AA, 0x7E2A, 0x69AA, 0xFFFF, 0x7E71, 0x6BAF, 0x7E6A, 0x6F39, 0x7DE7, 0x6F3A, 0x7DDE, 0x6BB1, 0x7E71, 0x6BAF, 0x7E71, 0x6BAF, 0xFFFF, 0x802D, 0x6BE7, 0x80C0, 0x6C0B, 0x806E, 0x6F89, 0x7FEE, 0x6F69, 0xFFFF, 0x7C22, 0x6BE9, 0x7C62, 0x6F6C, 0x7BE2, 0x6F8C, 0x7B90, 0x6C0E, 0x7C22, 0x6BE9, 0x7C22, 0x6BE9, 0xFFFF, 0x8272, 0x6CB0, 0x8300, 0x6CFA, 0x8268, 0x705B, 0x81EC, 0x701B, 0xFFFF, 0x79DD, 0x6CB4, 0x7A65, 0x701E, 0x79E8, 0x705E, 0x794F, 0x6CFE, 0x79DD, 0x6CB4, 0x79DD, 0x6CB4, 0xFFFF, 0x6FDC, 0x6CEB, 0x70B6, 0x6D8C, 0x7110, 0x6F0D, 0x70B6, 0x708E, 0x6FDC, 0x712D, 0x6F02, 0x708E, 0x6EA8, 0x6F0C, 0x6F02, 0x6D8A, 0x6FDC, 0x6CEB, 0x6FDC, 0x6CEB, 0xFFFF, 0x8C82, 0x6CEF, 0x8D5C, 0x6D8E, 0x8DB6, 0x6F0F, 0x8D5C, 0x7091, 0x8C82, 0x7131, 0x8BA8, 0x7091, 0x8B4E, 0x6F10, 0x8BA8, 0x6D90, 0x8C82, 0x6CEF, 0x8C82, 0x6CEF, 0xFFFF, 0x84A1, 0x6E0A, 0x8528, 0x6E76, 0x844B, 0x71A8, 0x83D5, 0x7149, 0x84A1, 0x6E0A, 0xFFFF, 0x77AF, 0x6E0F, 0x787A, 0x714F, 0x7804, 0x71AD, 0x7727, 0x6E7B, 0x77AF, 0x6E0F, 0x77AF, 0x6E0F, 0xFFFF, 0x86AF, 0x6FEE, 0x872B, 0x707A, 0x860F, 0x736D, 0x85A1, 0x72F1, 0x86AF, 0x6FEE, 0xFFFF, 0x75A0, 0x6FF3, 0x76AE, 0x72F6, 0x7640, 0x7372, 0x7523, 0x7081, 0x75A0, 0x6FF3, 0x75A0, 0x6FF3, 0xFFFF, 0x7E2A, 0x7132, 0x8330, 0x72F1, 0x876F, 0x77F6, 0x8A47, 0x7F75, 0x8B45, 0x8852, 0x8A47, 0x912F, 0x876F, 0x98AF, 0x8330, 0x9DB3, 0x7E2A, 0x9F72, 0x7924, 0x9DB3, 0x74E5, 0x98AF, 0x720D, 0x912F, 0x710F, 0x8852, 0x720C, 0x7F75, 0x74E5, 0x77F7, 0x7924, 0x72F1, 0x7E2A, 0x7132, 0x7E2A, 0x7132, 0xFFFF, 0x7E2A, 0x7240, 0x795F, 0x73EB, 0x7551, 0x78B5, 0x729A, 0x7FDD, 0x71A8, 0x8852, 0x729A, 0x90C8, 0x7551, 0x97EF, 0x795F, 0x9CB9, 0x7E2A, 0x9E64, 0x82F5, 0x9CBA, 0x8703, 0x97EF, 0x89BA, 0x90C8, 0x8AAC, 0x8852, 0x89BA, 0x7FDD, 0x8703, 0x78B5, 0x82F5, 0x73EB, 0x7E2A, 0x7240, 0x7E2A, 0x7240, 0xFFFF, 0x8892, 0x7253, 0x88FF, 0x72FC, 0x87A9, 0x759E, 0x874B, 0x750F, 0x87EB, 0x73AD, 0xFFFF, 0x73BF, 0x7258, 0x7509, 0x750F, 0x74A6, 0x75A5, 0x734F, 0x7305, 0x73BF, 0x7258, 0x73BF, 0x7258, 0xFFFF, 0x8A3B, 0x7525, 0x8A9C, 0x75EC, 0x8912, 0x7831, 0x88BE, 0x7784, 0xFFFF, 0x7215, 0x752F, 0x7393, 0x778C, 0x7340, 0x7836, 0x7337, 0x7847, 0x72A7, 0x775B, 0x71B4, 0x75F5, 0x71B6, 0x75F0, 0x7215, 0x752F, 0x7215, 0x752F, 0xFFFF, 0x8BA7, 0x785E, 0x8BF8, 0x793B, 0x8A43, 0x7B17, 0x89FC, 0x7A56, 0xFFFF, 0x70AA, 0x7867, 0x7254, 0x7A5F, 0x720E, 0x7B20, 0x7059, 0x7943, 0x70AA, 0x7867, 0x70AA, 0x7867, 0xFFFF, 0x8CCD, 0x7BEB, 0x8D0A, 0x7CDA, 0x8B34, 0x7E44, 0x8AFE, 0x7D72, 0x8CCD, 0x7BEB, 0xFFFF, 0x6F84, 0x7BF4, 0x7154, 0x7D7B, 0x711D, 0x7E4C, 0x6F47, 0x7CE3, 0x6F84, 0x7BF4, 0x6F84, 0x7BF4, 0xFFFF, 0x8DA6, 0x7FB9, 0x8DD0, 0x80B5, 0x8BE0, 0x81A3, 0x8BBC, 0x80C8, 0xFFFF, 0x6EAB, 0x7FC2, 0x7096, 0x80D0, 0x7071, 0x81AB, 0x6E82, 0x80BD, 0x6EAB, 0x7FC2, 0x6EAB, 0x7FC2, 0xFFFF, 0x8E2E, 0x83B2, 0x8E44, 0x84B6, 0x8C46, 0x8528, 0x8C33, 0x8445, 0xFFFF, 0x6E24, 0x83BC, 0x701F, 0x844B, 0x700D, 0x852D, 0x6E0F, 0x84BF, 0x6E24, 0x83BC, 0x6E24, 0x83BC, 0xFFFF, 0x69ED, 0x862F, 0x6AC7, 0x86CE, 0x6B22, 0x884F, 0x6AC7, 0x89D0, 0x69ED, 0x8A6F, 0x69EC, 0x8A6F, 0x6913, 0x89CF, 0x68B9, 0x884E, 0x6913, 0x86CE, 0x69ED, 0x862F, 0x69ED, 0x862F, 0xFFFF, 0x926F, 0x8634, 0x9349, 0x86D2, 0x93A3, 0x8852, 0x93A3, 0x8855, 0x9349, 0x89D5, 0x926F, 0x8A75, 0x9195, 0x89D6, 0x913A, 0x8855, 0x9194, 0x86D4, 0x926F, 0x8634, 0x926F, 0x8634, 0xFFFF, 0x8E64, 0x87C3, 0x8E64, 0x88CA, 0x8C63, 0x88BB, 0x8C63, 0x87D7, 0xFFFF, 0x6DF1, 0x87CB, 0x6FF2, 0x87DC, 0x6FF2, 0x88C2, 0x6DF1, 0x88D2, 0x6DF1, 0x87CB, 0x6DF1, 0x87CB, 0xFFFF, 0x8C48, 0x8B69, 0x8E45, 0x8BD8, 0x8E31, 0x8CD9, 0x8C36, 0x8C4D, 0x8C48, 0x8B69, 0x8C48, 0x8B69, 0xFFFF, 0x700D, 0x8B6F, 0x7020, 0x8C52, 0x6E25, 0x8CE3, 0x6E10, 0x8BDF, 0xFFFF, 0x8BE4, 0x8EEC, 0x8DD4, 0x8FDA, 0x8DAA, 0x90D4, 0x8BC1, 0x8FC9, 0x8BE4, 0x8EEC, 0x8BE4, 0x8EEC, 0xFFFF, 0x7072, 0x8EF4, 0x7096, 0x8FCF, 0x6EAC, 0x90DD, 0x6E82, 0x8FE1, 0xFFFF, 0x8B39, 0x924D, 0x8D10, 0x93B4, 0x8CD3, 0x94A3, 0x8B04, 0x931C, 0x8B39, 0x924D, 0x8B39, 0x924D, 0xFFFF, 0x711E, 0x9255, 0x7154, 0x9326, 0x6F84, 0x94AB, 0x6F47, 0x93BC, 0xFFFF, 0x8A49, 0x9578, 0x8BFE, 0x9754, 0x8BAE, 0x9830, 0x8A03, 0x9639, 0x8A49, 0x9578, 0x8A49, 0x9578, 0xFFFF, 0x720E, 0x9582, 0x7254, 0x9643, 0x70A9, 0x983A, 0x7059, 0x975C, 0x720E, 0x9582, 0xFFFF, 0x733E, 0x986A, 0x7393, 0x9916, 0x7215, 0x9B75, 0x71B4, 0x9AAF, 0xFFFF, 0x8914, 0x986E, 0x8AA6, 0x9AA3, 0x8AA2, 0x9AAB, 0x8A44, 0x9B6B, 0x88C5, 0x990F, 0x8914, 0x986E, 0x8914, 0x986E, 0xFFFF, 0x87B2, 0x9AF6, 0x890A, 0x9D97, 0x889B, 0x9E43, 0x8750, 0x9B8E, 0x87B2, 0x9AF6, 0x87B2, 0x9AF6, 0xFFFF, 0x74A6, 0x9AFD, 0x7509, 0x9B94, 0x7514, 0x9BA4, 0x73C9, 0x9E57, 0x73C2, 0x9E4F, 0x7350, 0x9D9F, 0xFFFF, 0x8619, 0x9D2B, 0x8737, 0xA01B, 0x86B9, 0xA0A9, 0x85AB, 0x9DA7, 0x8619, 0x9D2B, 0x8619, 0x9D2B, 0xFFFF, 0x764A, 0x9D3C, 0x76B8, 0x9DB7, 0x75AB, 0xA0BC, 0x752F, 0xA02F, 0xFFFF, 0x8456, 0x9EF1, 0x8533, 0xA222, 0x84AC, 0xA28F, 0x83DF, 0x9F50, 0x8456, 0x9EF1, 0x8456, 0x9EF1, 0xFFFF, 0x780E, 0x9F00, 0x7885, 0x9F5E, 0x77B9, 0xA29E, 0x7732, 0xA233, 0xFFFF, 0x6FD5, 0x9F77, 0x70AF, 0xA018, 0x70B4, 0xA021, 0x70B9, 0xA02A, 0x7114, 0xA1AA, 0x70BA, 0xA32C, 0x6FDF, 0xA3CB, 0x6F05, 0xA32D, 0x6F02, 0xA326, 0x6EFA, 0xA319, 0x6EFB, 0xA319, 0x6EA0, 0xA197, 0x6EFB, 0xA016, 0x6FD5, 0x9F77, 0x6FD5, 0x9F77, 0xFFFF, 0x8C85, 0x9F7B, 0x8D5F, 0xA01B, 0x8DBA, 0xA19C, 0x8D60, 0xA31D, 0x8C85, 0xA3BC, 0x8BAC, 0xA31D, 0x8B51, 0xA19C, 0x8BAB, 0xA01B, 0x8C85, 0x9F7B, 0x8C85, 0x9F7B, 0xFFFF, 0x8272, 0xA041, 0x830C, 0xA3A2, 0x827E, 0xA3EB, 0x81F5, 0xA082, 0x8272, 0xA041, 0x8272, 0xA041, 0xFFFF, 0x79F2, 0xA04C, 0x7A6F, 0xA08B, 0x79E9, 0xA3F6, 0x795A, 0xA3AE, 0xFFFF, 0x8079, 0xA115, 0x80CB, 0xA493, 0x8039, 0xA4B8, 0x7FF7, 0xA136, 0x8079, 0xA115, 0x8079, 0xA115, 0xFFFF, 0x7BEC, 0xA11B, 0x7C6C, 0xA13A, 0x7C2E, 0xA4BE, 0x7B9C, 0xA499, 0x7BEC, 0xA11B, 0xFFFF, 0x7E73, 0xA169, 0x7E7E, 0xA4F2, 0x7DEA, 0xA4F3, 0x7DF1, 0xA169, 0x7E73, 0xA169, 0x7E73, 0xA169, 0xFFFF, 0x7E34, 0xA9F6, 0x7F0E, 0xAA93, 0x7F69, 0xAC14, 0x7F0F, 0xAD96, 0x7E35, 0xAE37, 0x7D5A, 0xAD98, 0x7CFF, 0xAC16, 0x7D59, 0xAA95, 0x7E34, 0xA9F6, 0x7E34, 0xA9F6, 0xFFFF, 0x7E30, 0x2358, 0x4C02, 0xBCAA, 0xB05C, 0xBCAA, 0xFFFF, 0x7E30, 0x2C0E, 0x8A08, 0x503F, 0x7258, 0x503F, 0xFFFF, 0x70E4, 0x54AE, 0x8B7C, 0x54AE, 0x9EBD, 0x8F88, 0x916B, 0xB83A, 0x6ACF, 0xB83A, 0x5D90, 0x8FBE, 0x70E4, 0x54AE, 0xFFFF, 0xA02A, 0x93E3, 0xAC0F, 0xB83A, 0x9446, 0xB83A, 0xFFFF, 0x5C23, 0x941A, 0x67F5, 0xB83A, 0x5050, 0xB83A, 0x5C23, 0x941A}; + +const PROGMEM uint16_t logo_white[] = {0x7E72, 0x6BAF, 0x7E6A, 0x6F39, 0x7DE7, 0x6F3A, 0x7DDE, 0x6BB1, 0x7E72, 0x6BAF, 0xFFFF, 0x802D, 0x6BE7, 0x80C0, 0x6C0B, 0x806E, 0x6F8A, 0x7FEE, 0x6F69, 0xFFFF, 0x7C22, 0x6BE9, 0x7C62, 0x6F6C, 0x7BE2, 0x6F8C, 0x7B90, 0x6C0E, 0x7C22, 0x6BE9, 0x7C22, 0x6BE9, 0xFFFF, 0x8272, 0x6CB0, 0x8300, 0x6CFA, 0x8268, 0x705B, 0x81EC, 0x701B, 0xFFFF, 0x79DD, 0x6CB4, 0x7A65, 0x701E, 0x79E8, 0x705E, 0x794F, 0x6CFE, 0x79DD, 0x6CB4, 0x79DD, 0x6CB4, 0xFFFF, 0x84A1, 0x6E0A, 0x8528, 0x6E76, 0x844B, 0x71A8, 0x83D6, 0x7149, 0xFFFF, 0x77AF, 0x6E0F, 0x787A, 0x714F, 0x7804, 0x71AD, 0x7727, 0x6E7B, 0x77AF, 0x6E0F, 0x77AF, 0x6E0F, 0xFFFF, 0x86AF, 0x6FEE, 0x872C, 0x707A, 0x860F, 0x736D, 0x85A1, 0x72F1, 0xFFFF, 0x75A0, 0x6FF3, 0x76AE, 0x72F6, 0x7641, 0x7372, 0x7523, 0x7081, 0x75A0, 0x6FF3, 0x75A0, 0x6FF3, 0xFFFF, 0x8892, 0x7253, 0x88FF, 0x72FC, 0x87A9, 0x759E, 0x874B, 0x750F, 0xFFFF, 0x73BF, 0x7258, 0x7509, 0x750F, 0x74A6, 0x75A5, 0x734F, 0x7305, 0x73BF, 0x7258, 0x73BF, 0x7258, 0xFFFF, 0x8A3B, 0x7525, 0x8A9C, 0x75EC, 0x8912, 0x7831, 0x88BE, 0x7784, 0xFFFF, 0x7215, 0x752F, 0x7393, 0x778C, 0x7340, 0x7836, 0x71B4, 0x75F5, 0x7215, 0x752F, 0xFFFF, 0x8BA7, 0x785E, 0x8BF8, 0x793B, 0x8A43, 0x7B17, 0x89FC, 0x7A56, 0xFFFF, 0x70AA, 0x7867, 0x7254, 0x7A5F, 0x720E, 0x7B20, 0x7059, 0x7943, 0x70AA, 0x7867, 0x70AA, 0x7867, 0xFFFF, 0x8CCD, 0x7BEB, 0x8D0A, 0x7CDA, 0x8B34, 0x7E44, 0x8AFE, 0x7D72, 0xFFFF, 0x6F84, 0x7BF4, 0x7154, 0x7D7B, 0x711D, 0x7E4C, 0x6F47, 0x7CE3, 0x6F84, 0x7BF4, 0x6F84, 0x7BF4, 0xFFFF, 0x8DA6, 0x7FB9, 0x8DD0, 0x80B5, 0x8BE0, 0x81A3, 0x8BBC, 0x80C8, 0xFFFF, 0x6EAB, 0x7FC3, 0x7096, 0x80D0, 0x7071, 0x81AB, 0x6E82, 0x80BD, 0x6EAB, 0x7FC3, 0x6EAB, 0x7FC3, 0xFFFF, 0x8E2E, 0x83B2, 0x8E44, 0x84B6, 0x8C46, 0x8528, 0x8C33, 0x8445, 0xFFFF, 0x6E24, 0x83BC, 0x701F, 0x844B, 0x700D, 0x852D, 0x6E0F, 0x84BF, 0x6E24, 0x83BC, 0x6E24, 0x83BC, 0xFFFF, 0x8E64, 0x87C3, 0x8E64, 0x88CA, 0x8C63, 0x88BB, 0x8C63, 0x87D7, 0xFFFF, 0x6DF1, 0x87CB, 0x6FF2, 0x87DC, 0x6FF2, 0x88C2, 0x6DF1, 0x88D3, 0x6DF1, 0x87CB, 0xFFFF, 0x8C48, 0x8B69, 0x8E45, 0x8BD8, 0x8E31, 0x8CD9, 0x8C36, 0x8C4D, 0x8C48, 0x8B69, 0x8C48, 0x8B69, 0xFFFF, 0x700D, 0x8B70, 0x7020, 0x8C52, 0x6E25, 0x8CE3, 0x6E10, 0x8BE0, 0xFFFF, 0x8BE4, 0x8EEC, 0x8DD4, 0x8FDA, 0x8DAA, 0x90D4, 0x8BC0, 0x8FC9, 0x8BE4, 0x8EEC, 0xFFFF, 0x7072, 0x8EF4, 0x7096, 0x8FD0, 0x6EAC, 0x90DD, 0x6E82, 0x8FE1, 0xFFFF, 0x8B39, 0x924D, 0x8D10, 0x93B4, 0x8CD3, 0x94A3, 0x8B04, 0x931D, 0x8B39, 0x924D, 0x8B39, 0x924D, 0xFFFF, 0x711E, 0x9255, 0x7154, 0x9326, 0x6F84, 0x94AB, 0x6F47, 0x93BC, 0xFFFF, 0x8A49, 0x9579, 0x8BFE, 0x9754, 0x8BAE, 0x9830, 0x8A03, 0x9639, 0x8A49, 0x9579, 0x8A49, 0x9579, 0xFFFF, 0x720E, 0x9582, 0x7254, 0x9644, 0x70A9, 0x983A, 0x7059, 0x975C, 0xFFFF, 0x733D, 0x986A, 0x7393, 0x9916, 0x7215, 0x9B75, 0x71B4, 0x9AAF, 0xFFFF, 0x8914, 0x986E, 0x8AA6, 0x9AA3, 0x8A44, 0x9B6B, 0x88C5, 0x990F, 0x8914, 0x986E, 0xFFFF, 0x87B2, 0x9AF6, 0x890A, 0x9D97, 0x889B, 0x9E43, 0x8750, 0x9B8E, 0x87B2, 0x9AF6, 0x87B2, 0x9AF6, 0xFFFF, 0x74A6, 0x9AFD, 0x7509, 0x9B94, 0x73C9, 0x9E57, 0x7350, 0x9DA0, 0xFFFF, 0x8619, 0x9D2B, 0x8737, 0xA01B, 0x86B9, 0xA0A9, 0x85AB, 0x9DA7, 0x8619, 0x9D2B, 0x8619, 0x9D2B, 0xFFFF, 0x764A, 0x9D3C, 0x76B8, 0x9DB7, 0x75AB, 0xA0BC, 0x752E, 0xA02F, 0xFFFF, 0x8455, 0x9EF1, 0x8533, 0xA222, 0x84AC, 0xA28F, 0x83DF, 0x9F50, 0x8455, 0x9EF1, 0x8455, 0x9EF1, 0xFFFF, 0x780E, 0x9F00, 0x7885, 0x9F5E, 0x77B9, 0xA29E, 0x7732, 0xA233, 0xFFFF, 0x8272, 0xA041, 0x830C, 0xA3A2, 0x827D, 0xA3EC, 0x81F5, 0xA082, 0x8272, 0xA041, 0x8272, 0xA041, 0xFFFF, 0x79F2, 0xA04D, 0x7A6E, 0xA08C, 0x79E9, 0xA3F6, 0x795A, 0xA3AE, 0xFFFF, 0x8079, 0xA115, 0x80CB, 0xA493, 0x8039, 0xA4B9, 0x7FF7, 0xA136, 0x8079, 0xA115, 0x8079, 0xA115, 0xFFFF, 0x7BEC, 0xA11B, 0x7C6C, 0xA13A, 0x7C2E, 0xA4BE, 0x7B9C, 0xA499, 0xFFFF, 0x7E73, 0xA169, 0x7E7E, 0xA4F2, 0x7DE9, 0xA4F3, 0x7DF1, 0xA169, 0x7E73, 0xA169, 0xFFFF, 0x7F6C, 0x7644, 0x801D, 0x768B, 0x8069, 0x76D5, 0x80AE, 0x7739, 0x8102, 0x785D, 0x80E7, 0x799A, 0x807D, 0x7A8F, 0x7FD8, 0x7B0A, 0x7FC8, 0x7AFB, 0x7FA3, 0x7ABE, 0x7FCB, 0x7A6B, 0x7FE9, 0x7A54, 0x803C, 0x7A0A, 0x8084, 0x7950, 0x8090, 0x787F, 0x8057, 0x77D1, 0x8021, 0x778E, 0x7FE8, 0x775E, 0x7F71, 0x773A, 0x7F02, 0x777C, 0x7ECF, 0x77C4, 0x7EAC, 0x780F, 0x7E89, 0x7880, 0x7E77, 0x78DA, 0x7E6F, 0x79A6, 0x7E7D, 0x79F6, 0x7E9C, 0x7A3A, 0x7F0C, 0x7AD3, 0x8002, 0x7C03, 0x8084, 0x7CC0, 0x80B8, 0x7D14, 0x80F6, 0x7D99, 0x8135, 0x7EE9, 0x812D, 0x8036, 0x8103, 0x8165, 0x80C6, 0x8280, 0x8087, 0x8371, 0x806C, 0x8452, 0x810C, 0x8410, 0x8154, 0x839E, 0x8206, 0x823F, 0x827D, 0x80B4, 0x8297, 0x8003, 0x82CD, 0x7E19, 0x82F5, 0x7CEB, 0x8303, 0x7CA0, 0x8342, 0x7BB3, 0x8375, 0x7B3F, 0x83B2, 0x7ADA, 0x843E, 0x7A4C, 0x84A1, 0x7A11, 0x84DA, 0x79F7, 0x8528, 0x7A0D, 0x8575, 0x7A3B, 0x8597, 0x7A59, 0x861A, 0x7B08, 0x8672, 0x7C1B, 0x8684, 0x7CB2, 0x8686, 0x7D50, 0x8636, 0x7E77, 0x8597, 0x7F10, 0x84E7, 0x7F24, 0x8442, 0x7EA8, 0x843C, 0x7E82, 0x8439, 0x7E27, 0x847D, 0x7E2E, 0x8498, 0x7E44, 0x84F4, 0x7E8C, 0x8582, 0x7E7E, 0x85FA, 0x7E0C, 0x8630, 0x7D40, 0x862E, 0x7CC4, 0x861C, 0x7C48, 0x85D5, 0x7B74, 0x8562, 0x7AE7, 0x851B, 0x7ABD, 0x84E1, 0x7AAF, 0x848E, 0x7AE2, 0x8456, 0x7B13, 0x83F8, 0x7B7B, 0x83CC, 0x7BCD, 0x83A8, 0x7C2E, 0x837D, 0x7CFD, 0x8365, 0x7EF1, 0x8367, 0x8074, 0x8361, 0x810D, 0x8303, 0x8341, 0x8266, 0x8533, 0x81A6, 0x8702, 0x81A4, 0x8710, 0x824F, 0x8671, 0x82F2, 0x8603, 0x83B0, 0x85C4, 0x8493, 0x860B, 0x84F8, 0x8689, 0x853B, 0x8727, 0x8575, 0x87EB, 0x85F2, 0x8982, 0x8655, 0x8ABA, 0x86A4, 0x8B6E, 0x86D5, 0x8BAE, 0x8702, 0x8BCD, 0x8779, 0x8BD7, 0x87BB, 0x8BBA, 0x8806, 0x8B7C, 0x8834, 0x8B3C, 0x8853, 0x8B04, 0x8887, 0x8A44, 0x8881, 0x8962, 0x8869, 0x88EC, 0x884A, 0x888D, 0x87EB, 0x8810, 0x876F, 0x880F, 0x86FC, 0x887C, 0x86BC, 0x892D, 0x86AF, 0x8955, 0x866E, 0x8955, 0x8665, 0x88F9, 0x86C0, 0x8806, 0x8756, 0x8771, 0x8806, 0x876F, 0x8899, 0x8824, 0x88C9, 0x88AB, 0x88E7, 0x8932, 0x88F5, 0x8A64, 0x88B1, 0x8B88, 0x8873, 0x8C00, 0x882B, 0x8C5B, 0x87DD, 0x8C9D, 0x8790, 0x8CC5, 0x86E1, 0x8CCB, 0x86A0, 0x8CA8, 0x8679, 0x8C86, 0x863A, 0x8C3E, 0x85C5, 0x8B6D, 0x853C, 0x8A3D, 0x847D, 0x8882, 0x8456, 0x8835, 0x8420, 0x8808, 0x83DF, 0x8820, 0x831F, 0x88EC, 0x825B, 0x8A2B, 0x8258, 0x8A47, 0x8323, 0x8BA0, 0x8399, 0x8CA6, 0x83F8, 0x8DF6, 0x8405, 0x8F9A, 0x83DE, 0x905F, 0x83A4, 0x9120, 0x833B, 0x929B, 0x82F3, 0x945E, 0x82FC, 0x9529, 0x8319, 0x9587, 0x8336, 0x95C0, 0x841E, 0x968C, 0x844B, 0x9688, 0x8482, 0x966F, 0x84E3, 0x9607, 0x852B, 0x955E, 0x8543, 0x94FA, 0x854B, 0x9497, 0x852F, 0x93EA, 0x84D7, 0x9378, 0x8463, 0x9357, 0x83F5, 0x9378, 0x83AE, 0x9352, 0x83BB, 0x92D5, 0x83EB, 0x92BA, 0x8461, 0x928C, 0x8501, 0x92C4, 0x8587, 0x937A, 0x85B9, 0x949F, 0x85AC, 0x9536, 0x8586, 0x95D3, 0x8538, 0x96A1, 0x84B0, 0x9749, 0x845E, 0x9778, 0x8401, 0x9786, 0x83A7, 0x975E, 0x835F, 0x9730, 0x82CB, 0x96A2, 0x8285, 0x962B, 0x825B, 0x95B6, 0x824F, 0x9579, 0x822A, 0x945A, 0x8233, 0x932B, 0x828E, 0x8FF7, 0x8201, 0x8E1D, 0x81D6, 0x8E1B, 0x80A8, 0x8E1A, 0x7D88, 0x9136, 0x7D81, 0x9352, 0x7E13, 0x9482, 0x7EE8, 0x960C, 0x7F4A, 0x970B, 0x7F69, 0x97B4, 0x7F6C, 0x983B, 0x7F63, 0x9881, 0x7F26, 0x9992, 0x7EEE, 0x9A13, 0x7EA6, 0x9A86, 0x7E66, 0x9ACC, 0x7E14, 0x9B05, 0x7D61, 0x9B0D, 0x7CC3, 0x9A88, 0x7C84, 0x9A22, 0x7C50, 0x99AA, 0x7C25, 0x987B, 0x7C63, 0x9759, 0x7CE5, 0x9694, 0x7D8C, 0x9653, 0x7DB0, 0x966C, 0x7DB1, 0x96DF, 0x7D0E, 0x971E, 0x7CAB, 0x97B5, 0x7C81, 0x9884, 0x7CA2, 0x9950, 0x7CCE, 0x99AC, 0x7D03, 0x99F6, 0x7D77, 0x9A4B, 0x7DF2, 0x9A35, 0x7E2F, 0x9A00, 0x7E59, 0x99C6, 0x7E64, 0x99B4, 0x7E97, 0x9944, 0x7EAE, 0x98F9, 0x7ECA, 0x9840, 0x7EC4, 0x97E8, 0x7EAF, 0x9796, 0x7E5B, 0x96EA, 0x7D73, 0x9597, 0x7C95, 0x9462, 0x7C76, 0x9426, 0x7C3D, 0x9397, 0x7C18, 0x92D4, 0x7C1D, 0x9165, 0x7C9A, 0x8F14, 0x7CE9, 0x8E19, 0x7CDA, 0x8E1F, 0x7A83, 0x8FB1, 0x7A47, 0x8FC2, 0x7960, 0x8FD1, 0x78E6, 0x8FA5, 0x787F, 0x8F77, 0x77CC, 0x8F40, 0x7777, 0x8F3D, 0x772A, 0x8F54, 0x768D, 0x8FBB, 0x7670, 0x8FDD, 0x7609, 0x9086, 0x75EE, 0x90E1, 0x75DF, 0x916F, 0x75DF, 0x91A2, 0x75FF, 0x9292, 0x767C, 0x933F, 0x7721, 0x9375, 0x77A0, 0x92F1, 0x779C, 0x90BF, 0x779F, 0x907F, 0x77A1, 0x9055, 0x77DC, 0x904C, 0x77ED, 0x9087, 0x783B, 0x91C9, 0x7809, 0x9369, 0x77B0, 0x9410, 0x7737, 0x9468, 0x7645, 0x9438, 0x7579, 0x933A, 0x753D, 0x9268, 0x752C, 0x9188, 0x7538, 0x90AB, 0x7557, 0x9012, 0x756A, 0x8FD4, 0x7617, 0x8E93, 0x7664, 0x8E4F, 0x76E5, 0x8DE6, 0x7760, 0x8DAC, 0x77DC, 0x8D9E, 0x78BE, 0x8DC4, 0x795C, 0x8DF1, 0x7988, 0x8DF0, 0x7A69, 0x8DA0, 0x7AB9, 0x8D58, 0x7B46, 0x8C9F, 0x7BB3, 0x8BD0, 0x7BB7, 0x8B31, 0x7AD6, 0x8B59, 0x7983, 0x8B9A, 0x791B, 0x8BAC, 0x7895, 0x8B9D, 0x780B, 0x8B35, 0x77A4, 0x8A6A, 0x7784, 0x89EC, 0x773F, 0x8886, 0x7724, 0x880F, 0x76DB, 0x86FD, 0x7673, 0x8607, 0x75E1, 0x859E, 0x7538, 0x85D5, 0x7502, 0x8614, 0x74DB, 0x8661, 0x74C1, 0x869C, 0x74A2, 0x87BB, 0x74B8, 0x885D, 0x74C3, 0x888C, 0x74DF, 0x88D2, 0x7574, 0x8936, 0x761A, 0x88D3, 0x7672, 0x87D7, 0x767D, 0x87BC, 0x76AE, 0x8795, 0x76CA, 0x87F9, 0x76A5, 0x88B8, 0x7656, 0x895A, 0x7578, 0x89EF, 0x74FD, 0x89D4, 0x748E, 0x895C, 0x7462, 0x88FE, 0x7441, 0x8876, 0x7427, 0x87D9, 0x744C, 0x862A, 0x7494, 0x8576, 0x74D8, 0x8513, 0x74FC, 0x84EE, 0x75E8, 0x848A, 0x76DA, 0x851A, 0x777B, 0x865A, 0x77EA, 0x87BE, 0x7847, 0x8903, 0x7873, 0x8975, 0x78A2, 0x89B1, 0x78D7, 0x89D9, 0x791D, 0x89F0, 0x79C7, 0x89AB, 0x7A2B, 0x8938, 0x7AA0, 0x8868, 0x7A67, 0x83FA, 0x79D6, 0x82A1, 0x795A, 0x80F5, 0x7937, 0x7FF7, 0x793A, 0x7EE4, 0x7950, 0x7E54, 0x7970, 0x7DD1, 0x798F, 0x7D44, 0x79B3, 0x7BEA, 0x79AD, 0x7B69, 0x7992, 0x7B0C, 0x7983, 0x7AE4, 0x7886, 0x79EC, 0x77A1, 0x7ACF, 0x7787, 0x7B52, 0x777B, 0x7BDB, 0x77B1, 0x7C9E, 0x7846, 0x7CE9, 0x78E3, 0x7CA0, 0x7917, 0x7CB1, 0x791B, 0x7D17, 0x78B7, 0x7D82, 0x784C, 0x7DB0, 0x776A, 0x7D66, 0x770C, 0x7CC6, 0x76E4, 0x7BEA, 0x76EB, 0x7B15, 0x7702, 0x7A7F, 0x7710, 0x7A4B, 0x77A2, 0x790A, 0x7891, 0x789F, 0x7973, 0x790B, 0x7A2C, 0x7A0F, 0x7A54, 0x7A76, 0x7A78, 0x7AEE, 0x7A8E, 0x7BF9, 0x7A65, 0x7DC1, 0x7A4A, 0x7EDC, 0x7A4B, 0x7F1B, 0x7A7F, 0x800B, 0x7AFA, 0x80FD, 0x7B72, 0x81A2, 0x7D4E, 0x80DA, 0x7F2C, 0x824D, 0x7FB6, 0x8175, 0x800C, 0x809F, 0x8045, 0x7FD2, 0x8056, 0x7F0C, 0x8037, 0x7E65, 0x8008, 0x7E02, 0x7F7E, 0x7D1D, 0x7E90, 0x7BCF, 0x7E13, 0x7B0A, 0x7DDC, 0x7A70, 0x7DC6, 0x79DB, 0x7DC9, 0x797D, 0x7DDB, 0x787C, 0x7E01, 0x77E5, 0x7E25, 0x7782, 0x7E5D, 0x7711, 0x7E85, 0x76D8, 0x7EBA, 0x7698, 0x7F6C, 0x7643}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bootscreen_logo_portrait.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bootscreen_logo_portrait.h new file mode 100644 index 000000000000..ef86082077af --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bootscreen_logo_portrait.h @@ -0,0 +1,43 @@ + +/**************************************************************************** + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/** + * This file was auto-generated using "svg2cpp.pl" + * + * The encoding consists of x,y pairs with the min and max scaled to + * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the + * start of a new closed path. + */ + +#pragma once + +constexpr float x_min = 0.000000; + +constexpr float x_max = 272.000000; + +constexpr float y_min = 0.000000; + +constexpr float y_max = 480.000000; + +const PROGMEM uint16_t logo_green[] = {0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA}; + +const PROGMEM uint16_t logo_mark[] = {0xDB9F, 0xAC0C, 0xDA6F, 0xAC2D, 0xD970, 0xAC91, 0xD8C0, 0xAD23, 0xD885, 0xADCF, 0xD8C0, 0xAE7A, 0xD970, 0xAF0C, 0xDA6F, 0xAF6F, 0xDB9F, 0xAF8F, 0xDCCE, 0xAF6F, 0xDDD0, 0xAF0C, 0xDE7D, 0xAE7B, 0xDEB9, 0xADCF, 0xDE7D, 0xAD22, 0xDDD0, 0xAC91, 0xDCCE, 0xAC2D, 0xFFFF, 0xDB9F, 0xABC3, 0xDCFE, 0xABEA, 0xDE28, 0xAC5E, 0xDEF1, 0xAD06, 0xDF36, 0xADCF, 0xDEF1, 0xAE95, 0xDE28, 0xAF3E, 0xDCFE, 0xAFB1, 0xDB9F, 0xAFD8, 0xDA3F, 0xAFB1, 0xD916, 0xAF3E, 0xD849, 0xAE95, 0xD808, 0xADCF, 0xD849, 0xAD06, 0xD916, 0xAC5E, 0xDA3F, 0xABEA, 0xFFFF, 0xDB7D, 0xACE6, 0xDAE4, 0xACE6, 0xDAE4, 0xADA9, 0xDB7D, 0xADA9, 0xDC3B, 0xAD94, 0xDC71, 0xAD48, 0xDC3B, 0xACFD, 0xFFFF, 0xDB85, 0xAC9E, 0xDCCB, 0xACC8, 0xDD37, 0xAD47, 0xDCF6, 0xADAC, 0xDC3E, 0xADDE, 0xDC85, 0xADFF, 0xDCE8, 0xAE4E, 0xDD92, 0xAEEA, 0xDCBD, 0xAEEA, 0xDC1E, 0xAE58, 0xDBA7, 0xAE03, 0xDB36, 0xADEF, 0xDAE4, 0xADEF, 0xDAE4, 0xAEEA, 0xDA26, 0xAEEA, 0xDA26, 0xAC9E}; + +const PROGMEM uint16_t logo_type[] = {0xD8D5, 0xA520, 0xD8A5, 0xA563, 0xD82E, 0xA57F, 0xD348, 0xA57F, 0xD2D1, 0xA598, 0xD2A0, 0xA5D9, 0xD2A0, 0xAF7A, 0xD274, 0xAFBE, 0xD202, 0xAFDA, 0xCD37, 0xAFDA, 0xCCBF, 0xAFBE, 0xCC8F, 0xAF7A, 0xCC8F, 0xA5D9, 0xCC63, 0xA598, 0xCBF1, 0xA57F, 0xC70B, 0xA57F, 0xC694, 0xA563, 0xC664, 0xA520, 0xC664, 0xA28C, 0xC70B, 0xA22C, 0xD82E, 0xA22C, 0xD8A5, 0xA248, 0xD8D5, 0xA28C, 0xFFFF, 0xB138, 0xAC8C, 0xB952, 0xAC8C, 0xB952, 0xA57F, 0xB138, 0xA57F, 0xFFFF, 0xBF27, 0xA421, 0xBF57, 0xA476, 0xBF6D, 0xA4D0, 0xBF6D, 0xAD36, 0xBF57, 0xAD90, 0xBF27, 0xADE6, 0xBBFA, 0xAFB2, 0xBB60, 0xAFCF, 0xBABD, 0xAFDA, 0xAFCE, 0xAFDA, 0xAF30, 0xAFCF, 0xAE9A, 0xAFB2, 0xAB6E, 0xADE6, 0xAB39, 0xAD90, 0xAB28, 0xAD36, 0xAB28, 0xA4D0, 0xAB39, 0xA476, 0xAB6E, 0xA421, 0xAE9A, 0xA255, 0xAF30, 0xA239, 0xAFCE, 0xA22C, 0xBABD, 0xA22C, 0xBB60, 0xA239, 0xBBFA, 0xA255, 0xFFFF, 0x93A4, 0xACDC, 0x9CEA, 0xACDC, 0x9CEA, 0xAA34, 0x93A4, 0xAA34, 0x93A4, 0xACDC, 0xFFFF, 0x93A4, 0xA796, 0x9CEA, 0xA796, 0x9CEA, 0xA525, 0x93A4, 0xA525, 0xFFFF, 0xA227, 0xA421, 0xA258, 0xA478, 0xA26E, 0xA4D5, 0xA26E, 0xA700, 0xA24F, 0xA757, 0xA204, 0xA7A5, 0xA089, 0xA8B8, 0xA061, 0xA903, 0xA092, 0xA949, 0xA1FC, 0xAA43, 0xA24B, 0xAA91, 0xA26E, 0xAAE8, 0xA26E, 0xAD36, 0xA258, 0xAD90, 0xA227, 0xADE6, 0x9EFC, 0xAFB2, 0x9E61, 0xAFCF, 0x9DBE, 0xAFDA, 0x8ED0, 0xAFDA, 0x8E28, 0xAF7A, 0x8E28, 0xA28C, 0x8E59, 0xA248, 0x8ED0, 0xA22C, 0x9DBE, 0xA22C, 0x9E61, 0xA239, 0x9EFC, 0xA255, 0xFFFF, 0x853C, 0xA502, 0x8517, 0xA557, 0x84C9, 0xA5A2, 0x7994, 0xACC8, 0x8494, 0xACC8, 0x850A, 0xACE4, 0x853C, 0xAD27, 0x853C, 0xAF7A, 0x850A, 0xAFBE, 0x8494, 0xAFDA, 0x7371, 0xAFDA, 0x72C9, 0xAF7A, 0x72C9, 0xAD09, 0x72E8, 0xACB2, 0x7333, 0xAC64, 0x7EA5, 0xA53E, 0x73A6, 0xA53E, 0x732F, 0xA522, 0x72FE, 0xA4DF, 0x72FE, 0xA28C, 0x732F, 0xA248, 0x73A6, 0xA22C, 0x8494, 0xA22C, 0x850A, 0xA248, 0x853C, 0xA28C, 0xFFFF, 0x6B68, 0xAC87, 0x6BDB, 0xACA3, 0x6C07, 0xACE6, 0x6C07, 0xAF7A, 0x6BDB, 0xAFBE, 0x6B68, 0xAFDA, 0x5C84, 0xAFDA, 0x5BDC, 0xAF7A, 0x5BDC, 0xA28C, 0x5C84, 0xA22C, 0x6146, 0xA22C, 0x61EE, 0xA28C, 0x61EE, 0xAC2D, 0x621E, 0xAC6E, 0x6295, 0xAC87, 0xFFFF, 0x52C6, 0xA248, 0x52F7, 0xA28C, 0x52F7, 0xAD45, 0x52EE, 0xAD45, 0x52DC, 0xAD9B, 0x52B1, 0xADE6, 0x4F85, 0xAFB2, 0x4EEA, 0xAFCF, 0x4E47, 0xAFDA, 0x4359, 0xAFDA, 0x42BA, 0xAFCF, 0x4224, 0xAFB2, 0x3EF8, 0xADE6, 0x3EC3, 0xAD90, 0x3EB2, 0xAD36, 0x3EB2, 0xA28C, 0x3EE2, 0xA248, 0x3F5A, 0xA22C, 0x441B, 0xA22C, 0x4493, 0xA248, 0x44C3, 0xA28C, 0x44C3, 0xAC2D, 0x44F4, 0xAC71, 0x456B, 0xAC8C, 0x4C3E, 0xAC8C, 0x4CB1, 0xAC71, 0x4CDD, 0xAC2D, 0x4CDD, 0xA28C, 0x4D0D, 0xA248, 0x4D85, 0xA22C, 0x524F, 0xA22C, 0xFFFF, 0x3748, 0xAC87, 0x37BB, 0xACA3, 0x37E7, 0xACE6, 0x37E7, 0xAF7A, 0x37BB, 0xAFBE, 0x3748, 0xAFDA, 0x2864, 0xAFDA, 0x27BC, 0xAF7A, 0x27BC, 0xA28C, 0x2864, 0xA22C, 0x2D26, 0xA22C, 0x2DCD, 0xA28C, 0x2DCD, 0xAC2D, 0x2DFE, 0xAC6E, 0x2E75, 0xAC87}; + +const PROGMEM uint16_t logo_black[] = {0x8048, 0x527A, 0x8ADE, 0x5CDE, 0x75B2, 0x5CDE, 0xFFFF, 0x8048, 0x4FF6, 0x71D9, 0x5E20, 0x8EB8, 0x5E20, 0x8048, 0x4FF6, 0xFFFF, 0x4436, 0x8D8E, 0x4ECC, 0x97F2, 0x39A0, 0x97F2, 0xFFFF, 0x4436, 0x8B0A, 0x35C8, 0x9934, 0x52A5, 0x9934, 0xFFFF, 0xBC3D, 0x8D8E, 0xC6D4, 0x97F2, 0xB1A7, 0x97F2, 0xFFFF, 0xBC3D, 0x8B0A, 0xADCE, 0x9934, 0xCAAC, 0x9934, 0xFFFF, 0x8045, 0x6778, 0x7F6D, 0x67A7, 0x7E9D, 0x689F, 0x7D49, 0x69EA, 0x7B41, 0x6A81, 0x7908, 0x6A3A, 0x7726, 0x692C, 0x75EA, 0x685A, 0x7505, 0x684C, 0x744A, 0x6899, 0x73F5, 0x69A8, 0x7345, 0x6B1A, 0x7193, 0x6BF8, 0x6F4D, 0x6C08, 0x6CFA, 0x6B45, 0x6B61, 0x6AA3, 0x6A7D, 0x6AB7, 0x69EB, 0x6B1D, 0x6A1D, 0x6C34, 0x6A22, 0x6DB8, 0x68E5, 0x6ECD, 0x66B9, 0x6F33, 0x6417, 0x6EC5, 0x6239, 0x6E5C, 0x6165, 0x6E91, 0x6108, 0x6F09, 0x61C1, 0x7018, 0x6282, 0x7196, 0x61CF, 0x72D1, 0x5FE5, 0x7384, 0x5D38, 0x7380, 0x5B4B, 0x7365, 0x5A97, 0x73B7, 0x5A74, 0x7438, 0x5B90, 0x7520, 0x5CE8, 0x7671, 0x5CCB, 0x77BB, 0x5B43, 0x78B0, 0x58B6, 0x7914, 0x56D7, 0x7944, 0x564F, 0x79AD, 0x5667, 0x7A2F, 0x57DA, 0x7AE3, 0x59B7, 0x7BF3, 0x5A31, 0x7D37, 0x5927, 0x7E5D, 0x56E0, 0x7F1E, 0x5529, 0x7F93, 0x54D7, 0x800D, 0x5529, 0x8087, 0x56E0, 0x80FD, 0x5926, 0x81BE, 0x5A30, 0x82E5, 0x59B5, 0x8428, 0x57D8, 0x8538, 0x5664, 0x85EB, 0x564C, 0x866D, 0x56D4, 0x86D7, 0x58B2, 0x8708, 0x5B3F, 0x876B, 0x5CC6, 0x8860, 0x5CE3, 0x89AA, 0x5B8B, 0x8AFC, 0x5A6D, 0x8BE3, 0x5A91, 0x8C65, 0x5B44, 0x8CB7, 0x5D32, 0x8C9C, 0x5FDE, 0x8C98, 0x61C7, 0x8D4B, 0x627A, 0x8E87, 0x61B9, 0x9005, 0x60FF, 0x9114, 0x615C, 0x918B, 0x622F, 0x91C0, 0x640E, 0x9158, 0x66B0, 0x90EA, 0x68DC, 0x9150, 0x6A18, 0x9266, 0x6A12, 0x93E9, 0x69E0, 0x9501, 0x6A72, 0x9567, 0x6B56, 0x957B, 0x6CEE, 0x94D9, 0x6F43, 0x9417, 0x7188, 0x9428, 0x7339, 0x9506, 0x73E9, 0x9678, 0x743E, 0x9787, 0x74F8, 0x97D4, 0x75DD, 0x97C6, 0x771A, 0x96F4, 0x78FB, 0x95E6, 0x7B35, 0x95A1, 0x7D3D, 0x9637, 0x7E91, 0x9782, 0x7F60, 0x987A, 0x8038, 0x98AA, 0x810F, 0x987B, 0x81DF, 0x9782, 0x8333, 0x9638, 0x853B, 0x95A1, 0x8775, 0x95E7, 0x8956, 0x96F5, 0x8A92, 0x97C8, 0x8B78, 0x97D6, 0x8C32, 0x9789, 0x8C88, 0x967A, 0x8D37, 0x9508, 0x8EE9, 0x942A, 0x912F, 0x941A, 0x9383, 0x94DD, 0x951B, 0x957F, 0x95FF, 0x956B, 0x9690, 0x9505, 0x9660, 0x93ED, 0x9659, 0x926A, 0x9797, 0x9154, 0x99C3, 0x90EF, 0x9C65, 0x915D, 0x9E43, 0x91C6, 0x9F17, 0x9191, 0x9F74, 0x9119, 0x9EBB, 0x900A, 0x9DFA, 0x8E8C, 0x9EAE, 0x8D51, 0xA098, 0x8C9E, 0xA345, 0x8CA2, 0xA531, 0x8CBE, 0xA5E5, 0x8C6B, 0xA609, 0x8BEA, 0xA4EC, 0x8B02, 0xA394, 0x89B1, 0xA3B2, 0x8867, 0xA53A, 0x8772, 0xA7C6, 0x870E, 0xA9A5, 0x86DE, 0xAA2D, 0x8675, 0xAA14, 0x85F2, 0xA8A2, 0x853F, 0xA6C5, 0x842E, 0xA64B, 0x82EB, 0xA755, 0x81C5, 0xA99C, 0x8104, 0xAB52, 0x808F, 0xABA6, 0x8015, 0xAB52, 0x7F9B, 0xA99C, 0x7F25, 0xA755, 0x7E64, 0xA64C, 0x7D3E, 0xA6C7, 0x7BFA, 0xA8A5, 0x7AEA, 0xAA18, 0x7A37, 0xAA31, 0x79B5, 0xA9A9, 0x794B, 0xA7CA, 0x791B, 0xA53C, 0x78B7, 0xA3B6, 0x77C1, 0xA39A, 0x7677, 0xA4F1, 0x7526, 0xA60E, 0x743F, 0xA5EB, 0x73BD, 0xA538, 0x736B, 0xA34B, 0x7387, 0xA09E, 0x738A, 0x9EB4, 0x72D6, 0x9E02, 0x719B, 0x9EC4, 0x701D, 0x9F7E, 0x6F0E, 0x9F20, 0x6E96, 0x9E4E, 0x6E61, 0x9C6E, 0x6ECA, 0x99CB, 0x6F37, 0x97A0, 0x6ED2, 0x9664, 0x6DBC, 0x966B, 0x6C38, 0x969B, 0x6B21, 0x960B, 0x6ABB, 0x9526, 0x6AA6, 0x938E, 0x6B48, 0x913B, 0x6C0B, 0x8EF4, 0x6BFA, 0x8D43, 0x6B1D, 0x8C94, 0x69AA, 0x8C3F, 0x689B, 0x8B85, 0x684D, 0x8A9E, 0x685C, 0x8962, 0x692E, 0x8781, 0x6A3C, 0x8546, 0x6A82, 0x833F, 0x69EA, 0x81EC, 0x68A0, 0x811C, 0x67A8, 0x8045, 0x6778, 0x8045, 0x6778, 0xFFFF, 0x8047, 0x6AA0, 0x81C8, 0x6AFA, 0x8268, 0x6BD5, 0x81C8, 0x6CAF, 0x8047, 0x6D09, 0x7EC6, 0x6CAF, 0x7E27, 0x6BD5, 0x7EC6, 0x6AFA, 0x8047, 0x6AA0, 0x8047, 0x6AA0, 0xFFFF, 0x803E, 0x6E19, 0x867C, 0x6E71, 0x8C65, 0x6F75, 0x91D7, 0x711B, 0x96AD, 0x735B, 0x9ABC, 0x762C, 0x9DA2, 0x794C, 0x9F5F, 0x7CA2, 0x9FF3, 0x8011, 0x9F5E, 0x8380, 0x9DA1, 0x86D5, 0x9ABA, 0x89F6, 0x96AB, 0x8CC7, 0x91D6, 0x8F08, 0x8C65, 0x90AD, 0x867C, 0x91B1, 0x803D, 0x9209, 0x7A00, 0x91B1, 0x7416, 0x90AD, 0x6EA6, 0x8F08, 0x69D0, 0x8CC7, 0x65D6, 0x8A0A, 0x62EE, 0x86F4, 0x6125, 0x839B, 0x6089, 0x8011, 0x6124, 0x7C88, 0x62ED, 0x792E, 0x65D6, 0x7619, 0x69CF, 0x735B, 0x6EA5, 0x711B, 0x7416, 0x6F75, 0x7A00, 0x6E71, 0x803E, 0x6E19, 0x803E, 0x6E19, 0xFFFF, 0x803E, 0x6EB2, 0x7A5A, 0x6F04, 0x74B2, 0x6FF8, 0x6F4B, 0x7194, 0x6A8F, 0x73C7, 0x66A2, 0x7681, 0x63D5, 0x7986, 0x6226, 0x7CBF, 0x6197, 0x8011, 0x6226, 0x8363, 0x63D5, 0x869C, 0x66A2, 0x89A2, 0x6A8F, 0x8C5B, 0x6F4B, 0x8E8E, 0x74B2, 0x902B, 0x7A5A, 0x911E, 0x803D, 0x9170, 0x803E, 0x9170, 0x8621, 0x911E, 0x8BCA, 0x902B, 0x9130, 0x8E8E, 0x95ED, 0x8C5B, 0x99CF, 0x89AB, 0x9CA7, 0x869C, 0x9E55, 0x8367, 0x9EE5, 0x8011, 0x9E55, 0x7CBB, 0x9CA7, 0x7986, 0x99CF, 0x7677, 0x95ED, 0x73C7, 0x9130, 0x7194, 0x8BCA, 0x6FF8, 0x8621, 0x6F04, 0x803E, 0x6EB2, 0x803E, 0x6EB2, 0xFFFF, 0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x6700, 0x708A, 0x6880, 0x70E5, 0x6920, 0x71BF, 0x6880, 0x7299, 0x66FF, 0x72F4, 0x657F, 0x7299, 0x64E0, 0x71BF, 0x657F, 0x70E4, 0x6700, 0x708A, 0x6700, 0x708A, 0xFFFF, 0x998D, 0x708C, 0x9B0E, 0x70E6, 0x9BAE, 0x71C0, 0x9B0E, 0x729B, 0x998D, 0x72F6, 0x980D, 0x729B, 0x976E, 0x71C1, 0x980D, 0x70E7, 0x998D, 0x708C, 0x998D, 0x708C, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0x8BA7, 0x712C, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0x8F47, 0x723F, 0xFFFF, 0x712D, 0x7242, 0x7308, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x803E, 0x72F6, 0x891B, 0x73F4, 0x909A, 0x76CC, 0x959F, 0x7B0B, 0x975E, 0x8011, 0x959F, 0x8517, 0x909A, 0x8957, 0x891B, 0x8C2E, 0x803E, 0x8D2B, 0x7761, 0x8C2E, 0x6FE2, 0x8957, 0x6ADD, 0x8517, 0x691E, 0x8011, 0x6ADD, 0x7B0B, 0x6FE2, 0x76CC, 0x7761, 0x73F4, 0x803E, 0x72F6, 0x803E, 0x72F6, 0xFFFF, 0x803E, 0x738F, 0x77C8, 0x7481, 0x70A0, 0x7738, 0x6BD7, 0x7B46, 0x6A2C, 0x8011, 0x6BD7, 0x84DC, 0x70A1, 0x88EA, 0x77C9, 0x8BA1, 0x803E, 0x8C93, 0x88B4, 0x8BA1, 0x8FDB, 0x88EA, 0x94A5, 0x84DD, 0x9650, 0x8011, 0x94A5, 0x7B46, 0x8FDB, 0x7738, 0x88B4, 0x7481, 0x803E, 0x738F, 0x803E, 0x738F, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0x9175, 0x745E, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6CEC, 0x76FA, 0x6BED, 0x7674, 0x6A40, 0x75A9, 0x6A45, 0x75A7, 0x6AEB, 0x7539, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0x9A12, 0x790A, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCB, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x5C87, 0x7EDB, 0x5E08, 0x7F35, 0x5EA8, 0x800F, 0x5E08, 0x80E9, 0x5C87, 0x8144, 0x5C85, 0x8144, 0x5B06, 0x80E9, 0x5A67, 0x800F, 0x5B06, 0x7F35, 0x5C87, 0x7EDB, 0x5C87, 0x7EDB, 0xFFFF, 0xA402, 0x7EDE, 0xA583, 0x7F38, 0xA623, 0x8011, 0xA623, 0x8013, 0xA583, 0x80EC, 0xA402, 0x8147, 0xA281, 0x80ED, 0xA1E2, 0x8013, 0xA281, 0x7F38, 0xA402, 0x7EDE, 0xA402, 0x7EDE, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8255, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8914, 0x67DC, 0x8897, 0x6ADF, 0x878A, 0xFFFF, 0x6CF7, 0x892F, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x963E, 0x8A77, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x7035, 0x8B04, 0x6DED, 0x8C8B, 0x6DE1, 0x8C87, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x66F3, 0x8D2F, 0x6874, 0x8D8A, 0x687D, 0x8D8F, 0x6886, 0x8D94, 0x6926, 0x8E6E, 0x6887, 0x8F48, 0x6705, 0x8FA2, 0x6584, 0x8F49, 0x657F, 0x8F45, 0x6570, 0x8F3E, 0x6573, 0x8F3E, 0x64D3, 0x8E63, 0x6573, 0x8D89, 0x66F3, 0x8D2F, 0x66F3, 0x8D2F, 0xFFFF, 0x9993, 0x8D31, 0x9B13, 0x8D8C, 0x9BB4, 0x8E66, 0x9B16, 0x8F40, 0x9993, 0x8F9A, 0x9814, 0x8F40, 0x9774, 0x8E66, 0x9812, 0x8D8C, 0x9993, 0x8D31, 0x9993, 0x8D31, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CD, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C1, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0x7C48, 0x8E1C, 0xFFFF, 0x80BF, 0x8E49, 0x80D2, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BF, 0x8E49, 0x80BF, 0x8E49, 0xFFFF, 0x804F, 0x9321, 0x81D0, 0x937A, 0x8271, 0x9455, 0x81D1, 0x952F, 0x8051, 0x958A, 0x7ECF, 0x9530, 0x7E2F, 0x9456, 0x7ECE, 0x937B, 0x804F, 0x9321, 0x804F, 0x9321, 0xFFFF, 0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA, 0xFFFF, 0x8048, 0x4BC9, 0x952E, 0x604A, 0x6B62, 0x604A, 0xFFFF, 0x68D2, 0x62CE, 0x97BF, 0x62CE, 0xB9BA, 0x8427, 0xA239, 0x9B36, 0x5E16, 0x9B36, 0x46B6, 0x8446, 0x68D2, 0x62CE, 0xFFFF, 0xBC3E, 0x869F, 0xD13B, 0x9B36, 0xA742, 0x9B36, 0xFFFF, 0x4431, 0x86BE, 0x590E, 0x9B36, 0x2F54, 0x9B36, 0x4431, 0x86BE}; + +const PROGMEM uint16_t logo_white[] = {0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0xFFFF, 0x712D, 0x7242, 0x7309, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6A40, 0x75A9, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCC, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8256, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8915, 0x67DC, 0x8897, 0xFFFF, 0x6CF7, 0x8930, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x6DED, 0x8C8C, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CC, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C0, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0xFFFF, 0x80BE, 0x8E49, 0x80D1, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BE, 0x8E49, 0xFFFF, 0x8276, 0x75D6, 0x83AF, 0x75FE, 0x8436, 0x7628, 0x84AE, 0x7661, 0x8542, 0x7706, 0x8512, 0x77BA, 0x8457, 0x7845, 0x8335, 0x788B, 0x8318, 0x7882, 0x82D8, 0x7860, 0x831E, 0x7830, 0x8353, 0x7823, 0x83E6, 0x77F9, 0x8464, 0x7790, 0x847A, 0x771A, 0x8415, 0x76B7, 0x83B6, 0x7691, 0x8351, 0x7676, 0x827F, 0x7662, 0x81BB, 0x7687, 0x8161, 0x76AF, 0x8123, 0x76DA, 0x80E5, 0x771A, 0x80C5, 0x774D, 0x80B8, 0x77C1, 0x80D1, 0x77EE, 0x8107, 0x7814, 0x81CC, 0x786B, 0x837F, 0x7918, 0x8464, 0x7983, 0x84C0, 0x79B2, 0x852D, 0x79FD, 0x859D, 0x7ABC, 0x858E, 0x7B79, 0x8545, 0x7C25, 0x84D9, 0x7CC5, 0x8469, 0x7D4D, 0x843B, 0x7DCD, 0x8555, 0x7DA8, 0x85D3, 0x7D67, 0x870D, 0x7CA0, 0x87E0, 0x7BC0, 0x880D, 0x7B5B, 0x886D, 0x7A46, 0x88B3, 0x799B, 0x88CC, 0x7970, 0x893A, 0x78EA, 0x8995, 0x78A8, 0x8A01, 0x786F, 0x8AF8, 0x781F, 0x8BA6, 0x77FD, 0x8C0C, 0x77EF, 0x8C96, 0x77FB, 0x8D1D, 0x7815, 0x8D59, 0x7826, 0x8E40, 0x7889, 0x8EDB, 0x7925, 0x8EFC, 0x797B, 0x8EFF, 0x79D4, 0x8E71, 0x7A7B, 0x8D58, 0x7AD2, 0x8C23, 0x7ADE, 0x8AFF, 0x7A97, 0x8AF5, 0x7A81, 0x8AEF, 0x7A4E, 0x8B68, 0x7A52, 0x8B96, 0x7A5F, 0x8C39, 0x7A87, 0x8D33, 0x7A7F, 0x8E07, 0x7A3F, 0x8E66, 0x79CB, 0x8E63, 0x7985, 0x8E43, 0x793F, 0x8DC6, 0x78C6, 0x8CFA, 0x7876, 0x8C7E, 0x785F, 0x8C18, 0x7857, 0x8B84, 0x7874, 0x8B22, 0x788F, 0x8A7D, 0x78CA, 0x8A2E, 0x78F9, 0x89F0, 0x7930, 0x89A3, 0x79A5, 0x8979, 0x7AC0, 0x897C, 0x7B9C, 0x8972, 0x7BF2, 0x88CC, 0x7D32, 0x87B7, 0x7E4C, 0x8665, 0x7F52, 0x8660, 0x7F5A, 0x878F, 0x7F01, 0x88AE, 0x7EC2, 0x89FD, 0x7E9E, 0x8B8D, 0x7EC6, 0x8C40, 0x7F0E, 0x8CB6, 0x7F68, 0x8D1D, 0x7FD7, 0x8DFA, 0x80BD, 0x8EA8, 0x816E, 0x8F34, 0x81D4, 0x8F8A, 0x81F9, 0x8FDA, 0x820A, 0x90AB, 0x820F, 0x9120, 0x81FF, 0x91A5, 0x81DC, 0x91F4, 0x81B8, 0x922C, 0x8198, 0x9288, 0x812B, 0x927D, 0x80AB, 0x9252, 0x8068, 0x921C, 0x8033, 0x9174, 0x7FEB, 0x9099, 0x7FEB, 0x8FCF, 0x8029, 0x8F5D, 0x808D, 0x8F47, 0x80A4, 0x8ED4, 0x80A4, 0x8EC5, 0x8070, 0x8F65, 0x7FE6, 0x906D, 0x7F92, 0x91A4, 0x7F90, 0x92A8, 0x7FF7, 0x92FC, 0x8043, 0x9331, 0x8090, 0x9349, 0x813D, 0x92D1, 0x81E3, 0x9264, 0x8227, 0x91E5, 0x825B, 0x915D, 0x8280, 0x90D3, 0x8296, 0x8FA0, 0x829A, 0x8F2C, 0x8286, 0x8EE7, 0x8273, 0x8E78, 0x824A, 0x8DA9, 0x81D4, 0x8CB9, 0x8127, 0x8B68, 0x802C, 0x8B22, 0x8001, 0x8AC3, 0x7FE7, 0x8A50, 0x7FF4, 0x88FD, 0x8068, 0x87A4, 0x811D, 0x879E, 0x812D, 0x8904, 0x81F1, 0x89D4, 0x8285, 0x8A7C, 0x8343, 0x8A94, 0x8431, 0x8A4E, 0x84A1, 0x89E8, 0x850E, 0x892F, 0x85E5, 0x88B0, 0x86E5, 0x88C0, 0x8757, 0x88F2, 0x878D, 0x8927, 0x87AD, 0x8ABF, 0x8821, 0x8B0E, 0x881E, 0x8B70, 0x8811, 0x8C1B, 0x87D6, 0x8C9B, 0x8776, 0x8CC4, 0x873D, 0x8CD3, 0x8705, 0x8CA2, 0x86A3, 0x8C06, 0x8662, 0x8B39, 0x864F, 0x8A77, 0x8662, 0x89F9, 0x864D, 0x8A10, 0x8606, 0x8A66, 0x85F7, 0x8B35, 0x85DC, 0x8C50, 0x85FD, 0x8D3C, 0x8663, 0x8D94, 0x870A, 0x8D7D, 0x875F, 0x8D3A, 0x87B8, 0x8CB1, 0x882D, 0x8BC1, 0x888C, 0x8B30, 0x88A7, 0x8A8D, 0x88AE, 0x89EE, 0x8898, 0x896E, 0x887E, 0x8869, 0x882D, 0x87EE, 0x87EA, 0x87A4, 0x87A8, 0x878E, 0x8785, 0x874D, 0x86E3, 0x875D, 0x8637, 0x87FD, 0x8466, 0x8705, 0x835A, 0x86B8, 0x8359, 0x84A4, 0x8358, 0x7F20, 0x851B, 0x7F13, 0x864D, 0x8016, 0x86F9, 0x818E, 0x87D8, 0x823B, 0x8869, 0x8272, 0x88C9, 0x8276, 0x8915, 0x8266, 0x893D, 0x81FB, 0x89D8, 0x8197, 0x8A21, 0x8119, 0x8A62, 0x80A7, 0x8A8A, 0x8016, 0x8AAA, 0x7EDC, 0x8AAE, 0x7DC5, 0x8A63, 0x7D55, 0x8A29, 0x7CFA, 0x89E5, 0x7CAD, 0x8939, 0x7D1B, 0x8895, 0x7E00, 0x8825, 0x7F27, 0x8800, 0x7F66, 0x880F, 0x7F69, 0x8850, 0x7E49, 0x8873, 0x7D9A, 0x88C9, 0x7D4F, 0x893E, 0x7D8B, 0x89B2, 0x7DD8, 0x89E6, 0x7E36, 0x8A10, 0x7F02, 0x8A40, 0x7FDB, 0x8A34, 0x8046, 0x8A16, 0x8091, 0x89F5, 0x80A5, 0x89EB, 0x80FE, 0x89AB, 0x8126, 0x8981, 0x8159, 0x8918, 0x814F, 0x88E6, 0x8128, 0x88B8, 0x8094, 0x8856, 0x7EFC, 0x8796, 0x7D74, 0x86E7, 0x7D3D, 0x86C5, 0x7CD8, 0x8674, 0x7C98, 0x8605, 0x7CA0, 0x8536, 0x7D7C, 0x83E6, 0x7E07, 0x8357, 0x7DED, 0x835B, 0x79CC, 0x843E, 0x7962, 0x8448, 0x77CB, 0x8450, 0x76F3, 0x8438, 0x763E, 0x841E, 0x7502, 0x83FE, 0x746C, 0x83FD, 0x73E4, 0x840A, 0x72CE, 0x8444, 0x729B, 0x8457, 0x71E6, 0x84B7, 0x71B5, 0x84EB, 0x719B, 0x853B, 0x719B, 0x8558, 0x71D4, 0x85E0, 0x72B0, 0x8642, 0x73D4, 0x8661, 0x74B3, 0x8616, 0x74AD, 0x84D7, 0x74B2, 0x84B3, 0x74B5, 0x849B, 0x751E, 0x8496, 0x753B, 0x84B8, 0x75C5, 0x856E, 0x756D, 0x865A, 0x74D0, 0x86B8, 0x73FA, 0x86EA, 0x7250, 0x86CF, 0x70E7, 0x863F, 0x707E, 0x85C8, 0x705F, 0x8549, 0x7075, 0x84CC, 0x70AC, 0x8475, 0x70CD, 0x8452, 0x71FF, 0x839C, 0x7287, 0x8376, 0x736A, 0x833A, 0x7443, 0x8319, 0x751E, 0x8311, 0x76AC, 0x8327, 0x77C4, 0x8341, 0x7810, 0x8340, 0x799F, 0x8313, 0x7A2A, 0x82EA, 0x7B24, 0x8281, 0x7BE4, 0x820C, 0x7BEC, 0x81B1, 0x7A5E, 0x81C8, 0x7809, 0x81ED, 0x7751, 0x81F8, 0x7664, 0x81EF, 0x7571, 0x81B4, 0x74BB, 0x8141, 0x7483, 0x80F9, 0x7408, 0x802F, 0x73D9, 0x7FEB, 0x7359, 0x7F50, 0x72A0, 0x7EC4, 0x719E, 0x7E89, 0x7074, 0x7EA8, 0x7015, 0x7ECC, 0x6FD0, 0x7EF8, 0x6FA3, 0x7F19, 0x6F6B, 0x7FBB, 0x6F93, 0x8017, 0x6FA7, 0x8032, 0x6FD7, 0x805A, 0x70DF, 0x8092, 0x7205, 0x805A, 0x729E, 0x7FCB, 0x72B3, 0x7FBC, 0x7309, 0x7FA6, 0x733B, 0x7FDE, 0x72F9, 0x804B, 0x726D, 0x80A7, 0x70E6, 0x80FB, 0x700D, 0x80EC, 0x6F48, 0x80A8, 0x6EFC, 0x8073, 0x6EC1, 0x8026, 0x6E93, 0x7FCC, 0x6ED4, 0x7ED8, 0x6F54, 0x7E72, 0x6FCB, 0x7E3A, 0x700B, 0x7E25, 0x71AB, 0x7DED, 0x7356, 0x7E3E, 0x7472, 0x7EF4, 0x7536, 0x7FBD, 0x75DA, 0x8075, 0x7628, 0x80B6, 0x767B, 0x80D8, 0x76D9, 0x80EF, 0x7755, 0x80FC, 0x7881, 0x80D5, 0x7931, 0x8093, 0x7A00, 0x801E, 0x799B, 0x7D9B, 0x789A, 0x7CD8, 0x77C0, 0x7BE5, 0x7783, 0x7B55, 0x7787, 0x7AB9, 0x77AE, 0x7A67, 0x77E6, 0x7A1D, 0x781E, 0x79CD, 0x785E, 0x7909, 0x7853, 0x78C0, 0x7823, 0x788B, 0x7808, 0x7875, 0x7649, 0x77E8, 0x74B6, 0x7869, 0x7488, 0x78B3, 0x7472, 0x7901, 0x74D2, 0x796F, 0x75D8, 0x799A, 0x76EE, 0x7971, 0x774A, 0x797A, 0x7751, 0x79B4, 0x76A0, 0x79F0, 0x75E4, 0x7A0A, 0x7454, 0x79E1, 0x73AF, 0x7986, 0x7369, 0x7909, 0x7374, 0x7891, 0x739D, 0x783C, 0x73B6, 0x781E, 0x74B7, 0x7768, 0x765D, 0x772C, 0x77ED, 0x7769, 0x7932, 0x77FC, 0x7979, 0x7836, 0x79B8, 0x787B, 0x79DF, 0x7912, 0x7998, 0x7A14, 0x7967, 0x7AB4, 0x796A, 0x7AD8, 0x79C5, 0x7B60, 0x7A9D, 0x7BE9, 0x7B72, 0x7C47, 0x7EBA, 0x7BD6, 0x8206, 0x7CA8, 0x82FA, 0x7C2E, 0x8391, 0x7BB4, 0x83F6, 0x7B40, 0x8413, 0x7AD0, 0x83DD, 0x7A71, 0x838A, 0x7A39, 0x8296, 0x79B7, 0x80F3, 0x78FA, 0x8016, 0x788A, 0x7FB4, 0x7833, 0x7F8D, 0x77DF, 0x7F92, 0x77A9, 0x7FB3, 0x7718, 0x7FF6, 0x76C2, 0x8036, 0x768A, 0x8097, 0x764A, 0x80DF, 0x762A, 0x813C, 0x7605, 0x8275, 0x75D5}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h new file mode 100644 index 000000000000..1dae8de4b2da --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h @@ -0,0 +1,117 @@ +/************ + * colors.h * + ************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace Theme { + + #define COLOR_CORRECTION(rgb) ( \ + (uint32_t((((rgb) & 0xFF0000) >> 16) * 1.00) << 16) | \ + (uint32_t((((rgb) & 0x00FF00) >> 8) * 1.00) << 8) | \ + (uint32_t((((rgb) & 0x0000FF) >> 0) * .75) << 0)) + + #define COLOR_BLEND(a,b,f) COLOR_CORRECTION( \ + (uint32_t((((a) & 0xFF0000) >> 16) * f + (((b) & 0xFF0000) >> 16) * (1-f)) << 16) | \ + (uint32_t((((a) & 0x00FF00) >> 8) * f + (((b) & 0x00FF00) >> 8) * (1-f)) << 8) | \ + (uint32_t((((a) & 0x0000FF) >> 0) * f + (((b) & 0x0000FF) >> 0) * (1-f)) << 0)) + + constexpr uint32_t lulzbot_bg = 0xDEEA5C; + constexpr uint32_t lulzbot_fg = 0xC1D82F; + + constexpr uint32_t lulzbot_green = COLOR_BLEND(0xC1DB2F,0x788814,0.33); + + #ifndef LULZBOT_USE_BIOPRINTER_UI + constexpr uint32_t theme_darkest = COLOR_CORRECTION(0x444444); + constexpr uint32_t theme_dark = COLOR_CORRECTION(0x777777); + + constexpr uint32_t bg_color = theme_darkest; + constexpr uint32_t bg_text_disabled = theme_dark; + constexpr uint32_t bg_text_enabled = 0xFFFFFF; + constexpr uint32_t bg_normal = theme_darkest; + + constexpr uint32_t fg_normal = theme_dark; + constexpr uint32_t fg_action = lulzbot_green; + constexpr uint32_t fg_disabled = bg_color; + #else + constexpr uint32_t theme_darkest = 0x545923; + constexpr uint32_t theme_dark = lulzbot_bg; + + constexpr uint32_t bg_color = 0xFFFFFF; + constexpr uint32_t bg_text_disabled = 0x333333; + constexpr uint32_t bg_text_enabled = theme_darkest; + constexpr uint32_t bg_normal = theme_dark; + + constexpr uint32_t fg_normal = theme_darkest; + constexpr uint32_t fg_action = theme_dark; + constexpr uint32_t fg_disabled = 0xEFEFEF; + + constexpr uint32_t shadow_rgb = 0xE0E0E0; + constexpr uint32_t fill_rgb = lulzbot_fg; + constexpr uint32_t stroke_rgb = theme_darkest; + constexpr uint32_t syringe_rgb = 0xF1F6C0; + #endif + + constexpr uint32_t x_axis = COLOR_CORRECTION(0xFF0000); + constexpr uint32_t y_axis = COLOR_CORRECTION(0x00BB00); + constexpr uint32_t z_axis = COLOR_CORRECTION(0x0000FF); + #ifndef LULZBOT_USE_BIOPRINTER_UI + constexpr uint32_t e_axis = COLOR_CORRECTION(0x777777); + constexpr uint32_t feedrate = COLOR_CORRECTION(0x777777); + constexpr uint32_t other = COLOR_CORRECTION(0x777777); + #else + constexpr uint32_t e_axis = 0x000000; + constexpr uint32_t feedrate = 0x000000; + constexpr uint32_t other = 0x000000; + #endif + + // Status screen + constexpr uint32_t progress = theme_dark; + constexpr uint32_t status_msg = theme_dark; + constexpr uint32_t fan_speed = COLOR_CORRECTION(0x3771CB); + constexpr uint32_t temp = COLOR_CORRECTION(0x892ca0); + constexpr uint32_t axis_label = theme_dark; + + constexpr uint32_t disabled_icon = 0x101010; + + // Calibration Registers Screen + constexpr uint32_t transformA = 0x3010D0; + constexpr uint32_t transformB = 0x4010D0; + constexpr uint32_t transformC = 0x5010D0; + constexpr uint32_t transformD = 0x6010D0; + constexpr uint32_t transformE = 0x7010D0; + constexpr uint32_t transformF = 0x8010D0; + constexpr uint32_t transformVal = 0x104010; + + constexpr btn_colors disabled_btn = {.bg = bg_color, .grad = fg_disabled, .fg = fg_disabled, .rgb = fg_disabled }; + constexpr btn_colors normal_btn = {.bg = fg_action, .grad = 0xFFFFFF, .fg = fg_normal, .rgb = 0xFFFFFF }; + constexpr btn_colors action_btn = {.bg = bg_color, .grad = 0xFFFFFF, .fg = fg_action, .rgb = 0xFFFFFF }; + constexpr btn_colors red_btn = {.bg = 0xFF5555, .grad = 0xFFFFFF, .fg = 0xFF0000, .rgb = 0xFFFFFF }; + constexpr btn_colors ui_slider = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = lulzbot_green }; + constexpr btn_colors ui_toggle = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = 0xFFFFFF }; + + // Temperature color scale + + const rgb_t cool_rgb ( 0, 0, 0); + const rgb_t low_rgb (128, 0, 0); + const rgb_t med_rgb (255, 128, 0); + const rgb_t high_rgb (255, 255, 128); +}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h new file mode 100644 index 000000000000..3e5a985cc3b2 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h @@ -0,0 +1,80 @@ +/*********** + * fonts.h * + ***********/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace Theme { + #ifdef TOUCH_UI_800x480 + #ifdef TOUCH_UI_PORTRAIT + constexpr int16_t font_tiny = 26; + constexpr int16_t font_xsmall = 28; + constexpr int16_t font_small = 29; + constexpr int16_t font_medium = 30; + constexpr int16_t font_large = 30; + constexpr int16_t font_xlarge = 31; + #else + constexpr int16_t font_tiny = 27; + constexpr int16_t font_xsmall = 29; + constexpr int16_t font_small = 30; + constexpr int16_t font_medium = 30; + constexpr int16_t font_large = 31; + constexpr int16_t font_xlarge = 31; + #endif + constexpr float icon_scale = 1.0; + #elif defined(TOUCH_UI_480x272) + #ifdef TOUCH_UI_PORTRAIT + constexpr int16_t font_tiny = 26; + constexpr int16_t font_xsmall = 26; + constexpr int16_t font_small = 26; + constexpr int16_t font_medium = 27; + constexpr int16_t font_large = 28; + constexpr int16_t font_xlarge = 29; + constexpr float icon_scale = 0.7; + #else + constexpr int16_t font_tiny = 26; + constexpr int16_t font_xsmall = 26; + constexpr int16_t font_small = 27; + constexpr int16_t font_medium = 28; + constexpr int16_t font_large = 30; + constexpr int16_t font_xlarge = 31; + constexpr float icon_scale = 0.6; + #endif + #elif defined(TOUCH_UI_320x240) + #ifdef TOUCH_UI_PORTRAIT + constexpr int16_t font_tiny = 26; + constexpr int16_t font_xsmall = 26; + constexpr int16_t font_small = 26; + constexpr int16_t font_medium = 27; + constexpr int16_t font_large = 27; + constexpr int16_t font_xlarge = 28; + constexpr float icon_scale = 0.6; + #else + constexpr int16_t font_tiny = 26; + constexpr int16_t font_xsmall = 26; + constexpr int16_t font_small = 26; + constexpr int16_t font_medium = 27; + constexpr int16_t font_large = 29; + constexpr int16_t font_xlarge = 30; + constexpr float icon_scale = 0.5; + #endif + #endif +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp new file mode 100644 index 000000000000..163f7160c783 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp @@ -0,0 +1,410 @@ +/************** + * sounds.cpp * + **************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../compat.h" + +#if ENABLED(LULZBOT_TOUCH_UI) + +#include "../ftdi_eve_lib/ftdi_eve_lib.h" + +#include "sounds.h" + +namespace Theme { + using namespace FTDI; + + const PROGMEM SoundPlayer::sound_t chimes[] = { + {CHIMES, NOTE_G3, 5}, + {CHIMES, NOTE_E4, 5}, + {CHIMES, NOTE_C4, 5}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t sad_trombone[] = { + {TRUMPET, NOTE_A3S, 10}, + {TRUMPET, NOTE_A3 , 10}, + {TRUMPET, NOTE_G3S, 10}, + {TRUMPET, NOTE_G3, 20}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t twinkle[] = { + {GLOCKENSPIEL, NOTE_C4, 1}, + {GLOCKENSPIEL, NOTE_E4, 1}, + {GLOCKENSPIEL, NOTE_G4, 16}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t fanfare[] = { + {TRUMPET, NOTE_A3, 4}, + {SILENCE, REST, 1}, + {TRUMPET, NOTE_A3, 2}, + {SILENCE, REST, 1}, + {TRUMPET, NOTE_A3, 2}, + {SILENCE, REST, 1}, + {TRUMPET, NOTE_E4, 10}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t media_inserted[] = { + {MUSIC_BOX, NOTE_C4, 2}, + {MUSIC_BOX, NOTE_E4, 2}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t media_removed[] = { + {MUSIC_BOX, NOTE_E4, 2}, + {MUSIC_BOX, NOTE_C4, 2}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t js_bach_toccata[] = { + {ORGAN, NOTE_A4, 2}, + {ORGAN, NOTE_G4, 2}, + {ORGAN, NOTE_A4, 35}, + {SILENCE, REST, 12}, + {ORGAN, NOTE_G4, 4}, + {ORGAN, NOTE_F4, 4}, + {ORGAN, NOTE_E4, 4}, + {ORGAN, NOTE_D4, 4}, + {ORGAN, NOTE_C4S, 16}, + {ORGAN, NOTE_D4, 32}, + {SILENCE, REST, 42}, + + {ORGAN, NOTE_A3, 2}, + {ORGAN, NOTE_G3, 2}, + {ORGAN, NOTE_A3, 35}, + {SILENCE, REST, 9}, + {ORGAN, NOTE_E3, 8}, + {ORGAN, NOTE_F3, 8}, + {ORGAN, NOTE_C3S, 16}, + {ORGAN, NOTE_D3, 27}, + {SILENCE, REST, 42}, + + {ORGAN, NOTE_A2, 2}, + {ORGAN, NOTE_G2, 2}, + {ORGAN, NOTE_A2, 35}, + {SILENCE, REST, 12}, + {ORGAN, NOTE_G2, 4}, + {ORGAN, NOTE_F2, 4}, + {ORGAN, NOTE_E2, 4}, + {ORGAN, NOTE_D2, 4}, + {ORGAN, NOTE_C2S, 16}, + {ORGAN, NOTE_D2, 32}, + {SILENCE, REST, 52}, + + //{ORGAN, NOTE_D1, 28}, + {ORGAN, NOTE_C3S, 9}, + {ORGAN, NOTE_E3, 9}, + {ORGAN, NOTE_G3, 9}, + {ORGAN, NOTE_A3S, 9}, + {ORGAN, NOTE_C4S, 9}, + {ORGAN, NOTE_E4, 9}, + {ORGAN, NOTE_D4, 20}, + {SILENCE, REST, 30}, + + {ORGAN, NOTE_C4S, 4}, + {ORGAN, NOTE_D4, 2}, + {ORGAN, NOTE_E4, 2}, + + {ORGAN, NOTE_C4S, 2}, + {ORGAN, NOTE_D4, 2}, + {ORGAN, NOTE_E4, 2}, + + {ORGAN, NOTE_C4S, 2}, + {ORGAN, NOTE_D4, 2}, + {ORGAN, NOTE_E4, 2}, + + {ORGAN, NOTE_C4S, 2}, + {ORGAN, NOTE_D4, 4}, + {ORGAN, NOTE_E4, 4}, + {ORGAN, NOTE_F4, 2}, + {ORGAN, NOTE_G4, 2}, + + {ORGAN, NOTE_E4, 2}, + {ORGAN, NOTE_F4, 2}, + {ORGAN, NOTE_G4, 2}, + + {ORGAN, NOTE_E4, 2}, + {ORGAN, NOTE_F4, 2}, + {ORGAN, NOTE_G4, 2}, + + {ORGAN, NOTE_E4, 2}, + {ORGAN, NOTE_F4, 4}, + {ORGAN, NOTE_G4, 4}, + {ORGAN, NOTE_A4, 2}, + {ORGAN, NOTE_A4S, 2}, + + {ORGAN, NOTE_G4, 2}, + {ORGAN, NOTE_A4, 2}, + {ORGAN, NOTE_A4S, 2}, + + {ORGAN, NOTE_G4, 2}, + {ORGAN, NOTE_A4, 2}, + {ORGAN, NOTE_A4S, 2}, + + {ORGAN, NOTE_G4, 2}, + {ORGAN, NOTE_A4, 4}, + {SILENCE, REST, 36}, + + + {ORGAN, NOTE_C5S, 4}, + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_E5, 2}, + + {ORGAN, NOTE_C5S, 2}, + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_E5, 2}, + + {ORGAN, NOTE_C5S, 2}, + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_E5, 2}, + + {ORGAN, NOTE_C5S, 2}, + {ORGAN, NOTE_D5, 4}, + {ORGAN, NOTE_E5, 4}, + {ORGAN, NOTE_F5, 2}, + {ORGAN, NOTE_G5, 2}, + + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_F5, 2}, + {ORGAN, NOTE_G5, 2}, + + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_F5, 2}, + {ORGAN, NOTE_G5, 2}, + + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_F5, 4}, + {ORGAN, NOTE_G5, 4}, + {ORGAN, NOTE_A5, 2}, + {ORGAN, NOTE_A5S, 2}, + + {ORGAN, NOTE_G5, 2}, + {ORGAN, NOTE_A5, 2}, + {ORGAN, NOTE_A5S, 2}, + + {ORGAN, NOTE_G5, 2}, + {ORGAN, NOTE_A5, 2}, + {ORGAN, NOTE_A5S, 2}, + + {ORGAN, NOTE_G5, 2}, + {ORGAN, NOTE_A5, 4}, + {SILENCE, REST, 32}, + + {ORGAN, NOTE_A5, 4}, + {ORGAN, NOTE_G5, 2}, + {ORGAN, NOTE_A5S, 2}, + + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_G5, 2}, + {ORGAN, NOTE_A5S, 2}, + + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_F5, 2}, + {ORGAN, NOTE_A5, 2}, + + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_F5, 2}, + {ORGAN, NOTE_G5, 2}, + + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_A5, 2}, + + {ORGAN, NOTE_C5, 2}, + {ORGAN, NOTE_E5, 2}, + {ORGAN, NOTE_A5, 2}, + + {ORGAN, NOTE_C5, 2}, + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_F5, 2}, + + {ORGAN, NOTE_A4S, 2}, + {ORGAN, NOTE_D5, 2}, + {ORGAN, NOTE_E5, 2}, + + {ORGAN, NOTE_A4S, 2}, + {ORGAN, NOTE_C5, 2}, + {ORGAN, NOTE_E5, 2}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t js_bach_joy[] = { + {PIANO, NOTE_G3, 4}, + {PIANO, NOTE_A3, 4}, + {PIANO, NOTE_B3, 4}, + {PIANO, NOTE_D4, 3}, + {SILENCE, REST, 1}, + + {PIANO, NOTE_C4, 3}, + {SILENCE, REST, 1}, + {PIANO, NOTE_C4, 4}, + {PIANO, NOTE_E4, 3}, + {SILENCE, REST, 1}, + {PIANO, NOTE_D4, 2}, + {SILENCE, REST, 2}, + + {PIANO, NOTE_D4, 4}, + {PIANO, NOTE_G4 , 3}, + {SILENCE, REST, 1}, + {PIANO, NOTE_F4S, 4}, + {PIANO, NOTE_G4, 4}, + + {PIANO, NOTE_D4, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_B3, 3}, + {SILENCE, REST, 1}, + {PIANO, NOTE_G3, 4}, + {PIANO, NOTE_A3, 2}, + {SILENCE, REST, 2}, + + {PIANO, NOTE_B3, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_C4, 4}, + {PIANO, NOTE_D4, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_E4, 2}, + {SILENCE, REST, 2}, + + {PIANO, NOTE_D4, 4}, + {PIANO, NOTE_C4, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_B3, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_A3, 4}, + + {PIANO, NOTE_B3, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_G3, 2}, + {SILENCE, REST, 2}, + {PIANO, NOTE_G3, 8}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t big_band[] = { + {XYLOPHONE, NOTE_F4, 3}, + {XYLOPHONE, NOTE_G4, 3}, + {XYLOPHONE, NOTE_F4, 3}, + {XYLOPHONE, NOTE_D4, 3}, + {XYLOPHONE, NOTE_A3S, 3}, + {SILENCE, REST, 3}, + + {TRUMPET, NOTE_F4, 3}, + {TRUMPET, NOTE_G4, 3}, + {TRUMPET, NOTE_F4, 3}, + {TRUMPET, NOTE_D4, 3}, + {TRUMPET, NOTE_A3S, 3}, + {SILENCE, REST, 3}, + + {TUBA, NOTE_A2S, 6}, + {TUBA, NOTE_A2S, 6}, + {TUBA, NOTE_A2S, 4}, + {TUBA, NOTE_A2S, 6}, + {TUBA, NOTE_A2S, 6}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t beats[] = { + {SILENCE, REST, 8}, + {NOTCH, NOTE_C4, 8}, + {KICKDRUM, NOTE_C4, 8}, + {HIHAT, NOTE_C4, 8}, + {COWBELL, NOTE_C4, 8}, + {SILENCE, REST, 8}, + {NOTCH, NOTE_C4, 8}, + {KICKDRUM, NOTE_C4, 8}, + {HIHAT, NOTE_C4, 8}, + {COWBELL, NOTE_C4, 8}, + {SILENCE, REST, 8}, + {NOTCH, NOTE_C4, 8}, + {KICKDRUM, NOTE_C4, 8}, + {HIHAT, NOTE_C4, 8}, + {COWBELL, NOTE_C4, 8}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t beeping[] = { + {BEEPING, NOTE_C4, 64}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t alarm[] = { + {ALARM, NOTE_C4, 64}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t warble[] = { + {WARBLE, NOTE_C4, 64}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t carousel[] = { + {CAROUSEL, NOTE_C4, 64}, + {SILENCE, END_SONG, 0} + }; + + const PROGMEM SoundPlayer::sound_t all_instruments[] = { + {HARP}, + {XYLOPHONE}, + {TUBA}, + {GLOCKENSPIEL}, + {ORGAN}, + {TRUMPET}, + {PIANO}, + {CHIMES}, + {MUSIC_BOX}, + {BELL}, + {CLICK}, + {SWITCH}, + {COWBELL}, + {NOTCH}, + {HIHAT}, + {KICKDRUM}, + {SWITCH}, + {POP}, + {CLACK}, + {CHACK}, + {SILENCE, END_SONG, 0} + }; +}; // namespace Theme + +#define N_ELEMENTS(a) (sizeof(a)/sizeof(a[0])) + +const SoundList::list_t SoundList::list[] = { + {"Silence", FTDI::silence}, + {"Twinkle", Theme::twinkle}, + {"Chimes", Theme::chimes}, + {"Fanfare", Theme::fanfare}, + {"Sad Trombone", Theme::sad_trombone}, + {"Big Band", Theme::big_band}, + {"Beeping", Theme::beeping}, + {"Alarm", Theme::alarm}, + {"Warble", Theme::warble}, + {"Carousel", Theme::carousel}, + {"Beats", Theme::beats}, + {"Bach Joy", Theme::js_bach_joy}, + {"Bach Toccata", Theme::js_bach_toccata} +}; + +const uint8_t SoundList::n = N_ELEMENTS(SoundList::list); + +#endif // LULZBOT_TOUCH_UI diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h new file mode 100644 index 000000000000..c728d0012f2d --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h @@ -0,0 +1,43 @@ +/************ + * sounds.h * + ************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace Theme { + using namespace FTDI; + + extern const PROGMEM SoundPlayer::sound_t chimes[]; + extern const PROGMEM SoundPlayer::sound_t sad_trombone[]; + extern const PROGMEM SoundPlayer::sound_t twinkle[]; + extern const PROGMEM SoundPlayer::sound_t fanfare[]; + extern const PROGMEM SoundPlayer::sound_t media_inserted[]; + extern const PROGMEM SoundPlayer::sound_t media_removed[]; + extern const PROGMEM SoundPlayer::sound_t js_bach_toccata[]; + extern const PROGMEM SoundPlayer::sound_t js_bach_joy[]; + extern const PROGMEM SoundPlayer::sound_t big_band[]; + extern const PROGMEM SoundPlayer::sound_t beats[]; + extern const PROGMEM SoundPlayer::sound_t beeping[]; + extern const PROGMEM SoundPlayer::sound_t alarm[]; + extern const PROGMEM SoundPlayer::sound_t warble[]; + extern const PROGMEM SoundPlayer::sound_t carousel[]; + extern const PROGMEM SoundPlayer::sound_t all_instruments[]; +}; // namespace Theme diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h new file mode 100644 index 000000000000..6a73a07163c7 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h @@ -0,0 +1,28 @@ +/*********** + * theme.h * + ***********/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * 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. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "bitmaps.h" +#include "colors.h" +#include "fonts.h" +#include "sounds.h" diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 014c8da5e536..43ffca36553f 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -60,7 +60,7 @@ #include "../../libs/numtostr.h" #endif -#if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER) +#if EXTRUDERS > 1 #include "../../module/tool_change.h" #endif @@ -77,7 +77,7 @@ #if HAS_TRINAMIC #include "../../feature/tmc_util.h" - #include "../../module/stepper_indirection.h" + #include "../../module/stepper/indirection.h" #endif #include "ui_api.h" @@ -267,8 +267,12 @@ namespace ExtUI { return flags.manual_motion ? destination[axis] : current_position[axis]; } - float getAxisPosition_mm(const extruder_t) { - return flags.manual_motion ? destination[E_AXIS] : current_position[E_AXIS]; + float getAxisPosition_mm(const extruder_t extruder) { + const extruder_t old_tool = getActiveTool(); + setActiveTool(extruder, true); + const float pos = flags.manual_motion ? destination[E_AXIS] : current_position[E_AXIS]; + setActiveTool(old_tool, true); + return pos; } void setAxisPosition_mm(const float position, const axis_t axis) { @@ -315,6 +319,9 @@ namespace ExtUI { } #endif + constexpr float max_manual_feedrate[XYZE] = MANUAL_FEEDRATE; + setFeedrate_mm_s(MMM_TO_MMS(max_manual_feedrate[axis])); + if (!flags.manual_motion) set_destination_from_current(); destination[axis] = clamp(position, min, max); flags.manual_motion = true; @@ -323,6 +330,8 @@ namespace ExtUI { void setAxisPosition_mm(const float position, const extruder_t extruder) { setActiveTool(extruder, true); + constexpr float max_manual_feedrate[XYZE] = MANUAL_FEEDRATE; + setFeedrate_mm_s(MMM_TO_MMS(max_manual_feedrate[E_AXIS])); if (!flags.manual_motion) set_destination_from_current(); destination[E_AXIS] = position; flags.manual_motion = true; @@ -363,9 +372,7 @@ namespace ExtUI { void setActiveTool(const extruder_t extruder, bool no_move) { #if EXTRUDERS > 1 const uint8_t e = extruder - E0; - #if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER) - if (e != active_extruder) tool_change(e, no_move); - #endif + if (e != active_extruder) tool_change(e, no_move); active_extruder = e; #else UNUSED(extruder); @@ -707,17 +714,26 @@ namespace ExtUI { } #endif - #if HAS_BED_PROBE - float getZOffset_mm() { + float getZOffset_mm() { + #if HAS_BED_PROBE return zprobe_zoffset; - } + #elif ENABLED(BABYSTEP_DISPLAY_TOTAL) + return babystep.axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1]; + #else + return 0.0; + #endif + } - void setZOffset_mm(const float value) { - if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) { + void setZOffset_mm(const float value) { + #if HAS_BED_PROBE + if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) zprobe_zoffset = value; - } - } - #endif // HAS_BED_PROBE + #elif ENABLED(BABYSTEP_DISPLAY_TOTAL) + babystep.add_mm(Z_AXIS, (value - babystep.axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1])); + #else + UNUSED(value); + #endif + } #if HAS_HOTEND_OFFSET @@ -792,7 +808,7 @@ namespace ExtUI { char* getTotalPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints)); return buffer; } char* getFinishedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().finishedPrints)); return buffer; } char* getTotalPrintTime_str(char buffer[21]) { duration_t(print_job_timer.getStats().printTime).toString(buffer); return buffer; } - char* getLongestPrint_str(char buffer[21]) { duration_t(print_job_timer.getStats().printTime).toString(buffer); return buffer; } + char* getLongestPrint_str(char buffer[21]) { duration_t(print_job_timer.getStats().longestPrint).toString(buffer); return buffer; } char* getFilamentUsed_str(char buffer[21]) { printStatistics stats = print_job_timer.getStats(); sprintf_P(buffer, PSTR("%ld.%im"), long(stats.filamentUsed / 1000), int16_t(stats.filamentUsed / 100) % 10); diff --git a/Marlin/src/lcd/extensible_ui/ui_api.h b/Marlin/src/lcd/extensible_ui/ui_api.h index 5cae33a28707..11a60a28a513 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.h +++ b/Marlin/src/lcd/extensible_ui/ui_api.h @@ -66,6 +66,7 @@ namespace ExtUI { bool isMoving(); bool isAxisPositionKnown(const axis_t); + bool isAxisPositionKnown(const extruder_t); bool isPositionKnown(); // Axis position guaranteed, steppers active since homing bool isMachineHomed(); // Axis position most likely correct, steppers may have deactivated bool canMove(const axis_t); @@ -197,10 +198,8 @@ namespace ExtUI { void normalizeNozzleOffset(const axis_t axis); #endif - #if HAS_BED_PROBE - float getZOffset_mm(); - void setZOffset_mm(const float); - #endif + float getZOffset_mm(); + void setZOffset_mm(const float); #if ENABLED(BACKLASH_GCODE) float getAxisBacklash_mm(const axis_t); diff --git a/Marlin/src/lcd/extui_malyan_lcd.cpp b/Marlin/src/lcd/extui_malyan_lcd.cpp index 979e159598c4..d6fb84ac72ea 100644 --- a/Marlin/src/lcd/extui_malyan_lcd.cpp +++ b/Marlin/src/lcd/extui_malyan_lcd.cpp @@ -45,6 +45,8 @@ #if ENABLED(MALYAN_LCD) +#define DEBUG_MALYAN_LCD + #include "extensible_ui/ui_api.h" #include "ultralcd.h" @@ -62,6 +64,9 @@ #define LONG_FILENAME_LENGTH 0 #endif +#define DEBUG_OUT ENABLED(DEBUG_MALYAN_LCD) +#include "../core/debug_out.h" + // On the Malyan M200, this will be Serial1. On a RAMPS board, // it might not be. #define LCD_SERIAL Serial1 @@ -119,13 +124,13 @@ void process_lcd_c_command(const char* command) { LIMIT(feedrate_percentage, 10, 999); break; - case 'T': thermalManager.setTargetHotend(atoi(command + 1), 0); break; + case 'T': ExtUI::setTargetTemp_celsius(atoi(command + 1), ExtUI::extruder_t::E0); break; #if HAS_HEATED_BED - case 'P': thermalManager.setTargetBed(atoi(command + 1)); break; + case 'P': ExtUI::setTargetTemp_celsius(atoi(command + 1), ExtUI::heater_t::BED); break; #endif - default: SERIAL_ECHOLNPAIR("UNKNOWN C COMMAND", command); + default: DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command); } } @@ -163,9 +168,7 @@ void process_lcd_eb_command(const char* command) { write_to_lcd(message_buffer); } break; - default: - SERIAL_ECHOLNPAIR("UNKNOWN E/B COMMAND", command); - return; + default: DEBUG_ECHOLNPAIR("UNKNOWN E/B COMMAND ", command); } } @@ -180,32 +183,18 @@ void process_lcd_eb_command(const char* command) { * X, Y, Z, A (extruder) */ void process_lcd_j_command(const char* command) { - static bool steppers_enabled = false; - char axis = command[0]; - - switch (axis) { - case 'E': - // enable or disable steppers - // switch to relative - queue.enqueue_now_P(PSTR("G91")); - queue.enqueue_now_P(steppers_enabled ? PSTR("M18") : PSTR("M17")); - steppers_enabled = !steppers_enabled; - break; - case 'A': - axis = 'E'; - // fallthru - case 'Y': - case 'Z': - case 'X': { - // G0 - // The M200 class UI seems to send movement in .1mm values. - char cmd[20], pos[6]; - sprintf_P(cmd, PSTR("G1 %c%s"), axis, dtostrf(atof(command + 1) / 10.0, -5, 3, pos)); - queue.enqueue_one_now(cmd); - } break; - default: - SERIAL_ECHOLNPAIR("UNKNOWN J COMMAND", command); - return; + auto move_axis = [command](const auto axis) { + const float dist = atof(command + 1) / 10.0; + ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(axis) + dist, axis); + } + + switch (command[0]) { + case 'E': break; + case 'A': move_axis(ExtUI::extruder_t::E0); break; + case 'Y': move_axis(ExtUI::axis_t::Y); break; + case 'Z': move_axis(ExtUI::axis_t::Z); break; + case 'X': move_axis(ExtUI::axis_t::X); break; + default: DEBUG_ECHOLNPAIR("UNKNOWN J COMMAND ", command); } } @@ -234,29 +223,20 @@ void process_lcd_j_command(const char* command) { void process_lcd_p_command(const char* command) { switch (command[0]) { + case 'P': + ExtUI::pausePrint(); + write_to_lcd_P(PSTR("{SYS:PAUSED}")); + break; + case 'R': + ExtUI::resumePrint(); + write_to_lcd_P(PSTR("{SYS:RESUMED}")); + break; case 'X': - #if ENABLED(SDSUPPORT) - // cancel print write_to_lcd_P(PSTR("{SYS:CANCELING}")); - last_printing_status = false; - card.stopSDPrint( - #if SD_RESORT - true - #endif - ); - queue.clear(); - quickstop_stepper(); - print_job_timer.stop(); - thermalManager.disable_all_heaters(); - thermalManager.zero_fan_speeds(); - wait_for_heatup = false; + ExtUI::stopPrint(); write_to_lcd_P(PSTR("{SYS:STARTED}")); - #endif - break; - case 'H': - // Home all axis - queue.enqueue_now_P(PSTR("G28")); - break; + break; + case 'H': queue.enqueue_now_P(PSTR("G28")); break; // Home all axes default: { #if ENABLED(SDSUPPORT) // Print file 000 - a three digit number indicating which @@ -338,9 +318,7 @@ void process_lcd_s_command(const char* command) { #endif } break; - default: - SERIAL_ECHOLNPAIR("UNKNOWN S COMMAND", command); - return; + default: DEBUG_ECHOLNPAIR("UNKNOWN S COMMAND ", command); } } @@ -354,34 +332,22 @@ void process_lcd_command(const char* command) { current++; // skip the leading {. The trailing one is already gone. byte command_code = *current++; - if (*current != ':') { - SERIAL_ECHOLNPAIR("UNKNOWN COMMAND FORMAT", command); - return; - } - - current++; // skip the : - - switch (command_code) { - case 'S': - process_lcd_s_command(current); - break; - case 'J': - process_lcd_j_command(current); - break; - case 'P': - process_lcd_p_command(current); - break; - case 'C': - process_lcd_c_command(current); - break; - case 'B': - case 'E': - process_lcd_eb_command(current); - break; - default: - SERIAL_ECHOLNPAIR("UNKNOWN COMMAND", command); - return; + if (*current == ':') { + + current++; // skip the : + + switch (command_code) { + case 'S': process_lcd_s_command(current); break; + case 'J': process_lcd_j_command(current); break; + case 'P': process_lcd_p_command(current); break; + case 'C': process_lcd_c_command(current); break; + case 'B': + case 'E': process_lcd_eb_command(current); break; + default: DEBUG_ECHOLNPAIR("UNKNOWN COMMAND ", command); + } } + else + DEBUG_ECHOLNPAIR("UNKNOWN COMMAND FORMAT ", command); } /** @@ -405,8 +371,7 @@ namespace ExtUI { /** * The Malyan LCD actually runs as a separate MCU on Serial 1. * This code's job is to siphon the weird curly-brace commands from - * it and translate into gcode, which then gets injected into - * the command queue where possible. + * it and translate into ExtUI operations where possible. */ inbound_count = 0; LCD_SERIAL.begin(500000); @@ -455,13 +420,13 @@ namespace ExtUI { // If there was a print in progress, we need to emit the final // print status as {TQ:100}. Reset last percent done so a new print will // issue a percent of 0. - const uint8_t percent_done = IS_SD_PRINTING() ? card.percentDone() : last_printing_status ? 100 : 0; + const uint8_t percent_done = (ExtUI::isPrinting() || ExtUI::isPrintingFromMediaPaused()) ? ExtUI::getProgress_percent() : last_printing_status ? 100 : 0; if (percent_done != last_percent_done) { char message_buffer[16]; sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); write_to_lcd(message_buffer); last_percent_done = percent_done; - last_printing_status = IS_SD_PRINTING(); + last_printing_status = ExtUI::isPrinting(); } #endif } diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index 3ae5d967ccc9..2fd13d67efe3 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -33,8 +33,8 @@ #define NOT_EXTENDED_ISO10646_1_5X7 #define WELCOME_MSG MACHINE_NAME _UxGT(" parada.") -#define MSG_SD_INSERTED _UxGT("Tarcheta mesa") -#define MSG_SD_REMOVED _UxGT("Tarcheta sacada") +#define MSG_MEDIA_INSERTED _UxGT("Tarcheta mesa") +#define MSG_MEDIA_REMOVED _UxGT("Tarcheta sacada") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Menu prencipal") #define MSG_AUTOSTART _UxGT("Inicio automatico") @@ -146,8 +146,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pausar impresion") #define MSG_RESUME_PRINT _UxGT("Contin. impresion") #define MSG_STOP_PRINT _UxGT("Detener Impresion") -#define MSG_CARD_MENU _UxGT("Menu de SD") -#define MSG_NO_CARD _UxGT("No i hai tarcheta") +#define MSG_MEDIA_MENU _UxGT("Menu de SD") +#define MSG_NO_MEDIA _UxGT("No i hai tarcheta") #define MSG_DWELL _UxGT("Reposo...") #define MSG_USERWAIT _UxGT("Aguardand ordines") #define MSG_PRINT_ABORTED _UxGT("Impres. cancelada") @@ -163,8 +163,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("DesRet F") #define MSG_AUTORETRACT _UxGT("Retraccion auto.") #define MSG_FILAMENTCHANGE _UxGT("Cambear filamento") -#define MSG_INIT_SDCARD _UxGT("Encetan. tarcheta") -#define MSG_CHANGE_SDCARD _UxGT("Cambiar tarcheta") +#define MSG_INIT_MEDIA _UxGT("Encetan. tarcheta") +#define MSG_CHANGE_MEDIA _UxGT("Cambiar tarcheta") #define MSG_ZPROBE_OUT _UxGT("Sonda Z fuera") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Auto-Test") #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") diff --git a/Marlin/src/lcd/language/language_bg.h b/Marlin/src/lcd/language/language_bg.h index 90afab43f523..3e95058ba94c 100644 --- a/Marlin/src/lcd/language/language_bg.h +++ b/Marlin/src/lcd/language/language_bg.h @@ -32,8 +32,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" Готов.") -#define MSG_SD_INSERTED _UxGT("Картата е поставена") -#define MSG_SD_REMOVED _UxGT("Картата е извадена") +#define MSG_MEDIA_INSERTED _UxGT("Картата е поставена") +#define MSG_MEDIA_REMOVED _UxGT("Картата е извадена") #define MSG_MAIN _UxGT("Меню") #define MSG_AUTOSTART _UxGT("Автостарт") #define MSG_DISABLE_STEPPERS _UxGT("Изкл. двигатели") @@ -114,8 +114,8 @@ #define MSG_PAUSE_PRINT _UxGT("Пауза") #define MSG_RESUME_PRINT _UxGT("Възобнови печата") #define MSG_STOP_PRINT _UxGT("Спри печата") -#define MSG_CARD_MENU _UxGT("Меню карта") -#define MSG_NO_CARD _UxGT("Няма карта") +#define MSG_MEDIA_MENU _UxGT("Меню карта") +#define MSG_NO_MEDIA _UxGT("Няма карта") #define MSG_DWELL _UxGT("Почивка...") #define MSG_USERWAIT _UxGT("Изчакване") #define MSG_PRINT_ABORTED _UxGT("Печатът е прекъснат") @@ -131,8 +131,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Възврат V") #define MSG_AUTORETRACT _UxGT("Автоoткат") #define MSG_FILAMENTCHANGE _UxGT("Смяна нишка") -#define MSG_INIT_SDCARD _UxGT("Иниц. SD-Карта") -#define MSG_CHANGE_SDCARD _UxGT("Смяна SD-Карта") +#define MSG_INIT_MEDIA _UxGT("Иниц. SD-Карта") +#define MSG_CHANGE_MEDIA _UxGT("Смяна SD-Карта") #define MSG_ZPROBE_OUT _UxGT("Z-сондата е извадена") #define MSG_ZPROBE_ZOFFSET _UxGT("Z Отстояние") #define MSG_BABYSTEP_X _UxGT("Министъпка X") @@ -144,3 +144,4 @@ #define MSG_DELTA_CALIBRATE_Y _UxGT("Калибровка Y") #define MSG_DELTA_CALIBRATE_Z _UxGT("Калибровка Z") #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Калибровка Център") +#define MSG_EXPECTED_PRINTER _UxGT("Неправилен принтер") diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index 808566f5838a..3a81909cbf08 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -32,8 +32,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" preparada.") -#define MSG_SD_INSERTED _UxGT("Targeta detectada.") -#define MSG_SD_REMOVED _UxGT("Targeta extreta.") +#define MSG_MEDIA_INSERTED _UxGT("Targeta detectada.") +#define MSG_MEDIA_REMOVED _UxGT("Targeta extreta.") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") #define MSG_MAIN _UxGT("Menú principal") #define MSG_AUTOSTART _UxGT("Inici automatic") @@ -149,8 +149,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pausa impressio") #define MSG_RESUME_PRINT _UxGT("Repren impressio") #define MSG_STOP_PRINT _UxGT("Atura impressio.") -#define MSG_CARD_MENU _UxGT("Imprimeix de SD") -#define MSG_NO_CARD _UxGT("No hi ha targeta") +#define MSG_MEDIA_MENU _UxGT("Imprimeix de SD") +#define MSG_NO_MEDIA _UxGT("No hi ha targeta") #define MSG_DWELL _UxGT("En repos...") #define MSG_USERWAIT _UxGT("Esperant usuari..") #define MSG_PRINT_ABORTED _UxGT("Imp. cancelada") @@ -166,8 +166,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("DesRet V") #define MSG_AUTORETRACT _UxGT("Auto retraccio") #define MSG_FILAMENTCHANGE _UxGT("Canvia filament") -#define MSG_INIT_SDCARD _UxGT("Inicialitza SD") -#define MSG_CHANGE_SDCARD _UxGT("Canvia SD") +#define MSG_INIT_MEDIA _UxGT("Inicialitza SD") +#define MSG_CHANGE_MEDIA _UxGT("Canvia SD") #define MSG_ZPROBE_OUT _UxGT("Sonda Z fora") #define MSG_BLTOUCH_RESET _UxGT("Reinicia BLTouch") #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST @@ -231,6 +231,8 @@ #define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Repren impressió") +#define MSG_EXPECTED_PRINTER _UxGT("Impressora incorrecta") + // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index aead58bacdc1..4aec9f9a1acb 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -42,8 +42,8 @@ #define MSG_YES _UxGT("ANO") #define MSG_NO _UxGT("NE") #define MSG_BACK _UxGT("Zpět") -#define MSG_SD_INSERTED _UxGT("Karta vložena") -#define MSG_SD_REMOVED _UxGT("Karta vyjmuta") +#define MSG_MEDIA_INSERTED _UxGT("Karta vložena") +#define MSG_MEDIA_REMOVED _UxGT("Karta vyjmuta") #define MSG_LCD_ENDSTOPS _UxGT("Endstopy") // max 8 znaku #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Soft Endstopy") #define MSG_MAIN _UxGT("Hlavní nabídka") @@ -278,7 +278,7 @@ #define MSG_LOAD_EEPROM _UxGT("Načíst nastavení") #define MSG_RESTORE_FAILSAFE _UxGT("Obnovit výchozí") #define MSG_INIT_EEPROM _UxGT("Inic. EEPROM") -#define MSG_SD_UPDATE _UxGT("Aktualizace z SD") +#define MSG_MEDIA_UPDATE _UxGT("Aktualizace z SD") #define MSG_RESET_PRINTER _UxGT("Reset tiskárny") #define MSG_REFRESH _UxGT("Obnovit") #define MSG_WATCH _UxGT("Info obrazovka") @@ -291,8 +291,8 @@ #define MSG_RESUME_PRINT _UxGT("Obnovit tisk") #define MSG_STOP_PRINT _UxGT("Zastavit tisk") #define MSG_OUTAGE_RECOVERY _UxGT("Obnova výpadku") -#define MSG_CARD_MENU _UxGT("Tisknout z SD") -#define MSG_NO_CARD _UxGT("Žádná SD karta") +#define MSG_MEDIA_MENU _UxGT("Tisknout z SD") +#define MSG_NO_MEDIA _UxGT("Žádná SD karta") #define MSG_DWELL _UxGT("Uspáno...") #define MSG_USERWAIT _UxGT("Čekání na uživ...") #define MSG_PRINT_PAUSED _UxGT("Tisk pozastaven") @@ -321,8 +321,8 @@ #define MSG_FILAMENTUNLOAD _UxGT("Vysunout filament") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Vysunout vše") -#define MSG_INIT_SDCARD _UxGT("Načíst SD kartu") -#define MSG_CHANGE_SDCARD _UxGT("Vyměnit SD kartu") +#define MSG_INIT_MEDIA _UxGT("Načíst SD kartu") +#define MSG_CHANGE_MEDIA _UxGT("Vyměnit SD kartu") #define MSG_ZPROBE_OUT _UxGT("Sonda Z mimo podl") #define MSG_SKEW_FACTOR _UxGT("Faktor zkosení") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -495,6 +495,8 @@ #define MSG_SNAKE _UxGT("Sn4k3") #define MSG_MAZE _UxGT("Bludiště") +#define MSG_EXPECTED_PRINTER _UxGT("Nesprávná tiskárna") + #if LCD_HEIGHT >= 4 // Up to 3 lines allowed #define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Stikněte tlačítko") diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index b65e5621dd23..6ecc4c6ea434 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -33,8 +33,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" er klar") -#define MSG_SD_INSERTED _UxGT("Kort isat") -#define MSG_SD_REMOVED _UxGT("Kort fjernet") +#define MSG_MEDIA_INSERTED _UxGT("Kort isat") +#define MSG_MEDIA_REMOVED _UxGT("Kort fjernet") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Menu") #define MSG_AUTOSTART _UxGT("Autostart") @@ -146,8 +146,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pause printet") #define MSG_RESUME_PRINT _UxGT("Forsæt printet") #define MSG_STOP_PRINT _UxGT("Stop printet") -#define MSG_CARD_MENU _UxGT("Print fra SD") -#define MSG_NO_CARD _UxGT("Intet SD kort") +#define MSG_MEDIA_MENU _UxGT("Print fra SD") +#define MSG_NO_MEDIA _UxGT("Intet SD kort") #define MSG_DWELL _UxGT("Dvale...") #define MSG_USERWAIT _UxGT("Venter på bruger...") #define MSG_PRINT_ABORTED _UxGT("Print annulleret") @@ -163,8 +163,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("UnRet V") #define MSG_AUTORETRACT _UxGT("AutoRetr.") #define MSG_FILAMENTCHANGE _UxGT("Skift filament") -#define MSG_INIT_SDCARD _UxGT("Init. SD card") -#define MSG_CHANGE_SDCARD _UxGT("Skift SD kort") +#define MSG_INIT_MEDIA _UxGT("Init. SD card") +#define MSG_CHANGE_MEDIA _UxGT("Skift SD kort") #define MSG_ZPROBE_OUT _UxGT("Probe udenfor plade") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Selv-Test") #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") @@ -229,6 +229,8 @@ #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Forsæt print") +#define MSG_EXPECTED_PRINTER _UxGT("Forkert printer") + #if LCD_HEIGHT >= 4 #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Vent på start") #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("af filament") diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 3f81b45f011e..b18e4c159110 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -37,9 +37,9 @@ #define MSG_YES _UxGT("JA") #define MSG_NO _UxGT("NEIN") #define MSG_BACK _UxGT("Zurück") -#define MSG_SD_INSERTED _UxGT("SD-Karte erkannt") -#define MSG_SD_REMOVED _UxGT("SD-Karte entfernt") -#define MSG_SD_RELEASED _UxGT("SD-Karte freigeg.") +#define MSG_MEDIA_INSERTED _UxGT("SD-Karte erkannt") +#define MSG_MEDIA_REMOVED _UxGT("SD-Karte entfernt") +#define MSG_MEDIA_RELEASED _UxGT("SD-Karte freigeg.") #define MSG_LCD_ENDSTOPS _UxGT("Endstopp") // Max length 8 characters #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Software-Endstopp") #define MSG_MAIN _UxGT("Hauptmenü") @@ -276,7 +276,7 @@ #define MSG_LOAD_EEPROM _UxGT("Konfig. laden") #define MSG_RESTORE_FAILSAFE _UxGT("Standardwerte laden") #define MSG_INIT_EEPROM _UxGT("Werkseinstellungen") -#define MSG_SD_UPDATE _UxGT("SD-Firmware-Update") +#define MSG_MEDIA_UPDATE _UxGT("SD-Firmware-Update") #define MSG_RESET_PRINTER _UxGT("Drucker neustarten") #define MSG_REFRESH _UxGT("Aktualisieren") #define MSG_WATCH _UxGT("Info") @@ -287,15 +287,15 @@ #define MSG_BUTTON_INIT _UxGT("Bestätigen") #define MSG_BUTTON_STOP _UxGT("Stop") #define MSG_BUTTON_PRINT _UxGT("Drucken") -#define MSG_BUTTON_RESET _UxGT("Zurücksetzen") +#define MSG_BUTTON_RESET _UxGT("Reseten") #define MSG_BUTTON_CANCEL _UxGT("Abbrechen") #define MSG_BUTTON_DONE _UxGT("Fertig") #define MSG_PAUSE_PRINT _UxGT("SD-Druck pausieren") #define MSG_RESUME_PRINT _UxGT("SD-Druck fortsetzen") #define MSG_STOP_PRINT _UxGT("SD-Druck abbrechen") #define MSG_OUTAGE_RECOVERY _UxGT("Wiederh. n. Stroma.") -#define MSG_CARD_MENU _UxGT("Druck v. SD-Karte") -#define MSG_NO_CARD _UxGT("Keine SD-Karte") +#define MSG_MEDIA_MENU _UxGT("Druck v. SD-Karte") +#define MSG_NO_MEDIA _UxGT("Keine SD-Karte") #define MSG_DWELL _UxGT("Warten...") #define MSG_USERWAIT _UxGT("Klick zum Fortsetzen") #define MSG_PRINT_PAUSED _UxGT("Druck pausiert...") @@ -323,9 +323,9 @@ #define MSG_FILAMENTLOAD _UxGT("Filament laden") #define MSG_FILAMENTUNLOAD _UxGT("Filament entladen") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Alles entladen") -#define MSG_INIT_SDCARD _UxGT("SD-Karte initial.") // Manually initialize the SD-card via user interface -#define MSG_CHANGE_SDCARD _UxGT("SD-Karte getauscht") // SD-card changed by user. For machines with no autocarddetect. Both send "M21" -#define MSG_RELEASE_SDCARD _UxGT("SD-Karte freigeben") // if Marlin gets confused - M22 +#define MSG_INIT_MEDIA _UxGT("SD-Karte initial.") // Manually initialize the SD-card via user interface +#define MSG_CHANGE_MEDIA _UxGT("SD-Karte getauscht") // SD-card changed by user. For machines with no autocarddetect. Both send "M21" +#define MSG_RELEASE_MEDIA _UxGT("SD-Karte freigeben") // if Marlin gets confused - M22 #define MSG_ZPROBE_OUT _UxGT("Z-Sonde außerhalb") #define MSG_SKEW_FACTOR _UxGT("Korrekturfaktor") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -409,6 +409,8 @@ #define MSG_CASE_LIGHT _UxGT("Beleuchtung") #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Helligkeit") +#define MSG_EXPECTED_PRINTER _UxGT("Falscher Drucker") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Gesamte Drucke") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Komplette Drucke") diff --git a/Marlin/src/lcd/language/language_el-gr.h b/Marlin/src/lcd/language/language_el-gr.h index ea66d3ff0008..5f7a1d2d36bc 100644 --- a/Marlin/src/lcd/language/language_el-gr.h +++ b/Marlin/src/lcd/language/language_el-gr.h @@ -33,8 +33,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" έτοιμο.") -#define MSG_SD_INSERTED _UxGT("Εισαγωγή κάρτας") -#define MSG_SD_REMOVED _UxGT("Αφαίρεση κάρτας") +#define MSG_MEDIA_INSERTED _UxGT("Εισαγωγή κάρτας") +#define MSG_MEDIA_REMOVED _UxGT("Αφαίρεση κάρτας") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Βασική Οθόνη") #define MSG_AUTOSTART _UxGT("Αυτόματη εκκίνηση") @@ -144,8 +144,8 @@ #define MSG_PAUSE_PRINT _UxGT("Παύση εκτύπωσης") #define MSG_RESUME_PRINT _UxGT("Συνέχιση εκτύπωσης") #define MSG_STOP_PRINT _UxGT("Διακοπή εκτύπωσης") -#define MSG_CARD_MENU _UxGT("Εκτύπωση από SD") -#define MSG_NO_CARD _UxGT("Δεν βρέθηκε SD") +#define MSG_MEDIA_MENU _UxGT("Εκτύπωση από SD") +#define MSG_NO_MEDIA _UxGT("Δεν βρέθηκε SD") #define MSG_DWELL _UxGT("Αναστολή λειτουργίας…") #define MSG_USERWAIT _UxGT("Αναμονή για χρήστη…") #define MSG_PRINT_ABORTED _UxGT("Διακόπτεται η εκτύπωση") @@ -161,8 +161,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("UnRet V") #define MSG_AUTORETRACT _UxGT("Αυτόματη ανάσυρση") #define MSG_FILAMENTCHANGE _UxGT("Αλλαγή νήματος") -#define MSG_INIT_SDCARD _UxGT("Προετοιμασία κάρτας SD") -#define MSG_CHANGE_SDCARD _UxGT("Αλλαγή κάρτας SD") +#define MSG_INIT_MEDIA _UxGT("Προετοιμασία κάρτας SD") +#define MSG_CHANGE_MEDIA _UxGT("Αλλαγή κάρτας SD") #define MSG_ZPROBE_OUT _UxGT("Διερεύνηση Z εκτός κλίνης") #define MSG_YX_UNHOMED _UxGT("Επαναφορά Χ/Υ πριν από Ζ") #define MSG_XYZ_UNHOMED _UxGT("Επαναφορά ΧΥΖ πρώτα") @@ -185,3 +185,5 @@ #define MSG_DELTA_CALIBRATE_Y _UxGT("Βαθμονόμηση Y") #define MSG_DELTA_CALIBRATE_Z _UxGT("Βαθμονόμηση Z") #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Βαθμονόμηση κέντρου") + +#define MSG_EXPECTED_PRINTER _UxGT("Εσφαλμένος εκτυπωτής") diff --git a/Marlin/src/lcd/language/language_el.h b/Marlin/src/lcd/language/language_el.h index 2425309f7a6d..37eb4fbe7478 100644 --- a/Marlin/src/lcd/language/language_el.h +++ b/Marlin/src/lcd/language/language_el.h @@ -33,8 +33,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" έτοιμο.") -#define MSG_SD_INSERTED _UxGT("Εισαγωγή κάρτας") -#define MSG_SD_REMOVED _UxGT("Αφαίρεση κάρτας") +#define MSG_MEDIA_INSERTED _UxGT("Εισαγωγή κάρτας") +#define MSG_MEDIA_REMOVED _UxGT("Αφαίρεση κάρτας") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Βασική Οθόνη") #define MSG_AUTOSTART _UxGT("Αυτόματη εκκίνηση") @@ -144,8 +144,8 @@ #define MSG_PAUSE_PRINT _UxGT("Παύση εκτύπωσης") #define MSG_RESUME_PRINT _UxGT("Συνέχιση εκτύπωσης") #define MSG_STOP_PRINT _UxGT("Διακοπή εκτύπωσης") -#define MSG_CARD_MENU _UxGT("Εκτύπωση από SD") -#define MSG_NO_CARD _UxGT("Δεν βρέθηκε SD") +#define MSG_MEDIA_MENU _UxGT("Εκτύπωση από SD") +#define MSG_NO_MEDIA _UxGT("Δεν βρέθηκε SD") #define MSG_DWELL _UxGT("Αναστολή λειτουργίας") #define MSG_USERWAIT _UxGT("Αναμονή για χρήστη") #define MSG_PRINT_ABORTED _UxGT("Διακόπτεται η εκτύπωση") //SHORTEN @@ -161,8 +161,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("UnRet V") #define MSG_AUTORETRACT _UxGT("Αυτόματη ανάσυρση") #define MSG_FILAMENTCHANGE _UxGT("Αλλαγή νήματος") -#define MSG_INIT_SDCARD _UxGT("Προετοιμασία κάρτας SD") //SHORTEN -#define MSG_CHANGE_SDCARD _UxGT("Αλλαγή κάρτας SD") +#define MSG_INIT_MEDIA _UxGT("Προετοιμασία κάρτας SD") //SHORTEN +#define MSG_CHANGE_MEDIA _UxGT("Αλλαγή κάρτας SD") #define MSG_ZPROBE_OUT _UxGT("Διερεύνηση Z εκτός Επ.Εκτύπωσης") //SHORTEN #define MSG_YX_UNHOMED _UxGT("Επαναφορά Χ/Υ πριν από Ζ") //SHORTEN #define MSG_XYZ_UNHOMED _UxGT("Επαναφορά ΧΥΖ πρώτα") @@ -186,3 +186,5 @@ #define MSG_DELTA_CALIBRATE_Y _UxGT("Βαθμονόμηση Y") #define MSG_DELTA_CALIBRATE_Z _UxGT("Βαθμονόμηση Z") #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Βαθμονόμηση κέντρου") + +#define MSG_EXPECTED_PRINTER _UxGT("Εσφαλμένος εκτυπωτής") diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index f56d551f3bad..02022e4267aa 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -61,14 +61,14 @@ #ifndef MSG_BACK #define MSG_BACK _UxGT("Back") #endif -#ifndef MSG_SD_INSERTED - #define MSG_SD_INSERTED _UxGT("Card Inserted") +#ifndef MSG_MEDIA_INSERTED + #define MSG_MEDIA_INSERTED _UxGT("Media Inserted") #endif -#ifndef MSG_SD_REMOVED - #define MSG_SD_REMOVED _UxGT("Card Removed") +#ifndef MSG_MEDIA_REMOVED + #define MSG_MEDIA_REMOVED _UxGT("Media Removed") #endif -#ifndef MSG_SD_RELEASED - #define MSG_SD_RELEASED _UxGT("Card Released") +#ifndef MSG_MEDIA_RELEASED + #define MSG_MEDIA_RELEASED _UxGT("Media Released") #endif #ifndef MSG_LCD_ENDSTOPS #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters @@ -770,8 +770,8 @@ #ifndef MSG_INIT_EEPROM #define MSG_INIT_EEPROM _UxGT("Initialize EEPROM") #endif -#ifndef MSG_SD_UPDATE - #define MSG_SD_UPDATE _UxGT("SD Update") +#ifndef MSG_MEDIA_UPDATE + #define MSG_MEDIA_UPDATE _UxGT("Media Update") #endif #ifndef MSG_RESET_PRINTER #define MSG_RESET_PRINTER _UxGT("Reset Printer") @@ -824,11 +824,11 @@ #ifndef MSG_OUTAGE_RECOVERY #define MSG_OUTAGE_RECOVERY _UxGT("Outage Recovery") #endif -#ifndef MSG_CARD_MENU - #define MSG_CARD_MENU _UxGT("Print from SD") +#ifndef MSG_MEDIA_MENU + #define MSG_MEDIA_MENU _UxGT("Print from Media") #endif -#ifndef MSG_NO_CARD - #define MSG_NO_CARD _UxGT("No SD Card") +#ifndef MSG_NO_MEDIA + #define MSG_NO_MEDIA _UxGT("No Media") #endif #ifndef MSG_DWELL #define MSG_DWELL _UxGT("Sleep...") @@ -914,14 +914,14 @@ #ifndef MSG_FILAMENTUNLOAD_ALL #define MSG_FILAMENTUNLOAD_ALL _UxGT("Unload All") #endif -#ifndef MSG_INIT_SDCARD - #define MSG_INIT_SDCARD _UxGT("Init. SD Card") +#ifndef MSG_INIT_MEDIA + #define MSG_INIT_MEDIA _UxGT("Init. Media") #endif -#ifndef MSG_CHANGE_SDCARD - #define MSG_CHANGE_SDCARD _UxGT("Change SD Card") +#ifndef MSG_CHANGE_MEDIA + #define MSG_CHANGE_MEDIA _UxGT("Change Media") #endif -#ifndef MSG_RELEASE_SDCARD - #define MSG_RELEASE_SDCARD _UxGT("Release SD Card") +#ifndef MSG_RELEASE_MEDIA + #define MSG_RELEASE_MEDIA _UxGT("Release Media") #endif #ifndef MSG_ZPROBE_OUT #define MSG_ZPROBE_OUT _UxGT("Z Probe Past Bed") @@ -1169,6 +1169,11 @@ #ifndef MSG_CASE_LIGHT_BRIGHTNESS #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Light Brightness") #endif + +#ifndef MSG_EXPECTED_PRINTER + #define MSG_EXPECTED_PRINTER _UxGT("INCORRECT PRINTER") +#endif + #if LCD_WIDTH >= 20 #ifndef MSG_INFO_PRINT_COUNT #define MSG_INFO_PRINT_COUNT _UxGT("Print Count") diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 2d4f1ac2b4c5..be4c1e3205b1 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -34,8 +34,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" lista.") #define MSG_BACK _UxGT("Atrás") -#define MSG_SD_INSERTED _UxGT("Tarjeta colocada") -#define MSG_SD_REMOVED _UxGT("Tarjeta retirada") +#define MSG_MEDIA_INSERTED _UxGT("Tarjeta colocada") +#define MSG_MEDIA_REMOVED _UxGT("Tarjeta retirada") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Menú principal") #define MSG_AUTOSTART _UxGT("Inicio automático") @@ -143,8 +143,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pausar impresión") #define MSG_RESUME_PRINT _UxGT("Reanudar impresión") #define MSG_STOP_PRINT _UxGT("Detener impresión") -#define MSG_CARD_MENU _UxGT("Menú de SD") -#define MSG_NO_CARD _UxGT("No hay tarjeta SD") +#define MSG_MEDIA_MENU _UxGT("Menú de SD") +#define MSG_NO_MEDIA _UxGT("No hay tarjeta SD") #define MSG_DWELL _UxGT("Reposo...") #define MSG_USERWAIT _UxGT("Esperando órdenes") #define MSG_PRINT_ABORTED _UxGT("Impresión cancelada") @@ -160,8 +160,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("DesRet V") #define MSG_AUTORETRACT _UxGT("Retracción Auto.") #define MSG_FILAMENTCHANGE _UxGT("Cambiar filamento") -#define MSG_INIT_SDCARD _UxGT("Iniciando tarjeta") -#define MSG_CHANGE_SDCARD _UxGT("Cambiar tarjeta") +#define MSG_INIT_MEDIA _UxGT("Iniciando tarjeta") +#define MSG_CHANGE_MEDIA _UxGT("Cambiar tarjeta") #define MSG_ZPROBE_OUT _UxGT("Sonda Z fuera") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Auto-Prueba") #define MSG_BLTOUCH_RESET _UxGT("Reiniciar BLTouch") @@ -204,6 +204,8 @@ #define MSG_INFO_PROTOCOL _UxGT("Protocolo") #define MSG_CASE_LIGHT _UxGT("Luz cabina") +#define MSG_EXPECTED_PRINTER _UxGT("Impresora incorrecta") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Conteo de impresión") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Completadas") diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index 3d487450e6c1..12767d536ec1 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -34,8 +34,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" prest.") #define MSG_BACK _UxGT("Atzera") -#define MSG_SD_INSERTED _UxGT("Txartela sartuta") -#define MSG_SD_REMOVED _UxGT("Txartela kenduta") +#define MSG_MEDIA_INSERTED _UxGT("Txartela sartuta") +#define MSG_MEDIA_REMOVED _UxGT("Txartela kenduta") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Menu nagusia") #define MSG_AUTOSTART _UxGT("Auto hasiera") @@ -246,8 +246,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pausatu inprimak.") #define MSG_RESUME_PRINT _UxGT("Jarraitu inprima.") #define MSG_STOP_PRINT _UxGT("Gelditu inprima.") -#define MSG_CARD_MENU _UxGT("SD-tik inprimatu") -#define MSG_NO_CARD _UxGT("Ez dago SD-rik") +#define MSG_MEDIA_MENU _UxGT("SD-tik inprimatu") +#define MSG_NO_MEDIA _UxGT("Ez dago SD-rik") #define MSG_DWELL _UxGT("Lo egin...") #define MSG_USERWAIT _UxGT("Aginduak zain...") #define MSG_PRINT_PAUSED _UxGT("Inprim. geldi.") @@ -268,8 +268,8 @@ #define MSG_FILAMENTLOAD _UxGT("Harizpia kargatu") #define MSG_FILAMENTUNLOAD _UxGT("Harizpia deskargatu") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Erabat deskargatu") -#define MSG_INIT_SDCARD _UxGT("Hasieratu SD-a") -#define MSG_CHANGE_SDCARD _UxGT("Aldatu txartela") +#define MSG_INIT_MEDIA _UxGT("Hasieratu SD-a") +#define MSG_CHANGE_MEDIA _UxGT("Aldatu txartela") #define MSG_ZPROBE_OUT _UxGT("Z zunda kanpora") #define MSG_SKEW_FACTOR _UxGT("Okertze faktorea") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -354,6 +354,9 @@ #define MSG_ERR_HOMING_FAILED _UxGT("Hasi. huts egin du") #define MSG_ERR_PROBING_FAILED _UxGT("Neurketak huts egin du") #define MSG_M600_TOO_COLD _UxGT("M600: hotzegi") + +#define MSG_EXPECTED_PRINTER _UxGT("Inprimagailu okerra") + // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display diff --git a/Marlin/src/lcd/language/language_fi.h b/Marlin/src/lcd/language/language_fi.h index 185cc8ac19ba..4d02e0ac3460 100644 --- a/Marlin/src/lcd/language/language_fi.h +++ b/Marlin/src/lcd/language/language_fi.h @@ -33,8 +33,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" valmis.") -#define MSG_SD_INSERTED _UxGT("Kortti asetettu") -#define MSG_SD_REMOVED _UxGT("Kortti poistettu") +#define MSG_MEDIA_INSERTED _UxGT("Kortti asetettu") +#define MSG_MEDIA_REMOVED _UxGT("Kortti poistettu") #define MSG_MAIN _UxGT("Palaa") #define MSG_AUTOSTART _UxGT("Automaatti") #define MSG_DISABLE_STEPPERS _UxGT("Vapauta moottorit") @@ -136,8 +136,8 @@ #define MSG_PAUSE_PRINT _UxGT("Keskeytä tulostus") #define MSG_RESUME_PRINT _UxGT("Jatka tulostusta") #define MSG_STOP_PRINT _UxGT("Pysäytä tulostus") -#define MSG_CARD_MENU _UxGT("Korttivalikko") -#define MSG_NO_CARD _UxGT("Ei korttia") +#define MSG_MEDIA_MENU _UxGT("Korttivalikko") +#define MSG_NO_MEDIA _UxGT("Ei korttia") #define MSG_DWELL _UxGT("Nukkumassa...") #define MSG_USERWAIT _UxGT("Odotet. valintaa") #define MSG_PRINT_ABORTED _UxGT("Print aborted") @@ -153,8 +153,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("UnRet V") #define MSG_AUTORETRACT _UxGT("AutoVeto.") #define MSG_FILAMENTCHANGE _UxGT("Change filament") -#define MSG_INIT_SDCARD _UxGT("Init. SD-Card") -#define MSG_CHANGE_SDCARD _UxGT("Change SD-Card") +#define MSG_INIT_MEDIA _UxGT("Init. SD-Card") +#define MSG_CHANGE_MEDIA _UxGT("Change SD-Card") #define MSG_ZPROBE_OUT _UxGT("Z probe out. bed") #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_FIRST _UxGT("first") @@ -168,3 +168,5 @@ #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibroi Y") #define MSG_DELTA_CALIBRATE_Z _UxGT("Kalibroi Z") #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Kalibroi Center") + +#define MSG_EXPECTED_PRINTER _UxGT("Väärä tulostin") diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 947ea5ac299d..908b2e4590f6 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -36,9 +36,9 @@ #define MSG_YES _UxGT("Oui") #define MSG_NO _UxGT("Non") #define MSG_BACK _UxGT("Retour") -#define MSG_SD_INSERTED _UxGT("Carte insérée") -#define MSG_SD_REMOVED _UxGT("Carte retirée") -#define MSG_SD_RELEASED _UxGT("Carte libérée") +#define MSG_MEDIA_INSERTED _UxGT("Carte insérée") +#define MSG_MEDIA_REMOVED _UxGT("Carte retirée") +#define MSG_MEDIA_RELEASED _UxGT("Carte libérée") #define MSG_LCD_ENDSTOPS _UxGT("Butées") #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Butées SW") #define MSG_MAIN _UxGT("Menu principal") @@ -273,7 +273,7 @@ #define MSG_LOAD_EEPROM _UxGT("Charger config.") #define MSG_RESTORE_FAILSAFE _UxGT("Restaurer défauts") #define MSG_INIT_EEPROM _UxGT("Initialiser EEPROM") -#define MSG_SD_UPDATE _UxGT("MaJ Firmware SD") +#define MSG_MEDIA_UPDATE _UxGT("MaJ Firmware SD") #define MSG_RESET_PRINTER _UxGT("RaZ imprimante") #define MSG_REFRESH _UxGT("Actualiser") #define MSG_WATCH _UxGT("Surveiller") @@ -291,8 +291,8 @@ #define MSG_RESUME_PRINT _UxGT("Reprendre impr.") #define MSG_STOP_PRINT _UxGT("Arrêter impr.") #define MSG_OUTAGE_RECOVERY _UxGT("Récupér. coupure") -#define MSG_CARD_MENU _UxGT("Impression SD") -#define MSG_NO_CARD _UxGT("Pas de carte") +#define MSG_MEDIA_MENU _UxGT("Impression SD") +#define MSG_NO_MEDIA _UxGT("Pas de carte") #define MSG_DWELL _UxGT("Repos...") #define MSG_USERWAIT _UxGT("Attente utilis.") #define MSG_PRINT_PAUSED _UxGT("Impr. en pause") @@ -321,9 +321,9 @@ #define MSG_FILAMENTLOAD _UxGT("Charger filament") #define MSG_FILAMENTUNLOAD _UxGT("Retrait filament") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Décharger tout") -#define MSG_INIT_SDCARD _UxGT("Init. la carte SD") -#define MSG_CHANGE_SDCARD _UxGT("Actualiser carte SD") -#define MSG_RELEASE_SDCARD _UxGT("Retirer carte SD") +#define MSG_INIT_MEDIA _UxGT("Init. la carte SD") +#define MSG_CHANGE_MEDIA _UxGT("Actualiser carte SD") +#define MSG_RELEASE_MEDIA _UxGT("Retirer carte SD") #define MSG_ZPROBE_OUT _UxGT("Sonde Z hors lit") #define MSG_SKEW_FACTOR _UxGT("Facteur écart") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -409,6 +409,8 @@ #define MSG_CASE_LIGHT _UxGT("Lumière caisson") #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Luminosité") +#define MSG_EXPECTED_PRINTER _UxGT("Imprimante incorrecte") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Nbre impressions") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Terminées") diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index 701275a1e21e..d3a87296b265 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -33,8 +33,8 @@ #define NOT_EXTENDED_ISO10646_1_5X7 #define WELCOME_MSG MACHINE_NAME _UxGT(" lista.") -#define MSG_SD_INSERTED _UxGT("Tarxeta inserida") -#define MSG_SD_REMOVED _UxGT("Tarxeta retirada") +#define MSG_MEDIA_INSERTED _UxGT("Tarxeta inserida") +#define MSG_MEDIA_REMOVED _UxGT("Tarxeta retirada") #define MSG_LCD_ENDSTOPS _UxGT("FinCarro") #define MSG_MAIN _UxGT("Menu principal") #define MSG_AUTOSTART _UxGT("Autoarranque") @@ -145,8 +145,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pausar impres.") #define MSG_RESUME_PRINT _UxGT("Seguir impres.") #define MSG_STOP_PRINT _UxGT("Deter impres.") -#define MSG_CARD_MENU _UxGT("Tarxeta SD") -#define MSG_NO_CARD _UxGT("Sen tarxeta SD") +#define MSG_MEDIA_MENU _UxGT("Tarxeta SD") +#define MSG_NO_MEDIA _UxGT("Sen tarxeta SD") #define MSG_DWELL _UxGT("En repouso...") #define MSG_USERWAIT _UxGT("A espera...") #define MSG_PRINT_ABORTED _UxGT("Impre. cancelada") @@ -162,8 +162,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Recuperacion V") #define MSG_AUTORETRACT _UxGT("Retraccion auto.") #define MSG_FILAMENTCHANGE _UxGT("Cambiar filamen.") -#define MSG_INIT_SDCARD _UxGT("Iniciando SD") -#define MSG_CHANGE_SDCARD _UxGT("Cambiar SD") +#define MSG_INIT_MEDIA _UxGT("Iniciando SD") +#define MSG_CHANGE_MEDIA _UxGT("Cambiar SD") #define MSG_ZPROBE_OUT _UxGT("Sonda-Z sen cama") #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_BLTOUCH_SELFTEST _UxGT("Comprobar BLTouch") @@ -225,6 +225,8 @@ #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Segue traballo") +#define MSG_EXPECTED_PRINTER _UxGT("Impresora incorrecta") + #if LCD_HEIGHT >= 4 // Up to 3 lines allowed #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Agarde para") diff --git a/Marlin/src/lcd/language/language_hr.h b/Marlin/src/lcd/language/language_hr.h index 2662e2a2728a..f60e91654a7b 100644 --- a/Marlin/src/lcd/language/language_hr.h +++ b/Marlin/src/lcd/language/language_hr.h @@ -33,8 +33,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" spreman.") -#define MSG_SD_INSERTED _UxGT("SD kartica umetnuta") -#define MSG_SD_REMOVED _UxGT("SD kartica uklonjena") +#define MSG_MEDIA_INSERTED _UxGT("SD kartica umetnuta") +#define MSG_MEDIA_REMOVED _UxGT("SD kartica uklonjena") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Main") #define MSG_AUTOSTART _UxGT("Auto pokretanje") @@ -145,8 +145,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pauziraj print") #define MSG_RESUME_PRINT _UxGT("Nastavi print") #define MSG_STOP_PRINT _UxGT("Zaustavi print") -#define MSG_CARD_MENU _UxGT("Printaj s SD kartice") -#define MSG_NO_CARD _UxGT("Nema SD kartice") +#define MSG_MEDIA_MENU _UxGT("Printaj s SD kartice") +#define MSG_NO_MEDIA _UxGT("Nema SD kartice") #define MSG_DWELL _UxGT("Sleep...") #define MSG_USERWAIT _UxGT("Čekaj korisnika...") #define MSG_PRINT_ABORTED _UxGT("Print otkazan") @@ -162,8 +162,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("UnRet V") #define MSG_AUTORETRACT _UxGT("AutoRetr.") #define MSG_FILAMENTCHANGE _UxGT("Promijeni filament") -#define MSG_INIT_SDCARD _UxGT("Init. SD karticu") -#define MSG_CHANGE_SDCARD _UxGT("Promijeni SD karticu") +#define MSG_INIT_MEDIA _UxGT("Init. SD karticu") +#define MSG_CHANGE_MEDIA _UxGT("Promijeni SD karticu") #define MSG_ZPROBE_OUT _UxGT("Z probe out. bed") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test") #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") @@ -204,6 +204,8 @@ #define MSG_INFO_PROTOCOL _UxGT("Protokol") #define MSG_CASE_LIGHT _UxGT("Osvjetljenje") +#define MSG_EXPECTED_PRINTER _UxGT("Neispravan pisač") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Broj printova") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Završeni") diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 4cc8f0d985e0..9a6509573285 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -35,9 +35,9 @@ #define MSG_YES _UxGT("SI") #define MSG_NO _UxGT("NO") #define MSG_BACK _UxGT("Indietro") -#define MSG_SD_INSERTED _UxGT("SD Card inserita") -#define MSG_SD_REMOVED _UxGT("SD Card rimossa") -#define MSG_SD_RELEASED _UxGT("SD Card rilasciata") +#define MSG_MEDIA_INSERTED _UxGT("Media inserito") +#define MSG_MEDIA_REMOVED _UxGT("Media rimosso") +#define MSG_MEDIA_RELEASED _UxGT("Media rilasciato") #define MSG_LCD_ENDSTOPS _UxGT("Finecor.") // Max 8 caratteri #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Finecorsa Soft") #define MSG_MAIN _UxGT("Menu principale") @@ -101,6 +101,7 @@ #define MSG_USER_MENU _UxGT("Comandi personaliz.") #define MSG_LCD_TILTING_MESH _UxGT("Punto inclinaz.") #define MSG_M48_TEST _UxGT("Test sonda M48") +#define MSG_M48_POINT _UxGT("Punto M48") #define MSG_M48_DEVIATION _UxGT("Deviazione") #define MSG_IDEX_MENU _UxGT("Modo IDEX") #define MSG_OFFSETS_MENU _UxGT("Strumenti Offsets") @@ -274,7 +275,7 @@ #define MSG_LOAD_EEPROM _UxGT("Carica impostazioni") #define MSG_RESTORE_FAILSAFE _UxGT("Ripristina imp.") #define MSG_INIT_EEPROM _UxGT("Inizializza EEPROM") -#define MSG_SD_UPDATE _UxGT("Aggiorna SD") +#define MSG_MEDIA_UPDATE _UxGT("Aggiorna SD") #define MSG_RESET_PRINTER _UxGT("Resetta stampante") #define MSG_REFRESH _UxGT("Aggiorna") #define MSG_WATCH _UxGT("Schermata info") @@ -292,8 +293,8 @@ #define MSG_RESUME_PRINT _UxGT("Riprendi stampa") #define MSG_STOP_PRINT _UxGT("Arresta stampa") #define MSG_OUTAGE_RECOVERY _UxGT("Ripresa da PowerLoss") -#define MSG_CARD_MENU _UxGT("Stampa da SD") -#define MSG_NO_CARD _UxGT("SD non presente") +#define MSG_MEDIA_MENU _UxGT("Stampa da SD") +#define MSG_NO_MEDIA _UxGT("SD non presente") #define MSG_DWELL _UxGT("Sospensione...") #define MSG_USERWAIT _UxGT("Premi tasto..") #define MSG_PRINT_PAUSED _UxGT("Stampa sospesa") @@ -322,9 +323,9 @@ #define MSG_FILAMENTLOAD _UxGT("Carica filamento") #define MSG_FILAMENTUNLOAD _UxGT("Rimuovi filamento") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Rimuovi tutto") -#define MSG_INIT_SDCARD _UxGT("Iniz. SD card") -#define MSG_CHANGE_SDCARD _UxGT("Cambia SD card") -#define MSG_RELEASE_SDCARD _UxGT("Rilascia SD card") +#define MSG_INIT_MEDIA _UxGT("Iniz. SD card") +#define MSG_CHANGE_MEDIA _UxGT("Cambia SD card") +#define MSG_RELEASE_MEDIA _UxGT("Rilascia SD card") #define MSG_ZPROBE_OUT _UxGT("Z probe fuori piatto") #define MSG_SKEW_FACTOR _UxGT("Fattore distorsione") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -494,6 +495,8 @@ #define MSG_SNAKE _UxGT("Sn4k3") #define MSG_MAZE _UxGT("Maze") +#define MSG_EXPECTED_PRINTER _UxGT("Stampante errata") + // // Le schermate di Cambio Filamento possono visualizzare fino a 3 linee su un display a 4 righe // ...o fino a 2 linee su un display a 3 righe. diff --git a/Marlin/src/lcd/language/language_jp-kana.h b/Marlin/src/lcd/language/language_jp-kana.h index e1a6b20602af..4792bb1ddfa3 100644 --- a/Marlin/src/lcd/language/language_jp-kana.h +++ b/Marlin/src/lcd/language/language_jp-kana.h @@ -38,8 +38,8 @@ // 片仮名表示定義 #define WELCOME_MSG MACHINE_NAME _UxGT(" ready.") -#define MSG_SD_INSERTED _UxGT("カードガソウニュウサレマシタ") // "Card inserted" -#define MSG_SD_REMOVED _UxGT("カードガアリマセン") // "Card removed" +#define MSG_MEDIA_INSERTED _UxGT("カードガソウニュウサレマシタ") // "Card inserted" +#define MSG_MEDIA_REMOVED _UxGT("カードガアリマセン") // "Card removed" #define MSG_LCD_ENDSTOPS _UxGT("エンドストップ") // "Endstops" // Max length 8 characters #define MSG_MAIN _UxGT("メイン") // "Main" #define MSG_AUTOSTART _UxGT("ジドウカイシ") // "Autostart" @@ -139,8 +139,8 @@ #define MSG_PAUSE_PRINT _UxGT("イチジテイシ") // "Pause print" #define MSG_RESUME_PRINT _UxGT("プリントサイカイ") // "Resume print" #define MSG_STOP_PRINT _UxGT("プリントテイシ") // "Stop print" -#define MSG_CARD_MENU _UxGT("SDカードカラプリント") // "Print from SD" -#define MSG_NO_CARD _UxGT("SDカードガアリマセン") // "No SD card" +#define MSG_MEDIA_MENU _UxGT("SDカードカラプリント") // "Print from SD" +#define MSG_NO_MEDIA _UxGT("SDカードガアリマセン") // "No SD card" #define MSG_DWELL _UxGT("キュウシ") // "Sleep..." #define MSG_USERWAIT _UxGT("シバラクオマチクダサイ") // "Wait for user..." #define MSG_PRINT_ABORTED _UxGT("プリントガチュウシサレマシタ") // "Print aborted" @@ -156,8 +156,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("ホショウソクド mm/s") // "UnRet V" #define MSG_AUTORETRACT _UxGT("ジドウヒキコミ") // "AutoRetr." #define MSG_FILAMENTCHANGE _UxGT("フィラメントコウカン") // "Change filament" -#define MSG_INIT_SDCARD _UxGT("SDカードサイヨミコミ") // "Init. SD card" -#define MSG_CHANGE_SDCARD _UxGT("SDカードコウカン") // "Change SD card" +#define MSG_INIT_MEDIA _UxGT("SDカードサイヨミコミ") // "Init. SD card" +#define MSG_CHANGE_MEDIA _UxGT("SDカードコウカン") // "Change SD card" #define MSG_ZPROBE_OUT _UxGT("Zプローブ ベッドガイ") // "Z probe out. bed" #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch ジコシンダン") // "BLTouch Self-Test" #define MSG_BLTOUCH_RESET _UxGT("BLTouch リセット") // "Reset BLTouch" @@ -219,3 +219,5 @@ #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("シバラクオマチクダサイ") // "filament load" #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("プリントヲサイカイシマス") // "Wait for print" #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("シバラクオマチクダサイ") // "to resume" + +#define MSG_EXPECTED_PRINTER _UxGT("間違ったプリンター") // "Wrong printer" diff --git a/Marlin/src/lcd/language/language_ko_KR.h b/Marlin/src/lcd/language/language_ko_KR.h index bf614ad8bc65..8d24736e6cdc 100644 --- a/Marlin/src/lcd/language/language_ko_KR.h +++ b/Marlin/src/lcd/language/language_ko_KR.h @@ -33,8 +33,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" 준비.") #define MSG_BACK _UxGT("뒤로") -#define MSG_SD_INSERTED _UxGT("카드 삽입됨") -#define MSG_SD_REMOVED _UxGT("카드 제거됨") +#define MSG_MEDIA_INSERTED _UxGT("카드 삽입됨") +#define MSG_MEDIA_REMOVED _UxGT("카드 제거됨") #define MSG_LCD_ENDSTOPS _UxGT("엔드스탑") #define MSG_LCD_SOFT_ENDSTOPS _UxGT("소프트 엔드스탑") #define MSG_MAIN _UxGT("뒤로") @@ -259,8 +259,8 @@ #define MSG_RESUME_PRINT _UxGT("재시작") #define MSG_STOP_PRINT _UxGT("출력중지") //#define MSG_OUTAGE_RECOVERY _UxGT("Outage Recovery") -#define MSG_CARD_MENU _UxGT("SD 카드출력") -#define MSG_NO_CARD _UxGT("SD 카드없음") +#define MSG_MEDIA_MENU _UxGT("SD 카드출력") +#define MSG_NO_MEDIA _UxGT("SD 카드없음") #define MSG_DWELL _UxGT("슬립모드...") //#define MSG_USERWAIT _UxGT("Click to resume...") #define MSG_PRINT_PAUSED _UxGT("일시 정지됨") @@ -282,8 +282,8 @@ //#define MSG_FILAMENTLOAD _UxGT("Load filament") //#define MSG_FILAMENTUNLOAD _UxGT("Unload filament") //#define MSG_FILAMENTUNLOAD_ALL _UxGT("Unload All") -//#define MSG_INIT_SDCARD _UxGT("Init. SD card") -//#define MSG_CHANGE_SDCARD _UxGT("Change SD card") +//#define MSG_INIT_MEDIA _UxGT("Init. SD card") +//#define MSG_CHANGE_MEDIA _UxGT("Change SD card") //#define MSG_ZPROBE_OUT _UxGT("Z Probe past bed") //#define MSG_SKEW_FACTOR _UxGT("Skew Factor") //#define MSG_BLTOUCH _UxGT("BLTouch") @@ -346,6 +346,9 @@ //#define MSG_INFO_PROTOCOL _UxGT("Protocol") //#define MSG_CASE_LIGHT _UxGT("Case light") //#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Light Brightness") + +#define MSG_EXPECTED_PRINTER _UxGT("잘못된 프린터") + #if LCD_WIDTH >= 20 //#define MSG_INFO_PRINT_COUNT _UxGT("Print Count") //#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completed") diff --git a/Marlin/src/lcd/language/language_nl.h b/Marlin/src/lcd/language/language_nl.h index fbf7c789837e..5e95c3554b2f 100644 --- a/Marlin/src/lcd/language/language_nl.h +++ b/Marlin/src/lcd/language/language_nl.h @@ -34,8 +34,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" gereed.") #define MSG_BACK _UxGT("Terug") -#define MSG_SD_INSERTED _UxGT("Kaart ingestoken") -#define MSG_SD_REMOVED _UxGT("Kaart verwijderd") +#define MSG_MEDIA_INSERTED _UxGT("Kaart ingestoken") +#define MSG_MEDIA_REMOVED _UxGT("Kaart verwijderd") #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #define MSG_MAIN _UxGT("Hoofdmenu") #define MSG_AUTOSTART _UxGT("Autostart") @@ -154,8 +154,8 @@ #define MSG_PAUSE_PRINT _UxGT("Print pauzeren") #define MSG_RESUME_PRINT _UxGT("Print hervatten") #define MSG_STOP_PRINT _UxGT("Print stoppen") -#define MSG_CARD_MENU _UxGT("Print van SD") -#define MSG_NO_CARD _UxGT("Geen SD kaart") +#define MSG_MEDIA_MENU _UxGT("Print van SD") +#define MSG_NO_MEDIA _UxGT("Geen SD kaart") #define MSG_DWELL _UxGT("Slapen...") #define MSG_USERWAIT _UxGT("Wachten...") #define MSG_PRINT_ABORTED _UxGT("Print afgebroken") @@ -171,8 +171,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("UnRet F") #define MSG_AUTORETRACT _UxGT("AutoRetr.") #define MSG_FILAMENTCHANGE _UxGT("Verv. Filament") -#define MSG_INIT_SDCARD _UxGT("Init. SD kaart") -#define MSG_CHANGE_SDCARD _UxGT("Verv. SD Kaart") +#define MSG_INIT_MEDIA _UxGT("Init. SD kaart") +#define MSG_CHANGE_MEDIA _UxGT("Verv. SD Kaart") #define MSG_ZPROBE_OUT _UxGT("Z probe uit. bed") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Zelf-Test") #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") @@ -216,6 +216,8 @@ #define MSG_INFO_PROTOCOL _UxGT("Protocol") #define MSG_CASE_LIGHT _UxGT("Case licht") +#define MSG_EXPECTED_PRINTER _UxGT("Onjuiste printer") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Printed Aantal") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Totaal Voltooid") diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index 92ad95908dae..575f313dffa8 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -30,8 +30,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" gotowy.") -#define MSG_SD_INSERTED _UxGT("Karta włożona") -#define MSG_SD_REMOVED _UxGT("Karta usunięta") +#define MSG_MEDIA_INSERTED _UxGT("Karta włożona") +#define MSG_MEDIA_REMOVED _UxGT("Karta usunięta") #define MSG_LCD_ENDSTOPS _UxGT("Kranców.") // Max length 8 characters #define MSG_MAIN _UxGT("Menu główne") #define MSG_AUTOSTART _UxGT("Autostart") @@ -144,8 +144,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pauza") #define MSG_RESUME_PRINT _UxGT("Wznowienie") #define MSG_STOP_PRINT _UxGT("Stop") -#define MSG_CARD_MENU _UxGT("Karta SD") -#define MSG_NO_CARD _UxGT("Brak karty") +#define MSG_MEDIA_MENU _UxGT("Karta SD") +#define MSG_NO_MEDIA _UxGT("Brak karty") #define MSG_DWELL _UxGT("Uśpij...") #define MSG_USERWAIT _UxGT("Oczekiwanie...") #define MSG_PRINT_ABORTED _UxGT("Druk przerwany") @@ -161,8 +161,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Cof. wycof. V") #define MSG_AUTORETRACT _UxGT("Auto. wycofanie") #define MSG_FILAMENTCHANGE _UxGT("Zmień filament") -#define MSG_INIT_SDCARD _UxGT("Inicjal. karty SD") -#define MSG_CHANGE_SDCARD _UxGT("Zmiana karty SD") +#define MSG_INIT_MEDIA _UxGT("Inicjal. karty SD") +#define MSG_CHANGE_MEDIA _UxGT("Zmiana karty SD") #define MSG_ZPROBE_OUT _UxGT("Sonda Z za stołem") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test") #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") @@ -204,6 +204,8 @@ #define MSG_INFO_PROTOCOL _UxGT("Protokół") #define MSG_CASE_LIGHT _UxGT("Oświetlenie") +#define MSG_EXPECTED_PRINTER _UxGT("Niepoprawna drukarka") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukończono") diff --git a/Marlin/src/lcd/language/language_pt-br.h b/Marlin/src/lcd/language/language_pt-br.h index c07fa199d3cd..9b97457870ed 100644 --- a/Marlin/src/lcd/language/language_pt-br.h +++ b/Marlin/src/lcd/language/language_pt-br.h @@ -38,8 +38,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" pronto.") #define MSG_BACK _UxGT("Voltar") -#define MSG_SD_INSERTED _UxGT("Cartão inserido") -#define MSG_SD_REMOVED _UxGT("Cartão removido") +#define MSG_MEDIA_INSERTED _UxGT("Cartão inserido") +#define MSG_MEDIA_REMOVED _UxGT("Cartão removido") #define MSG_LCD_ENDSTOPS _UxGT("Fins de curso") #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Soft Fins curso") #define MSG_MAIN _UxGT("Menu principal") @@ -150,7 +150,7 @@ #define MSG_UBL_INVALIDATE_ALL _UxGT("Invalidar tudo") #define MSG_UBL_INVALIDATE_CLOSEST _UxGT("Invalidar próximo") #define MSG_UBL_FINE_TUNE_ALL _UxGT("Ajuste Fino de Todos") -#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Ajuar Mais Próximo") +#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Ajustar Mais Próximo") #define MSG_UBL_STORAGE_MESH_MENU _UxGT("Armazenamento Malha") #define MSG_UBL_STORAGE_SLOT _UxGT("Slot de Memória") #define MSG_UBL_LOAD_MESH _UxGT("Ler Malha") @@ -261,7 +261,7 @@ #define MSG_LOAD_EEPROM _UxGT("Ler Configuração") #define MSG_RESTORE_FAILSAFE _UxGT("Restauro seguro") #define MSG_INIT_EEPROM _UxGT("Iniciar EEPROM") -#define MSG_SD_UPDATE _UxGT("Atualiz. SD") +#define MSG_MEDIA_UPDATE _UxGT("Atualiz. SD") #define MSG_RESET_PRINTER _UxGT("Resetar Impressora") #define MSG_REFRESH _UxGT("Atualização") #define MSG_WATCH _UxGT("Informações") @@ -271,8 +271,8 @@ #define MSG_RESUME_PRINT _UxGT("Resumir impressão") #define MSG_STOP_PRINT _UxGT("Parar impressão") #define MSG_OUTAGE_RECOVERY _UxGT("Recuperar Impressão") -#define MSG_CARD_MENU _UxGT("Imprimir do SD") -#define MSG_NO_CARD _UxGT("Sem cartão SD") +#define MSG_MEDIA_MENU _UxGT("Imprimir do SD") +#define MSG_NO_MEDIA _UxGT("Sem cartão SD") #define MSG_DWELL _UxGT("Dormindo...") #define MSG_USERWAIT _UxGT("Clique para retomar") #define MSG_PRINT_PAUSED _UxGT("Impressão Pausada") @@ -299,8 +299,8 @@ #define MSG_FILAMENTLOAD _UxGT("Carregar Filamento") #define MSG_FILAMENTUNLOAD _UxGT("Descarreg. Filamento") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Descarregar Todos") -#define MSG_INIT_SDCARD _UxGT("Iniciar SD") -#define MSG_CHANGE_SDCARD _UxGT("Trocar SD") +#define MSG_INIT_MEDIA _UxGT("Iniciar SD") +#define MSG_CHANGE_MEDIA _UxGT("Trocar SD") #define MSG_ZPROBE_OUT _UxGT("Sonda fora da mesa") #define MSG_SKEW_FACTOR _UxGT("Fator de Cisalho") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -366,6 +366,8 @@ #define MSG_CASE_LIGHT _UxGT("Luz da Impressora") #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Intensidade Brilho") +#define MSG_EXPECTED_PRINTER _UxGT("Impressora Incorreta") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Total de Impressões") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Realizadas") diff --git a/Marlin/src/lcd/language/language_pt.h b/Marlin/src/lcd/language/language_pt.h index c6a8367d917e..50d9d60c719b 100644 --- a/Marlin/src/lcd/language/language_pt.h +++ b/Marlin/src/lcd/language/language_pt.h @@ -34,8 +34,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" pronta.") -#define MSG_SD_INSERTED _UxGT("Cartão inserido") -#define MSG_SD_REMOVED _UxGT("Cartão removido") +#define MSG_MEDIA_INSERTED _UxGT("Cartão inserido") +#define MSG_MEDIA_REMOVED _UxGT("Cartão removido") #define MSG_MAIN _UxGT("Menu principal") #define MSG_AUTOSTART _UxGT("Autostart") #define MSG_DISABLE_STEPPERS _UxGT("Desactivar motores") @@ -142,8 +142,8 @@ #define MSG_PAUSE_PRINT _UxGT("Pausar impressão") #define MSG_RESUME_PRINT _UxGT("Retomar impressão") #define MSG_STOP_PRINT _UxGT("Parar impressão") -#define MSG_CARD_MENU _UxGT("Imprimir do SD") -#define MSG_NO_CARD _UxGT("Sem cartão SD") +#define MSG_MEDIA_MENU _UxGT("Imprimir do SD") +#define MSG_NO_MEDIA _UxGT("Sem cartão SD") #define MSG_DWELL _UxGT("Em espera...") #define MSG_USERWAIT _UxGT("Á espera de ordem") #define MSG_PRINT_ABORTED _UxGT("Impressão cancelada") @@ -159,8 +159,8 @@ #define MSG_CONTROL_RETRACT_RECOVERF _UxGT(" DesRet V") #define MSG_AUTORETRACT _UxGT(" AutoRetr.") #define MSG_FILAMENTCHANGE _UxGT("Trocar filamento") -#define MSG_INIT_SDCARD _UxGT("Inici. cartão SD") -#define MSG_CHANGE_SDCARD _UxGT("Trocar cartão SD") +#define MSG_INIT_MEDIA _UxGT("Inici. cartão SD") +#define MSG_CHANGE_MEDIA _UxGT("Trocar cartão SD") #define MSG_ZPROBE_OUT _UxGT("Sensor fora/base") #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_FIRST _UxGT("first") @@ -185,3 +185,5 @@ #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Calibrar Centro") #define MSG_LCD_ENDSTOPS _UxGT("Fim de curso") + +#define MSG_EXPECTED_PRINTER _UxGT("Impressora Incorreta") diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 9ede1518ae6e..37e19c787311 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -34,9 +34,9 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" готов.") #define MSG_BACK _UxGT("Назад") -#define MSG_SD_INSERTED _UxGT("Карта вставлена") -#define MSG_SD_REMOVED _UxGT("Карта извлечена") -#define MSG_SD_RELEASED _UxGT("SD карта не активна") +#define MSG_MEDIA_INSERTED _UxGT("Карта вставлена") +#define MSG_MEDIA_REMOVED _UxGT("Карта извлечена") +#define MSG_MEDIA_RELEASED _UxGT("SD карта не активна") #define MSG_LCD_ENDSTOPS _UxGT("Эндстопы") // Max length 8 characters #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Прогр. эндстопы") #define MSG_MAIN _UxGT("Меню") @@ -86,7 +86,7 @@ #define MSG_M48_TEST _UxGT("Проверка датчика Z") #define MSG_M48_DEVIATION _UxGT("Отклонение") -#define MSG_M48_POINT _UxGT("Точка") +#define MSG_M48_POINT _UxGT("Измерение") // TODO: IDEX Menu #define MSG_OFFSETS_MENU _UxGT("Размещение сопел") @@ -255,15 +255,26 @@ #define MSG_LOAD_EEPROM _UxGT("Загрузить настройки") #define MSG_RESTORE_FAILSAFE _UxGT("Вернуть настройки") #define MSG_INIT_EEPROM _UxGT("Инициализация EEPROM") +#define MSG_MEDIA_UPDATE _UxGT("Обновление прошивки") +#define MSG_RESET_PRINTER _UxGT("Сброс принтера") #define MSG_REFRESH _UxGT("Обновить") #define MSG_WATCH _UxGT("Информационный экран") #define MSG_PREPARE _UxGT("Подготовить") #define MSG_TUNE _UxGT("Настроить") +#define MSG_START_PRINT _UxGT("Начало печати") +#define MSG_BUTTON_NEXT _UxGT("Дальше") +#define MSG_BUTTON_INIT _UxGT("Инициализация") +#define MSG_BUTTON_STOP _UxGT("Остановить") +#define MSG_BUTTON_PRINT _UxGT("Печать") +#define MSG_BUTTON_RESET _UxGT("Сброс") +#define MSG_BUTTON_CANCEL _UxGT("Отмена") +#define MSG_BUTTON_DONE _UxGT("Готово") #define MSG_PAUSE_PRINT _UxGT("Пауза печати") #define MSG_RESUME_PRINT _UxGT("Продолжить печать") #define MSG_STOP_PRINT _UxGT("Остановить печать") -#define MSG_CARD_MENU _UxGT("Печать с SD карты") -#define MSG_NO_CARD _UxGT("Нет SD карты") +#define MSG_OUTAGE_RECOVERY _UxGT("Восстановение сбоя") +#define MSG_MEDIA_MENU _UxGT("Печать с SD карты") +#define MSG_NO_MEDIA _UxGT("Нет SD карты") #define MSG_DWELL _UxGT("Сон...") #define MSG_USERWAIT _UxGT("Продолжить...") #define MSG_PRINT_PAUSED _UxGT("Печать на паузе") @@ -292,9 +303,9 @@ #define MSG_FILAMENTLOAD _UxGT("Загрузка филамента") #define MSG_FILAMENTUNLOAD _UxGT("Выгрузка филамента") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Выгрузить всё") -#define MSG_INIT_SDCARD _UxGT("Активировать SD") -#define MSG_CHANGE_SDCARD _UxGT("Сменить SD карту") -#define MSG_RELEASE_SDCARD _UxGT("Деактивировать SD") +#define MSG_INIT_MEDIA _UxGT("Активировать SD") +#define MSG_CHANGE_MEDIA _UxGT("Сменить SD карту") +#define MSG_RELEASE_MEDIA _UxGT("Деактивировать SD") #define MSG_ZPROBE_OUT _UxGT("Z датчик вне стола") #define MSG_SKEW_FACTOR _UxGT("Фактор наклона") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -313,7 +324,7 @@ #define MSG_BABYSTEP_Z _UxGT("Микрошаг Z") #define MSG_ENDSTOP_ABORT _UxGT("Сработал концевик") #define MSG_HEATING_FAILED_LCD _UxGT("Разогрев не удался") -#define MSG_HEATING_FAILED_LCD_BED _UxGT("Разогр. стола не уд.") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Неудача нагрева стола") #define MSG_ERR_REDUNDANT_TEMP _UxGT("Ошибка: Избыточная Т") #define MSG_THERMAL_RUNAWAY _UxGT("УБЕГАНИЕ ТЕПЛА") #define MSG_THERMAL_RUNAWAY_BED _UxGT("УБЕГАНИЕ ТЕПЛА СТОЛА") @@ -361,6 +372,9 @@ #define MSG_INFO_PROTOCOL _UxGT("Протокол") #define MSG_CASE_LIGHT _UxGT("Подсветка корпуса") #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Яркость подсветки") + +#define MSG_EXPECTED_PRINTER _UxGT("Неверный принтер") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Счётчик печати") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Закончено") diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 58a89de87b06..e92d741f4ec2 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -43,9 +43,9 @@ #define MSG_YES _UxGT("ÁNO") #define MSG_NO _UxGT("NIE") #define MSG_BACK _UxGT("Naspäť") -#define MSG_SD_INSERTED _UxGT("Karta vložená") -#define MSG_SD_REMOVED _UxGT("Karta vybraná") -#define MSG_SD_RELEASED _UxGT("Karta odpojená") +#define MSG_MEDIA_INSERTED _UxGT("Karta vložená") +#define MSG_MEDIA_REMOVED _UxGT("Karta vybraná") +#define MSG_MEDIA_RELEASED _UxGT("Karta odpojená") #define MSG_LCD_ENDSTOPS _UxGT("Endstopy") // max 8 znakov #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Soft. endstopy") #define MSG_MAIN _UxGT("Hlavná ponuka") @@ -281,7 +281,7 @@ #define MSG_LOAD_EEPROM _UxGT("Načítať nastavenie") #define MSG_RESTORE_FAILSAFE _UxGT("Obnoviť nastavenie") #define MSG_INIT_EEPROM _UxGT("Inicializ. EEPROM") -#define MSG_SD_UPDATE _UxGT("Aktualizovať z SD") +#define MSG_MEDIA_UPDATE _UxGT("Aktualizovať z SD") #define MSG_RESET_PRINTER _UxGT("Reštart. tlačiar.") #define MSG_REFRESH _UxGT("Obnoviť") #define MSG_WATCH _UxGT("Info. obrazovka") @@ -299,8 +299,8 @@ #define MSG_RESUME_PRINT _UxGT("Obnoviť tlač") #define MSG_STOP_PRINT _UxGT("Zastaviť tlač") #define MSG_OUTAGE_RECOVERY _UxGT("Obnova po výp. nap.") -#define MSG_CARD_MENU _UxGT("Tlačiť z SD") -#define MSG_NO_CARD _UxGT("Žiadna SD karta") +#define MSG_MEDIA_MENU _UxGT("Tlačiť z SD") +#define MSG_NO_MEDIA _UxGT("Žiadna SD karta") #define MSG_DWELL _UxGT("Spím...") #define MSG_USERWAIT _UxGT("Pokrač. kliknutím...") #define MSG_PRINT_PAUSED _UxGT("Tlač pozastavená") @@ -329,9 +329,9 @@ #define MSG_FILAMENTUNLOAD _UxGT("Vysunúť filament") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Vysunúť všetko") -#define MSG_INIT_SDCARD _UxGT("Načítať SD kartu") -#define MSG_CHANGE_SDCARD _UxGT("Vymeniť SD kartu") -#define MSG_RELEASE_SDCARD _UxGT("Odpojiť SD kartu") +#define MSG_INIT_MEDIA _UxGT("Načítať SD kartu") +#define MSG_CHANGE_MEDIA _UxGT("Vymeniť SD kartu") +#define MSG_RELEASE_MEDIA _UxGT("Odpojiť SD kartu") #define MSG_ZPROBE_OUT _UxGT("Sonda Z mimo podl.") #define MSG_SKEW_FACTOR _UxGT("Faktor skosenia") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -415,6 +415,8 @@ #define MSG_CASE_LIGHT _UxGT("Osvetlenie") #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Jas svetla") +#define MSG_EXPECTED_PRINTER _UxGT("Nesprávna tlačiareň") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Počet tlačí") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Dokončené") diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 551991b99b8c..de48759003b3 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -1,4 +1,4 @@ -/** + /** * Marlin 3D Printer Firmware * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * @@ -39,8 +39,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT(" hazır.") #define MSG_BACK _UxGT("Geri") -#define MSG_SD_INSERTED _UxGT("SD K. Yerleştirildi.") -#define MSG_SD_REMOVED _UxGT("SD Kart Çıkarıldı.") +#define MSG_MEDIA_INSERTED _UxGT("SD K. Yerleştirildi.") +#define MSG_MEDIA_REMOVED _UxGT("SD Kart Çıkarıldı.") #define MSG_LCD_ENDSTOPS _UxGT("Enstops") // Max length 8 characters #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Yazılımsal Endstops") #define MSG_MAIN _UxGT("Ana") @@ -260,7 +260,7 @@ #define MSG_LOAD_EEPROM _UxGT("Hafızadan Yükle") #define MSG_RESTORE_FAILSAFE _UxGT("Fabrika Ayarları") #define MSG_INIT_EEPROM _UxGT("EEPROM'u başlat") -#define MSG_SD_UPDATE _UxGT("SD Güncellemesi") +#define MSG_MEDIA_UPDATE _UxGT("SD Güncellemesi") #define MSG_RESET_PRINTER _UxGT("Yazıcıyı Resetle") #define MSG_REFRESH _UxGT("Yenile") #define MSG_WATCH _UxGT("Bilgi Ekranı") @@ -270,8 +270,8 @@ #define MSG_RESUME_PRINT _UxGT("Sürdür") #define MSG_STOP_PRINT _UxGT("Durdur") #define MSG_OUTAGE_RECOVERY _UxGT("Kesinti Kurtarma") -#define MSG_CARD_MENU _UxGT("SD Karttan Yazdır") -#define MSG_NO_CARD _UxGT("SD Kart Yok!") +#define MSG_MEDIA_MENU _UxGT("SD Karttan Yazdır") +#define MSG_NO_MEDIA _UxGT("SD Kart Yok!") #define MSG_DWELL _UxGT("Uyku...") #define MSG_USERWAIT _UxGT("Operatör bekleniyor.") #define MSG_PRINT_PAUSED _UxGT("Baskı Duraklatıldı") @@ -298,8 +298,8 @@ #define MSG_FILAMENTLOAD _UxGT("Filaman Yükle") #define MSG_FILAMENTUNLOAD _UxGT("Filaman Çıkart") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Tümünü Çıkart") -#define MSG_INIT_SDCARD _UxGT("SD Kart Başlatılıyor") -#define MSG_CHANGE_SDCARD _UxGT("SD Kart Değiştir") +#define MSG_INIT_MEDIA _UxGT("SD Kart Başlatılıyor") +#define MSG_CHANGE_MEDIA _UxGT("SD Kart Değiştir") #define MSG_ZPROBE_OUT _UxGT("Z Prob Açık. Tabla") #define MSG_SKEW_FACTOR _UxGT("Çarpıklık Faktörü") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -362,6 +362,9 @@ #define MSG_INFO_PROTOCOL _UxGT("Protokol") #define MSG_CASE_LIGHT _UxGT("Aydınlatmayı Aç") #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Aydınlatma Parlaklğı") + +#define MSG_EXPECTED_PRINTER _UxGT("Yanlış Yazıcı") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("Baskı Sayısı") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Tamamlanan") diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 763a2f559b53..7e866668c38d 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -33,8 +33,8 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" готовий.") -#define MSG_SD_INSERTED _UxGT("Картка вставлена") -#define MSG_SD_REMOVED _UxGT("Картка видалена") +#define MSG_MEDIA_INSERTED _UxGT("Картка вставлена") +#define MSG_MEDIA_REMOVED _UxGT("Картка видалена") #define MSG_LCD_ENDSTOPS _UxGT("Кінцевик") // Max length 8 characters #define MSG_MAIN _UxGT("Меню") #define MSG_AUTOSTART _UxGT("Автостарт") @@ -145,8 +145,8 @@ #define MSG_PAUSE_PRINT _UxGT("Призупинити друк") #define MSG_RESUME_PRINT _UxGT("Відновити друк") #define MSG_STOP_PRINT _UxGT("Скасувати друк") -#define MSG_CARD_MENU _UxGT("Друкувати з SD") -#define MSG_NO_CARD _UxGT("Відсутня SD карт.") +#define MSG_MEDIA_MENU _UxGT("Друкувати з SD") +#define MSG_NO_MEDIA _UxGT("Відсутня SD карт.") #define MSG_DWELL _UxGT("Сплячка...") #define MSG_USERWAIT _UxGT("Очікування дій...") #define MSG_PRINT_ABORTED _UxGT("Друк скасовано") @@ -154,8 +154,8 @@ #define MSG_KILLED _UxGT("ПЕРЕРВАНО. ") #define MSG_STOPPED _UxGT("ЗУПИНЕНО. ") #define MSG_FILAMENTCHANGE _UxGT("Зміна волокна") -#define MSG_INIT_SDCARD _UxGT("Старт SD картки") -#define MSG_CHANGE_SDCARD _UxGT("Заміна SD карти") +#define MSG_INIT_MEDIA _UxGT("Старт SD картки") +#define MSG_CHANGE_MEDIA _UxGT("Заміна SD карти") #define MSG_ZPROBE_OUT _UxGT("Z дет. не в межах") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Само-Тест") #define MSG_BLTOUCH_RESET _UxGT("Скинути BLTouch") @@ -192,6 +192,8 @@ #define MSG_INFO_PROTOCOL _UxGT("Протокол") #define MSG_CASE_LIGHT _UxGT("Підсвітка") +#define MSG_EXPECTED_PRINTER _UxGT("Неправильний принтер") + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("К-сть друків") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Завершено") diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h new file mode 100644 index 000000000000..3453e88bdaf0 --- /dev/null +++ b/Marlin/src/lcd/language/language_vi.h @@ -0,0 +1,439 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 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 . + * + */ +#pragma once + +/** + * Vietnamese + * + * LCD Menu Messages + * See also http://marlinfw.org/docs/development/lcd_language.html + * + */ + +#define CHARSIZE 2 + +#define THIS_LANGUAGES_SPECIAL_SYMBOLS _UxGT("àạậẵắấầđẻểếềìỉởộỗợúự") + +#define WELCOME_MSG MACHINE_NAME _UxGT(" Sẵn sàng.") // Ready +#define MSG_BACK _UxGT("Trở lại") // Back +#define MSG_SD_INSERTED _UxGT("Thẻ được cắm vào") // Card inserted +#define MSG_SD_REMOVED _UxGT("Thẻ được rút ra") +#define MSG_LCD_ENDSTOPS _UxGT("Công tắc") // Endstops - công tắc hành trình +#define MSG_LCD_SOFT_ENDSTOPS _UxGT("Công tắc mềm") // soft Endstops +#define MSG_MAIN _UxGT("Chính") // Main +#define MSG_ADVANCED_SETTINGS _UxGT("Thiết lập cấp cao") // Advanced Settings +#define MSG_CONFIGURATION _UxGT("Cấu hình") // Configuration +#define MSG_AUTOSTART _UxGT("Khởi chạy tự động") // Autostart +#define MSG_DISABLE_STEPPERS _UxGT("Tắt động cơ bước") // Disable steppers +#define MSG_DEBUG_MENU _UxGT("Menu gỡ lỗi") // Debug Menu +#define MSG_PROGRESS_BAR_TEST _UxGT("Kiểm tra tiến độ") // Progress bar test +#define MSG_AUTO_HOME _UxGT("Về nhà tự động") // Auto home +#define MSG_AUTO_HOME_X _UxGT("Về nhà X") // home x +#define MSG_AUTO_HOME_Y _UxGT("Về nhà Y") // home y +#define MSG_AUTO_HOME_Z _UxGT("Về nhà Z") +#define MSG_AUTO_Z_ALIGN _UxGT("Chỉnh canh Z tự động") +#define MSG_LEVEL_BED_HOMING _UxGT("Đang về nhà XYZ") // Homing XYZ +#define MSG_LEVEL_BED_WAITING _UxGT("Nhấn để bắt đầu") // Click to Begin +#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Điểm tiếp theo") // Next Point +#define MSG_LEVEL_BED_DONE _UxGT("San lấp được hoàn thành") // Leveling Done! +#define MSG_Z_FADE_HEIGHT _UxGT("Chiều cao mờ dần") // Fade Height +#define MSG_SET_HOME_OFFSETS _UxGT("Đặt bù đắp nhà") // Set home offsets +#define MSG_HOME_OFFSETS_APPLIED _UxGT("Bù đắp được áp dụng") // Offsets applied +#define MSG_SET_ORIGIN _UxGT("Đặt nguồn gốc") // Set origin +#define MSG_PREHEAT_1 _UxGT("Làm nóng " PREHEAT_1_LABEL " trước") // Preheat +#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ") +#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" Tất cả") // all +#define MSG_PREHEAT_1_END MSG_PREHEAT_1 _UxGT(" Đầu") +#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 _UxGT(" Bàn") // bed -- using vietnamese term for 'table' instead +#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 _UxGT(" Cấu hình") // conf +#define MSG_PREHEAT_2 _UxGT("Làm nóng " PREHEAT_2_LABEL " trước") +#define MSG_PREHEAT_2_N MSG_PREHEAT_2 _UxGT(" ") +#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" Tất cả") +#define MSG_PREHEAT_2_END MSG_PREHEAT_2 _UxGT(" Đầu") +#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 _UxGT(" Bàn") // bed -- using vietnamese term for 'table' instead +#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 _UxGT(" Cấu hình") +#define MSG_PREHEAT_CUSTOM _UxGT("Sự nóng trước tự chọn") // Preheat Custom +#define MSG_COOLDOWN _UxGT("Nguội xuống") // Cooldown +#define MSG_SWITCH_PS_ON _UxGT("Bật nguồn") // Switch power on +#define MSG_SWITCH_PS_OFF _UxGT("Tắt nguồn") // Switch power off +#define MSG_EXTRUDE _UxGT("Ép đùn") // Extrude +#define MSG_RETRACT _UxGT("Rút lại") // Retract +#define MSG_MOVE_AXIS _UxGT("Di chuyển trục") // Move axis +#define MSG_BED_LEVELING _UxGT("San Lấp Bàn") // Bed Leveling +#define MSG_LEVEL_BED _UxGT("Làm bằng mặt bàn") // Level bed +#define MSG_LEVEL_CORNERS _UxGT("Làm bằng góc bàn") // Level corners +#define MSG_NEXT_CORNER _UxGT("Góc tiếp theo") // Next corner +#define MSG_EDITING_STOPPED _UxGT("Chỉnh lưới đã dừng") // Mesh Editing Stopped +#define MSG_MESH_X _UxGT("Mục lục X") // Index X +#define MSG_MESH_Y _UxGT("Mục lục Y") +#define MSG_MESH_EDIT_Z _UxGT("Giá trị Z") // Z Value +#define MSG_USER_MENU _UxGT("Các lệnh tự chọn") // Custom Commands +#define MSG_UBL_DOING_G29 _UxGT("Đang chạy G29") // Doing G29 +#define MSG_UBL_UNHOMED _UxGT("Về nhà XYZ trước") +#define MSG_UBL_TOOLS _UxGT("Công cụ UBL") // UBL tools +#define MSG_UBL_LEVEL_BED _UxGT("San Lấp Bàn Thống Nhất (UBL)") // Unified Bed Leveling +#define MSG_IDEX_MENU _UxGT("chế độ IDEX") // IDEX Mode +#define MSG_IDEX_MODE_AUTOPARK _UxGT("Đậu tự động") // Auto-Park +#define MSG_IDEX_MODE_DUPLICATE _UxGT("Sự gấp đôi") // Duplication +#define MSG_IDEX_MODE_SCALED_COPY _UxGT("Bản sao thu nhỏ") +#define MSG_IDEX_MODE_FULL_CTRL _UxGT("Toàn quyền điều khiển") // Full control +#define MSG_IDEX_X_OFFSET _UxGT("Đầu phun X nhì") // 2nd nozzle X +#define MSG_IDEX_Y_OFFSET _UxGT("Đầu phun Y nhì") +#define MSG_IDEX_Z_OFFSET _UxGT("Đầu phun Z nhì") +#define MSG_IDEX_SAVE_OFFSETS _UxGT("Lưu bù đắp") // Save offsets +#define MSG_UBL_MANUAL_MESH _UxGT("Tự xây dựng lưới") // Manually Build Mesh +#define MSG_UBL_BC_INSERT _UxGT("Đặt chêm và đo") // Place shim & measure +#define MSG_UBL_BC_INSERT2 _UxGT("Đo") // Measure +#define MSG_UBL_BC_REMOVE _UxGT("Tháo và đo bàn") // Remove & measure bed +#define MSG_UBL_MOVING_TO_NEXT _UxGT("Chuyển sang tiếp theo") // moving to next +#define MSG_UBL_ACTIVATE_MESH _UxGT("Bật UBL") +#define MSG_UBL_DEACTIVATE_MESH _UxGT("Tắt UBL") +#define MSG_UBL_SET_TEMP_BED _UxGT("Nhiệt độ bàn") // Bed Temp +#define MSG_UBL_BED_TEMP_CUSTOM MSG_UBL_SET_TEMP_BED +#define MSG_UBL_SET_TEMP_HOTEND _UxGT("Nhiệt độ đầu phun") // Hotend Temp +#define MSG_UBL_HOTEND_TEMP_CUSTOM MSG_UBL_SET_TEMP_HOTEND +#define MSG_UBL_MESH_EDIT _UxGT("Chỉnh sửa lưới") // Mesh Edit +#define MSG_UBL_EDIT_CUSTOM_MESH _UxGT("Chỉnh sửa lưới tự chọn") // Edit Custom Mesh +#define MSG_UBL_FINE_TUNE_MESH _UxGT("Chỉnh lưới chính xác") // Fine tuning mesh +#define MSG_UBL_DONE_EDITING_MESH _UxGT("Chỉnh sửa xong lưới") // Done Editing Mesh +#define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("Xây dựng lưới tự chọn") // Build Custom Mesh +#define MSG_UBL_BUILD_MESH_MENU _UxGT("Xây dựng lưới") // Build Mesh +#define MSG_UBL_BUILD_MESH_M1 _UxGT("Xây dựng lưới (" PREHEAT_1_LABEL ")") +#define MSG_UBL_BUILD_MESH_M2 _UxGT("Xây dựng lưới (" PREHEAT_2_LABEL ")") +#define MSG_UBL_BUILD_COLD_MESH _UxGT("Xây dựng lưới lạnh") // Build cold mesh +#define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("Điều chỉnh chiều cao lưới") // Adjust Mesh Height +#define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("Số lượng chiều cao") // Height Amount +#define MSG_UBL_VALIDATE_MESH_MENU _UxGT("Thẩm tra lưới") // Validate Mesh +#define MSG_UBL_VALIDATE_MESH_M1 _UxGT("Thẩm tra lưới (" PREHEAT_1_LABEL ")") +#define MSG_UBL_VALIDATE_MESH_M2 _UxGT("Thẩm tra lưới (" PREHEAT_2_LABEL ")") +#define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("Thẩm tra lưới tự chọn") // validate custom mesh +#define MSG_UBL_CONTINUE_MESH _UxGT("Tiếp tục xây lưới bàn") // Continue Bed Mesh +#define MSG_UBL_MESH_LEVELING _UxGT("Đang san lấp lưới") // Mesh Leveling +#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("Đang san lấp 3-điểm") // 3-Point Leveling +#define MSG_UBL_GRID_MESH_LEVELING _UxGT("Đang san lấp lưới phẳng") // Grid (planar) Mesh Leveling +#define MSG_UBL_MESH_LEVEL _UxGT("Làm bằng lưới") // Level Mesh +#define MSG_UBL_SIDE_POINTS _UxGT("Điểm bên cạnh") // Side Points +#define MSG_UBL_MAP_TYPE _UxGT("Loại bản đồ") // Map Type +#define MSG_UBL_OUTPUT_MAP _UxGT("Đầu ra bản đồ lưới") // Output Mesh Map +#define MSG_UBL_OUTPUT_MAP_HOST _UxGT("Đầu ra cho máy chủ") // Output for Host +#define MSG_UBL_OUTPUT_MAP_CSV _UxGT("Đầu ra cho CSV") // Output for CSV +#define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("Hỗ trợ lưới") // Off Printer Backup | backup mesh +#define MSG_UBL_INFO_UBL _UxGT("Đầu ra thông tin UBL") // Output UBL Info +#define MSG_EDIT_MESH _UxGT("Chỉnh sửa lưới") // Edit mesh +#define MSG_UBL_FILLIN_AMOUNT _UxGT("Số lượng lấp đầy") // Fill-in Amount +#define MSG_UBL_MANUAL_FILLIN _UxGT("Tự lấp đầy") // Manual Fill-in +#define MSG_UBL_SMART_FILLIN _UxGT("Lấp đầy thông minh") // Smart Fill-in +#define MSG_UBL_FILLIN_MESH _UxGT("Lưới lấp đầy") // Fill-in Mesh +#define MSG_UBL_INVALIDATE_ALL _UxGT("Bác bỏ tất cả") // Invalidate All +#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("Bác bỏ gần nhất") // Invalidate Closest +#define MSG_UBL_FINE_TUNE_ALL _UxGT("Chỉnh chính xác tất cả") // Fine Tune ALl +#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Chỉnh chính xác gần nhất") // Fine Tune Closest +#define MSG_UBL_STORAGE_MESH_MENU _UxGT("Lưu trữ lưới") // Mesh Storage +#define MSG_UBL_STORAGE_SLOT _UxGT("Khe nhớ") // Memory Slot +#define MSG_UBL_LOAD_MESH _UxGT("Tải lưới bàn") // Load Bed Mesh +#define MSG_UBL_SAVE_MESH _UxGT("Lưu lưới bàn") // Save Bed Mesh +#define MSG_MESH_LOADED _UxGT("%i lưới được nạp") // Mesh %i loaded +#define MSG_MESH_SAVED _UxGT("%i lưới đã lưu") +#define MSG_NO_STORAGE _UxGT("Không lưu trữ") // No Storage +#define MSG_UBL_SAVE_ERROR _UxGT("Điều sai: Lưu UBL") // Err: UBL Save +#define MSG_UBL_RESTORE_ERROR _UxGT("Điều Sai: Khôi Phục UBL") // Err: UBL Restore +#define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Đầu Dò-Z Đã Ngừng") // Z-Offset Stopped +#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("Bước-Từng-Bước UBL") // Step-By-Step UBL + +#define MSG_LED_CONTROL _UxGT("Điều khiển LED") // LED Control +#define MSG_LEDS _UxGT("Đèn") // Lights +#define MSG_LED_PRESETS _UxGT("Đèn định sẵn") // Light Presets +#define MSG_SET_LEDS_RED _UxGT("Đỏ") // Red +#define MSG_SET_LEDS_ORANGE _UxGT("Cam") // Orange +#define MSG_SET_LEDS_YELLOW _UxGT("Vàng") // Yellow +#define MSG_SET_LEDS_GREEN _UxGT("Xanh Lá") // Green +#define MSG_SET_LEDS_BLUE _UxGT("Xanh") // Blue +#define MSG_SET_LEDS_INDIGO _UxGT("Xanh Đậm") // Indigo +#define MSG_SET_LEDS_VIOLET _UxGT("Tím") // Violet +#define MSG_SET_LEDS_WHITE _UxGT("Trắng") // White +#define MSG_SET_LEDS_DEFAULT _UxGT("Mặc định") // Default +#define MSG_CUSTOM_LEDS _UxGT("Đèn Tự Chọn") // Custom Lights +#define MSG_INTENSITY_R _UxGT("Cường Độ Đỏ") // Red Intensity +#define MSG_INTENSITY_G _UxGT("Cường Độ Xanh Lá") // Green Intensity +#define MSG_INTENSITY_B _UxGT("Cường Độ Xanh") // Blue Intensity +#define MSG_INTENSITY_W _UxGT("Cường Độ Trắng") // White Intensity +#define MSG_LED_BRIGHTNESS _UxGT("độ sáng") // Brightness + +#define MSG_MOVING _UxGT("Di chuyển...") // Moving +#define MSG_FREE_XY _UxGT("Giải phóng XY") // Free XY +#define MSG_MOVE_X _UxGT("Di chuyển X") // Move X +#define MSG_MOVE_Y _UxGT("Di chuyển Y") +#define MSG_MOVE_Z _UxGT("Di chuyển Z") +#define MSG_MOVE_E _UxGT("Máy đùn") // Extruder +#define MSG_HOTEND_TOO_COLD _UxGT("Đầu nóng quá lạnh") // Hotend too cold +#define MSG_MOVE_01MM _UxGT("Di chuyển 0.1mm") // Move 0.1mm +#define MSG_MOVE_1MM _UxGT("Di chuyển 1mm") // Move 1mm +#define MSG_MOVE_10MM _UxGT("Di chuyển 10mm") // Move 10mm +#define MSG_SPEED _UxGT("Tốc độ") // Speed +#define MSG_BED_Z _UxGT("Z Bàn") +#define MSG_NOZZLE _UxGT("Đầu phun") // Nozzle +#define MSG_BED _UxGT("Bàn") // bed +#define MSG_FAN_SPEED _UxGT("Tốc độ quạt") // fan speed +#define MSG_EXTRA_FAN_SPEED _UxGT("Tốc độ quạt phụ") // Extra fan speed +#define MSG_FLOW _UxGT("Lưu Lượng") +#define MSG_CONTROL _UxGT("Điều khiển") // Control +#define MSG_MIN _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" Đa") // min +#define MSG_MAX _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" Thiểu") +#define MSG_FACTOR _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" Hệ Số") // factor +#define MSG_AUTOTEMP _UxGT("Nhiệt độ tự động") // Autotemp +#define MSG_LCD_ON _UxGT("Bật") // on +#define MSG_LCD_OFF _UxGT("Tắt") // off +#define MSG_PID_P _UxGT("PID-P") +#define MSG_PID_I _UxGT("PID-I") +#define MSG_PID_D _UxGT("PID-D") +#define MSG_PID_C _UxGT("PID-C") +#define MSG_SELECT _UxGT("Lựa") // Select +#define MSG_ACC _UxGT("Tăng Tốc") +#define MSG_JERK _UxGT("Giật") +#if IS_KINEMATIC + #define MSG_VA_JERK _UxGT("Giật-Va") + #define MSG_VB_JERK _UxGT("Giật-Vb") + #define MSG_VC_JERK _UxGT("Giật-Vc") +#else + #define MSG_VA_JERK _UxGT("Giật-Vx") + #define MSG_VB_JERK _UxGT("Giật-Vy") + #define MSG_VC_JERK _UxGT("Giật-Vz") +#endif +#define MSG_VE_JERK _UxGT("Giật-Ve") +#define MSG_JUNCTION_DEVIATION _UxGT("Độ Lệch Chỗ Giao") // Junction Dev +#define MSG_VELOCITY _UxGT("Vận tốc") // velocity +#define MSG_VMAX _UxGT("Vđa") // Vmax +#define MSG_VMIN _UxGT("Vthiểu") // Vmin +#define MSG_VTRAV_MIN _UxGT("Vchuyển thiểu") // VTrav min +#define MSG_ACCELERATION _UxGT("Sự tăng tốc") // Acceleration +#define MSG_AMAX _UxGT("Tăng tốc ca") // Amax +#define MSG_A_RETRACT _UxGT("TT-Rút") // A-retract +#define MSG_A_TRAVEL _UxGT("TT-Chuyển") // A-travel +#define MSG_STEPS_PER_MM _UxGT("Bước/mm") // Steps +#if IS_KINEMATIC + #define MSG_ASTEPS _UxGT("BướcA/mm") // Asteps/mm + #define MSG_BSTEPS _UxGT("BướcB/mm") + #define MSG_CSTEPS _UxGT("BướcC/mm") +#else + #define MSG_ASTEPS _UxGT("BướcX/mm") // Xsteps/mm + #define MSG_BSTEPS _UxGT("BướcY/mm") + #define MSG_CSTEPS _UxGT("BướcZ/mm") +#endif +#define MSG_ESTEPS _UxGT("BướcE/mm") +#define MSG_E1STEPS _UxGT("BướcE1/mm") +#define MSG_E2STEPS _UxGT("BướcE2/mm") +#define MSG_E3STEPS _UxGT("BướcE3/mm") +#define MSG_E4STEPS _UxGT("BướcE4/mm") +#define MSG_E5STEPS _UxGT("BướcE5/mm") +#define MSG_E6STEPS _UxGT("BướcE6/mm") +#define MSG_TEMPERATURE _UxGT("Nhiệt độ") // Temperature +#define MSG_MOTION _UxGT("Chuyển động") // Motion +#define MSG_FILAMENT _UxGT("Vật liệu in") // dây nhựa +#define MSG_VOLUMETRIC_ENABLED _UxGT("E bằng mm") MSG_CUBED // E in mm +#define MSG_FILAMENT_DIAM _UxGT("Đường kính nhựa") // Fil. Dai. +#define MSG_FILAMENT_UNLOAD _UxGT("Dỡ mm") // unload mm +#define MSG_FILAMENT_LOAD _UxGT("Nạp mm") +#define MSG_ADVANCE_K _UxGT("K Cấp Cao") // Advance K +#define MSG_CONTRAST _UxGT("Độ tương phản LCD") // LCD contrast +#define MSG_STORE_EEPROM _UxGT("Lưu các thiết lập") // Store settings +#define MSG_LOAD_EEPROM _UxGT("Tải các cài đặt") // Load settings +#define MSG_RESTORE_FAILSAFE _UxGT("Khôi phục phòng hư") // Restore failsafe +#define MSG_INIT_EEPROM _UxGT("Khởi Tạo EEPROM") // Initialize EEPROM +#define MSG_SD_UPDATE _UxGT("Cập Nhật SD") // SD Update +#define MSG_RESET_PRINTER _UxGT("Bặt Lại Máy In") +#define MSG_REFRESH _UxGT("Cập Nhật") // Refresh +#define MSG_WATCH _UxGT("Màn Hình Thông Tin") // Info screen +#define MSG_PREPARE _UxGT("Chuẩn bị") // Prepare +#define MSG_TUNE _UxGT("Điều Chỉnh") // Tune +#define MSG_PAUSE_PRINT _UxGT("Tạm dừng in") // Pause print +#define MSG_RESUME_PRINT _UxGT("Tiếp tục in") // Resume print +#define MSG_STOP_PRINT _UxGT("Ngừng in") // Stop print +#define MSG_OUTAGE_RECOVERY _UxGT("Phục Hồi Mất Điện") // Outage Recovery +#define MSG_CARD_MENU _UxGT("In từ SD") // Print from SD +#define MSG_NO_CARD _UxGT("Không có thẻ SD") // No SD card +#define MSG_DWELL _UxGT("Ngủ...") // Sleep +#define MSG_USERWAIT _UxGT("Nhấn để tiếp tục...") // Click to resume (same as 'continue') +#define MSG_PRINT_PAUSED _UxGT("In tạm dừng") // print paused +#define MSG_PRINTING _UxGT("Đang in...") // printing +#define MSG_PRINT_ABORTED _UxGT("In đã hủy bỏ") // Print aborted +#define MSG_NO_MOVE _UxGT("Không di chuyển.") // No move. +#define MSG_KILLED _UxGT("ĐÃ CHẾT. ") +#define MSG_STOPPED _UxGT("ĐÃ NGỪNG. ") +#define MSG_CONTROL_RETRACT _UxGT("Rút mm") // Retract mm +#define MSG_CONTROL_RETRACT_SWAP _UxGT("Rút Trao.mm") // Swap Re.mm +#define MSG_CONTROL_RETRACTF _UxGT("Rút V") +#define MSG_CONTROL_RETRACT_ZHOP _UxGT("Nhảy mm") // hop +#define MSG_CONTROL_RETRACT_RECOVER _UxGT("BỏRút mm") // UnRet mm +#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("BỏRút T mm") // S UnRet mm +#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("BỏRút V") // UnRet V +#define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("BỏRút T V") // S UnRet V +#define MSG_AUTORETRACT _UxGT("RútTựĐộng") // AutoRetr. +#define MSG_FILAMENT_SWAP_LENGTH _UxGT("Khoảng Cách Rút") // Retract Distance +#define MSG_TOOL_CHANGE _UxGT("Thay Đổi Công Cụ") // Tool Change +#define MSG_TOOL_CHANGE_ZLIFT _UxGT("Đưa Lên Z") // Z Raise +#define MSG_SINGLENOZZLE_PRIME_SPD _UxGT("Tốc Độ Tuôn Ra") // Prime Speed +#define MSG_SINGLENOZZLE_RETRACT_SPD _UxGT("Tốc Độ Rút Lại") // Retract Speed +#define MSG_FILAMENTCHANGE _UxGT("Thay dây nhựa") // change filament +#define MSG_FILAMENTLOAD _UxGT("Nạp dây nhựa") // load filament +#define MSG_FILAMENTUNLOAD _UxGT("Dỡ dây nhựa") // unload filament +#define MSG_FILAMENTUNLOAD_ALL _UxGT("Dỡ tất cả") // Unload All +#define MSG_INIT_SDCARD _UxGT("Khởi tạo thẻ SD ") // Init. SD card +#define MSG_CHANGE_SDCARD _UxGT("Thay thẻ SD") // Change SD card +#define MSG_ZPROBE_OUT _UxGT("Đầu Dò Z qua bàn") // Z Probe past bed +#define MSG_SKEW_FACTOR _UxGT("Hệ số nghiêng") // Skew Factor +#define MSG_BLTOUCH _UxGT("BLTOUCH") // BLTouch +#define MSG_BLTOUCH_SELFTEST _UxGT("Tự kiểm tra BLTOUCH ") // BLTouch Self-Test +#define MSG_BLTOUCH_RESET _UxGT("Bặt lại BLTouch") // Reset BLTouch +#define MSG_BLTOUCH_DEPLOY _UxGT("Đem BLTouch") // Deploy BLTouch +#define MSG_BLTOUCH_STOW _UxGT("Cất BLTouch") // Stow BLTouch +#define MSG_MANUAL_DEPLOY _UxGT("Đem Đầu Dò-Z") // Deploy Z-Probe +#define MSG_MANUAL_STOW _UxGT("Cất Đầu Dò-Z") // Stow Z-Probe +#define MSG_HOME _UxGT("Về nhà") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST +#define MSG_FIRST _UxGT("Trước") +#define MSG_ZPROBE_ZOFFSET _UxGT("Đầu Dò Bù Đắp Z") // Probe Z Offset +#define MSG_BABYSTEP_X _UxGT("Nhít X") // Babystep X +#define MSG_BABYSTEP_Y _UxGT("Nhít Y") +#define MSG_BABYSTEP_Z _UxGT("Nhít Z") +#define MSG_ENDSTOP_ABORT _UxGT("Hủy bỏ công tắc") // Endstop abort +#define MSG_HEATING_FAILED_LCD _UxGT("Sưởi đầu phun không thành công") // Heating failed +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Sưởi bàn không thành công") // Bed heating failed +#define MSG_ERR_REDUNDANT_TEMP _UxGT("Điều sai: nhiệt độ dư") // Err: REDUNDANT TEMP +#define MSG_THERMAL_RUNAWAY _UxGT("Vấn đề nhiệt") // THERMAL RUNAWAY | problem +#define MSG_THERMAL_RUNAWAY_BED _UxGT("Vấn đề nhiệt bàn") // BED THERMAL RUNAWAY +#define MSG_ERR_MAXTEMP _UxGT("Điều sai: nhiệt độ tối đa") // Err: MAXTEMP +#define MSG_ERR_MINTEMP _UxGT("Điều sai: nhiệt độ tối thiểu") // Err: MINTEMP +#define MSG_ERR_MAXTEMP_BED _UxGT("Điều sai: nhiệt độ bàn tối đa") // Err: MAXTEMP BED +#define MSG_ERR_MINTEMP_BED _UxGT("Điều sai: nhiệt độ bàn tối thiểu") // Err: MINTEMP BED +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST +#define MSG_HALTED _UxGT("MÁY IN ĐÃ DỪNG LẠI") // PRINTER HALTED +#define MSG_PLEASE_RESET _UxGT("Xin bặt lại") // Please reset +#define MSG_SHORT_DAY _UxGT("n") // d - ngày - One character only +#define MSG_SHORT_HOUR _UxGT("g") // h - giờ - One character only +#define MSG_SHORT_MINUTE _UxGT("p") // m - phút - One character only +#define MSG_HEATING _UxGT("Đang sưởi nóng...") // heating +#define MSG_COOLING _UxGT("Đang làm nguội...") // cooling +#define MSG_BED_HEATING _UxGT("Đang sưởi nong bàn...") // bed heating +#define MSG_BED_COOLING _UxGT("Đang làm nguội bàn...") // bed cooling +#define MSG_DELTA_CALIBRATE _UxGT("Cân Chỉnh Delta") // Delta calibration +#define MSG_DELTA_CALIBRATE_X _UxGT("Chỉnh X lại") +#define MSG_DELTA_CALIBRATE_Y _UxGT("Chỉnh Y lại") +#define MSG_DELTA_CALIBRATE_Z _UxGT("Chỉnh Z lại") +#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Chỉnh Z Center") // Calibrate Center +#define MSG_DELTA_SETTINGS _UxGT("Cài Đặt Delta") // Delta Settings +#define MSG_DELTA_AUTO_CALIBRATE _UxGT("Cân Chỉnh Tự Động") // Auto Calibration +#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Đặt Chiều Cao Delta") // Set Delta Height +#define MSG_DELTA_Z_OFFSET_CALIBRATE _UxGT("Đầu Dò Z-Bù Đắp") // Probe Z-offset +#define MSG_DELTA_DIAG_ROD _UxGT("Gậy Chéo") // Diag Rod +#define MSG_DELTA_HEIGHT _UxGT("Chiều Cao") // Height +#define MSG_DELTA_RADIUS _UxGT("Bán Kính") // Radius +#define MSG_INFO_MENU _UxGT("Về Máy In") +#define MSG_INFO_PRINTER_MENU _UxGT("Thông Tin Máy In") // Printer Info +#define MSG_3POINT_LEVELING _UxGT("San lấp 3-Điểm") // 3-Point Leveling +#define MSG_LINEAR_LEVELING _UxGT("San Lấp Tuyến Tính") // Linear Leveling +#define MSG_BILINEAR_LEVELING _UxGT("San Lấp Song Tuyến") // Bilinear Leveling +#define MSG_UBL_LEVELING _UxGT("San Lấp Bàn Thống Nhất") // Unified Bed Leveling +#define MSG_MESH_LEVELING _UxGT("Lưới San Lấp") // Mesh Leveling +#define MSG_INFO_STATS_MENU _UxGT("Thống Kê Máy In") // Printer Stats +#define MSG_INFO_BOARD_MENU _UxGT("Thông Tin Bo Mạch") // Board Info +#define MSG_INFO_THERMISTOR_MENU _UxGT("Điện Trở Nhiệt") // Thermistors +#define MSG_INFO_EXTRUDERS _UxGT("Máy đùn") // Extruders +#define MSG_INFO_BAUDRATE _UxGT("Baud") // Baud +#define MSG_INFO_PROTOCOL _UxGT("Giao Thức") // Protocol +#define MSG_CASE_LIGHT _UxGT("Đèn Khuông") // Case light +#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Độ Sáng") // Light Brightness +#if LCD_WIDTH >= 20 + #define MSG_INFO_PRINT_COUNT _UxGT("Số In") // Print Count + #define MSG_INFO_COMPLETED_PRINTS _UxGT("Đã hoàn thành") + #define MSG_INFO_PRINT_TIME _UxGT("Tổng số thời gian in") // Total print time + #define MSG_INFO_PRINT_LONGEST _UxGT("Thời gian việc lâu nhất") // Longest job time + #define MSG_INFO_PRINT_FILAMENT _UxGT("Tổng số đùn") // Extruded total +#else + #define MSG_INFO_PRINT_COUNT _UxGT("In") // prints + #define MSG_INFO_COMPLETED_PRINTS _UxGT("Đã hoàn thành") // Completed + #define MSG_INFO_PRINT_TIME _UxGT("Tổng số") // total + #define MSG_INFO_PRINT_LONGEST _UxGT("Dài nhất") // Longest + #define MSG_INFO_PRINT_FILAMENT _UxGT("Đã ép đùn") +#endif +#define MSG_INFO_MIN_TEMP _UxGT("Nhiệt độ tối thiểu") // Min Temp +#define MSG_INFO_MAX_TEMP _UxGT("Nhiệt độ tối đa") // Max temp +#define MSG_INFO_PSU _UxGT("Bộ nguồn") // PSU +#define MSG_DRIVE_STRENGTH _UxGT("Sức mạnh ổ đĩa") // Drive Strength +#define MSG_DAC_PERCENT _UxGT("% trình điều khiển") // Driver % +#define MSG_DAC_EEPROM_WRITE _UxGT("Ghi DAC EEPROM") // DAC EEPROM Write +#define MSG_FILAMENT_CHANGE_HEADER_PAUSE _UxGT("In tạm dừng") // PRINT PAUSED +#define MSG_FILAMENT_CHANGE_HEADER_LOAD _UxGT("Nạp dây nhựa") +#define MSG_FILAMENT_CHANGE_HEADER_UNLOAD _UxGT("Dỡ dây nhựa") // unload filament +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Tùy chọn hồi phục:") // RESUME OPTIONS +#define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Xả thêm") // Purge more +#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Tiếp tục") // continue +#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Đầu Phun: ") // Nozzle +#define MSG_RUNOUT_SENSOR_ENABLE _UxGT("Cảm Biến Hết") // Runout Sensor +#define MSG_ERR_HOMING_FAILED _UxGT("Sự nhà không thành công") // Homing failed +#define MSG_ERR_PROBING_FAILED _UxGT(" không thành công") // Probing failed +#define MSG_M600_TOO_COLD _UxGT("M600: Quá lạnh") + +// +// Filament Change screens show up to 3 lines on a 4-line display +// ...or up to 2 lines on a 3-line display +// +#if LCD_HEIGHT >= 4 + #define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Nhấn nút") // Press button + #define MSG_ADVANCED_PAUSE_WAITING_2 _UxGT("để tiếp tục in") // to resume print + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Chờ cho sự") // wait for + #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("thay đổi dây nhựa") // filament change + #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("bắt đầu") // to start + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Đút dây nhựa vào") // insert filament + #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("và nhấn nút") // and press button + #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("để tiếp tục") // to continue + #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Nhấn nút") // Press button + #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("để làm nóng đầu phun") // to heat nozzle + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Đầu phun đang nóng lên") // Nozzle heating + #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Xin chờ...") // Please wait + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Chờ tro") // Wait for + #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("dây nhựa ra") // filament unload + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Chờ tro") + #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("dây nhựa vào") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Chờ tro") // wait for filament purge + #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("xả dây nhựa") + #define MSG_FILAMENT_CHANGE_CONT_PURGE_1 _UxGT("Nhấn nút để kết thúc") // Click to finish + #define MSG_FILAMENT_CHANGE_CONT_PURGE_2 _UxGT("xả dây nhựa") // dây nhựa purge + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Chờ tro in") // Wait for print to resume + #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("tiếp tục...") +#else // LCD_HEIGHT < 4 + #define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Nhấn nút để tiếp tục") // Click to continue + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Xin chờ...") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Chèn và nhấn") // Insert and Click + #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Nhấn để sưởi") // Click to heat + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Đang sưởi nóng") // Heating + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Đang dỡ ra...") // Ejecting + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Đang nạp...") // Loading + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Đang xả...") // Purging + #define MSG_FILAMENT_CHANGE_CONT_PURGE_1 _UxGT("Nhấn nút để kết thúc") // Click to finish + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Đang tiếp tục...") // Resuming +#endif // LCD_HEIGHT < 4 + +#define MSG_TMC_DRIVERS _UxGT("Trình điều khiển TMC") // TMC drivers +#define MSG_TMC_CURRENT _UxGT("Dòng điện trình điều khiển") // Driver current +#define MSG_TMC_HYBRID_THRS _UxGT("Ngưỡng Hỗn Hợp") // Hybrid threshold +#define MSG_TMC_HOMING_THRS _UxGT("Vô cảm biến") // Sensorless homing +#define MSG_TMC_STEPPING_MODE _UxGT("Chế độ từng bước") // Stepping mode +#define MSG_TMC_STEALTH_ENABLED _UxGT("CắtTàngHình được kích hoạt") // StealthChop enabled diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 19ef300564ac..bad55c974f9e 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -33,8 +33,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT("已就绪.") //" ready." #define MSG_BACK _UxGT("返回") // ”Back“ -#define MSG_SD_INSERTED _UxGT("存储卡已插入") //"Card inserted" -#define MSG_SD_REMOVED _UxGT("存储卡被拔出") //"Card removed" +#define MSG_MEDIA_INSERTED _UxGT("存储卡已插入") //"Card inserted" +#define MSG_MEDIA_REMOVED _UxGT("存储卡被拔出") //"Card removed" #define MSG_LCD_ENDSTOPS _UxGT("挡块") //"Endstops" // Max length 8 characters #define MSG_MAIN _UxGT("主菜单") //"Main" #define MSG_AUTOSTART _UxGT("自动开始") //"Autostart" @@ -243,8 +243,8 @@ #define MSG_PAUSE_PRINT _UxGT("暂停打印") //"Pause print" #define MSG_RESUME_PRINT _UxGT("恢复打印") //"Resume print" #define MSG_STOP_PRINT _UxGT("停止打印") //"Stop print" -#define MSG_CARD_MENU _UxGT("从存储卡上打印") //"Print from SD" -#define MSG_NO_CARD _UxGT("无存储卡") //"No SD card" +#define MSG_MEDIA_MENU _UxGT("从存储卡上打印") //"Print from SD" +#define MSG_NO_MEDIA _UxGT("无存储卡") //"No SD card" #define MSG_DWELL _UxGT("休眠中 ...") //"Sleep..." #define MSG_USERWAIT _UxGT("点击继续 ...") //"Click to resume..." #define MSG_PRINT_PAUSED _UxGT("暫停打印") // "Print paused" @@ -265,8 +265,8 @@ #define MSG_FILAMENTLOAD _UxGT("装载丝料") // "Load filament" #define MSG_FILAMENTUNLOAD _UxGT("卸载丝料") // "Unload filament" #define MSG_FILAMENTUNLOAD_ALL _UxGT("卸载全部") // "Unload All" -#define MSG_INIT_SDCARD _UxGT("初始化存储卡") //"Init. SD card" -#define MSG_CHANGE_SDCARD _UxGT("更换存储卡") //"Change SD card" +#define MSG_INIT_MEDIA _UxGT("初始化存储卡") //"Init. SD card" +#define MSG_CHANGE_MEDIA _UxGT("更换存储卡") //"Change SD card" #define MSG_ZPROBE_OUT _UxGT("Z探针在热床之外") //"Z probe out. bed" Z probe is not within the physical limits #define MSG_SKEW_FACTOR _UxGT("偏斜因数") // "Skew Factor" #define MSG_BLTOUCH _UxGT("BLTouch") // "BLTouch" @@ -323,6 +323,8 @@ #define MSG_CASE_LIGHT _UxGT("外壳灯") // "Case light" #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("灯亮度") // "Light BRIGHTNESS" +#define MSG_EXPECTED_PRINTER _UxGT("打印机不正确") // "The printer is incorrect" + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("打印计数") //"Print Count" #define MSG_INFO_COMPLETED_PRINTS _UxGT("完成了") //"Completed" diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index ed1e40ceed85..e9e871ac2a18 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -33,8 +33,8 @@ #define WELCOME_MSG MACHINE_NAME _UxGT("已就緒.") //" ready." #define MSG_BACK _UxGT("返回") // ”Back“ -#define MSG_SD_INSERTED _UxGT("記憶卡已插入") //"Card inserted" -#define MSG_SD_REMOVED _UxGT("記憶卡被拔出") //"Card removed" +#define MSG_MEDIA_INSERTED _UxGT("記憶卡已插入") //"Card inserted" +#define MSG_MEDIA_REMOVED _UxGT("記憶卡被拔出") //"Card removed" #define MSG_LCD_ENDSTOPS _UxGT("擋塊") //"Endstops" // Max length 8 characters #define MSG_MAIN _UxGT("主選單") //"Main" #define MSG_AUTOSTART _UxGT("自動開始") //"Autostart" @@ -243,8 +243,8 @@ #define MSG_PAUSE_PRINT _UxGT("暫停列印") //"Pause print" #define MSG_RESUME_PRINT _UxGT("恢復列印") //"Resume print" #define MSG_STOP_PRINT _UxGT("停止列印") //"Stop print" -#define MSG_CARD_MENU _UxGT("從記憶卡上列印") //"Print from SD" -#define MSG_NO_CARD _UxGT("無記憶卡") //"No SD card" +#define MSG_MEDIA_MENU _UxGT("從記憶卡上列印") //"Print from SD" +#define MSG_NO_MEDIA _UxGT("無記憶卡") //"No SD card" #define MSG_DWELL _UxGT("休眠 ...") //"Sleep..." #define MSG_USERWAIT _UxGT("點擊繼續 ...") //"Click to resume..." #define MSG_PRINT_PAUSED _UxGT("列印已暫停") // "Print paused" @@ -265,8 +265,8 @@ #define MSG_FILAMENTLOAD _UxGT("裝載絲料") // "Load filament" #define MSG_FILAMENTUNLOAD _UxGT("卸載絲料") // "Unload filament" #define MSG_FILAMENTUNLOAD_ALL _UxGT("卸載全部") // "Unload All" -#define MSG_INIT_SDCARD _UxGT("初始化記憶卡") //"Init. SD card" -#define MSG_CHANGE_SDCARD _UxGT("更換記憶卡") //"Change SD card" +#define MSG_INIT_MEDIA _UxGT("初始化記憶卡") //"Init. SD card" +#define MSG_CHANGE_MEDIA _UxGT("更換記憶卡") //"Change SD card" #define MSG_ZPROBE_OUT _UxGT("Z探針在熱床之外") //"Z probe out. bed" Z probe is not within the physical limits #define MSG_SKEW_FACTOR _UxGT("偏斜因數") // "Skew Factor" #define MSG_BLTOUCH _UxGT("BLTouch") // "BLTouch" @@ -323,6 +323,8 @@ #define MSG_CASE_LIGHT _UxGT("外殼燈") // "Case light" #define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("燈亮度") // "Light BRIGHTNESS" +#define MSG_EXPECTED_PRINTER _UxGT("打印機不正確") // "The printer is incorrect" + #if LCD_WIDTH >= 20 #define MSG_INFO_PRINT_COUNT _UxGT("列印計數") //"Print Count" #define MSG_INFO_COMPLETED_PRINTS _UxGT("已完成") //"Completed" diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index 59cd5468550e..9e9d6418d5c9 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -14,8 +14,10 @@ #if HAS_GRAPHICAL_LCD #include "dogm/u8g_fontutf8.h" + typedef u8g_uint_t lcd_uint_t; #else #define _UxGT(a) a + typedef uint8_t lcd_uint_t; #endif #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u) @@ -36,6 +38,11 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length); */ int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length); +/** + * Set the print baseline position + */ +void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row); + /** * @brief Draw a ROM UTF-8 string * @@ -47,13 +54,19 @@ int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length); * Draw a ROM UTF-8 string */ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length); - -void lcd_moveto(const uint8_t col, const uint8_t row); +inline int lcd_put_u8str_max_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P utf8_str_P, pixel_len_t max_length) { + lcd_moveto(col, row); + return lcd_put_u8str_max_P(utf8_str_P, max_length); +} void lcd_put_int(const int i); +inline void lcd_put_int(const lcd_uint_t col, const lcd_uint_t row, const int i) { lcd_moveto(col, row); lcd_put_int(i); } inline int lcd_put_u8str_P(PGM_P str) { return lcd_put_u8str_max_P(str, PIXEL_LEN_NOLIMIT); } +inline int lcd_put_u8str_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P str) { lcd_moveto(col, row); return lcd_put_u8str_P(str); } inline int lcd_put_u8str(const char* str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); } +inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, PGM_P str) { lcd_moveto(col, row); return lcd_put_u8str(str); } inline int lcd_put_wchar(const wchar_t c) { return lcd_put_wchar_max(c, PIXEL_LEN_NOLIMIT); } +inline int lcd_put_wchar(const lcd_uint_t col, const lcd_uint_t row, const wchar_t c) { lcd_moveto(col, row); return lcd_put_wchar(c); } diff --git a/Marlin/src/lcd/menu/game/brickout.cpp b/Marlin/src/lcd/menu/game/brickout.cpp index b13649ca9e92..921a6f6e3081 100644 --- a/Marlin/src/lcd/menu/game/brickout.cpp +++ b/Marlin/src/lcd/menu/game/brickout.cpp @@ -180,8 +180,7 @@ void BrickoutGame::game_screen() { // Score Digits //const uint8_t sx = (LCD_PIXEL_WIDTH - (score >= 10 ? score >= 100 ? score >= 1000 ? 4 : 3 : 2 : 1) * MENU_FONT_WIDTH) / 2; constexpr uint8_t sx = 0; - lcd_moveto(sx, MENU_FONT_ASCENT - 1); - lcd_put_int(score); + lcd_put_int(sx, MENU_FONT_ASCENT - 1, score); // Balls Left lcd_moveto(LCD_PIXEL_WIDTH - MENU_FONT_WIDTH * 3, MENU_FONT_ASCENT - 1); diff --git a/Marlin/src/lcd/menu/game/game.cpp b/Marlin/src/lcd/menu/game/game.cpp index 1f1982615a04..6f8d24769299 100644 --- a/Marlin/src/lcd/menu/game/game.cpp +++ b/Marlin/src/lcd/menu/game/game.cpp @@ -48,10 +48,7 @@ void MarlinGame::draw_game_over() { u8g.setColorIndex(0); u8g.drawBox(lx - 1, ly - gohigh - 1, gowide + 2, gohigh + 2); u8g.setColorIndex(1); - if (ui.get_blink()) { - lcd_moveto(lx, ly); - lcd_put_u8str_P(PSTR("GAME OVER")); - } + if (ui.get_blink()) lcd_put_u8str_P(lx, ly, PSTR("GAME OVER")); } } diff --git a/Marlin/src/lcd/menu/game/invaders.cpp b/Marlin/src/lcd/menu/game/invaders.cpp index c183867eac28..4517c5f43c4b 100644 --- a/Marlin/src/lcd/menu/game/invaders.cpp +++ b/Marlin/src/lcd/menu/game/invaders.cpp @@ -416,8 +416,7 @@ void InvadersGame::game_screen() { // Draw Score //const uint8_t sx = (LCD_PIXEL_WIDTH - (score >= 10 ? score >= 100 ? score >= 1000 ? 4 : 3 : 2 : 1) * MENU_FONT_WIDTH) / 2; constexpr uint8_t sx = 0; - lcd_moveto(sx, MENU_FONT_ASCENT - 1); - lcd_put_int(score); + lcd_put_int(sx, MENU_FONT_ASCENT - 1, score); // Draw lives if (idat.cannons_left) diff --git a/Marlin/src/lcd/menu/game/maze.cpp b/Marlin/src/lcd/menu/game/maze.cpp index bb07ce0d6428..13784f0d76c0 100644 --- a/Marlin/src/lcd/menu/game/maze.cpp +++ b/Marlin/src/lcd/menu/game/maze.cpp @@ -80,10 +80,7 @@ void MazeGame::game_screen() { u8g.setColorIndex(1); // Draw Score - if (PAGE_UNDER(HEADER_H)) { - lcd_moveto(0, HEADER_H - 1); - lcd_put_int(score); - } + if (PAGE_UNDER(HEADER_H)) lcd_put_int(0, HEADER_H - 1, score); // Draw the maze // for (uint8_t n = 0; n < head_ind; ++n) { diff --git a/Marlin/src/lcd/menu/game/snake.cpp b/Marlin/src/lcd/menu/game/snake.cpp index f12a8b3959dd..713c2ddd74ff 100644 --- a/Marlin/src/lcd/menu/game/snake.cpp +++ b/Marlin/src/lcd/menu/game/snake.cpp @@ -231,10 +231,7 @@ void SnakeGame::game_screen() { u8g.setColorIndex(1); // Draw Score - if (PAGE_UNDER(HEADER_H)) { - lcd_moveto(0, HEADER_H - 1); - lcd_put_int(score); - } + if (PAGE_UNDER(HEADER_H)) lcd_put_int(0, HEADER_H - 1, score); // DRAW THE PLAYFIELD BORDER u8g.drawFrame(BOARD_L - 2, BOARD_T - 2, BOARD_R - BOARD_L + 4, BOARD_B - BOARD_T + 4); diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 9bea6c1352a0..5f6db8196d69 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -88,10 +88,21 @@ void MarlinUI::save_previous_screen() { screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items }; } -void MarlinUI::goto_previous_screen() { +void MarlinUI::goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + const bool is_back/*=false*/ + #endif +) { + #if DISABLED(TURBO_BACK_MENU_ITEM) + constexpr bool is_back = false; + #endif if (screen_history_depth > 0) { menuPosition &sh = screen_history[--screen_history_depth]; - goto_screen(sh.menu_function, sh.encoder_position, sh.top_line, sh.items); + goto_screen(sh.menu_function, + is_back ? 0 : sh.encoder_position, + is_back ? 0 : sh.top_line, + sh.items + ); } else return_to_status(); @@ -442,12 +453,14 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { #if HAS_BUZZER ui.completion_feedback(saved); #endif + UNUSED(saved); } void lcd_load_settings() { const bool loaded = settings.load(); #if HAS_BUZZER ui.completion_feedback(loaded); #endif + UNUSED(loaded); } #endif diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index b1b2bba162d9..da1b9a7a73a9 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -46,7 +46,7 @@ bool printer_busy(); static inline char* strfunc(const float value) { return STRFUNC((TYPE) value); } \ }; -DECLARE_MENU_EDIT_TYPE(uint8_t, percent, ui8tostr4pct, 1 ); // 100% right-justified +DECLARE_MENU_EDIT_TYPE(uint8_t, percent, ui8tostr4pct, 100.0/255); // 100% right-justified DECLARE_MENU_EDIT_TYPE(int16_t, int3, i16tostr3, 1 ); // 123, -12 right-justified DECLARE_MENU_EDIT_TYPE(int16_t, int4, i16tostr4sign, 1 ); // 1234, -123 right-justified DECLARE_MENU_EDIT_TYPE(int8_t, int8, i8tostr3, 1 ); // 123, -12 right-justified @@ -144,7 +144,13 @@ DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(long5_25); // 12345 right-justif class MenuItem_back { public: - static inline void action() { ui.goto_previous_screen(); } + static inline void action() { + ui.goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + true + #endif + ); + } }; class MenuItem_submenu { @@ -351,7 +357,7 @@ void menu_main(); void menu_move(); #if ENABLED(SDSUPPORT) - void menu_sdcard(); + void menu_media(); #endif // First Fan Speed title in "Tune" and "Control>Temperature" menus diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 1dbd33ef21d7..0d8a562d9aab 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -567,14 +567,14 @@ void menu_backlash(); START_MENU(); MENU_BACK(MSG_ADVANCED_SETTINGS); - #define EDIT_QSTEPS(Q) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float5, MSG_##Q##STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, _planner_refresh_positioning) + #define EDIT_QSTEPS(Q) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_##Q##STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, _planner_refresh_positioning) EDIT_QSTEPS(A); EDIT_QSTEPS(B); EDIT_QSTEPS(C); #if ENABLED(DISTINCT_E_FACTORS) - #define EDIT_ESTEPS(N,E) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float5, MSG_E##N##STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(E)], 5, 9999, _planner_refresh_e##E##_positioning) - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float5, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, _planner_refresh_positioning); + #define EDIT_ESTEPS(N,E) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_E##N##STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(E)], 5, 9999, _planner_refresh_e##E##_positioning) + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, _planner_refresh_positioning); EDIT_ESTEPS(1,0); EDIT_ESTEPS(2,1); #if E_STEPPERS > 2 @@ -590,7 +590,7 @@ void menu_backlash(); #endif // E_STEPPERS > 3 #endif // E_STEPPERS > 2 #elif E_STEPPERS - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float5, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); #endif END_MENU(); @@ -608,6 +608,7 @@ void menu_backlash(); #if HAS_BUZZER ui.completion_feedback(inited); #endif + UNUSED(inited); }, ui.goto_previous_screen, PSTR(MSG_INIT_EEPROM), nullptr, PSTR("?") @@ -699,7 +700,7 @@ void menu_advanced_settings() { #if ENABLED(SD_FIRMWARE_UPDATE) bool sd_update_state = settings.sd_update_status(); - MENU_ITEM_EDIT_CALLBACK(bool, MSG_SD_UPDATE, &sd_update_state, []{ + MENU_ITEM_EDIT_CALLBACK(bool, MSG_MEDIA_UPDATE, &sd_update_state, []{ // // Toggle the SD Firmware Update state in EEPROM // diff --git a/Marlin/src/lcd/menu/menu_cnc.cpp b/Marlin/src/lcd/menu/menu_cnc.cpp index 0aaa01a56292..c3189d8a10db 100644 --- a/Marlin/src/lcd/menu/menu_cnc.cpp +++ b/Marlin/src/lcd/menu/menu_cnc.cpp @@ -1041,9 +1041,9 @@ void menu_cnc_scan() { card.getfilename_sorted(nr); if (card.flag.filenameIsDir) - MENU_ITEM(sdfolder, MSG_CARD_MENU, card); + MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card); else - MENU_ITEM(sdfile, MSG_CARD_MENU, card); + MENU_ITEM(sdfile, MSG_MEDIA_MENU, card); } else { MENU_ITEM_DUMMY(); diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 29ab1a171684..0bc3963f290d 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -76,8 +76,7 @@ static void lcd_factory_settings() { LIMIT(bar_percent, 0, 100); ui.encoderPosition = 0; draw_menu_item_static(0, PSTR(MSG_PROGRESS_BAR_TEST), true, true); - lcd_moveto((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2); - lcd_put_int(bar_percent); lcd_put_wchar('%'); + lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%'); lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent); } @@ -148,9 +147,9 @@ static void lcd_factory_settings() { #if ENABLED(DUAL_X_CARRIAGE) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); #else - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], -10.0, 10.0, _recalc_offsets); + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], -99.0, 99.0, _recalc_offsets); #endif - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_Y_OFFSET, &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_offsets); + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_Y_OFFSET, &hotend_offset[Y_AXIS][1], -99.0, 99.0, _recalc_offsets); MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_Z_OFFSET, &hotend_offset[Z_AXIS][1], Z_PROBE_LOW_POINT, 10.0, _recalc_offsets); #if ENABLED(EEPROM_SETTINGS) MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index a4770d0f86c3..b8232ba38880 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -36,6 +36,10 @@ #include "../../feature/bedlevel/bedlevel.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../../lcd/extensible_ui/ui_api.h" +#endif + void _man_probe_pt(const float &rx, const float &ry) { do_blocking_move_to(rx, ry, Z_CLEARANCE_BETWEEN_PROBES); ui.synchronize(); @@ -55,6 +59,9 @@ void _man_probe_pt(const float &rx, const float &ry) { #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("Delta Calibration in progress")); + #endif while (wait_for_user) idle(); ui.goto_previous_screen_no_defer(); return current_position[Z_AXIS]; diff --git a/Marlin/src/lcd/menu/menu_game.cpp b/Marlin/src/lcd/menu/menu_game.cpp index f5eb60a87961..36b7f18314de 100644 --- a/Marlin/src/lcd/menu/menu_game.cpp +++ b/Marlin/src/lcd/menu/menu_game.cpp @@ -46,4 +46,3 @@ void menu_game() { } #endif // HAS_GAME_MENU - diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 08edaea438d4..9fe2ea6108e9 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -42,7 +42,11 @@ // About Printer > Printer Stats // void menu_info_stats() { - if (ui.use_click()) return ui.goto_previous_screen(); + if (ui.use_click()) return ui.goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + true + #endif + ); char buffer[21]; printStatistics stats = print_job_timer.getStats(); @@ -95,7 +99,11 @@ // About Printer > Thermistors // void menu_info_thermistors() { - if (ui.use_click()) return ui.goto_previous_screen(); + if (ui.use_click()) return ui.goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + true + #endif + ); START_SCREEN(); #define THERMISTOR_ID TEMP_SENSOR_0 #include "../thermistornames.h" @@ -163,11 +171,18 @@ void menu_info_thermistors() { // About Printer > Board Info // void menu_info_board() { - if (ui.use_click()) return ui.goto_previous_screen(); + if (ui.use_click()) return ui.goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + true + #endif + ); START_SCREEN(); - STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController - STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 + STATIC_ITEM(BOARD_INFO_NAME, true, true); // MyPrinterController + #ifdef BOARD_WEBSITE_URL + STATIC_ITEM(BOARD_WEBSITE_URL, false, false); // www.my3dprinter.com + #endif + STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 + STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 STATIC_ITEM(MSG_INFO_PSU ": " PSU_NAME, true); END_SCREEN(); } @@ -175,9 +190,28 @@ void menu_info_board() { // // About Printer > Printer Info // -#if DISABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) +#if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) + + void menu_show_marlin_bootscreen() { + if (ui.use_click()) { ui.goto_previous_screen_no_defer(); } + ui.draw_marlin_bootscreen(); + } + + #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) + void menu_show_custom_bootscreen() { + if (ui.use_click()) { ui.goto_screen(menu_show_marlin_bootscreen); } + ui.draw_custom_bootscreen(); + } + #endif + +#else + void menu_info_printer() { - if (ui.use_click()) return ui.goto_previous_screen(); + if (ui.use_click()) return ui.goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + true + #endif + ); START_SCREEN(); STATIC_ITEM(MSG_MARLIN, true, true); // Marlin STATIC_ITEM(SHORT_BUILD_VERSION, true); // x.x.x-Branch @@ -198,19 +232,8 @@ void menu_info_board() { #endif END_SCREEN(); } -#else - void menu_show_marlin_bootscreen() { - if (ui.use_click()) { ui.goto_previous_screen_no_defer(); } - ui.draw_marlin_bootscreen(); - } - #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) - void menu_show_custom_bootscreen() { - if (ui.use_click()) { ui.goto_screen(menu_show_marlin_bootscreen); } - ui.draw_custom_bootscreen(); - } - #endif -#endif // LCD_PRINTER_INFO_IS_BOOTSCREEN +#endif // // "About Printer" submenu @@ -240,6 +263,7 @@ void menu_info() { #if ENABLED(GAMES_EASTER_EGG) MENU_ITEM_DUMMY(); MENU_ITEM_DUMMY(); + MENU_ITEM_DUMMY(); #endif MENU_ITEM(submenu, MSG_GAMES, ( #if HAS_GAME_MENU diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 49f9ca948336..3dedc1af3c42 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -89,7 +89,7 @@ void menu_configuration(); void menu_mixer(); #endif -#if HAS_SERVICE_INTERVALS && ENABLED(PRINTCOUNTER) +#if HAS_SERVICE_INTERVALS #if SERVICE_INTERVAL_1 > 0 void menu_service1(); #endif @@ -132,22 +132,22 @@ void menu_main() { if (card_detected) { if (!card_open) { - MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard); + MENU_ITEM(submenu, MSG_MEDIA_MENU, menu_media); MENU_ITEM(gcode, #if PIN_EXISTS(SD_DETECT) - MSG_CHANGE_SDCARD, PSTR("M21") + MSG_CHANGE_MEDIA, PSTR("M21") #else - MSG_RELEASE_SDCARD, PSTR("M22") + MSG_RELEASE_MEDIA, PSTR("M22") #endif ); } } else { #if PIN_EXISTS(SD_DETECT) - MENU_ITEM(function, MSG_NO_CARD, nullptr); + MENU_ITEM(function, MSG_NO_MEDIA, nullptr); #else - MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); - MENU_ITEM(function, MSG_SD_RELEASED, nullptr); + MENU_ITEM(gcode, MSG_INIT_MEDIA, PSTR("M21")); + MENU_ITEM(function, MSG_MEDIA_RELEASED, nullptr); #endif } #endif // !HAS_ENCODER_WHEEL && SDSUPPORT @@ -232,25 +232,25 @@ void menu_main() { if (!card_open) { MENU_ITEM(gcode, #if PIN_EXISTS(SD_DETECT) - MSG_CHANGE_SDCARD, PSTR("M21") + MSG_CHANGE_MEDIA, PSTR("M21") #else - MSG_RELEASE_SDCARD, PSTR("M22") + MSG_RELEASE_MEDIA, PSTR("M22") #endif ); - MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard); + MENU_ITEM(submenu, MSG_MEDIA_MENU, menu_media); } } else { #if PIN_EXISTS(SD_DETECT) - MENU_ITEM(function, MSG_NO_CARD, nullptr); + MENU_ITEM(function, MSG_NO_MEDIA, nullptr); #else - MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); - MENU_ITEM(function, MSG_SD_RELEASED, nullptr); + MENU_ITEM(gcode, MSG_INIT_MEDIA, PSTR("M21")); + MENU_ITEM(function, MSG_MEDIA_RELEASED, nullptr); #endif } #endif // HAS_ENCODER_WHEEL && SDSUPPORT - #if HAS_SERVICE_INTERVALS && ENABLED(PRINTCOUNTER) + #if HAS_SERVICE_INTERVALS #if SERVICE_INTERVAL_1 > 0 MENU_ITEM(submenu, SERVICE_NAME_1, menu_service1); #endif diff --git a/Marlin/src/lcd/menu/menu_sdcard.cpp b/Marlin/src/lcd/menu/menu_media.cpp similarity index 95% rename from Marlin/src/lcd/menu/menu_sdcard.cpp rename to Marlin/src/lcd/menu/menu_media.cpp index 894d9288a94a..037f98531bb6 100644 --- a/Marlin/src/lcd/menu/menu_sdcard.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -62,7 +62,7 @@ void lcd_sd_updir() { // ui.drawing_screen = screen_changed = true; //#endif - goto_screen(menu_sdcard, sd_encoder_position, sd_top_line, sd_items); + goto_screen(menu_media, sd_encoder_position, sd_top_line, sd_items); sd_encoder_position = 0xFFFF; defer_status_screen(); @@ -122,7 +122,7 @@ class MenuItem_sdfolder { } }; -void menu_sdcard() { +void menu_media() { ui.encoder_direction_menus(); const uint16_t fileCnt = card.get_num_Files(); @@ -149,9 +149,9 @@ void menu_sdcard() { card.getfilename_sorted(nr); if (card.flag.filenameIsDir) - MENU_ITEM(sdfolder, MSG_CARD_MENU, card); + MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card); else - MENU_ITEM(sdfile, MSG_CARD_MENU, card); + MENU_ITEM(sdfile, MSG_MEDIA_MENU, card); } else { MENU_ITEM_DUMMY(); diff --git a/Marlin/src/lcd/menu/menu_service.cpp b/Marlin/src/lcd/menu/menu_service.cpp index 6eee17814310..fb7f05c90567 100644 --- a/Marlin/src/lcd/menu/menu_service.cpp +++ b/Marlin/src/lcd/menu/menu_service.cpp @@ -26,39 +26,57 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_LCD_MENU && HAS_SERVICE_INTERVALS && ENABLED(PRINTCOUNTER) +#if HAS_LCD_MENU && HAS_SERVICE_INTERVALS #include "menu.h" #include "../../module/printcounter.h" -inline void _menu_service(const int index, PGM_P const name) { - char sram[30]; - strncpy_P(sram, name, 29); - do_select_screen( - PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL), - []{ - print_job_timer.resetServiceInterval(index); - #if HAS_BUZZER - ui.completion_feedback(); - #endif - ui.reset_status(); - ui.return_to_status(); - }, - ui.goto_previous_screen, - PSTR(MSG_SERVICE_RESET), sram, PSTR("?") - ); +inline void _service_reset(const int index) { + print_job_timer.resetServiceInterval(index); + #if HAS_BUZZER + ui.completion_feedback(); + #endif + ui.reset_status(); + ui.return_to_status(); } #if SERVICE_INTERVAL_1 > 0 - void menu_service1() { _menu_service(1, PSTR(SERVICE_NAME_1)); } + void menu_service1() { + char sram[30]; + strncpy_P(sram, PSTR(SERVICE_NAME_1), 29); + do_select_screen( + PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL), + []{ _service_reset(1); }, + ui.goto_previous_screen, + PSTR(MSG_SERVICE_RESET), sram, PSTR("?") + ); + } #endif #if SERVICE_INTERVAL_2 > 0 - void menu_service2() { _menu_service(2, PSTR(SERVICE_NAME_2)); } + void menu_service2() { + char sram[30]; + strncpy_P(sram, PSTR(SERVICE_NAME_2), 29); + do_select_screen( + PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL), + []{ _service_reset(2); }, + ui.goto_previous_screen, + PSTR(MSG_SERVICE_RESET), sram, PSTR("?") + ); + } #endif #if SERVICE_INTERVAL_3 > 0 - void menu_service3() { _menu_service(3, PSTR(SERVICE_NAME_3)); } + void menu_service3() { + char sram[30]; + strncpy_P(sram, PSTR(SERVICE_NAME_3), 29); + do_select_screen( + PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL), + []{ _service_reset(3); }, + ui.goto_previous_screen, + PSTR(MSG_SERVICE_RESET), sram, PSTR("?") + ); + } #endif -#endif // HAS_LCD_MENU && HAS_SERVICE_INTERVALS && PRINTCOUNTER +#endif // HAS_LCD_MENU && HAS_SERVICE_INTERVALS diff --git a/Marlin/src/lcd/menu/menu_tmc.cpp b/Marlin/src/lcd/menu/menu_tmc.cpp index 8b905cd09536..917b39ebfad6 100644 --- a/Marlin/src/lcd/menu/menu_tmc.cpp +++ b/Marlin/src/lcd/menu/menu_tmc.cpp @@ -29,7 +29,7 @@ #if HAS_TRINAMIC && HAS_LCD_MENU #include "menu.h" -#include "../../module/stepper_indirection.h" +#include "../../module/stepper/indirection.h" #include "../../feature/tmc_util.h" #define TMC_EDIT_STORED_I_RMS(ST,MSG) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST) @@ -217,6 +217,9 @@ void menu_tmc_current() { #if X_SENSORLESS void refresh_homing_thrs_X() { stepperX.refresh_homing_thrs(); } #endif + #if X2_SENSORLESS + void refresh_homing_thrs_X2() { stepperX2.refresh_homing_thrs(); } + #endif #if Y_SENSORLESS void refresh_homing_thrs_Y() { stepperY.refresh_homing_thrs(); } #endif @@ -230,6 +233,9 @@ void menu_tmc_current() { #if X_SENSORLESS TMC_EDIT_STORED_SGT(X); #endif + #if X2_SENSORLESS + TMC_EDIT_STORED_SGT(X2); + #endif #if Y_SENSORLESS TMC_EDIT_STORED_SGT(Y); #endif diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index b3bb94cb1621..85e42a8b87b8 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -37,10 +37,9 @@ static int16_t ubl_storage_slot = 0, custom_hotend_temp = 190, side_points = 3, ubl_fillin_amount = 5, - ubl_height_amount = 1, - n_edit_pts = 1, - x_plot = 0, - y_plot = 0; + ubl_height_amount = 1; + +static uint8_t n_edit_pts = 1, x_plot = 0, y_plot = 0; #if HAS_HEATED_BED static int16_t custom_bed_temp = 50; @@ -423,7 +422,7 @@ void _lcd_ubl_map_lcd_edit_cmd() { char ubl_lcd_gcode[50], str[10], str2[10]; dtostrf(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]), 0, 2, str); dtostrf(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]), 0, 2, str2); - snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, n_edit_pts); + snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, int(n_edit_pts)); lcd_enqueue_one_now(ubl_lcd_gcode); } diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index d1d0dcb2a758..071c13592d91 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -64,6 +64,22 @@ uint8_t MarlinUI::progress_bar_percent; // = 0 #endif +#if HAS_BUZZER + #include "../libs/buzzer.h" + #if ENABLED(PCA9632_BUZZER) + #include "../feature/leds/pca9632.h" + #endif + void MarlinUI::buzz(const long duration, const uint16_t freq) { + #if ENABLED(LCD_USE_I2C_BUZZER) + lcd.buzz(duration, freq); + #elif ENABLED(PCA9632_BUZZER) + pca9632_buzz(duration, freq); + #elif USE_BEEPER + buzzer.tone(duration, freq); + #endif + } +#endif + #if HAS_SPI_LCD #if HAS_GRAPHICAL_LCD @@ -89,10 +105,6 @@ #include "../feature/bedlevel/bedlevel.h" #endif -#if HAS_BUZZER - #include "../libs/buzzer.h" -#endif - #if HAS_TRINAMIC #include "../feature/tmc_util.h" #endif @@ -205,13 +217,13 @@ millis_t next_button_update_ms; #endif - void _wrap_string(uint8_t &x, uint8_t &y, const char * const string, read_byte_cb_t cb_read_byte, bool wordwrap/*=false*/) { - SETCURSOR(x, y); + void _wrap_string(uint8_t &col, uint8_t &row, const char * const string, read_byte_cb_t cb_read_byte, bool wordwrap/*=false*/) { + SETCURSOR(col, row); if (!string) return; - auto _newline = [&x, &y]() { - x = 0; y++; // move x to string len (plus space) - SETCURSOR(0, y); // simulate carriage return + auto _newline = [&col, &row]() { + col = 0; row++; // Move col to string len (plus space) + SETCURSOR(0, row); // Simulate carriage return }; uint8_t *p = (uint8_t*)string; @@ -227,9 +239,9 @@ millis_t next_button_update_ms; if (eol || ch == ' ' || ch == '-' || ch == '+' || ch == '.') { if (!c && ch == ' ') { if (wrd) wrd++; continue; } // collapse extra spaces // Past the right and the word is not too long? - if (x + c > LCD_WIDTH && x >= (LCD_WIDTH) / 4) _newline(); // should it wrap? + if (col + c > LCD_WIDTH && col >= (LCD_WIDTH) / 4) _newline(); // should it wrap? c += !eol; // +1 so the space will be printed - x += c; // advance x to new position + col += c; // advance col to new position while (c) { // character countdown --c; // count down to zero wrd = get_utf8_value_cb(wrd, cb_read_byte, &ch); // get characters again @@ -246,25 +258,25 @@ millis_t next_button_update_ms; p = get_utf8_value_cb(p, cb_read_byte, &ch); if (!ch) break; lcd_put_wchar(ch); - x++; - if (x >= LCD_WIDTH) _newline(); + col++; + if (col >= LCD_WIDTH) _newline(); } } } void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; - uint8_t x = 0, y = 0; + uint8_t col = 0, row = 0; if (!string && plen + slen <= LCD_WIDTH) { - x = (LCD_WIDTH - plen - slen) / 2; - y = LCD_HEIGHT > 3 ? 1 : 0; + col = (LCD_WIDTH - plen - slen) / 2; + row = LCD_HEIGHT > 3 ? 1 : 0; } - wrap_string_P(x, y, pref, true); + wrap_string_P(col, row, pref, true); if (string) { - if (x) { x = 0; y++; } // Move to the start of the next line - wrap_string(x, y, string); + if (col) { col = 0; row++; } // Move to the start of the next line + wrap_string(col, row, string); } - if (suff) wrap_string_P(x, y, suff); + if (suff) wrap_string_P(col, row, suff); } #endif // HAS_LCD_MENU @@ -568,7 +580,7 @@ void MarlinUI::status_screen() { const millis_t ms = millis(); #endif if (ELAPSED(ms, next_beep)) { - BUZZ(FEEDRATE_CHANGE_BEEP_DURATION, FEEDRATE_CHANGE_BEEP_FREQUENCY); + buzz(FEEDRATE_CHANGE_BEEP_DURATION, FEEDRATE_CHANGE_BEEP_FREQUENCY); next_beep = ms + 500UL; } #endif @@ -611,13 +623,12 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { #if HAS_BUZZER // Buzz and wait. Is the delay needed for buttons to settle? buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); - #endif - - #if HAS_LCD_MENU - #if ENABLED(LCD_USE_I2C_BUZZER) - delay(10); - #elif PIN_EXISTS(BEEPER) - for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #if HAS_LCD_MENU + #if USE_BEEPER + for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #else + delay(10); + #endif #endif #endif } @@ -729,16 +740,6 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { LCDViewAction MarlinUI::lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; -bool MarlinUI::detected() { - return - #if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE) - lcd.LcdDetected() == 1 - #else - true - #endif - ; -} - void MarlinUI::update() { static uint16_t max_display_update_time = 0; @@ -764,17 +765,48 @@ void MarlinUI::update() { // If the action button is pressed... static bool wait_for_unclick; // = 0 - if (!external_control && button_pressed()) { + auto generate_click = [&]() { if (!wait_for_unclick) { // If not waiting for a debounce release: wait_for_unclick = true; // - Set debounce flag to ignore continous clicks lcd_clicked = !wait_for_user && !no_reentry; // - Keep the click if not waiting for a user-click wait_for_user = false; // - Any click clears wait for user quick_feedback(); // - Always make a click sound } - } - else wait_for_unclick = false; + }; - #if HAS_DIGITAL_BUTTONS && BUTTON_EXISTS(BACK) + #if ENABLED(TOUCH_BUTTONS) + if (touch_buttons) { + if (buttons & EN_C) + generate_click(); + else if (buttons & (EN_A | EN_B)) { // Ignore the encoder if clicked, to prevent "slippage" + const millis_t ms = millis(); + if (ELAPSED(ms, next_button_update_ms)) { + next_button_update_ms = ms + 50; + encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * (ENCODER_PULSES_PER_STEP); + if (buttons & EN_A) encoderDiff *= -1; + if (!wait_for_unclick) { + next_button_update_ms += 250; + #if HAS_BUZZER + buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); + #endif + wait_for_unclick = true; // - Set debounce flag to ignore continous clicks + } + } + } + } + else + #endif // TOUCH_BUTTONS + { + // + // Integrated LCD click handling via button_pressed() + // + if (!external_control && button_pressed()) + generate_click(); + else + wait_for_unclick = false; + } + + #if HAS_DIGITAL_BUTTONS && (BUTTON_EXISTS(BACK) || ENABLED(TOUCH_BUTTONS)) if (LCD_BACK_CLICKED()) { quick_feedback(); goto_previous_screen(); @@ -784,7 +816,9 @@ void MarlinUI::update() { #endif // HAS_LCD_MENU #if ENABLED(INIT_SDCARD_ON_BOOT) - + // + // SPI SD Card detection (and first card init when the LCD is present) + // const uint8_t sd_status = (uint8_t)IS_SD_INSERTED(); if (sd_status != lcd_sd_status && detected()) { @@ -797,13 +831,13 @@ void MarlinUI::update() { if (old_sd_status == 2) card.beginautostart(); // Initial boot else - set_status_P(PSTR(MSG_SD_INSERTED)); + set_status_P(PSTR(MSG_MEDIA_INSERTED)); } #if PIN_EXISTS(SD_DETECT) else { card.release(); if (old_sd_status != 2) { - set_status_P(PSTR(MSG_SD_REMOVED)); + set_status_P(PSTR(MSG_MEDIA_REMOVED)); #if HAS_LCD_MENU return_to_status(); #endif @@ -853,6 +887,11 @@ void MarlinUI::update() { #if ENABLED(TOUCH_BUTTONS) touch_buttons = read_touch_buttons(); + if (touch_buttons) { + #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS + return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; + #endif + } #endif #if ENABLED(REPRAPWORLD_KEYPAD) @@ -936,7 +975,7 @@ void MarlinUI::update() { #if HAS_LCD_MENU && ENABLED(SCROLL_LONG_FILENAMES) // If scrolling of long file names is enabled and we are in the sd card menu, // cause a refresh to occur until all the text has scrolled into view. - if (currentScreen == menu_sdcard && !lcd_status_update_delay--) { + if (currentScreen == menu_media && !lcd_status_update_delay--) { lcd_status_update_delay = 4; if (++filename_scroll_pos > filename_scroll_max) { filename_scroll_pos = 0; @@ -1264,23 +1303,6 @@ void MarlinUI::update() { #endif // HAS_ENCODER_WHEEL } - #if HAS_SLOW_BUTTONS - - uint8_t MarlinUI::read_slow_buttons() { - #if ENABLED(LCD_I2C_TYPE_MCP23017) - // Reading these buttons this is likely to be too slow to call inside interrupt context - // so they are called during normal lcd_update - uint8_t slow_bits = lcd.readButtons() << B_I2C_BTN_OFFSET; - #if ENABLED(LCD_I2C_VIKI) - if ((slow_bits & (B_MI | B_RI)) && PENDING(millis(), next_button_update_ms)) // LCD clicked - slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated - #endif // LCD_I2C_VIKI - return slow_bits; - #endif // LCD_I2C_TYPE_MCP23017 - } - - #endif - #endif // HAS_ENCODER_ACTION #endif // HAS_SPI_LCD diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index 2eb8c79f2fc3..26e9261bd528 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -76,11 +76,11 @@ #define LCDWRITE(c) lcd_put_wchar(c) #endif - #include "fontutils.h" + #include "lcdprint.h" - void _wrap_string(uint8_t &x, uint8_t &y, const char * const string, read_byte_cb_t cb_read_byte, const bool wordwrap=false); - inline void wrap_string_P(uint8_t &x, uint8_t &y, PGM_P const pstr, const bool wordwrap=false) { _wrap_string(x, y, pstr, read_byte_rom, wordwrap); } - inline void wrap_string(uint8_t &x, uint8_t &y, const char * const string, const bool wordwrap=false) { _wrap_string(x, y, string, read_byte_ram, wordwrap); } + void _wrap_string(uint8_t &col, uint8_t &row, const char * const string, read_byte_cb_t cb_read_byte, const bool wordwrap=false); + inline void wrap_string_P(uint8_t &col, uint8_t &row, PGM_P const pstr, const bool wordwrap=false) { _wrap_string(col, row, pstr, read_byte_rom, wordwrap); } + inline void wrap_string(uint8_t &col, uint8_t &row, const char * const string, const bool wordwrap=false) { _wrap_string(col, row, string, read_byte_ram, wordwrap); } #if ENABLED(SDSUPPORT) #include "../sd/cardreader.h" @@ -151,7 +151,7 @@ #define BUTTON_PRESSED(BN) !READ(BTN_## BN) - #if BUTTON_EXISTS(ENC) + #if BUTTON_EXISTS(ENC) || ENABLED(TOUCH_BUTTONS) #define BLEN_C 2 #define EN_C _BV(BLEN_C) #endif @@ -215,7 +215,7 @@ #endif -#if BUTTON_EXISTS(BACK) +#if BUTTON_EXISTS(BACK) || ENABLED(TOUCH_BUTTONS) #define BLEN_D 3 #define EN_D _BV(BLEN_D) #define LCD_BACK_CLICKED() (buttons & EN_D) @@ -259,15 +259,11 @@ class MarlinUI { } #if HAS_BUZZER - static inline void buzz(const long duration, const uint16_t freq) { - #if ENABLED(LCD_USE_I2C_BUZZER) - lcd.buzz(duration, freq); - #elif PIN_EXISTS(BEEPER) - buzzer.tone(duration, freq); - #elif ENABLED(PCA9632_BUZZER) - pca9632_buzz(duration, freq); - #endif - } + static void buzz(const long duration, const uint16_t freq); + #endif + + #if ENABLED(LCD_HAS_STATUS_INDICATORS) + static void update_indicators(); #endif // LCD implementations @@ -323,7 +319,7 @@ class MarlinUI { #endif #if ENABLED(SHOW_BOOTSCREEN) - static void draw_marlin_bootscreen(); + static void draw_marlin_bootscreen(const bool line2=false); static void show_marlin_bootscreen(); static void show_bootscreen(); #endif @@ -344,7 +340,7 @@ class MarlinUI { static millis_t progress_bar_ms; // Start time for the current progress bar cycle static void draw_progress_bar(const uint8_t percent); #if PROGRESS_MSG_EXPIRE > 0 - static millis_t MarlinUI::expire_status_ms; // = 0 + static millis_t expire_status_ms; // = 0 static inline void reset_progress_bar_timeout() { expire_status_ms = 0; } #endif #endif @@ -451,7 +447,18 @@ class MarlinUI { static screenFunc_t currentScreen; static void goto_screen(const screenFunc_t screen, const uint16_t encoder=0, const uint8_t top=0, const uint8_t items=0); static void save_previous_screen(); - static void goto_previous_screen(); + static void goto_previous_screen( + #if ENABLED(TURBO_BACK_MENU_ITEM) + const bool is_back + #endif + ); + + #if ENABLED(TURBO_BACK_MENU_ITEM) + // Various menu items require a "void (*)()" to point to + // this function so a default argument *won't* work + static inline void goto_previous_screen() { goto_previous_screen(false); } + #endif + static void return_to_status(); static inline bool on_status_screen() { return currentScreen == status_screen; } static inline void run_current_screen() { (*currentScreen)(); } @@ -486,7 +493,7 @@ class MarlinUI { #endif #if ENABLED(AUTO_BED_LEVELING_UBL) - static void ubl_plot(const uint8_t x, const uint8_t inverted_y); + static void ubl_plot(const uint8_t x_plot, const uint8_t y_plot); #endif static void draw_select_screen_prompt(PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr); diff --git a/Marlin/src/libs/L6470/L6470_Marlin.cpp b/Marlin/src/libs/L6470/L6470_Marlin.cpp index ae90f761f703..7dc2b2d1f8dc 100644 --- a/Marlin/src/libs/L6470/L6470_Marlin.cpp +++ b/Marlin/src/libs/L6470/L6470_Marlin.cpp @@ -21,7 +21,7 @@ */ /** - * The monitor_driver routines are a close copy of the TMC code + * The monitor_driver routines are a close copy of the TMC code */ #include "../../inc/MarlinConfig.h" @@ -32,9 +32,9 @@ L6470_Marlin L6470; -#include "../stepper_indirection.h" +#include "../../module/stepper/indirection.h" +#include "../../module/planner.h" #include "../../gcode/gcode.h" -#include "../planner.h" #define DEBUG_OUT ENABLED(L6470_CHITCHAT) #include "../../core/debug_out.h" diff --git a/Marlin/src/libs/L6470/L6470_Marlin.h b/Marlin/src/libs/L6470/L6470_Marlin.h index 92745b6e3e04..3311574a16f9 100644 --- a/Marlin/src/libs/L6470/L6470_Marlin.h +++ b/Marlin/src/libs/L6470/L6470_Marlin.h @@ -32,8 +32,6 @@ #define L6470_ERROR_MASK (STATUS_UVLO | STATUS_TH_WRN | STATUS_TH_SD | STATUS_OCD | STATUS_STEP_LOSS_A | STATUS_STEP_LOSS_B) #define dSPIN_STEP_CLOCK_FWD dSPIN_STEP_CLOCK #define dSPIN_STEP_CLOCK_REV dSPIN_STEP_CLOCK+1 -#define HAS_L6470_EXTRUDER ( AXIS_DRIVER_TYPE_E0(L6470) || AXIS_DRIVER_TYPE_E1(L6470) || AXIS_DRIVER_TYPE_E2(L6470) \ - || AXIS_DRIVER_TYPE_E3(L6470) || AXIS_DRIVER_TYPE_E4(L6470) || AXIS_DRIVER_TYPE_E5(L6470) ) class L6470_Marlin { public: diff --git a/Marlin/src/libs/buzzer.cpp b/Marlin/src/libs/buzzer.cpp index aa20127fa02b..549c76008e4d 100644 --- a/Marlin/src/libs/buzzer.cpp +++ b/Marlin/src/libs/buzzer.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if DISABLED(LCD_USE_I2C_BUZZER) && PIN_EXISTS(BEEPER) +#if USE_BEEPER #include "buzzer.h" #include "../module/temperature.h" @@ -78,4 +78,4 @@ void Buzzer::tick() { else if (ELAPSED(now, state.endtime)) reset(); } -#endif // !LCD_USE_I2C_BUZZER && BEEPER +#endif // USE_BEEPER diff --git a/Marlin/src/libs/buzzer.h b/Marlin/src/libs/buzzer.h index 1908b6aeafb0..026b9330f96d 100644 --- a/Marlin/src/libs/buzzer.h +++ b/Marlin/src/libs/buzzer.h @@ -23,16 +23,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(LCD_USE_I2C_BUZZER) - - #define BUZZ(d,f) ui.buzz(d,f) - -#elif ENABLED(PCA9632_BUZZER) - - #include "../feature/leds/pca9632.h" - #define BUZZ(d, f) pca9632_buzz(d,f) - -#elif PIN_EXISTS(BEEPER) +#if USE_BEEPER #include "circularqueue.h" @@ -120,10 +111,18 @@ // Provide a buzzer instance extern Buzzer buzzer; + + // Buzz directly via the BEEPER pin tone queue #define BUZZ(d,f) buzzer.tone(d, f) -#else // No buzz capability +#elif HAS_BUZZER + + // Buzz indirectly via the MarlinUI instance + #define BUZZ(d,f) ui.buzz(d,f) + +#else + // No buzz capability #define BUZZ(d,f) NOOP #endif diff --git a/Marlin/src/libs/stopwatch.cpp b/Marlin/src/libs/stopwatch.cpp index 6a6ea03c1b42..e3797c21f332 100644 --- a/Marlin/src/libs/stopwatch.cpp +++ b/Marlin/src/libs/stopwatch.cpp @@ -24,6 +24,10 @@ #include "../inc/MarlinConfig.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + Stopwatch::State Stopwatch::state; millis_t Stopwatch::accumulator; millis_t Stopwatch::startTimestamp; @@ -60,6 +64,10 @@ bool Stopwatch::start() { Stopwatch::debug(PSTR("start")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onPrintTimerStarted(); + #endif + if (!isRunning()) { if (isPaused()) accumulator = duration(); else reset(); diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index da3a52035d4c..190bde400d1b 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -37,7 +37,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V68" +#define EEPROM_VERSION "V69" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -112,7 +112,7 @@ #endif #if HAS_TRINAMIC - #include "stepper_indirection.h" + #include "stepper/indirection.h" #include "../feature/tmc_util.h" #endif @@ -120,7 +120,7 @@ typedef struct { uint16_t X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5; } tmc_stepper_current_t; typedef struct { uint32_t X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5; } tmc_hybrid_threshold_t; -typedef struct { int16_t X, Y, Z; } tmc_sgt_t; +typedef struct { int16_t X, Y, Z, X2; } tmc_sgt_t; typedef struct { bool X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5; } tmc_stealth_enabled_t; // Limit an index to an array size @@ -283,7 +283,7 @@ typedef struct SettingsDataStruct { // tmc_stepper_current_t tmc_stepper_current; // M906 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5 tmc_hybrid_threshold_t tmc_hybrid_threshold; // M913 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5 - tmc_sgt_t tmc_sgt; // M914 X Y Z + tmc_sgt_t tmc_sgt; // M914 X Y Z X2 tmc_stealth_enabled_t tmc_stealth_enabled; // M569 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5 // @@ -447,36 +447,19 @@ void MarlinSettings::postprocess() { #if ENABLED(EEPROM_SETTINGS) - #define WORD_PADDED_EEPROM ENABLED(__STM32F1__, FLASH_EEPROM_EMULATION) - - #if WORD_PADDED_EEPROM && ENABLED(DEBUG_EEPROM_READWRITE) - #define UPDATE_TEST_INDEX(VAR) (test_index += sizeof(VAR)) - #else - #define UPDATE_TEST_INDEX(VAR) NOOP - #endif - #if WORD_PADDED_EEPROM - #define EEPROM_SKIP(VAR) do{ eeprom_index += sizeof(VAR) + (sizeof(VAR) & 1); UPDATE_TEST_INDEX(sizeof(VAR)); }while(0) - #else - #define EEPROM_SKIP(VAR) (eeprom_index += sizeof(VAR)) - #endif - #define EEPROM_START() if (!persistentStore.access_start()) { SERIAL_ECHO_MSG("No EEPROM."); return false; } \ int eeprom_index = EEPROM_OFFSET #define EEPROM_FINISH() persistentStore.access_finish() - #define EEPROM_WRITE(VAR) do{ persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); UPDATE_TEST_INDEX(VAR); }while(0) - #define EEPROM_READ(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating); UPDATE_TEST_INDEX(VAR); }while(0) - #define EEPROM_READ_ALWAYS(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); UPDATE_TEST_INDEX(VAR); }while(0) + #define EEPROM_SKIP(VAR) (eeprom_index += sizeof(VAR)) + #define EEPROM_WRITE(VAR) do{ persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) + #define EEPROM_READ(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating); }while(0) + #define EEPROM_READ_ALWAYS(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) #define EEPROM_ASSERT(TST,ERR) do{ if (!(TST)) { SERIAL_ERROR_MSG(ERR); eeprom_error = true; } }while(0) #if ENABLED(DEBUG_EEPROM_READWRITE) - #if WORD_PADDED_EEPROM - int test_index; - #else - #define test_index eeprom_index - #endif #define _FIELD_TEST(FIELD) \ EEPROM_ASSERT( \ - eeprom_error || test_index == offsetof(SettingsData, FIELD) + EEPROM_OFFSET, \ + eeprom_error || eeprom_index == offsetof(SettingsData, FIELD) + EEPROM_OFFSET, \ "Field " STRINGIFY(FIELD) " mismatch." \ ) #else @@ -845,8 +828,10 @@ void MarlinSettings::postprocess() { const int16_t lcd_contrast = #if HAS_LCD_CONTRAST ui.contrast + #elif defined(DEFAULT_LCD_CONTRAST) + DEFAULT_LCD_CONTRAST #else - 32 + 127 #endif ; EEPROM_WRITE(lcd_contrast); @@ -1047,11 +1032,14 @@ void MarlinSettings::postprocess() { // TMC StallGuard threshold // { - tmc_sgt_t tmc_sgt = { 0, 0, 0 }; + tmc_sgt_t tmc_sgt = { 0 }; #if USE_SENSORLESS #if X_SENSORLESS tmc_sgt.X = stepperX.homing_threshold(); #endif + #if X2_SENSORLESS + tmc_sgt.X2 = stepperX2.homing_threshold(); + #endif #if Y_SENSORLESS tmc_sgt.Y = stepperY.homing_threshold(); #endif @@ -1835,10 +1823,13 @@ void MarlinSettings::postprocess() { #if AXIS_HAS_STALLGUARD(X) stepperX.homing_threshold(tmc_sgt.X); #endif - #if AXIS_HAS_STALLGUARD(X2) + #if AXIS_HAS_STALLGUARD(X2) && !X2_SENSORLESS stepperX2.homing_threshold(tmc_sgt.X); #endif #endif + #if X2_SENSORLESS + stepperX2.homing_threshold(tmc_sgt.X2); + #endif #ifdef Y_STALL_SENSITIVITY #if AXIS_HAS_STALLGUARD(Y) stepperY.homing_threshold(tmc_sgt.Y); @@ -2815,12 +2806,6 @@ void MarlinSettings::reset() { } #endif - #if HAS_FILAMENT_SENSOR - CONFIG_ECHO_HEADING("Filament Runout Sensor:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M412 S", int(runout.enabled)); - #endif - /** * Bed Leveling */ diff --git a/Marlin/src/module/delta.cpp b/Marlin/src/module/delta.cpp index 88485605b90d..e44fd8620004 100644 --- a/Marlin/src/module/delta.cpp +++ b/Marlin/src/module/delta.cpp @@ -43,7 +43,7 @@ #if ENABLED(SENSORLESS_HOMING) #include "../feature/tmc_util.h" - #include "stepper_indirection.h" + #include "stepper/indirection.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 85d9362ef8b7..c5854d1f1545 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1325,11 +1325,6 @@ void set_axis_is_at_home(const AxisEnum axis) { SBI(axis_known_position, axis); SBI(axis_homed, axis); - #if HAS_POSITION_SHIFT - position_shift[axis] = 0; - update_workspace_offset(axis); - #endif - #if ENABLED(DUAL_X_CARRIAGE) if (axis == X_AXIS && (active_extruder == 1 || dual_x_carriage_mode == DXC_DUPLICATION_MODE)) { current_position[X_AXIS] = x_home_pos(active_extruder); @@ -1663,7 +1658,7 @@ void homeaxis(const AxisEnum axis) { ]; if (backoff_mm) { current_position[axis] -= ABS(backoff_mm) * axis_home_dir; - line_to_current_position(); + line_to_current_position(Z_PROBE_SPEED_FAST); } #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index b8bc07069e79..56695f3a9bfd 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2037,6 +2037,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (was_enabled) DISABLE_STEPPER_DRIVER_INTERRUPT(); block_buffer_runtime_us += segment_time_us; + block->segment_time_us = segment_time_us; if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT(); #endif diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 9df4820576df..77cde6e2bf9e 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -155,7 +155,9 @@ typedef struct block_t { uint8_t valve_pressure, e_to_p_pressure; #endif - uint32_t segment_time_us; + #if HAS_SPI_LCD + uint32_t segment_time_us; + #endif } block_t; @@ -713,8 +715,8 @@ class Planner { FORCE_INLINE static float get_axis_position_degrees(const AxisEnum axis) { return get_axis_position_mm(axis); } #endif - // Called to force a quick stop of the machine (for example, when an emergency - // stop is required, or when endstops are hit) + // Called to force a quick stop of the machine (for example, when + // a Full Shutdown is required, or when endstops are hit) static void quick_stop(); // Called when an endstop is triggered. Causes the machine to stop inmediately diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 25e8a767ab4e..ba308142e440 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -157,6 +157,8 @@ void PrintCounter::loadStats() { #endif #if HAS_BUZZER && SERVICE_WARNING_BUZZES > 0 if (doBuzz) for (int i = 0; i < SERVICE_WARNING_BUZZES; i++) BUZZ(200, 404); + #else + UNUSED(doBuzz); #endif #endif // HAS_SERVICE_INTERVALS } diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 91b699aa0478..d20257fa3255 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -76,7 +76,11 @@ float zprobe_zoffset; // Initialized by settings.load() #endif #if QUIET_PROBING - #include "stepper_indirection.h" + #include "stepper/indirection.h" +#endif + +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -114,6 +118,7 @@ float zprobe_zoffset; // Initialized by settings.load() #endif #if ENABLED(TOUCH_MI_MANUAL_DEPLOY) + const screenFunc_t prev_screen = ui.currentScreen; LCD_MESSAGEPGM(MSG_MANUAL_DEPLOY_TOUCHMI); ui.return_to_status(); @@ -126,10 +131,11 @@ float zprobe_zoffset; // Initialized by settings.load() while (wait_for_user) idle(); ui.reset_status(); ui.goto_screen(prev_screen); - #else - #ifdef TOUCH_MI_DEPLOY_XPOS - do_blocking_move_to_x(TOUCH_MI_DEPLOY_XPOS); - #endif + + #elif defined(TOUCH_MI_DEPLOY_XPOS) + + do_blocking_move_to_x(TOUCH_MI_DEPLOY_XPOS); + #endif } @@ -371,6 +377,9 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(PSTR("Stow Probe")); + #endif while (wait_for_user) idle(); ui.reset_status(); diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 3d2c34e6d339..862c608776a8 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2316,7 +2316,7 @@ void Stepper::report_positions() { #define EXTRA_CYCLES_BABYSTEP (STEP_PULSE_CYCLES - (CYCLES_EATEN_BABYSTEP)) #define _ENABLE(AXIS) enable_## AXIS() - #define _READ_DIR(AXIS) AXIS ##_DIR_READ + #define _READ_DIR(AXIS) AXIS ##_DIR_READ() #define _INVERT_DIR(AXIS) INVERT_## AXIS ##_DIR #define _APPLY_DIR(AXIS, INVERT) AXIS ##_APPLY_DIR(INVERT, true) @@ -2404,9 +2404,9 @@ void Stepper::report_positions() { enable_Y(); enable_Z(); - const uint8_t old_x_dir_pin = X_DIR_READ, - old_y_dir_pin = Y_DIR_READ, - old_z_dir_pin = Z_DIR_READ; + const uint8_t old_x_dir_pin = X_DIR_READ(), + old_y_dir_pin = Y_DIR_READ(), + old_z_dir_pin = Z_DIR_READ(); X_DIR_WRITE(INVERT_X_DIR ^ z_direction); Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction); diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index eca4a75c1757..e1d60fffce49 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -218,7 +218,7 @@ // Stepper class definition // -#include "stepper_indirection.h" +#include "stepper/indirection.h" #ifdef __AVR__ #include "speed_lookuptable.h" diff --git a/Marlin/src/module/stepper/L6470.cpp b/Marlin/src/module/stepper/L6470.cpp new file mode 100644 index 000000000000..d682193aa985 --- /dev/null +++ b/Marlin/src/module/stepper/L6470.cpp @@ -0,0 +1,143 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ + +/** + * stepper/L6470.cpp + * Stepper driver indirection for L6470 drivers + */ + +#include "../../inc/MarlinConfig.h" + +#if HAS_DRIVER(L6470) + +#include "L6470.h" + +#define _L6470_DEFINE(ST) L6470 stepper##ST((const int)L6470_CHAIN_SS_PIN) + +// L6470 Stepper objects +#if AXIS_DRIVER_TYPE_X(L6470) + _L6470_DEFINE(X); +#endif +#if AXIS_DRIVER_TYPE_X2(L6470) + _L6470_DEFINE(X2); +#endif +#if AXIS_DRIVER_TYPE_Y(L6470) + _L6470_DEFINE(Y); +#endif +#if AXIS_DRIVER_TYPE_Y2(L6470) + _L6470_DEFINE(Y2); +#endif +#if AXIS_DRIVER_TYPE_Z(L6470) + _L6470_DEFINE(Z); +#endif +#if AXIS_DRIVER_TYPE_Z2(L6470) + _L6470_DEFINE(Z2); +#endif +#if AXIS_DRIVER_TYPE_Z3(L6470) + _L6470_DEFINE(Z3); +#endif +#if AXIS_DRIVER_TYPE_E0(L6470) + _L6470_DEFINE(E0); +#endif +#if AXIS_DRIVER_TYPE_E1(L6470) + _L6470_DEFINE(E1); +#endif +#if AXIS_DRIVER_TYPE_E2(L6470) + _L6470_DEFINE(E2); +#endif +#if AXIS_DRIVER_TYPE_E3(L6470) + _L6470_DEFINE(E3); +#endif +#if AXIS_DRIVER_TYPE_E4(L6470) + _L6470_DEFINE(E4); +#endif +#if AXIS_DRIVER_TYPE_E5(L6470) + _L6470_DEFINE(E5); +#endif + +// not using L6470 library's init command because it +// briefly sends power to the steppers + +#define _L6470_INIT_CHIP(Q) do{ \ + stepper##Q.resetDev(); \ + stepper##Q.softFree(); \ + stepper##Q.SetParam(L6470_CONFIG, CONFIG_PWM_DIV_1 \ + | CONFIG_PWM_MUL_2 \ + | CONFIG_SR_290V_us \ + | CONFIG_OC_SD_DISABLE \ + | CONFIG_VS_COMP_DISABLE \ + | CONFIG_SW_HARD_STOP \ + | CONFIG_INT_16MHZ); \ + stepper##Q.SetParam(L6470_KVAL_RUN, 0xFF); \ + stepper##Q.SetParam(L6470_KVAL_ACC, 0xFF); \ + stepper##Q.SetParam(L6470_KVAL_DEC, 0xFF); \ + stepper##Q.setMicroSteps(Q##_MICROSTEPS); \ + stepper##Q.setOverCurrent(Q##_OVERCURRENT); \ + stepper##Q.setStallCurrent(Q##_STALLCURRENT); \ + stepper##Q.SetParam(L6470_KVAL_HOLD, Q##_MAX_VOLTAGE); \ + stepper##Q.SetParam(L6470_ABS_POS, 0); \ + stepper##Q.getStatus(); \ +}while(0) + +void L6470_Marlin::init_to_defaults() { + #if AXIS_DRIVER_TYPE_X(L6470) + _L6470_INIT_CHIP(X); + #endif + #if AXIS_DRIVER_TYPE_X2(L6470) + _L6470_INIT_CHIP(X2); + #endif + #if AXIS_DRIVER_TYPE_Y(L6470) + _L6470_INIT_CHIP(Y); + #endif + #if AXIS_DRIVER_TYPE_Y2(L6470) + _L6470_INIT_CHIP(Y2); + #endif + #if AXIS_DRIVER_TYPE_Z(L6470) + _L6470_INIT_CHIP(Z); + #endif + #if AXIS_DRIVER_TYPE_Z2(L6470) + _L6470_INIT_CHIP(Z2); + #endif + #if AXIS_DRIVER_TYPE_Z3(L6470) + _L6470_INIT_CHIP(Z3); + #endif + #if AXIS_DRIVER_TYPE_E0(L6470) + _L6470_INIT_CHIP(E0); + #endif + #if AXIS_DRIVER_TYPE_E1(L6470) + _L6470_INIT_CHIP(E1); + #endif + #if AXIS_DRIVER_TYPE_E2(L6470) + _L6470_INIT_CHIP(E2); + #endif + #if AXIS_DRIVER_TYPE_E3(L6470) + _L6470_INIT_CHIP(E3); + #endif + #if AXIS_DRIVER_TYPE_E4(L6470) + _L6470_INIT_CHIP(E4); + #endif + #if AXIS_DRIVER_TYPE_E5(L6470) + _L6470_INIT_CHIP(E5); + #endif +} + +#endif // L6470 diff --git a/Marlin/src/module/stepper/L6470.h b/Marlin/src/module/stepper/L6470.h new file mode 100644 index 000000000000..8c731a80424a --- /dev/null +++ b/Marlin/src/module/stepper/L6470.h @@ -0,0 +1,176 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * stepper/L6470.h + * Stepper driver indirection for L6470 drivers + */ + +#include "../../inc/MarlinConfig.h" +#include "../../libs/L6470/L6470_Marlin.h" + +// L6470 has STEP on normal pins, but DIR/ENABLE via SPI +#define L6470_WRITE_DIR_COMMAND(STATE,Q) do{ L6470_dir_commands[Q] = (STATE ? dSPIN_STEP_CLOCK_REV : dSPIN_STEP_CLOCK_FWD); }while(0) + +// X Stepper +#if AXIS_DRIVER_TYPE_X(L6470) + extern L6470 stepperX; + #define X_ENABLE_INIT NOOP + #define X_ENABLE_WRITE(STATE) NOOP + #define X_ENABLE_READ() (stepperX.getStatus() & STATUS_HIZ) + #define X_DIR_INIT NOOP + #define X_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,X) + #define X_DIR_READ() (stepperX.getStatus() & STATUS_DIR) +#endif + +// Y Stepper +#if AXIS_DRIVER_TYPE_Y(L6470) + extern L6470 stepperY; + #define Y_ENABLE_INIT NOOP + #define Y_ENABLE_WRITE(STATE) NOOP + #define Y_ENABLE_READ() (stepperY.getStatus() & STATUS_HIZ) + #define Y_DIR_INIT NOOP + #define Y_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Y) + #define Y_DIR_READ() (stepperY.getStatus() & STATUS_DIR) +#endif + +// Z Stepper +#if AXIS_DRIVER_TYPE_Z(L6470) + extern L6470 stepperZ; + #define Z_ENABLE_INIT NOOP + #define Z_ENABLE_WRITE(STATE) NOOP + #define Z_ENABLE_READ() (stepperZ.getStatus() & STATUS_HIZ) + #define Z_DIR_INIT NOOP + #define Z_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z) + #define Z_DIR_READ() (stepperZ.getStatus() & STATUS_DIR) +#endif + +// X2 Stepper +#if HAS_X2_ENABLE && AXIS_DRIVER_TYPE_X2(L6470) + extern L6470 stepperX2; + #define X2_ENABLE_INIT NOOP + #define X2_ENABLE_WRITE(STATE) NOOP + #define X2_ENABLE_READ() (stepperX2.getStatus() & STATUS_HIZ) + #define X2_DIR_INIT NOOP + #define X2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,X2) + #define X2_DIR_READ() (stepperX2.getStatus() & STATUS_DIR) +#endif + +// Y2 Stepper +#if HAS_Y2_ENABLE && AXIS_DRIVER_TYPE_Y2(L6470) + extern L6470 stepperY2; + #define Y2_ENABLE_INIT NOOP + #define Y2_ENABLE_WRITE(STATE) NOOP + #define Y2_ENABLE_READ() (stepperY2.getStatus() & STATUS_HIZ) + #define Y2_DIR_INIT NOOP + #define Y2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Y2) + #define Y2_DIR_READ() (stepperY2.getStatus() & STATUS_DIR) +#endif + +// Z2 Stepper +#if HAS_Z2_ENABLE && AXIS_DRIVER_TYPE_Z2(L6470) + extern L6470 stepperZ2; + #define Z2_ENABLE_INIT NOOP + #define Z2_ENABLE_WRITE(STATE) NOOP + #define Z2_ENABLE_READ() (stepperZ2.getStatus() & STATUS_HIZ) + #define Z2_DIR_INIT NOOP + #define Z2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z2) + #define Z2_DIR_READ() (stepperZ2.getStatus() & STATUS_DIR) +#endif + +// Z3 Stepper +#if HAS_Z3_ENABLE && AXIS_DRIVER_TYPE_Z3(L6470) + extern L6470 stepperZ3; + #define Z3_ENABLE_INIT NOOP + #define Z3_ENABLE_WRITE(STATE) NOOP + #define Z3_ENABLE_READ() (stepperZ3.getStatus() & STATUS_HIZ) + #define Z3_DIR_INIT NOOP + #define Z3_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z3) + #define Z3_DIR_READ() (stepperZ3.getStatus() & STATUS_DIR) +#endif + +// E0 Stepper +#if AXIS_DRIVER_TYPE_E0(L6470) + extern L6470 stepperE0; + #define E0_ENABLE_INIT NOOP + #define E0_ENABLE_WRITE(STATE) NOOP + #define E0_ENABLE_READ() (stepperE0.getStatus() & STATUS_HIZ) + #define E0_DIR_INIT NOOP + #define E0_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E0) + #define E0_DIR_READ() (stepperE0.getStatus() & STATUS_DIR) +#endif + +// E1 Stepper +#if AXIS_DRIVER_TYPE_E1(L6470) + extern L6470 stepperE1; + #define E1_ENABLE_INIT NOOP + #define E1_ENABLE_WRITE(STATE) NOOP + #define E1_ENABLE_READ() (stepperE1.getStatus() & STATUS_HIZ) + #define E1_DIR_INIT NOOP + #define E1_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E1) + #define E1_DIR_READ() (stepperE1.getStatus() & STATUS_DIR) +#endif + +// E2 Stepper +#if AXIS_DRIVER_TYPE_E2(L6470) + extern L6470 stepperE2; + #define E2_ENABLE_INIT NOOP + #define E2_ENABLE_WRITE(STATE) NOOP + #define E2_ENABLE_READ() (stepperE2.getStatus() & STATUS_HIZ) + #define E2_DIR_INIT NOOP + #define E2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E2) + #define E2_DIR_READ() (stepperE2.getStatus() & STATUS_DIR) +#endif + +// E3 Stepper +#if AXIS_DRIVER_TYPE_E3(L6470) + extern L6470 stepperE3; + #define E3_ENABLE_INIT NOOP + #define E3_ENABLE_WRITE(STATE) NOOP + #define E3_ENABLE_READ() (stepperE3.getStatus() & STATUS_HIZ) + #define E3_DIR_INIT NOOP + #define E3_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E3) + #define E3_DIR_READ() (stepperE3.getStatus() & STATUS_DIR) +#endif + +// E4 Stepper +#if AXIS_DRIVER_TYPE_E4(L6470) + extern L6470 stepperE4; + #define E4_ENABLE_INIT NOOP + #define E4_ENABLE_WRITE(STATE) NOOP + #define E4_ENABLE_READ() (stepperE4.getStatus() & STATUS_HIZ) + #define E4_DIR_INIT NOOP + #define E4_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E4) + #define E4_DIR_READ() (stepperE4.getStatus() & STATUS_DIR) +#endif + +// E5 Stepper +#if AXIS_DRIVER_TYPE_E5(L6470) + extern L6470 stepperE5; + #define E5_ENABLE_INIT NOOP + #define E5_ENABLE_WRITE(STATE) NOOP + #define E5_ENABLE_READ() (stepperE5.getStatus() & STATUS_HIZ) + #define E5_DIR_INIT NOOP + #define E5_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E5) + #define E5_DIR_READ() (stepperE5.getStatus() & STATUS_DIR) +#endif diff --git a/Marlin/src/module/stepper/TMC26X.cpp b/Marlin/src/module/stepper/TMC26X.cpp new file mode 100644 index 000000000000..8acb735c9db6 --- /dev/null +++ b/Marlin/src/module/stepper/TMC26X.cpp @@ -0,0 +1,126 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ + +/** + * stepper/TMC26X.cpp + * Stepper driver indirection for TMC26X drivers + */ + +#include "../../inc/MarlinConfig.h" + +// +// TMC26X Driver objects and inits +// +#if HAS_DRIVER(TMC26X) + +#include "TMC26X.h" + +#define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) + +#if AXIS_DRIVER_TYPE_X(TMC26X) + _TMC26X_DEFINE(X); +#endif +#if AXIS_DRIVER_TYPE_X2(TMC26X) + _TMC26X_DEFINE(X2); +#endif +#if AXIS_DRIVER_TYPE_Y(TMC26X) + _TMC26X_DEFINE(Y); +#endif +#if AXIS_DRIVER_TYPE_Y2(TMC26X) + _TMC26X_DEFINE(Y2); +#endif +#if AXIS_DRIVER_TYPE_Z(TMC26X) + _TMC26X_DEFINE(Z); +#endif +#if AXIS_DRIVER_TYPE_Z2(TMC26X) + _TMC26X_DEFINE(Z2); +#endif +#if AXIS_DRIVER_TYPE_Z3(TMC26X) + _TMC26X_DEFINE(Z3); +#endif +#if AXIS_DRIVER_TYPE_E0(TMC26X) + _TMC26X_DEFINE(E0); +#endif +#if AXIS_DRIVER_TYPE_E1(TMC26X) + _TMC26X_DEFINE(E1); +#endif +#if AXIS_DRIVER_TYPE_E2(TMC26X) + _TMC26X_DEFINE(E2); +#endif +#if AXIS_DRIVER_TYPE_E3(TMC26X) + _TMC26X_DEFINE(E3); +#endif +#if AXIS_DRIVER_TYPE_E4(TMC26X) + _TMC26X_DEFINE(E4); +#endif +#if AXIS_DRIVER_TYPE_E5(TMC26X) + _TMC26X_DEFINE(E5); +#endif + +#define _TMC26X_INIT(A) do{ \ + stepper##A.setMicrosteps(A##_MICROSTEPS); \ + stepper##A.start(); \ +}while(0) + +void tmc26x_init_to_defaults() { + #if AXIS_DRIVER_TYPE_X(TMC26X) + _TMC26X_INIT(X); + #endif + #if AXIS_DRIVER_TYPE_X2(TMC26X) + _TMC26X_INIT(X2); + #endif + #if AXIS_DRIVER_TYPE_Y(TMC26X) + _TMC26X_INIT(Y); + #endif + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + _TMC26X_INIT(Y2); + #endif + #if AXIS_DRIVER_TYPE_Z(TMC26X) + _TMC26X_INIT(Z); + #endif + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + _TMC26X_INIT(Z2); + #endif + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + _TMC26X_INIT(Z3); + #endif + #if AXIS_DRIVER_TYPE_E0(TMC26X) + _TMC26X_INIT(E0); + #endif + #if AXIS_DRIVER_TYPE_E1(TMC26X) + _TMC26X_INIT(E1); + #endif + #if AXIS_DRIVER_TYPE_E2(TMC26X) + _TMC26X_INIT(E2); + #endif + #if AXIS_DRIVER_TYPE_E3(TMC26X) + _TMC26X_INIT(E3); + #endif + #if AXIS_DRIVER_TYPE_E4(TMC26X) + _TMC26X_INIT(E4); + #endif + #if AXIS_DRIVER_TYPE_E5(TMC26X) + _TMC26X_INIT(E5); + #endif +} + +#endif // TMC26X diff --git a/Marlin/src/module/stepper/TMC26X.h b/Marlin/src/module/stepper/TMC26X.h new file mode 100644 index 000000000000..d195a50c0395 --- /dev/null +++ b/Marlin/src/module/stepper/TMC26X.h @@ -0,0 +1,144 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * stepper/TMC26X.h + * Stepper driver indirection for TMC26X drivers + */ + +#include "../../inc/MarlinConfig.h" + +// TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI + +#include +#if defined(STM32GENERIC) && defined(STM32F7) + #include "../../HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.h" +#else + #include +#endif + +void tmc26x_init_to_defaults(); + +// X Stepper +#if AXIS_DRIVER_TYPE_X(TMC26X) + extern TMC26XStepper stepperX; + #define X_ENABLE_INIT NOOP + #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) + #define X_ENABLE_READ() stepperX.isEnabled() +#endif + +// Y Stepper +#if AXIS_DRIVER_TYPE_Y(TMC26X) + extern TMC26XStepper stepperY; + #define Y_ENABLE_INIT NOOP + #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) + #define Y_ENABLE_READ() stepperY.isEnabled() +#endif + +// Z Stepper +#if AXIS_DRIVER_TYPE_Z(TMC26X) + extern TMC26XStepper stepperZ; + #define Z_ENABLE_INIT NOOP + #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) + #define Z_ENABLE_READ() stepperZ.isEnabled() +#endif + +// X2 Stepper +#if HAS_X2_ENABLE && AXIS_DRIVER_TYPE_X2(TMC26X) + extern TMC26XStepper stepperX2; + #define X2_ENABLE_INIT NOOP + #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) + #define X2_ENABLE_READ() stepperX2.isEnabled() +#endif + +// Y2 Stepper +#if HAS_Y2_ENABLE && AXIS_DRIVER_TYPE_Y2(TMC26X) + extern TMC26XStepper stepperY2; + #define Y2_ENABLE_INIT NOOP + #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) + #define Y2_ENABLE_READ() stepperY2.isEnabled() +#endif + +// Z2 Stepper +#if HAS_Z2_ENABLE && AXIS_DRIVER_TYPE_Z2(TMC26X) + extern TMC26XStepper stepperZ2; + #define Z2_ENABLE_INIT NOOP + #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) + #define Z2_ENABLE_READ() stepperZ2.isEnabled() +#endif + +// Z3 Stepper +#if HAS_Z3_ENABLE && ENABLED(Z3_IS_TMC26X) + extern TMC26XStepper stepperZ3; + #define Z3_ENABLE_INIT NOOP + #define Z3_ENABLE_WRITE(STATE) stepperZ3.setEnabled(STATE) + #define Z3_ENABLE_READ() stepperZ3.isEnabled() +#endif + +// E0 Stepper +#if AXIS_DRIVER_TYPE_E0(TMC26X) + extern TMC26XStepper stepperE0; + #define E0_ENABLE_INIT NOOP + #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) + #define E0_ENABLE_READ() stepperE0.isEnabled() +#endif + +// E1 Stepper +#if AXIS_DRIVER_TYPE_E1(TMC26X) + extern TMC26XStepper stepperE1; + #define E1_ENABLE_INIT NOOP + #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) + #define E1_ENABLE_READ() stepperE1.isEnabled() +#endif + +// E2 Stepper +#if AXIS_DRIVER_TYPE_E2(TMC26X) + extern TMC26XStepper stepperE2; + #define E2_ENABLE_INIT NOOP + #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) + #define E2_ENABLE_READ() stepperE2.isEnabled() +#endif + +// E3 Stepper +#if AXIS_DRIVER_TYPE_E3(TMC26X) + extern TMC26XStepper stepperE3; + #define E3_ENABLE_INIT NOOP + #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) + #define E3_ENABLE_READ() stepperE3.isEnabled() +#endif + +// E4 Stepper +#if AXIS_DRIVER_TYPE_E4(TMC26X) + extern TMC26XStepper stepperE4; + #define E4_ENABLE_INIT NOOP + #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) + #define E4_ENABLE_READ() stepperE4.isEnabled() +#endif + +// E5 Stepper +#if AXIS_DRIVER_TYPE_E5(TMC26X) + extern TMC26XStepper stepperE5; + #define E5_ENABLE_INIT NOOP + #define E5_ENABLE_WRITE(STATE) stepperE5.setEnabled(STATE) + #define E5_ENABLE_READ() stepperE5.isEnabled() +#endif diff --git a/Marlin/src/module/stepper/indirection.cpp b/Marlin/src/module/stepper/indirection.cpp new file mode 100644 index 000000000000..2037c1b84e16 --- /dev/null +++ b/Marlin/src/module/stepper/indirection.cpp @@ -0,0 +1,53 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ + +/** + * stepper/indirection.cpp + * + * Stepper motor driver indirection to allow some stepper functions to + * be done via SPI/I2c instead of direct pin manipulation. + * + * Copyright (c) 2015 Dominik Wenger + */ + +#include "../../inc/MarlinConfig.h" +#include "indirection.h" + +void restore_stepper_drivers() { + #if HAS_TRINAMIC + restore_trinamic_drivers(); + #endif +} + +void reset_stepper_drivers() { + #if HAS_DRIVER(TMC26X) + tmc26x_init_to_defaults(); + #endif + + #if HAS_DRIVER(L6470) + L6470.init_to_defaults(); + #endif + + #if HAS_TRINAMIC + reset_trinamic_drivers(); + #endif +} diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h new file mode 100644 index 000000000000..ed87fde83cb8 --- /dev/null +++ b/Marlin/src/module/stepper/indirection.h @@ -0,0 +1,399 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * stepper/indirection.h + * + * Stepper motor driver indirection to allow some stepper functions to + * be done via SPI/I2c instead of direct pin manipulation. + * + * Copyright (c) 2015 Dominik Wenger + */ + +#include "../../inc/MarlinConfig.h" + +#if HAS_DRIVER(L6470) + #include "L6470.h" +#endif + +#if HAS_DRIVER(TMC26X) + #include "TMC26X.h" +#endif + +#if HAS_TRINAMIC + #include "trinamic.h" +#endif + +void restore_stepper_drivers(); // Called by PSU_ON +void reset_stepper_drivers(); // Called by settings.load / settings.reset + +// X Stepper +#ifndef X_ENABLE_INIT + #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN) + #define X_ENABLE_WRITE(STATE) WRITE(X_ENABLE_PIN,STATE) + #define X_ENABLE_READ() READ(X_ENABLE_PIN) +#endif +#ifndef X_DIR_INIT + #define X_DIR_INIT SET_OUTPUT(X_DIR_PIN) + #define X_DIR_WRITE(STATE) WRITE(X_DIR_PIN,STATE) + #define X_DIR_READ() READ(X_DIR_PIN) +#endif +#define X_STEP_INIT SET_OUTPUT(X_STEP_PIN) +#ifndef X_STEP_WRITE + #define X_STEP_WRITE(STATE) WRITE(X_STEP_PIN,STATE) +#endif +#define X_STEP_READ READ(X_STEP_PIN) + +// Y Stepper +#ifndef Y_ENABLE_INIT + #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN) + #define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE) + #define Y_ENABLE_READ() READ(Y_ENABLE_PIN) +#endif +#ifndef Y_DIR_INIT + #define Y_DIR_INIT SET_OUTPUT(Y_DIR_PIN) + #define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE) + #define Y_DIR_READ() READ(Y_DIR_PIN) +#endif +#define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN) +#ifndef Y_STEP_WRITE + #define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE) +#endif +#define Y_STEP_READ READ(Y_STEP_PIN) + +// Z Stepper +#ifndef Z_ENABLE_INIT + #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN) + #define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE) + #define Z_ENABLE_READ() READ(Z_ENABLE_PIN) +#endif +#ifndef Z_DIR_INIT + #define Z_DIR_INIT SET_OUTPUT(Z_DIR_PIN) + #define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE) + #define Z_DIR_READ() READ(Z_DIR_PIN) +#endif +#define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN) +#ifndef Z_STEP_WRITE + #define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE) +#endif +#define Z_STEP_READ READ(Z_STEP_PIN) + +// X2 Stepper +#if HAS_X2_ENABLE + #ifndef X2_ENABLE_INIT + #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) + #define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE) + #define X2_ENABLE_READ() READ(X2_ENABLE_PIN) + #endif + #ifndef X2_DIR_INIT + #define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN) + #define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE) + #define X2_DIR_READ() READ(X2_DIR_PIN) + #endif + #define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN) + #ifndef X2_STEP_WRITE + #define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE) + #endif + #define X2_STEP_READ READ(X2_STEP_PIN) +#endif + +// Y2 Stepper +#if HAS_Y2_ENABLE + #ifndef Y2_ENABLE_INIT + #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN) + #define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE) + #define Y2_ENABLE_READ() READ(Y2_ENABLE_PIN) + #endif + #ifndef Y2_DIR_INIT + #define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN) + #define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE) + #define Y2_DIR_READ() READ(Y2_DIR_PIN) + #endif + #define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN) + #ifndef Y2_STEP_WRITE + #define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE) + #endif + #define Y2_STEP_READ READ(Y2_STEP_PIN) +#else + #define Y2_DIR_WRITE(STATE) NOOP +#endif + +// Z2 Stepper +#if HAS_Z2_ENABLE + #ifndef Z2_ENABLE_INIT + #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN) + #define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE) + #define Z2_ENABLE_READ() READ(Z2_ENABLE_PIN) + #endif + #ifndef Z2_DIR_INIT + #define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN) + #define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE) + #define Z2_DIR_READ() READ(Z2_DIR_PIN) + #endif + #define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN) + #ifndef Z2_STEP_WRITE + #define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE) + #endif + #define Z2_STEP_READ READ(Z2_STEP_PIN) +#else + #define Z2_DIR_WRITE(STATE) NOOP +#endif + +// Z3 Stepper +#if HAS_Z3_ENABLE + #ifndef Z3_ENABLE_INIT + #define Z3_ENABLE_INIT SET_OUTPUT(Z3_ENABLE_PIN) + #define Z3_ENABLE_WRITE(STATE) WRITE(Z3_ENABLE_PIN,STATE) + #define Z3_ENABLE_READ() READ(Z3_ENABLE_PIN) + #endif + #ifndef Z3_DIR_INIT + #define Z3_DIR_INIT SET_OUTPUT(Z3_DIR_PIN) + #define Z3_DIR_WRITE(STATE) WRITE(Z3_DIR_PIN,STATE) + #define Z3_DIR_READ() READ(Z3_DIR_PIN) + #endif + #define Z3_STEP_INIT SET_OUTPUT(Z3_STEP_PIN) + #ifndef Z3_STEP_WRITE + #define Z3_STEP_WRITE(STATE) WRITE(Z3_STEP_PIN,STATE) + #endif + #define Z3_STEP_READ READ(Z3_STEP_PIN) +#else + #define Z3_DIR_WRITE(STATE) NOOP +#endif + +// E0 Stepper +#ifndef E0_ENABLE_INIT + #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN) + #define E0_ENABLE_WRITE(STATE) WRITE(E0_ENABLE_PIN,STATE) + #define E0_ENABLE_READ() READ(E0_ENABLE_PIN) +#endif +#ifndef E0_DIR_INIT + #define E0_DIR_INIT SET_OUTPUT(E0_DIR_PIN) + #define E0_DIR_WRITE(STATE) WRITE(E0_DIR_PIN,STATE) + #define E0_DIR_READ() READ(E0_DIR_PIN) +#endif +#define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN) +#ifndef E0_STEP_WRITE + #define E0_STEP_WRITE(STATE) WRITE(E0_STEP_PIN,STATE) +#endif +#define E0_STEP_READ READ(E0_STEP_PIN) + +// E1 Stepper +#ifndef E1_ENABLE_INIT + #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN) + #define E1_ENABLE_WRITE(STATE) WRITE(E1_ENABLE_PIN,STATE) + #define E1_ENABLE_READ() READ(E1_ENABLE_PIN) +#endif +#ifndef E1_DIR_INIT + #define E1_DIR_INIT SET_OUTPUT(E1_DIR_PIN) + #define E1_DIR_WRITE(STATE) WRITE(E1_DIR_PIN,STATE) + #define E1_DIR_READ() READ(E1_DIR_PIN) +#endif +#define E1_STEP_INIT SET_OUTPUT(E1_STEP_PIN) +#ifndef E1_STEP_WRITE + #define E1_STEP_WRITE(STATE) WRITE(E1_STEP_PIN,STATE) +#endif +#define E1_STEP_READ READ(E1_STEP_PIN) + +// E2 Stepper +#ifndef E2_ENABLE_INIT + #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN) + #define E2_ENABLE_WRITE(STATE) WRITE(E2_ENABLE_PIN,STATE) + #define E2_ENABLE_READ() READ(E2_ENABLE_PIN) +#endif +#ifndef E2_DIR_INIT + #define E2_DIR_INIT SET_OUTPUT(E2_DIR_PIN) + #define E2_DIR_WRITE(STATE) WRITE(E2_DIR_PIN,STATE) + #define E2_DIR_READ() READ(E2_DIR_PIN) +#endif +#define E2_STEP_INIT SET_OUTPUT(E2_STEP_PIN) +#ifndef E2_STEP_WRITE + #define E2_STEP_WRITE(STATE) WRITE(E2_STEP_PIN,STATE) +#endif +#define E2_STEP_READ READ(E2_STEP_PIN) + +// E3 Stepper +#ifndef E3_ENABLE_INIT + #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN) + #define E3_ENABLE_WRITE(STATE) WRITE(E3_ENABLE_PIN,STATE) + #define E3_ENABLE_READ() READ(E3_ENABLE_PIN) +#endif +#ifndef E3_DIR_INIT + #define E3_DIR_INIT SET_OUTPUT(E3_DIR_PIN) + #define E3_DIR_WRITE(STATE) WRITE(E3_DIR_PIN,STATE) + #define E3_DIR_READ() READ(E3_DIR_PIN) +#endif +#define E3_STEP_INIT SET_OUTPUT(E3_STEP_PIN) +#ifndef E3_STEP_WRITE + #define E3_STEP_WRITE(STATE) WRITE(E3_STEP_PIN,STATE) +#endif +#define E3_STEP_READ READ(E3_STEP_PIN) + +// E4 Stepper +#ifndef E4_ENABLE_INIT + #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN) + #define E4_ENABLE_WRITE(STATE) WRITE(E4_ENABLE_PIN,STATE) + #define E4_ENABLE_READ() READ(E4_ENABLE_PIN) +#endif +#ifndef E4_DIR_INIT + #define E4_DIR_INIT SET_OUTPUT(E4_DIR_PIN) + #define E4_DIR_WRITE(STATE) WRITE(E4_DIR_PIN,STATE) + #define E4_DIR_READ() READ(E4_DIR_PIN) +#endif +#define E4_STEP_INIT SET_OUTPUT(E4_STEP_PIN) +#ifndef E4_STEP_WRITE + #define E4_STEP_WRITE(STATE) WRITE(E4_STEP_PIN,STATE) +#endif +#define E4_STEP_READ READ(E4_STEP_PIN) + +// E5 Stepper +#ifndef E5_ENABLE_INIT + #define E5_ENABLE_INIT SET_OUTPUT(E5_ENABLE_PIN) + #define E5_ENABLE_WRITE(STATE) WRITE(E5_ENABLE_PIN,STATE) + #define E5_ENABLE_READ() READ(E5_ENABLE_PIN) +#endif +#ifndef E5_DIR_INIT + #define E5_DIR_INIT SET_OUTPUT(E5_DIR_PIN) + #define E5_DIR_WRITE(STATE) WRITE(E5_DIR_PIN,STATE) + #define E5_DIR_READ() READ(E5_DIR_PIN) +#endif +#define E5_STEP_INIT SET_OUTPUT(E5_STEP_PIN) +#ifndef E5_STEP_WRITE + #define E5_STEP_WRITE(STATE) WRITE(E5_STEP_PIN,STATE) +#endif +#define E5_STEP_READ READ(E5_STEP_PIN) + +/** + * Extruder indirection for the single E axis + */ +#if ENABLED(SWITCHING_EXTRUDER) // One stepper driver per two extruders, reversed on odd index + #if EXTRUDERS > 5 + #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else { E2_STEP_WRITE(V); } }while(0) + #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE( INVERT_E1_DIR); break; case 4: E2_DIR_WRITE(!INVERT_E2_DIR); case 5: E2_DIR_WRITE( INVERT_E2_DIR); } }while(0) + #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 4: E2_DIR_WRITE( INVERT_E2_DIR); case 5: E2_DIR_WRITE(!INVERT_E2_DIR); } }while(0) + #elif EXTRUDERS > 4 + #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else { E2_STEP_WRITE(V); } }while(0) + #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE( INVERT_E1_DIR); break; case 4: E2_DIR_WRITE(!INVERT_E2_DIR); } }while(0) + #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 4: E2_DIR_WRITE( INVERT_E2_DIR); } }while(0) + #elif EXTRUDERS > 3 + #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) + #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) + #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0) + #elif EXTRUDERS > 2 + #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) + #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0) + #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) + #else + #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) + #define NORM_E_DIR(E) do{ E0_DIR_WRITE(E ? INVERT_E0_DIR : !INVERT_E0_DIR); }while(0) + #define REV_E_DIR(E) do{ E0_DIR_WRITE(E ? !INVERT_E0_DIR : INVERT_E0_DIR); }while(0) + #endif +#elif ENABLED(PRUSA_MMU2) + #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) + #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) + #define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR) + +#elif ENABLED(MK2_MULTIPLEXER) // One multiplexed stepper driver, reversed on odd index + #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) + #define NORM_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR); }while(0) + #define REV_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR); }while(0) + +#elif E_STEPPERS > 1 + + #if E_STEPPERS > 5 + #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); break; case 4: E4_STEP_WRITE(V); case 5: E5_STEP_WRITE(V); } }while(0) + #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); case 5: E5_DIR_WRITE(!INVERT_E5_DIR); } }while(0) + #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 4: E4_DIR_WRITE( INVERT_E4_DIR); case 5: E5_DIR_WRITE( INVERT_E5_DIR); } }while(0) + #elif E_STEPPERS > 4 + #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); break; case 4: E4_STEP_WRITE(V); } }while(0) + #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } }while(0) + #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 4: E4_DIR_WRITE( INVERT_E4_DIR); } }while(0) + #elif E_STEPPERS > 3 + #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); } }while(0) + #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); } }while(0) + #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); } }while(0) + #elif E_STEPPERS > 2 + #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); } }while(0) + #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); } }while(0) + #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); } }while(0) + #else + #define _E_STEP_WRITE(E,V) do{ if (E == 0) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) + #define _NORM_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0) + #define _REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( INVERT_E0_DIR); } else { E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) + #endif + + #if HAS_DUPLICATION_MODE + + #if ENABLED(MULTI_NOZZLE_DUPLICATION) + #define _DUPE(N,T,V) do{ if (TEST(duplication_e_mask, N)) E##N##_##T##_WRITE(V); }while(0) + #else + #define _DUPE(N,T,V) E##N##_##T##_WRITE(V) + #endif + + #define NDIR(N) _DUPE(N,DIR,!INVERT_E##N##_DIR) + #define RDIR(N) _DUPE(N,DIR, INVERT_E##N##_DIR) + + #define E_STEP_WRITE(E,V) do{ if (extruder_duplication_enabled) { DUPE(STEP,V); } else _E_STEP_WRITE(E,V); }while(0) + + #if E_STEPPERS > 2 + #if E_STEPPERS > 5 + #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); _DUPE(5,T,V); }while(0) + #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); NDIR(5); } else _NORM_E_DIR(E); }while(0) + #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); RDIR(5); } else _REV_E_DIR(E); }while(0) + #elif E_STEPPERS > 4 + #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); }while(0) + #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); } else _NORM_E_DIR(E); }while(0) + #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); } else _REV_E_DIR(E); }while(0) + #elif E_STEPPERS > 3 + #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); }while(0) + #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); } else _NORM_E_DIR(E); }while(0) + #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); } else _REV_E_DIR(E); }while(0) + #else + #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); }while(0) + #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); } else _NORM_E_DIR(E); }while(0) + #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); } else _REV_E_DIR(E); }while(0) + #endif + #else + #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); }while(0) + #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); } else _NORM_E_DIR(E); }while(0) + #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); } else _REV_E_DIR(E); }while(0) + #endif + + #else + + #define E_STEP_WRITE(E,V) _E_STEP_WRITE(E,V) + #define NORM_E_DIR(E) _NORM_E_DIR(E) + #define REV_E_DIR(E) _REV_E_DIR(E) + + #endif + +#elif E_STEPPERS + #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) + #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) + #define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR) + +#else + #define E_STEP_WRITE(E,V) NOOP + #define NORM_E_DIR(E) NOOP + #define REV_E_DIR(E) NOOP + +#endif diff --git a/Marlin/src/module/stepper_indirection.cpp b/Marlin/src/module/stepper/trinamic.cpp similarity index 64% rename from Marlin/src/module/stepper_indirection.cpp rename to Marlin/src/module/stepper/trinamic.cpp index 786cb1db8f5f..a0910204e6b1 100644 --- a/Marlin/src/module/stepper_indirection.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -21,204 +21,90 @@ */ /** - * stepper_indirection.cpp - * - * Stepper motor driver indirection to allow some stepper functions to - * be done via SPI/I2c instead of direct pin manipulation. - * - * Copyright (c) 2015 Dominik Wenger + * stepper/trinamic.cpp + * Stepper driver indirection for Trinamic */ -#include "stepper_indirection.h" - -#include "../inc/MarlinConfig.h" - -#include "stepper.h" - -#if HAS_DRIVER(L6470) - #include "L6470/L6470_Marlin.h" -#endif - -// -// TMC26X Driver objects and inits -// -#if HAS_DRIVER(TMC26X) - #include - - #if defined(STM32GENERIC) && defined(STM32F7) - #include "../HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.h" - #else - #include - #endif - - #define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) - - #if AXIS_DRIVER_TYPE_X(TMC26X) - _TMC26X_DEFINE(X); - #endif - #if AXIS_DRIVER_TYPE_X2(TMC26X) - _TMC26X_DEFINE(X2); - #endif - #if AXIS_DRIVER_TYPE_Y(TMC26X) - _TMC26X_DEFINE(Y); - #endif - #if AXIS_DRIVER_TYPE_Y2(TMC26X) - _TMC26X_DEFINE(Y2); - #endif - #if AXIS_DRIVER_TYPE_Z(TMC26X) - _TMC26X_DEFINE(Z); - #endif - #if AXIS_DRIVER_TYPE_Z2(TMC26X) - _TMC26X_DEFINE(Z2); - #endif - #if AXIS_DRIVER_TYPE_Z3(TMC26X) - _TMC26X_DEFINE(Z3); - #endif - #if AXIS_DRIVER_TYPE_E0(TMC26X) - _TMC26X_DEFINE(E0); - #endif - #if AXIS_DRIVER_TYPE_E1(TMC26X) - _TMC26X_DEFINE(E1); - #endif - #if AXIS_DRIVER_TYPE_E2(TMC26X) - _TMC26X_DEFINE(E2); - #endif - #if AXIS_DRIVER_TYPE_E3(TMC26X) - _TMC26X_DEFINE(E3); - #endif - #if AXIS_DRIVER_TYPE_E4(TMC26X) - _TMC26X_DEFINE(E4); - #endif - #if AXIS_DRIVER_TYPE_E5(TMC26X) - _TMC26X_DEFINE(E5); - #endif - - #define _TMC26X_INIT(A) do{ \ - stepper##A.setMicrosteps(A##_MICROSTEPS); \ - stepper##A.start(); \ - }while(0) - - void tmc26x_init_to_defaults() { - #if AXIS_DRIVER_TYPE_X(TMC26X) - _TMC26X_INIT(X); - #endif - #if AXIS_DRIVER_TYPE_X2(TMC26X) - _TMC26X_INIT(X2); - #endif - #if AXIS_DRIVER_TYPE_Y(TMC26X) - _TMC26X_INIT(Y); - #endif - #if AXIS_DRIVER_TYPE_Y2(TMC26X) - _TMC26X_INIT(Y2); - #endif - #if AXIS_DRIVER_TYPE_Z(TMC26X) - _TMC26X_INIT(Z); - #endif - #if AXIS_DRIVER_TYPE_Z2(TMC26X) - _TMC26X_INIT(Z2); - #endif - #if AXIS_DRIVER_TYPE_Z3(TMC26X) - _TMC26X_INIT(Z3); - #endif - #if AXIS_DRIVER_TYPE_E0(TMC26X) - _TMC26X_INIT(E0); - #endif - #if AXIS_DRIVER_TYPE_E1(TMC26X) - _TMC26X_INIT(E1); - #endif - #if AXIS_DRIVER_TYPE_E2(TMC26X) - _TMC26X_INIT(E2); - #endif - #if AXIS_DRIVER_TYPE_E3(TMC26X) - _TMC26X_INIT(E3); - #endif - #if AXIS_DRIVER_TYPE_E4(TMC26X) - _TMC26X_INIT(E4); - #endif - #if AXIS_DRIVER_TYPE_E5(TMC26X) - _TMC26X_INIT(E5); - #endif - } -#endif // TMC26X +#include "../../inc/MarlinConfig.h" #if HAS_TRINAMIC - #include - #include - #include "planner.h" - #include "../core/enum.h" - enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; - #define _TMC_INIT(ST, STEALTH_INDEX) tmc_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, stealthchop_by_axis[STEALTH_INDEX]) +#include "trinamic.h" +#include "../stepper.h" - // IC = TMC model number - // ST = Stepper object letter - // L = Label characters - // AI = Axis Enum Index - // SWHW = SW/SH UART selection - #if ENABLED(TMC_USE_SW_SPI) - #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, ST##_RSENSE, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK) - #else - #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, ST##_RSENSE) - #endif +#include +#include - #define TMC_UART_HW_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(&ST##_HARDWARE_SERIAL, ST##_RSENSE, ST##_SLAVE_ADDRESS) - #define TMC_UART_SW_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN, ST##_RSENSE, ST##_SLAVE_ADDRESS, ST##_SERIAL_RX_PIN > -1) +enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; +#define _TMC_INIT(ST, STEALTH_INDEX) tmc_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, stealthchop_by_axis[STEALTH_INDEX]) - #define _TMC_SPI_DEFINE(IC, ST, AI) __TMC_SPI_DEFINE(IC, ST, TMC_##ST##_LABEL, AI) - #define TMC_SPI_DEFINE(ST, AI) _TMC_SPI_DEFINE(ST##_DRIVER_TYPE, ST, AI##_AXIS) +// IC = TMC model number +// ST = Stepper object letter +// L = Label characters +// AI = Axis Enum Index +// SWHW = SW/SH UART selection +#if ENABLED(TMC_USE_SW_SPI) + #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, ST##_RSENSE, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK) +#else + #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, ST##_RSENSE) +#endif - #define _TMC_UART_DEFINE(SWHW, IC, ST, AI) TMC_UART_##SWHW##_DEFINE(IC, ST, TMC_##ST##_LABEL, AI) - #define TMC_UART_DEFINE(SWHW, ST, AI) _TMC_UART_DEFINE(SWHW, ST##_DRIVER_TYPE, ST, AI##_AXIS) +#define TMC_UART_HW_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(&ST##_HARDWARE_SERIAL, ST##_RSENSE, ST##_SLAVE_ADDRESS) +#define TMC_UART_SW_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN, ST##_RSENSE, ST##_SLAVE_ADDRESS, ST##_SERIAL_RX_PIN > -1) - #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 - #define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E##AI) - #define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E##AI) - #else - #define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E) - #define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E) - #endif +#define _TMC_SPI_DEFINE(IC, ST, AI) __TMC_SPI_DEFINE(IC, ST, TMC_##ST##_LABEL, AI) +#define TMC_SPI_DEFINE(ST, AI) _TMC_SPI_DEFINE(ST##_DRIVER_TYPE, ST, AI##_AXIS) - // Stepper objects of TMC2130/TMC2160/TMC2660/TMC5130/TMC5160 steppers used - #if AXIS_HAS_SPI(X) - TMC_SPI_DEFINE(X, X); - #endif - #if AXIS_HAS_SPI(X2) - TMC_SPI_DEFINE(X2, X); - #endif - #if AXIS_HAS_SPI(Y) - TMC_SPI_DEFINE(Y, Y); - #endif - #if AXIS_HAS_SPI(Y2) - TMC_SPI_DEFINE(Y2, Y); - #endif - #if AXIS_HAS_SPI(Z) - TMC_SPI_DEFINE(Z, Z); - #endif - #if AXIS_HAS_SPI(Z2) - TMC_SPI_DEFINE(Z2, Z); - #endif - #if AXIS_HAS_SPI(Z3) - TMC_SPI_DEFINE(Z3, Z); - #endif - #if AXIS_HAS_SPI(E0) - TMC_SPI_DEFINE_E(0); - #endif - #if AXIS_HAS_SPI(E1) - TMC_SPI_DEFINE_E(1); - #endif - #if AXIS_HAS_SPI(E2) - TMC_SPI_DEFINE_E(2); - #endif - #if AXIS_HAS_SPI(E3) - TMC_SPI_DEFINE_E(3); - #endif - #if AXIS_HAS_SPI(E4) - TMC_SPI_DEFINE_E(4); - #endif - #if AXIS_HAS_SPI(E5) - TMC_SPI_DEFINE_E(5); - #endif +#define _TMC_UART_DEFINE(SWHW, IC, ST, AI) TMC_UART_##SWHW##_DEFINE(IC, ST, TMC_##ST##_LABEL, AI) +#define TMC_UART_DEFINE(SWHW, ST, AI) _TMC_UART_DEFINE(SWHW, ST##_DRIVER_TYPE, ST, AI##_AXIS) +#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 + #define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E##AI) + #define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E##AI) +#else + #define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E) + #define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E) +#endif + +// Stepper objects of TMC2130/TMC2160/TMC2660/TMC5130/TMC5160 steppers used +#if AXIS_HAS_SPI(X) + TMC_SPI_DEFINE(X, X); +#endif +#if AXIS_HAS_SPI(X2) + TMC_SPI_DEFINE(X2, X); +#endif +#if AXIS_HAS_SPI(Y) + TMC_SPI_DEFINE(Y, Y); +#endif +#if AXIS_HAS_SPI(Y2) + TMC_SPI_DEFINE(Y2, Y); +#endif +#if AXIS_HAS_SPI(Z) + TMC_SPI_DEFINE(Z, Z); +#endif +#if AXIS_HAS_SPI(Z2) + TMC_SPI_DEFINE(Z2, Z); +#endif +#if AXIS_HAS_SPI(Z3) + TMC_SPI_DEFINE(Z3, Z); +#endif +#if AXIS_HAS_SPI(E0) + TMC_SPI_DEFINE_E(0); +#endif +#if AXIS_HAS_SPI(E1) + TMC_SPI_DEFINE_E(1); +#endif +#if AXIS_HAS_SPI(E2) + TMC_SPI_DEFINE_E(2); +#endif +#if AXIS_HAS_SPI(E3) + TMC_SPI_DEFINE_E(3); +#endif +#if AXIS_HAS_SPI(E4) + TMC_SPI_DEFINE_E(4); +#endif +#if AXIS_HAS_SPI(E5) + TMC_SPI_DEFINE_E(5); #endif #if HAS_DRIVER(TMC2130) @@ -704,7 +590,7 @@ } #endif // TMC5160 -void restore_stepper_drivers() { +void restore_trinamic_drivers() { #if AXIS_IS_TMC(X) stepperX.push(); #endif @@ -746,37 +632,113 @@ void restore_stepper_drivers() { #endif } -void reset_stepper_drivers() { +void reset_trinamic_drivers() { + static constexpr bool stealthchop_by_axis[] = { + #if ENABLED(STEALTHCHOP_XY) + true + #else + false + #endif + , + #if ENABLED(STEALTHCHOP_Z) + true + #else + false + #endif + , + #if ENABLED(STEALTHCHOP_E) + true + #else + false + #endif + }; + + #if TMC_USE_CHAIN - #if HAS_DRIVER(TMC26X) - tmc26x_init_to_defaults(); - #endif + enum TMC_axis_enum : unsigned char { _, X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5 }; + #define __TMC_CHAIN(Q,V) do{ stepper##Q.set_chain_info(Q,V); }while(0) + #define _TMC_CHAIN(Q) __TMC_CHAIN(Q, Q##_CHAIN_POS) - #if HAS_DRIVER(L6470) - L6470.init_to_defaults(); - #endif + #if AXIS_HAS_SPI(X) // First set chain array to uninitialized + __TMC_CHAIN(X, 0); + #endif + #if AXIS_HAS_SPI(X2) + __TMC_CHAIN(X2, 0); + #endif + #if AXIS_HAS_SPI(Y) + __TMC_CHAIN(Y, 0); + #endif + #if AXIS_HAS_SPI(Y2) + __TMC_CHAIN(Y2, 0); + #endif + #if AXIS_HAS_SPI(Z) + __TMC_CHAIN(Z, 0); + #endif + #if AXIS_HAS_SPI(Z2) + __TMC_CHAIN(Z2, 0); + #endif + #if AXIS_HAS_SPI(Z3) + __TMC_CHAIN(Z3, 0); + #endif + #if AXIS_HAS_SPI(E0) + __TMC_CHAIN(E0, 0); + #endif + #if AXIS_HAS_SPI(E1) + __TMC_CHAIN(E1, 0); + #endif + #if AXIS_HAS_SPI(E2) + __TMC_CHAIN(E2, 0); + #endif + #if AXIS_HAS_SPI(E3) + __TMC_CHAIN(E3, 0); + #endif + #if AXIS_HAS_SPI(E4) + __TMC_CHAIN(E4, 0); + #endif + #if AXIS_HAS_SPI(E5) + __TMC_CHAIN(E5, 0); + #endif - #if HAS_TRINAMIC - static constexpr bool stealthchop_by_axis[] = { - #if ENABLED(STEALTHCHOP_XY) - true - #else - false - #endif - , - #if ENABLED(STEALTHCHOP_Z) - true - #else - false - #endif - , - #if ENABLED(STEALTHCHOP_E) - true - #else - false - #endif - }; - #endif + #if AXIS_HAS_SPI(X) && X_CHAIN_POS // Now set up the SPI chain + _TMC_CHAIN(X); + #endif + #if AXIS_HAS_SPI(X2) && X2_CHAIN_POS + _TMC_CHAIN(X2); + #endif + #if AXIS_HAS_SPI(Y) && Y_CHAIN_POS + _TMC_CHAIN(Y); + #endif + #if AXIS_HAS_SPI(Y2) && Y2_CHAIN_POS + _TMC_CHAIN(Y2); + #endif + #if AXIS_HAS_SPI(Z) && Z_CHAIN_POS + _TMC_CHAIN(Z); + #endif + #if AXIS_HAS_SPI(Z2) && Z2_CHAIN_POS + _TMC_CHAIN(Z2); + #endif + #if AXIS_HAS_SPI(Z3) && Z3_CHAIN_POS + _TMC_CHAIN(Z3); + #endif + #if AXIS_HAS_SPI(E0) && E0_CHAIN_POS + _TMC_CHAIN(E0); + #endif + #if AXIS_HAS_SPI(E1) && E1_CHAIN_POS + _TMC_CHAIN(E1); + #endif + #if AXIS_HAS_SPI(E2) && E2_CHAIN_POS + _TMC_CHAIN(E2); + #endif + #if AXIS_HAS_SPI(E3) && E3_CHAIN_POS + _TMC_CHAIN(E3); + #endif + #if AXIS_HAS_SPI(E4) && E4_CHAIN_POS + _TMC_CHAIN(E4); + #endif + #if AXIS_HAS_SPI(E5) && E5_CHAIN_POS + _TMC_CHAIN(E5); + #endif + #endif // TMC_USE_CHAIN #if AXIS_IS_TMC(X) _TMC_INIT(X, STEALTH_AXIS_XY); @@ -823,10 +785,13 @@ void reset_stepper_drivers() { #if AXIS_HAS_STALLGUARD(X) stepperX.homing_threshold(X_STALL_SENSITIVITY); #endif - #if AXIS_HAS_STALLGUARD(X2) + #if AXIS_HAS_STALLGUARD(X2) && !X2_SENSORLESS stepperX2.homing_threshold(X_STALL_SENSITIVITY); #endif #endif + #if X2_SENSORLESS + stepperX2.homing_threshold(X2_STALL_SENSITIVITY); + #endif #if Y_SENSORLESS #if AXIS_HAS_STALLGUARD(Y) stepperY.homing_threshold(Y_STALL_SENSITIVITY); @@ -852,125 +817,7 @@ void reset_stepper_drivers() { TMC_ADV() #endif - #if HAS_TRINAMIC - stepper.set_directions(); - #endif + stepper.set_directions(); } -// -// L6470 Driver objects and inits -// -#if HAS_DRIVER(L6470) - - // create stepper objects - - #define _L6470_DEFINE(ST) L6470 stepper##ST((const int)L6470_CHAIN_SS_PIN) - - // L6470 Stepper objects - #if AXIS_DRIVER_TYPE_X(L6470) - _L6470_DEFINE(X); - #endif - #if AXIS_DRIVER_TYPE_X2(L6470) - _L6470_DEFINE(X2); - #endif - #if AXIS_DRIVER_TYPE_Y(L6470) - _L6470_DEFINE(Y); - #endif - #if AXIS_DRIVER_TYPE_Y2(L6470) - _L6470_DEFINE(Y2); - #endif - #if AXIS_DRIVER_TYPE_Z(L6470) - _L6470_DEFINE(Z); - #endif - #if AXIS_DRIVER_TYPE_Z2(L6470) - _L6470_DEFINE(Z2); - #endif - #if AXIS_DRIVER_TYPE_Z3(L6470) - _L6470_DEFINE(Z3); - #endif - #if AXIS_DRIVER_TYPE_E0(L6470) - _L6470_DEFINE(E0); - #endif - #if AXIS_DRIVER_TYPE_E1(L6470) - _L6470_DEFINE(E1); - #endif - #if AXIS_DRIVER_TYPE_E2(L6470) - _L6470_DEFINE(E2); - #endif - #if AXIS_DRIVER_TYPE_E3(L6470) - _L6470_DEFINE(E3); - #endif - #if AXIS_DRIVER_TYPE_E4(L6470) - _L6470_DEFINE(E4); - #endif - #if AXIS_DRIVER_TYPE_E5(L6470) - _L6470_DEFINE(E5); - #endif - - // not using L6470 library's init command because it - // briefly sends power to the steppers - - #define _L6470_INIT_CHIP(Q) do{ \ - stepper##Q.resetDev(); \ - stepper##Q.softFree(); \ - stepper##Q.SetParam(L6470_CONFIG, CONFIG_PWM_DIV_1 \ - | CONFIG_PWM_MUL_2 \ - | CONFIG_SR_290V_us \ - | CONFIG_OC_SD_DISABLE \ - | CONFIG_VS_COMP_DISABLE \ - | CONFIG_SW_HARD_STOP \ - | CONFIG_INT_16MHZ); \ - stepper##Q.SetParam(L6470_KVAL_RUN, 0xFF); \ - stepper##Q.SetParam(L6470_KVAL_ACC, 0xFF); \ - stepper##Q.SetParam(L6470_KVAL_DEC, 0xFF); \ - stepper##Q.setMicroSteps(Q##_MICROSTEPS); \ - stepper##Q.setOverCurrent(Q##_OVERCURRENT); \ - stepper##Q.setStallCurrent(Q##_STALLCURRENT); \ - stepper##Q.SetParam(L6470_KVAL_HOLD, Q##_MAX_VOLTAGE); \ - stepper##Q.SetParam(L6470_ABS_POS, 0); \ - stepper##Q.getStatus(); \ - }while(0) - - void L6470_Marlin::init_to_defaults() { - #if AXIS_DRIVER_TYPE_X(L6470) - _L6470_INIT_CHIP(X); - #endif - #if AXIS_DRIVER_TYPE_X2(L6470) - _L6470_INIT_CHIP(X2); - #endif - #if AXIS_DRIVER_TYPE_Y(L6470) - _L6470_INIT_CHIP(Y); - #endif - #if AXIS_DRIVER_TYPE_Y2(L6470) - _L6470_INIT_CHIP(Y2); - #endif - #if AXIS_DRIVER_TYPE_Z(L6470) - _L6470_INIT_CHIP(Z); - #endif - #if AXIS_DRIVER_TYPE_Z2(L6470) - _L6470_INIT_CHIP(Z2); - #endif - #if AXIS_DRIVER_TYPE_Z3(L6470) - _L6470_INIT_CHIP(Z3); - #endif - #if AXIS_DRIVER_TYPE_E0(L6470) - _L6470_INIT_CHIP(E0); - #endif - #if AXIS_DRIVER_TYPE_E1(L6470) - _L6470_INIT_CHIP(E1); - #endif - #if AXIS_DRIVER_TYPE_E2(L6470) - _L6470_INIT_CHIP(E2); - #endif - #if AXIS_DRIVER_TYPE_E3(L6470) - _L6470_INIT_CHIP(E3); - #endif - #if AXIS_DRIVER_TYPE_E4(L6470) - _L6470_INIT_CHIP(E4); - #endif - #if AXIS_DRIVER_TYPE_E5(L6470) - _L6470_INIT_CHIP(E5); - #endif - } - -#endif // L6470 +#endif // HAS_TRINAMIC diff --git a/Marlin/src/module/stepper/trinamic.h b/Marlin/src/module/stepper/trinamic.h new file mode 100644 index 000000000000..711d46b65835 --- /dev/null +++ b/Marlin/src/module/stepper/trinamic.h @@ -0,0 +1,232 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * stepper/trinamic.h + * Stepper driver indirection for Trinamic + */ + +#include +#if TMCSTEPPER_VERSION < 0x000405 + #error "Update TMCStepper library to 0.4.5 or newer." +#endif + +#include "../../inc/MarlinConfig.h" +#include "../../feature/tmc_util.h" + +#define ____TMC_CLASS(MODEL, A, I, E) TMCMarlin +#define ___TMC_CLASS(MODEL, A, I, E) ____TMC_CLASS(MODEL, A, I, E) +#define __TMC_CLASS(MODEL, A, I, E) ___TMC_CLASS(_##MODEL, A, I, E) +#define _TMC_CLASS(MODEL, L, E) __TMC_CLASS(MODEL, L, E) +#define TMC_CLASS(ST, A) _TMC_CLASS(ST##_DRIVER_TYPE, TMC_##ST##_LABEL, A##_AXIS) +#if ENABLED(DISTINCT_E_FACTORS) + #define TMC_CLASS_E(I) TMC_CLASS(E##I, E##I) +#else + #define TMC_CLASS_E(I) TMC_CLASS(E##I, E) +#endif + +typedef struct { + uint8_t toff; + int8_t hend; + uint8_t hstrt; +} chopper_timing_t; + +static constexpr chopper_timing_t chopper_timing = CHOPPER_TIMING; + +#if HAS_TMC220x + void tmc_serial_begin(); +#endif + +void restore_trinamic_drivers(); +void reset_trinamic_drivers(); + +#define AXIS_HAS_SQUARE_WAVE(A) (AXIS_IS_TMC(A) && ENABLED(SQUARE_WAVE_STEPPING)) + +// X Stepper +#if AXIS_IS_TMC(X) + extern TMC_CLASS(X, X) stepperX; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define X_ENABLE_INIT NOOP + #define X_ENABLE_WRITE(STATE) stepperX.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0) + #define X_ENABLE_READ() stepperX.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(X) + #define X_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X_STEP_PIN); }while(0) + #endif +#endif + +// Y Stepper +#if AXIS_IS_TMC(Y) + extern TMC_CLASS(Y, Y) stepperY; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define Y_ENABLE_INIT NOOP + #define Y_ENABLE_WRITE(STATE) stepperY.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0) + #define Y_ENABLE_READ() stepperY.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(Y) + #define Y_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Y_STEP_PIN); }while(0) + #endif +#endif + +// Z Stepper +#if AXIS_IS_TMC(Z) + extern TMC_CLASS(Z, Z) stepperZ; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define Z_ENABLE_INIT NOOP + #define Z_ENABLE_WRITE(STATE) stepperZ.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0) + #define Z_ENABLE_READ() stepperZ.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(Z) + #define Z_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z_STEP_PIN); }while(0) + #endif +#endif + +// X2 Stepper +#if HAS_X2_ENABLE && AXIS_IS_TMC(X2) + extern TMC_CLASS(X2, X) stepperX2; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define X2_ENABLE_INIT NOOP + #define X2_ENABLE_WRITE(STATE) stepperX2.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0) + #define X2_ENABLE_READ() stepperX2.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(X2) + #define X2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X2_STEP_PIN); }while(0) + #endif +#endif + +// Y2 Stepper +#if HAS_Y2_ENABLE && AXIS_IS_TMC(Y2) + extern TMC_CLASS(Y2, Y) stepperY2; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define Y2_ENABLE_INIT NOOP + #define Y2_ENABLE_WRITE(STATE) stepperY2.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0) + #define Y2_ENABLE_READ() stepperY2.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(Y2) + #define Y2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Y2_STEP_PIN); }while(0) + #endif +#endif + +// Z2 Stepper +#if HAS_Z2_ENABLE && AXIS_IS_TMC(Z2) + extern TMC_CLASS(Z2, Z) stepperZ2; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2) + #define Z2_ENABLE_INIT NOOP + #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0) + #define Z2_ENABLE_READ() stepperZ2.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(Z2) + #define Z2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z2_STEP_PIN); }while(0) + #endif +#endif + +// Z3 Stepper +#if HAS_Z3_ENABLE && AXIS_IS_TMC(Z3) + extern TMC_CLASS(Z3, Z) stepperZ3; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define Z3_ENABLE_INIT NOOP + #define Z3_ENABLE_WRITE(STATE) stepperZ3.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0) + #define Z3_ENABLE_READ() stepperZ3.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(Z3) + #define Z3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z3_STEP_PIN); }while(0) + #endif +#endif + +// E0 Stepper +#if AXIS_IS_TMC(E0) + extern TMC_CLASS_E(0) stepperE0; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0) + #define E0_ENABLE_INIT NOOP + #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) + #define E0_ENABLE_READ() stepperE0.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(E0) + #define E0_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E0_STEP_PIN); }while(0) + #endif +#endif + +// E1 Stepper +#if AXIS_IS_TMC(E1) + extern TMC_CLASS_E(1) stepperE1; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1) + #define E1_ENABLE_INIT NOOP + #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) + #define E1_ENABLE_READ() stepperE1.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(E1) + #define E1_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E1_STEP_PIN); }while(0) + #endif +#endif + +// E2 Stepper +#if AXIS_IS_TMC(E2) + extern TMC_CLASS_E(1) stepperE2; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2) + #define E2_ENABLE_INIT NOOP + #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) + #define E2_ENABLE_READ() stepperE2.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(E2) + #define E2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E2_STEP_PIN); }while(0) + #endif +#endif + +// E3 Stepper +#if AXIS_IS_TMC(E3) + extern TMC_CLASS_E(1) stepperE3; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3) + #define E3_ENABLE_INIT NOOP + #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) + #define E3_ENABLE_READ() stepperE3.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(E3) + #define E3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E3_STEP_PIN); }while(0) + #endif +#endif + +// E4 Stepper +#if AXIS_IS_TMC(E4) + extern TMC_CLASS_E(1) stepperE4; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4) + #define E4_ENABLE_INIT NOOP + #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) + #define E4_ENABLE_READ() stepperE4.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(E4) + #define E4_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E4_STEP_PIN); }while(0) + #endif +#endif + +// E5 Stepper +#if AXIS_IS_TMC(E5) + extern TMC_CLASS_E(1) stepperE5; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5) + #define E5_ENABLE_INIT NOOP + #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) + #define E5_ENABLE_READ() stepperE5.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(E5) + #define E5_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E5_STEP_PIN); }while(0) + #endif +#endif diff --git a/Marlin/src/module/stepper_indirection.h b/Marlin/src/module/stepper_indirection.h deleted file mode 100644 index b0688a9a089a..000000000000 --- a/Marlin/src/module/stepper_indirection.h +++ /dev/null @@ -1,727 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2019 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 . - * - */ -#pragma once - -/** - * stepper_indirection.h - * - * Stepper motor driver indirection to allow some stepper functions to - * be done via SPI/I2c instead of direct pin manipulation. - * - * Copyright (c) 2015 Dominik Wenger - */ - -#include "../inc/MarlinConfig.h" - -// TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI -#if HAS_DRIVER(TMC26X) - #include - #if defined(STM32GENERIC) && defined(STM32F7) - #include "../HAL/HAL_STM32_F4_F7/STM32F7/TMC2660.h" - #else - #include - #endif - void tmc26x_init_to_defaults(); -#endif - -#if HAS_TRINAMIC - #include - #include "../feature/tmc_util.h" - #if TMCSTEPPER_VERSION < 0x000405 - #error "Update TMCStepper library to 0.4.5 or newer." - #endif - - #define ____TMC_CLASS(MODEL, A, I, E) TMCMarlin - #define ___TMC_CLASS(MODEL, A, I, E) ____TMC_CLASS(MODEL, A, I, E) - #define __TMC_CLASS(MODEL, A, I, E) ___TMC_CLASS(_##MODEL, A, I, E) - #define _TMC_CLASS(MODEL, L, E) __TMC_CLASS(MODEL, L, E) - #define TMC_CLASS(ST, A) _TMC_CLASS(ST##_DRIVER_TYPE, TMC_##ST##_LABEL, A##_AXIS) - #if ENABLED(DISTINCT_E_FACTORS) - #define TMC_CLASS_E(I) TMC_CLASS(E##I, E##I) - #else - #define TMC_CLASS_E(I) TMC_CLASS(E##I, E) - #endif - - typedef struct { - uint8_t toff; - int8_t hend; - uint8_t hstrt; - } chopper_timing_t; - - static constexpr chopper_timing_t chopper_timing = CHOPPER_TIMING; - - #if HAS_TMC220x - void tmc_serial_begin(); - #endif -#endif - -// L6470 has STEP on normal pins, but DIR/ENABLE via SPI -#if HAS_DRIVER(L6470) - #include "L6470/L6470_Marlin.h" - #define L6470_WRITE_DIR_COMMAND(STATE,Q) do{ L6470_dir_commands[Q] = (STATE ? dSPIN_STEP_CLOCK_REV : dSPIN_STEP_CLOCK_FWD); }while(0) -#endif - -void restore_stepper_drivers(); // Called by PSU_ON -void reset_stepper_drivers(); // Called by settings.load / settings.reset - -#define AXIS_HAS_SQUARE_WAVE(A) (AXIS_IS_TMC(A) && ENABLED(SQUARE_WAVE_STEPPING)) - -// X Stepper -#if AXIS_DRIVER_TYPE_X(L6470) - extern L6470 stepperX; - #define X_ENABLE_INIT NOOP - #define X_ENABLE_WRITE(STATE) NOOP - #define X_ENABLE_READ (stepperX.getStatus() & STATUS_HIZ) - #define X_DIR_INIT NOOP - #define X_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,X) - #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(X) - extern TMC_CLASS(X, X) stepperX; - #endif - #if AXIS_DRIVER_TYPE_X(TMC26X) - extern TMC26XStepper stepperX; - #define X_ENABLE_INIT NOOP - #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) - #define X_ENABLE_READ stepperX.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X) - #define X_ENABLE_INIT NOOP - #define X_ENABLE_WRITE(STATE) stepperX.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0) - #define X_ENABLE_READ stepperX.isEnabled() - #else - #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN) - #define X_ENABLE_WRITE(STATE) WRITE(X_ENABLE_PIN,STATE) - #define X_ENABLE_READ READ(X_ENABLE_PIN) - #endif - #define X_DIR_INIT SET_OUTPUT(X_DIR_PIN) - #define X_DIR_WRITE(STATE) WRITE(X_DIR_PIN,STATE) - #define X_DIR_READ READ(X_DIR_PIN) -#endif -#define X_STEP_INIT SET_OUTPUT(X_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(X) - #define X_STEP_WRITE(STATE) do { if(STATE) TOGGLE(X_STEP_PIN); } while(0) -#else - #define X_STEP_WRITE(STATE) WRITE(X_STEP_PIN,STATE) -#endif -#define X_STEP_READ READ(X_STEP_PIN) - -// Y Stepper -#if AXIS_DRIVER_TYPE_Y(L6470) - extern L6470 stepperY; - #define Y_ENABLE_INIT NOOP - #define Y_ENABLE_WRITE(STATE) NOOP - #define Y_ENABLE_READ (stepperY.getStatus() & STATUS_HIZ) - #define Y_DIR_INIT NOOP - #define Y_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Y) - #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(Y) - extern TMC_CLASS(Y, Y) stepperY; - #endif - #if AXIS_DRIVER_TYPE_Y(TMC26X) - extern TMC26XStepper stepperY; - #define Y_ENABLE_INIT NOOP - #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) - #define Y_ENABLE_READ stepperY.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y) - #define Y_ENABLE_INIT NOOP - #define Y_ENABLE_WRITE(STATE) stepperY.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0) - #define Y_ENABLE_READ stepperY.isEnabled() - #else - #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN) - #define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE) - #define Y_ENABLE_READ READ(Y_ENABLE_PIN) - #endif - #define Y_DIR_INIT SET_OUTPUT(Y_DIR_PIN) - #define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE) - #define Y_DIR_READ READ(Y_DIR_PIN) -#endif -#define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(Y) - #define Y_STEP_WRITE(STATE) do { if (STATE) TOGGLE(Y_STEP_PIN); } while(0) -#else - #define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE) -#endif -#define Y_STEP_READ READ(Y_STEP_PIN) - -// Z Stepper -#if AXIS_DRIVER_TYPE_Z(L6470) - extern L6470 stepperZ; - #define Z_ENABLE_INIT NOOP - #define Z_ENABLE_WRITE(STATE) NOOP - #define Z_ENABLE_READ (stepperZ.getStatus() & STATUS_HIZ) - #define Z_DIR_INIT NOOP - #define Z_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z) - #define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(Z) - extern TMC_CLASS(Z, Z) stepperZ; - #endif - #if AXIS_DRIVER_TYPE_Z(TMC26X) - extern TMC26XStepper stepperZ; - #define Z_ENABLE_INIT NOOP - #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) - #define Z_ENABLE_READ stepperZ.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z) - #define Z_ENABLE_INIT NOOP - #define Z_ENABLE_WRITE(STATE) stepperZ.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0) - #define Z_ENABLE_READ stepperZ.isEnabled() - #else - #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN) - #define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE) - #define Z_ENABLE_READ READ(Z_ENABLE_PIN) - #endif - #define Z_DIR_INIT SET_OUTPUT(Z_DIR_PIN) - #define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE) - #define Z_DIR_READ READ(Z_DIR_PIN) -#endif -#define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(Z) - #define Z_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Z_STEP_PIN); } while(0) -#else - #define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE) -#endif -#define Z_STEP_READ READ(Z_STEP_PIN) - -// X2 Stepper -#if HAS_X2_ENABLE - #if AXIS_DRIVER_TYPE_X2(L6470) - extern L6470 stepperX2; - #define X2_ENABLE_INIT NOOP - #define X2_ENABLE_WRITE(STATE) NOOP - #define X2_ENABLE_READ (stepperX2.getStatus() & STATUS_HIZ) - #define X2_DIR_INIT NOOP - #define X2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,X2) - #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR) - #else - #if AXIS_IS_TMC(X2) - extern TMC_CLASS(X2, X) stepperX2; - #endif - #if AXIS_DRIVER_TYPE_X2(TMC26X) - extern TMC26XStepper stepperX2; - #define X2_ENABLE_INIT NOOP - #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) - #define X2_ENABLE_READ stepperX2.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2) - #define X2_ENABLE_INIT NOOP - #define X2_ENABLE_WRITE(STATE) stepperX2.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0) - #define X2_ENABLE_READ stepperX2.isEnabled() - #else - #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) - #define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE) - #define X2_ENABLE_READ READ(X2_ENABLE_PIN) - #endif - #define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN) - #define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE) - #define X2_DIR_READ READ(X2_DIR_PIN) - #endif - #define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN) - #if AXIS_HAS_SQUARE_WAVE(X2) - #define X2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(X2_STEP_PIN); } while(0) - #else - #define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE) - #endif - - #define X2_STEP_READ READ(X2_STEP_PIN) -#endif - -// Y2 Stepper -#if HAS_Y2_ENABLE - #if AXIS_DRIVER_TYPE_Y2(L6470) - extern L6470 stepperY2; - #define Y2_ENABLE_INIT NOOP - #define Y2_ENABLE_WRITE(STATE) NOOP - #define Y2_ENABLE_READ (stepperY2.getStatus() & STATUS_HIZ) - #define Y2_DIR_INIT NOOP - #define Y2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Y2) - #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR) - #else - #if AXIS_IS_TMC(Y2) - extern TMC_CLASS(Y2, Y) stepperY2; - #endif - #if AXIS_DRIVER_TYPE_Y2(TMC26X) - extern TMC26XStepper stepperY2; - #define Y2_ENABLE_INIT NOOP - #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) - #define Y2_ENABLE_READ stepperY2.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2) - #define Y2_ENABLE_INIT NOOP - #define Y2_ENABLE_WRITE(STATE) stepperY2.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0) - #define Y2_ENABLE_READ stepperY2.isEnabled() - #else - #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN) - #define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE) - #define Y2_ENABLE_READ READ(Y2_ENABLE_PIN) - #endif - #define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN) - #define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE) - #define Y2_DIR_READ READ(Y2_DIR_PIN) - #endif - #define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN) - #if AXIS_HAS_SQUARE_WAVE(Y2) - #define Y2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Y2_STEP_PIN); } while(0) - #else - #define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE) - #endif - - #define Y2_STEP_READ READ(Y2_STEP_PIN) -#else - #define Y2_DIR_WRITE(STATE) NOOP -#endif - -// Z2 Stepper -#if HAS_Z2_ENABLE - #if AXIS_DRIVER_TYPE_Z2(L6470) - extern L6470 stepperZ2; - #define Z2_ENABLE_INIT NOOP - #define Z2_ENABLE_WRITE(STATE) NOOP - #define Z2_ENABLE_READ (stepperZ2.getStatus() & STATUS_HIZ) - #define Z2_DIR_INIT NOOP - #define Z2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z2) - #define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR) - #else - #if AXIS_IS_TMC(Z2) - extern TMC_CLASS(Z2, Z) stepperZ2; - #endif - #if AXIS_DRIVER_TYPE_Z2(TMC26X) - extern TMC26XStepper stepperZ2; - #define Z2_ENABLE_INIT NOOP - #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) - #define Z2_ENABLE_READ stepperZ2.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2) - #define Z2_ENABLE_INIT NOOP - #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0) - #define Z2_ENABLE_READ stepperZ2.isEnabled() - #else - #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN) - #define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE) - #define Z2_ENABLE_READ READ(Z2_ENABLE_PIN) - #endif - #define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN) - #define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE) - #define Z2_DIR_READ READ(Z2_DIR_PIN) - #endif - #define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN) - #if AXIS_HAS_SQUARE_WAVE(Z2) - #define Z2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Z2_STEP_PIN); } while(0) - #else - #define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE) - #endif - - #define Z2_STEP_READ READ(Z2_STEP_PIN) -#else - #define Z2_DIR_WRITE(STATE) NOOP -#endif - -// Z3 Stepper -#if HAS_Z3_ENABLE - #if AXIS_DRIVER_TYPE_Z3(L6470) - extern L6470 stepperZ3; - #define Z3_ENABLE_INIT NOOP - #define Z3_ENABLE_WRITE(STATE) NOOP - #define Z3_ENABLE_READ (stepperZ3.getStatus() & STATUS_HIZ) - #define Z3_DIR_INIT NOOP - #define Z3_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z3) - #define Z3_DIR_READ (stepperZ3.getStatus() & STATUS_DIR) - #else - #if AXIS_IS_TMC(Z3) - extern TMC_CLASS(Z3, Z) stepperZ3; - #endif - #if ENABLED(Z3_IS_TMC26X) - extern TMC26XStepper stepperZ3; - #define Z3_ENABLE_INIT NOOP - #define Z3_ENABLE_WRITE(STATE) stepperZ3.setEnabled(STATE) - #define Z3_ENABLE_READ stepperZ3.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3) - #define Z3_ENABLE_INIT NOOP - #define Z3_ENABLE_WRITE(STATE) stepperZ3.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0) - #define Z3_ENABLE_READ stepperZ3.isEnabled() - #else - #define Z3_ENABLE_INIT SET_OUTPUT(Z3_ENABLE_PIN) - #define Z3_ENABLE_WRITE(STATE) WRITE(Z3_ENABLE_PIN,STATE) - #define Z3_ENABLE_READ READ(Z3_ENABLE_PIN) - #endif - #define Z3_DIR_INIT SET_OUTPUT(Z3_DIR_PIN) - #define Z3_DIR_WRITE(STATE) WRITE(Z3_DIR_PIN,STATE) - #define Z3_DIR_READ READ(Z3_DIR_PIN) - #endif - #define Z3_STEP_INIT SET_OUTPUT(Z3_STEP_PIN) - #if AXIS_HAS_SQUARE_WAVE(Z3) - #define Z3_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Z3_STEP_PIN); } while(0) - #else - #define Z3_STEP_WRITE(STATE) WRITE(Z3_STEP_PIN,STATE) - #endif - - #define Z3_STEP_READ READ(Z3_STEP_PIN) -#else - #define Z3_DIR_WRITE(STATE) NOOP -#endif - -// E0 Stepper -#if AXIS_DRIVER_TYPE_E0(L6470) - extern L6470 stepperE0; - #define E0_ENABLE_INIT NOOP - #define E0_ENABLE_WRITE(STATE) NOOP - #define E0_ENABLE_READ (stepperE0.getStatus() & STATUS_HIZ) - #define E0_DIR_INIT NOOP - #define E0_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E0) - #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(E0) - extern TMC_CLASS_E(0) stepperE0; - #endif - #if AXIS_DRIVER_TYPE_E0(TMC26X) - extern TMC26XStepper stepperE0; - #define E0_ENABLE_INIT NOOP - #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) - #define E0_ENABLE_READ stepperE0.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0) - #define E0_ENABLE_INIT NOOP - #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) - #define E0_ENABLE_READ stepperE0.isEnabled() - #else - #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN) - #define E0_ENABLE_WRITE(STATE) WRITE(E0_ENABLE_PIN,STATE) - #define E0_ENABLE_READ READ(E0_ENABLE_PIN) - #endif - #define E0_DIR_INIT SET_OUTPUT(E0_DIR_PIN) - #define E0_DIR_WRITE(STATE) WRITE(E0_DIR_PIN,STATE) - #define E0_DIR_READ READ(E0_DIR_PIN) -#endif -#define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(E0) - #define E0_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E0_STEP_PIN); } while(0) -#else - #define E0_STEP_WRITE(STATE) WRITE(E0_STEP_PIN,STATE) -#endif -#define E0_STEP_READ READ(E0_STEP_PIN) - -// E1 Stepper -#if AXIS_DRIVER_TYPE_E1(L6470) - extern L6470 stepperE1; - #define E1_ENABLE_INIT NOOP - #define E1_ENABLE_WRITE(STATE) NOOP - #define E1_ENABLE_READ (stepperE1.getStatus() & STATUS_HIZ) - #define E1_DIR_INIT NOOP - #define E1_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E1) - #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(E1) - extern TMC_CLASS_E(1) stepperE1; - #endif - #if AXIS_DRIVER_TYPE_E1(TMC26X) - extern TMC26XStepper stepperE1; - #define E1_ENABLE_INIT NOOP - #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) - #define E1_ENABLE_READ stepperE1.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1) - #define E1_ENABLE_INIT NOOP - #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) - #define E1_ENABLE_READ stepperE1.isEnabled() - #else - #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN) - #define E1_ENABLE_WRITE(STATE) WRITE(E1_ENABLE_PIN,STATE) - #define E1_ENABLE_READ READ(E1_ENABLE_PIN) - #endif - #define E1_DIR_INIT SET_OUTPUT(E1_DIR_PIN) - #define E1_DIR_WRITE(STATE) WRITE(E1_DIR_PIN,STATE) - #define E1_DIR_READ READ(E1_DIR_PIN) -#endif -#define E1_STEP_INIT SET_OUTPUT(E1_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(E1) - #define E1_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E1_STEP_PIN); } while(0) -#else - #define E1_STEP_WRITE(STATE) WRITE(E1_STEP_PIN,STATE) -#endif -#define E1_STEP_READ READ(E1_STEP_PIN) - -// E2 Stepper -#if AXIS_DRIVER_TYPE_E2(L6470) - extern L6470 stepperE2; - #define E2_ENABLE_INIT NOOP - #define E2_ENABLE_WRITE(STATE) NOOP - #define E2_ENABLE_READ (stepperE2.getStatus() & STATUS_HIZ) - #define E2_DIR_INIT NOOP - #define E2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E2) - #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(E2) - extern TMC_CLASS_E(2) stepperE2; - #endif - #if AXIS_DRIVER_TYPE_E2(TMC26X) - extern TMC26XStepper stepperE2; - #define E2_ENABLE_INIT NOOP - #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) - #define E2_ENABLE_READ stepperE2.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2) - #define E2_ENABLE_INIT NOOP - #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) - #define E2_ENABLE_READ stepperE2.isEnabled() - #else - #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN) - #define E2_ENABLE_WRITE(STATE) WRITE(E2_ENABLE_PIN,STATE) - #define E2_ENABLE_READ READ(E2_ENABLE_PIN) - #endif - #define E2_DIR_INIT SET_OUTPUT(E2_DIR_PIN) - #define E2_DIR_WRITE(STATE) WRITE(E2_DIR_PIN,STATE) - #define E2_DIR_READ READ(E2_DIR_PIN) -#endif -#define E2_STEP_INIT SET_OUTPUT(E2_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(E2) - #define E2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E2_STEP_PIN); } while(0) -#else - #define E2_STEP_WRITE(STATE) WRITE(E2_STEP_PIN,STATE) -#endif -#define E2_STEP_READ READ(E2_STEP_PIN) - -// E3 Stepper -#if AXIS_DRIVER_TYPE_E3(L6470) - extern L6470 stepperE3; - #define E3_ENABLE_INIT NOOP - #define E3_ENABLE_WRITE(STATE) NOOP - #define E3_ENABLE_READ (stepperE3.getStatus() & STATUS_HIZ) - #define E3_DIR_INIT NOOP - #define E3_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E3) - #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(E3) - extern TMC_CLASS_E(3) stepperE3; - #endif - #if AXIS_DRIVER_TYPE_E3(TMC26X) - extern TMC26XStepper stepperE3; - #define E3_ENABLE_INIT NOOP - #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) - #define E3_ENABLE_READ stepperE3.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3) - #define E3_ENABLE_INIT NOOP - #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) - #define E3_ENABLE_READ stepperE3.isEnabled() - #else - #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN) - #define E3_ENABLE_WRITE(STATE) WRITE(E3_ENABLE_PIN,STATE) - #define E3_ENABLE_READ READ(E3_ENABLE_PIN) - #endif - #define E3_DIR_INIT SET_OUTPUT(E3_DIR_PIN) - #define E3_DIR_WRITE(STATE) WRITE(E3_DIR_PIN,STATE) - #define E3_DIR_READ READ(E3_DIR_PIN) -#endif -#define E3_STEP_INIT SET_OUTPUT(E3_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(E3) - #define E3_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E3_STEP_PIN); } while(0) -#else - #define E3_STEP_WRITE(STATE) WRITE(E3_STEP_PIN,STATE) -#endif -#define E3_STEP_READ READ(E3_STEP_PIN) - -// E4 Stepper -#if AXIS_DRIVER_TYPE_E4(L6470) - extern L6470 stepperE4; - #define E4_ENABLE_INIT NOOP - #define E4_ENABLE_WRITE(STATE) NOOP - #define E4_ENABLE_READ (stepperE4.getStatus() & STATUS_HIZ) - #define E4_DIR_INIT NOOP - #define E4_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E4) - #define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(E4) - extern TMC_CLASS_E(4) stepperE4; - #endif - #if AXIS_DRIVER_TYPE_E4(TMC26X) - extern TMC26XStepper stepperE4; - #define E4_ENABLE_INIT NOOP - #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) - #define E4_ENABLE_READ stepperE4.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4) - #define E4_ENABLE_INIT NOOP - #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) - #define E4_ENABLE_READ stepperE4.isEnabled() - #else - #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN) - #define E4_ENABLE_WRITE(STATE) WRITE(E4_ENABLE_PIN,STATE) - #define E4_ENABLE_READ READ(E4_ENABLE_PIN) - #endif - #define E4_DIR_INIT SET_OUTPUT(E4_DIR_PIN) - #define E4_DIR_WRITE(STATE) WRITE(E4_DIR_PIN,STATE) - #define E4_DIR_READ READ(E4_DIR_PIN) -#endif -#define E4_STEP_INIT SET_OUTPUT(E4_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(E4) - #define E4_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E4_STEP_PIN); } while(0) -#else - #define E4_STEP_WRITE(STATE) WRITE(E4_STEP_PIN,STATE) -#endif -#define E4_STEP_READ READ(E4_STEP_PIN) - -// E5 Stepper -#if AXIS_DRIVER_TYPE_E5(L6470) - extern L6470 stepperE5; - #define E5_ENABLE_INIT NOOP - #define E5_ENABLE_WRITE(STATE) NOOP - #define E5_ENABLE_READ (stepperE5.getStatus() & STATUS_HIZ) - #define E5_DIR_INIT NOOP - #define E5_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E5) - #define E5_DIR_READ (stepperE5.getStatus() & STATUS_DIR) -#else - #if AXIS_IS_TMC(E5) - extern TMC_CLASS_E(5) stepperE5; - #endif - #if AXIS_DRIVER_TYPE_E5(TMC26X) - extern TMC26XStepper stepperE5; - #define E5_ENABLE_INIT NOOP - #define E5_ENABLE_WRITE(STATE) stepperE5.setEnabled(STATE) - #define E5_ENABLE_READ stepperE5.isEnabled() - #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5) - #define E5_ENABLE_INIT NOOP - #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0) - #define E5_ENABLE_READ stepperE5.isEnabled() - #else - #define E5_ENABLE_INIT SET_OUTPUT(E5_ENABLE_PIN) - #define E5_ENABLE_WRITE(STATE) WRITE(E5_ENABLE_PIN,STATE) - #define E5_ENABLE_READ READ(E5_ENABLE_PIN) - #endif - #define E5_DIR_INIT SET_OUTPUT(E5_DIR_PIN) - #define E5_DIR_WRITE(STATE) WRITE(E5_DIR_PIN,STATE) - #define E5_DIR_READ READ(E5_DIR_PIN) -#endif -#define E5_STEP_INIT SET_OUTPUT(E5_STEP_PIN) -#if AXIS_HAS_SQUARE_WAVE(E5) - #define E5_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E5_STEP_PIN); } while(0) -#else - #define E5_STEP_WRITE(STATE) WRITE(E5_STEP_PIN,STATE) -#endif -#define E5_STEP_READ READ(E5_STEP_PIN) - -/** - * Extruder indirection for the single E axis - */ -#if ENABLED(SWITCHING_EXTRUDER) // One stepper driver per two extruders, reversed on odd index - #if EXTRUDERS > 5 - #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else { E2_STEP_WRITE(V); } }while(0) - #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE( INVERT_E1_DIR); break; case 4: E2_DIR_WRITE(!INVERT_E2_DIR); case 5: E2_DIR_WRITE( INVERT_E2_DIR); } }while(0) - #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 4: E2_DIR_WRITE( INVERT_E2_DIR); case 5: E2_DIR_WRITE(!INVERT_E2_DIR); } }while(0) - #elif EXTRUDERS > 4 - #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else { E2_STEP_WRITE(V); } }while(0) - #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE( INVERT_E1_DIR); break; case 4: E2_DIR_WRITE(!INVERT_E2_DIR); } }while(0) - #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 4: E2_DIR_WRITE( INVERT_E2_DIR); } }while(0) - #elif EXTRUDERS > 3 - #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) - #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) - #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0) - #elif EXTRUDERS > 2 - #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) - #define NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0) - #define REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) - #else - #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) do{ E0_DIR_WRITE(E ? INVERT_E0_DIR : !INVERT_E0_DIR); }while(0) - #define REV_E_DIR(E) do{ E0_DIR_WRITE(E ? !INVERT_E0_DIR : INVERT_E0_DIR); }while(0) - #endif -#elif ENABLED(PRUSA_MMU2) - #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) - #define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR) - -#elif ENABLED(MK2_MULTIPLEXER) // One multiplexed stepper driver, reversed on odd index - #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR); }while(0) - #define REV_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR); }while(0) - -#elif E_STEPPERS > 1 - - #if E_STEPPERS > 5 - #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); break; case 4: E4_STEP_WRITE(V); case 5: E5_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); case 5: E5_DIR_WRITE(!INVERT_E5_DIR); } }while(0) - #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 4: E4_DIR_WRITE( INVERT_E4_DIR); case 5: E5_DIR_WRITE( INVERT_E5_DIR); } }while(0) - #elif E_STEPPERS > 4 - #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); break; case 4: E4_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } }while(0) - #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 4: E4_DIR_WRITE( INVERT_E4_DIR); } }while(0) - #elif E_STEPPERS > 3 - #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); } }while(0) - #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); } }while(0) - #elif E_STEPPERS > 2 - #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); } }while(0) - #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); } }while(0) - #else - #define _E_STEP_WRITE(E,V) do{ if (E == 0) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } }while(0) - #define _REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( INVERT_E0_DIR); } else { E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) - #endif - - #if HAS_DUPLICATION_MODE - - #if ENABLED(MULTI_NOZZLE_DUPLICATION) - #define _DUPE(N,T,V) do{ if (TEST(duplication_e_mask, N)) E##N##_##T##_WRITE(V); }while(0) - #else - #define _DUPE(N,T,V) E##N##_##T##_WRITE(V) - #endif - - #define NDIR(N) _DUPE(N,DIR,!INVERT_E##N##_DIR) - #define RDIR(N) _DUPE(N,DIR, INVERT_E##N##_DIR) - - #define E_STEP_WRITE(E,V) do{ if (extruder_duplication_enabled) { DUPE(STEP,V); } else _E_STEP_WRITE(E,V); }while(0) - - #if E_STEPPERS > 2 - #if E_STEPPERS > 5 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); _DUPE(5,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); NDIR(5); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); RDIR(5); } else _REV_E_DIR(E); }while(0) - #elif E_STEPPERS > 4 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); } else _REV_E_DIR(E); }while(0) - #elif E_STEPPERS > 3 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); } else _REV_E_DIR(E); }while(0) - #else - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); } else _REV_E_DIR(E); }while(0) - #endif - #else - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); } while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); } else _REV_E_DIR(E); }while(0) - #endif - - #else - - #define E_STEP_WRITE(E,V) _E_STEP_WRITE(E,V) - #define NORM_E_DIR(E) _NORM_E_DIR(E) - #define REV_E_DIR(E) _REV_E_DIR(E) - - #endif - -#elif E_STEPPERS - #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) - #define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR) - -#else - #define E_STEP_WRITE(E,V) NOOP - #define NORM_E_DIR(E) NOOP - #define REV_E_DIR(E) NOOP - -#endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 1dd774d1ba64..04492987b712 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -68,7 +68,7 @@ #include "tool_change.h" #endif -#if HAS_BUZZER && PIN_EXISTS(BEEPER) +#if USE_BEEPER #include "../libs/buzzer.h" #endif @@ -654,13 +654,6 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) { #define AUTO_5_IS_2 (E5_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) #define AUTO_5_IS_3 (E5_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) #define AUTO_5_IS_4 (E5_AUTO_FAN_PIN == E4_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_0 (CHAMBER_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_1 (CHAMBER_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_2 (CHAMBER_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_3 (CHAMBER_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_4 (CHAMBER_AUTO_FAN_PIN == E4_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_5 (CHAMBER_AUTO_FAN_PIN == E5_AUTO_FAN_PIN) - #define AUTO_CHAMBER_IS_E (AUTO_CHAMBER_IS_0 || AUTO_CHAMBER_IS_1 || AUTO_CHAMBER_IS_2 || AUTO_CHAMBER_IS_3 || AUTO_CHAMBER_IS_4 || AUTO_CHAMBER_IS_5) #define CHAMBER_FAN_INDEX HOTENDS void Temperature::checkExtruderAutoFans() { @@ -709,7 +702,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) { if (TEST(fanDone, realFan)) continue; const bool fan_on = TEST(fanState, realFan); switch (f) { - #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E + #if ENABLED(AUTO_POWER_CHAMBER_FAN) case CHAMBER_FAN_INDEX: chamberfan_speed = fan_on ? CHAMBER_AUTO_FAN_SPEED : 0; break; @@ -756,7 +749,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) { inline void loud_kill(PGM_P const lcd_msg) { Running = false; - #if HAS_BUZZER && PIN_EXISTS(BEEPER) + #if USE_BEEPER for (uint8_t i = 20; i--;) { WRITE(BEEPER_PIN, HIGH); delay(25); WRITE(BEEPER_PIN, LOW); delay(80); diff --git a/Marlin/src/module/thermistor/thermistor_331.h b/Marlin/src/module/thermistor/thermistor_331.h new file mode 100644 index 000000000000..8f98d0752345 --- /dev/null +++ b/Marlin/src/module/thermistor/thermistor_331.h @@ -0,0 +1,92 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +#define OVM(V) OV((V)*(0.327/0.5)) + +// R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor +const short temptable_331[][2] PROGMEM = { + { OVM( 23), 300 }, + { OVM( 25), 295 }, + { OVM( 27), 290 }, + { OVM( 28), 285 }, + { OVM( 31), 280 }, + { OVM( 33), 275 }, + { OVM( 35), 270 }, + { OVM( 38), 265 }, + { OVM( 41), 260 }, + { OVM( 44), 255 }, + { OVM( 48), 250 }, + { OVM( 52), 245 }, + { OVM( 56), 240 }, + { OVM( 61), 235 }, + { OVM( 66), 230 }, + { OVM( 71), 225 }, + { OVM( 78), 220 }, + { OVM( 84), 215 }, + { OVM( 92), 210 }, + { OVM( 100), 205 }, + { OVM( 109), 200 }, + { OVM( 120), 195 }, + { OVM( 131), 190 }, + { OVM( 143), 185 }, + { OVM( 156), 180 }, + { OVM( 171), 175 }, + { OVM( 187), 170 }, + { OVM( 205), 165 }, + { OVM( 224), 160 }, + { OVM( 245), 155 }, + { OVM( 268), 150 }, + { OVM( 293), 145 }, + { OVM( 320), 140 }, + { OVM( 348), 135 }, + { OVM( 379), 130 }, + { OVM( 411), 125 }, + { OVM( 445), 120 }, + { OVM( 480), 115 }, + { OVM( 516), 110 }, + { OVM( 553), 105 }, + { OVM( 591), 100 }, + { OVM( 628), 95 }, + { OVM( 665), 90 }, + { OVM( 702), 85 }, + { OVM( 737), 80 }, + { OVM( 770), 75 }, + { OVM( 801), 70 }, + { OVM( 830), 65 }, + { OVM( 857), 60 }, + { OVM( 881), 55 }, + { OVM( 903), 50 }, + { OVM( 922), 45 }, + { OVM( 939), 40 }, + { OVM( 954), 35 }, + { OVM( 966), 30 }, + { OVM( 977), 25 }, + { OVM( 985), 20 }, + { OVM( 993), 15 }, + { OVM( 999), 10 }, + { OVM(1004), 5 }, + { OVM(1008), 0 }, + { OVM(1012), -5 }, + { OVM(1016), -10 }, + { OVM(1020), -15 } +}; diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index f91c2be943d9..f42f647e8514 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -131,6 +131,9 @@ #if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord #include "thermistor_201.h" #endif +#if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage + #include "thermistor_331.h" +#endif #if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pull-up = 10 kOhm, "Unidentified 200K NTC thermistor (Einstart S)" #include "thermistor_666.h" #endif diff --git a/Marlin/src/pins/esp32/pins_ESP32.h b/Marlin/src/pins/esp32/pins_ESP32.h index 35e8e1ee0742..0831746f0d19 100644 --- a/Marlin/src/pins/esp32/pins_ESP32.h +++ b/Marlin/src/pins/esp32/pins_ESP32.h @@ -29,7 +29,7 @@ "Oops! Select an ESP32 board in 'Tools > Board.'" #endif -#define BOARD_NAME "Espressif ESP32" +#define BOARD_INFO_NAME "Espressif ESP32" // // I2S (steppers & other output-only pins) diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index a726b384289a..48cdb1dd62b3 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -45,8 +45,8 @@ * 7 | 11 */ -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.4" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "RAMPS 1.4" #endif #define E2END 0xFFF // 4KB @@ -437,7 +437,7 @@ #endif #if DISABLED(NEWPANEL) - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index dddec6b0cd8d..98c0ece3ac62 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -29,7 +29,7 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "AZSMZ MINI" +#define BOARD_INFO_NAME "AZSMZ MINI" // // Servos diff --git a/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.1.h b/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.1.h index d4ead0f4f7a3..36e7b028b80a 100644 --- a/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.1.h +++ b/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.1.h @@ -25,7 +25,7 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "BIGTREE SKR 1.1" +#define BOARD_INFO_NAME "BIGTREE SKR 1.1" // // Limit Switches diff --git a/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.3.h b/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.3.h index f84eafdf8c7d..6c86056e3623 100644 --- a/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.3.h +++ b/Marlin/src/pins/lpc1768/pins_BIGTREE_SKR_V1.3.h @@ -25,7 +25,7 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "BIGTREE SKR 1.3" +#define BOARD_INFO_NAME "BIGTREE SKR 1.3" // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 426a20653db2..c0590458489f 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -34,8 +34,8 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#ifndef BOARD_NAME - #define BOARD_NAME "BIQU Thunder B300 V1.0" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "BIQU Thunder B300 V1.0" #endif // diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 8095d86ab36c..873d43786c4e 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -34,7 +34,7 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "BIQU BQ111-A4" +#define BOARD_INFO_NAME "BIQU BQ111-A4" // // Limit Switches diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index e2a3d6dc197c..20385bab4eb2 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -25,7 +25,7 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "GMARSH X6 REV1" +#define BOARD_INFO_NAME "GMARSH X6 REV1" // Ignore temp readings during develpment. //#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index b3d307d3bf36..a23101ea6a75 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -29,11 +29,11 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#ifndef BOARD_NAME - #define BOARD_NAME "MKS SBASE" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "MKS SBASE" #endif #ifndef BOARD_WEBSITE_URL - #define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE" + #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SBASE" #endif #define LED_PIN P1_18 // Used as a status indicator @@ -42,7 +42,7 @@ #define LED4_PIN P1_21 // -// Servo pin +// Servos // #define SERVO0_PIN P1_23 // J8-3 (low jitter) #define SERVO1_PIN P2_12 // J8-4 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 3207309c5064..4eead57e770c 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -29,11 +29,11 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "MKS SGen-L" -#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SGEN_L" +#define BOARD_INFO_NAME "MKS SGen-L" +#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L" // -// Servo pin +// Servos // #define SERVO0_PIN P1_23 // SERVO P1.23 #define SERVO1_PIN P2_00 // SERVO P2.0 diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 802fc9fe7d22..8e4bfeb8b9dc 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -40,7 +40,7 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "Re-ARM RAMPS 1.4" +#define BOARD_INFO_NAME "Re-ARM RAMPS 1.4" // // Servos @@ -128,17 +128,33 @@ // P2_08 E1-Step // P2_13 E1-Dir - #define X_SERIAL_TX_PIN P2_13 - #define X_SERIAL_RX_PIN P2_13 + #ifndef X_SERIAL_TX_PIN + #define X_SERIAL_TX_PIN P0_01 + #endif + #ifndef X_SERIAL_RX_PIN + #define X_SERIAL_RX_PIN P0_01 + #endif - #define Y_SERIAL_TX_PIN P0_00 - #define Y_SERIAL_RX_PIN P0_00 + #ifndef Y_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P0_00 + #endif + #ifndef Y_SERIAL_RX_PIN + #define Y_SERIAL_RX_PIN P0_00 + #endif - #define Z_SERIAL_TX_PIN P0_01 - #define Z_SERIAL_RX_PIN P0_01 + #ifndef Z_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P2_13 + #endif + #ifndef Z_SERIAL_RX_PIN + #define Z_SERIAL_RX_PIN P2_13 + #endif - #define E0_SERIAL_TX_PIN P2_08 - #define E0_SERIAL_RX_PIN P2_08 + #ifndef E0_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P2_08 + #endif + #ifndef E0_SESIAL_RX_PIN + #define E0_SERIAL_RX_PIN P2_08 + #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 3baa441d9c43..72e1b8141c7f 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -29,13 +29,17 @@ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif -#define BOARD_NAME "Selena Compact" -#define BOARD_WEBSITE_URL "https://github.com/Ales2-k/Selena" +#define BOARD_INFO_NAME "Selena Compact" +#define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena" // -// Limit Switches +// Servos // +#define SERVO0_PIN P1_23 +// +// Limit Switches +// #define X_MIN_PIN P1_28 #define X_MAX_PIN P1_25 #define Y_MIN_PIN P2_11 @@ -108,8 +112,3 @@ #define SD_DETECT_PIN -1 #endif // REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// Servo -// -#define SERVO0_PIN P1_23 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index fed88b465613..57a9686a2383 100755 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -29,19 +29,23 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "Azteeg X5 GT" -#define BOARD_WEBSITE_URL "https://tinyurl.com/yx8tdqa3" +#define BOARD_INFO_NAME "Azteeg X5 GT" +#define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3" // -// Set CPU +// Custom CPU Speed 120MHz // #undef F_CPU #define F_CPU 120000000 // -// Limit Switches +// Servos // +#define SERVO0_PIN P1_23 +// +// Limit Switches +// #define X_MIN_PIN P1_24 #define X_MAX_PIN P1_27 #define Y_MIN_PIN P1_25 @@ -128,8 +132,3 @@ #define STAT_LED_RED_PIN P1_19 #define STAT_LED_BLUE_PIN P1_20 #endif - -// -// Servo -// -#define SERVO0_PIN P1_23 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index a6854807572d..b576ed1a3dfc 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -29,10 +29,10 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Azteeg X5 MINI" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Azteeg X5 MINI" #endif -#define BOARD_WEBSITE_URL "http://www.panucatt.com/azteeg_X5_mini_reprap_3d_printer_controller_p/ax5mini.htm" +#define BOARD_WEBSITE_URL "tiny.cc/x5_mini" // // LED diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h index 6cbdb335f3ed..6b42cee535ed 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -29,7 +29,7 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "Azteeg X5 MINI WIFI" +#define BOARD_INFO_NAME "Azteeg X5 MINI WIFI" // // DIGIPOT slave addresses diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index 29ad150b2889..2422d198c59b 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -29,7 +29,7 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "Cohesion3D Mini" +#define BOARD_INFO_NAME "Cohesion3D Mini" // // Servos diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 5adec936ae4f..7f29e8dec74b 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -29,7 +29,7 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "Cohesion3D ReMix" +#define BOARD_INFO_NAME "Cohesion3D ReMix" // // Servos diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index bf6359f096f9..7edb80ecaa93 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -29,8 +29,8 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "MKS SGen" -#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SGEN" +#define BOARD_INFO_NAME "MKS SGen" +#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN" #include "../lpc1768/pins_MKS_SBASE.h" diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index ace87a8ca4d1..8ddf9a9ee9f3 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -29,9 +29,12 @@ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "Smoothieboard" -#define BOARD_WEBSITE_URL "http://smoothieware.org/smoothieboard" +#define BOARD_INFO_NAME "Smoothieboard" +#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard" +// +// Custom CPU Speed 120MHz +// #undef F_CPU #define F_CPU 120000000 diff --git a/Marlin/src/pins/lpc1768/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h old mode 100755 new mode 100644 similarity index 92% rename from Marlin/src/pins/lpc1768/pins_TH3D_EZBOARD.h rename to Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 509fdd3aec3b..f1af6d1fbda7 --- a/Marlin/src/pins/lpc1768/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -25,12 +25,12 @@ * TH3D EZBoard pin assignments */ -#ifndef TARGET_LPC1768 - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." +#ifndef LPC1769 + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#define BOARD_NAME "TH3D EZBoard" -#define BOARD_WEBSITE_URL "https://www.th3dstudio.com/product/ezboard-lite/" +#define BOARD_INFO_NAME "TH3D EZBoard" +#define BOARD_WEBSITE_URL "th3dstudio.com" // // Servos @@ -93,9 +93,15 @@ // Temp Sensors // 3.3V max when defined as an Analog Input! // -#define TEMP_0_PIN 0 // Analog Input P0_23 +#if TEMP_SENSOR_0 == 20 // PT100 Adapter + #define TEMP_0_PIN 7 // Analog Input +#else + #define TEMP_0_PIN 0 // Analog Input P0_23 +#endif + #define TEMP_BED_PIN 1 // Analog Input P0_24 #define TEMP_1_PIN 2 // Analog Input P0_25 + #if ENABLED(FILAMENT_WIDTH_SENSOR) #define FILWIDTH_PIN 3 // Analog Input P0_26 #else diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h index 36cfb3143542..e49207a42acb 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Cheaptronic v1.0" +#define BOARD_INFO_NAME "Cheaptronic v1.0" // // Limit Switches // diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index a409f0335238..f2df6e1ecb31 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -31,7 +31,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Cheaptronic v2.0" +#define BOARD_INFO_NAME "Cheaptronic v2.0" // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index 91bafb9e0e2a..681ce65e35f0 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -6,7 +6,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "CN Controls V11" +#define BOARD_INFO_NAME "CN Controls V11" // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h index a7fcb181621f..585c048e49a1 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -6,7 +6,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "CN Controls V12" +#define BOARD_INFO_NAME "CN Controls V12" // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h new file mode 100644 index 000000000000..6d7325996f7f --- /dev/null +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h @@ -0,0 +1,86 @@ +/** + * CNControls V15 for HMS434 pin assignments + */ + +#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "CN Controls V15" + +// +// Servos +// +#define SERVO0_PIN 6 + +// +// Limit Switches +// +#define X_STOP_PIN 34 +#define Y_STOP_PIN 39 +#define Z_STOP_PIN 62 + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 49 +#endif + +// +// Steppers +// +#define X_STEP_PIN 14 +#define X_DIR_PIN 25 +#define X_ENABLE_PIN 26 + +#define Y_STEP_PIN 11 +#define Y_DIR_PIN 12 +#define Y_ENABLE_PIN 15 + +#define Z_STEP_PIN 24 +#define Z_DIR_PIN 27 +#define Z_ENABLE_PIN 28 + +#define E0_STEP_PIN 64 +#define E0_DIR_PIN 65 +#define E0_ENABLE_PIN 63 + +// +// Temperature Sensors +// Analog Inputs +// +#define TEMP_0_PIN 2 // Analog Input +#define TEMP_BED_PIN 4 // Analog Input +#define TEMP_CHAMBER_PIN 5 // Analog Input + +// +// Heaters +// +#define HEATER_0_PIN 4 +#define HEATER_BED_PIN 32 +#define HEATER_CHAMBER_PIN 33 + +// +// Fans +// +#define FAN0_PIN 8 +#define ORIG_E0_AUTO_FAN_PIN 30 +#define ORIG_E1_AUTO_FAN_PIN 30 +#define ORIG_E2_AUTO_FAN_PIN 30 +#define ORIG_E3_AUTO_FAN_PIN 30 +//#define ORIG_CHAMBER_AUTO_FAN_PIN 10 + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 40 + +// Common I/O + +#define FIL_RUNOUT_PIN 9 +//#define FIL_RUNOUT_PIN 29 // encoder sensor +//#define PWM_1_PIN 12 +//#define PWM_2_PIN 13 +//#define SPARE_IO 17 +#define BEEPER_PIN 13 +#define STAT_LED_BLUE_PIN -1 +#define STAT_LED_RED_PIN 10 // 31 diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h index 78e2fe2c05e5..fae1d2e94d79 100755 --- a/Marlin/src/pins/mega/pins_EINSTART-S.h +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -30,7 +30,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Einstart-S" +#define BOARD_INFO_NAME "Einstart-S" // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/src/pins/mega/pins_ELEFU_3.h index ae87e8ce7b09..5b43acab10b6 100644 --- a/Marlin/src/pins/mega/pins_ELEFU_3.h +++ b/Marlin/src/pins/mega/pins_ELEFU_3.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Elefu Ra v3" +#define BOARD_INFO_NAME "Elefu Ra v3" // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index 3bc68cfd45df..16bd5688df53 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -31,8 +31,8 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "GT2560 Rev.A" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "GT2560 Rev.A" #endif #define DEFAULT_MACHINE_NAME "Prusa i3 Pro B" diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h index 8becf9bcfe93..c5c894810b32 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h @@ -25,7 +25,7 @@ * Geeetech GT2560 Revision A+ board pin assignments */ -#define BOARD_NAME "GT2560 Rev.A+" +#define BOARD_INFO_NAME "GT2560 Rev.A+" #include "pins_GT2560_REV_A.h" diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index 10db766da36f..d84ce5e6b738 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -29,8 +29,8 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "GT2560 V3.0" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "GT2560 V3.0" #endif // diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h index 7abee9cd606e..afdcad34352a 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h @@ -25,7 +25,7 @@ * GT2560 V3.0 pin assignment (for Mecreator 2) *****************************************************************/ -#define BOARD_NAME "GT2560 V3.0 (MC2)" +#define BOARD_INFO_NAME "GT2560 V3.0 (MC2)" #define X_MIN_PIN 22 #define X_MAX_PIN 24 diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h new file mode 100644 index 000000000000..a39162ddedcd --- /dev/null +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -0,0 +1,170 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * HJC2560-C Rev2.x pin assignments + */ + +#ifndef __AVR_ATmega2560__ + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define DEFAULT_MACHINE_NAME "ADIMLab Gantry v2" +#define BOARD_INFO_NAME "HJC2560-C" + +// +// Servos +// +//#ifndef SERVO0_PIN +// #define SERVO0_PIN 11 +//#endif + +// +// Limit Switches +// +#define X_STOP_PIN 22 +#define Y_STOP_PIN 26 +#define Z_STOP_PIN 29 +//#define EXP_STOP_PIN 28 + +// +// Steppers +// +#define X_STEP_PIN 25 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 27 + +#define Y_STEP_PIN 32 +#define Y_DIR_PIN 33 +#define Y_ENABLE_PIN 31 + +#define Z_STEP_PIN 35 +#define Z_DIR_PIN 36 +#define Z_ENABLE_PIN 34 + +#define E0_STEP_PIN 42 +#define E0_DIR_PIN 43 +#define E0_ENABLE_PIN 37 + +#define E1_STEP_PIN 49 +#define E1_DIR_PIN 47 +#define E1_ENABLE_PIN 48 + +#define MOTOR_CURRENT_PWM_XY_PIN 44 +#define MOTOR_CURRENT_PWM_Z_PIN 45 +#define MOTOR_CURRENT_PWM_E_PIN 46 +// Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range +#ifndef MOTOR_CURRENT_PWM_RANGE + #define MOTOR_CURRENT_PWM_RANGE 2000 +#endif +#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 } + +// +// Temperature Sensors +// +#define TEMP_0_PIN 8 // Analog Input +#define TEMP_1_PIN 9 // Analog Input +#define TEMP_BED_PIN 10 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 2 +#define HEATER_1_PIN 3 +#define HEATER_BED_PIN 4 + +#ifndef FAN_PIN + #define FAN_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释 +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 39 +//#define LED_PIN 8 +#define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8 + +//#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered +//#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider. + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if ENABLED(SPINDLE_LASER_ENABLE) + #define SPINDLE_DIR_PIN 16 + #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM +#endif + +// +// LCD / Controller +// +#if HAS_SPI_LCD + + #define BEEPER_PIN 18 + + #if ENABLED(NEWPANEL) + + #define LCD_PINS_RS 20 // LCD_CS + #define LCD_PINS_ENABLE 15 // LCD_SDA + #define LCD_PINS_D4 14 // LCD_SCK + + #if ENABLED(HJC_LCD_SMART_CONTROLLER) + #define LCD_BACKLIGHT_PIN 5 // LCD_Backlight + //#ifndef LCD_CONTRAST_PIN + // #define LCD_CONTRAST_PIN 5 // LCD_Contrast + //#endif + #ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 24 // Filament runout + #endif + #else + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #endif + + #define BTN_EN1 41 + #define BTN_EN2 40 + #define BTN_ENC 19 + + #define SD_DETECT_PIN 39 + + #else + + // Buttons attached to a shift register + #define SHIFT_CLK 38 + #define SHIFT_LD 42 + #define SHIFT_OUT 40 + #define SHIFT_EN 17 + + #define LCD_PINS_RS 16 + #define LCD_PINS_ENABLE 5 + #define LCD_PINS_D4 6 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 20 + #define LCD_PINS_D7 19 + + #endif // !NEWPANEL + +#endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/src/pins/mega/pins_LEAPFROG.h index 8d4f31a70f9a..56eec5e97e14 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Leapfrog" +#define BOARD_INFO_NAME "Leapfrog" // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 07fd91f73a00..473e79b2765a 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -31,7 +31,7 @@ #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Mega Controller" +#define BOARD_INFO_NAME "Mega Controller" // // Servos diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index c0b009392c48..64337578677d 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Megatronics" +#define BOARD_INFO_NAME "Megatronics" // // Limit Switches // diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index 90ddc5cc0de5..4cd5999604e8 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Megatronics v2.0" +#define BOARD_INFO_NAME "Megatronics v2.0" // // Limit Switches // @@ -115,32 +115,38 @@ #define PS_ON_PIN 12 #define CASE_LIGHT_PIN 2 -// -// LCD / Controller -// -#define BEEPER_PIN 64 - -#define LCD_PINS_RS 14 -#define LCD_PINS_ENABLE 15 -#define LCD_PINS_D4 30 -#define LCD_PINS_D5 31 -#define LCD_PINS_D6 32 -#define LCD_PINS_D7 33 - -// Buttons are directly attached using keypad -#define BTN_EN1 61 -#define BTN_EN2 59 -#define BTN_ENC 43 - -// Buttons that are attached using shift register of reprapworld keypad v1.1 -#define SHIFT_CLK 63 -#define SHIFT_LD 42 -#define SHIFT_OUT 17 -#define SHIFT_EN 17 - // // M3/M4/M5 - Spindle/Laser Control // #define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 16 // Pullup! #define SPINDLE_DIR_PIN 11 + +// +// LCD / Controller +// +#define BEEPER_PIN 64 + +#if HAS_SPI_LCD + + #define LCD_PINS_RS 14 + #define LCD_PINS_ENABLE 15 + #define LCD_PINS_D4 30 + #define LCD_PINS_D5 31 + #define LCD_PINS_D6 32 + #define LCD_PINS_D7 33 + + #if ENABLED(NEWPANEL) + // Buttons are directly attached using keypad + #define BTN_EN1 61 + #define BTN_EN2 59 + #define BTN_ENC 43 + #else + // Buttons attached to shift register of reprapworld keypad v1.1 + #define SHIFT_CLK 63 + #define SHIFT_LD 42 + #define SHIFT_OUT 17 + #define SHIFT_EN 17 + #endif + +#endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index 77edc79e1995..7a6465471cdd 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -30,11 +30,11 @@ #endif #if MB(MEGATRONICS_32) - #define BOARD_NAME "Megatronics v3.2" + #define BOARD_INFO_NAME "Megatronics v3.2" #elif MB(MEGATRONICS_31) - #define BOARD_NAME "Megatronics v3.1" + #define BOARD_INFO_NAME "Megatronics v3.1" #else - #define BOARD_NAME "Megatronics v3.0" + #define BOARD_INFO_NAME "Megatronics v3.0" #endif // diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 4b93add4c05d..703d5caae0a1 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -41,7 +41,7 @@ #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Mightyboard" +#define BOARD_INFO_NAME "Mightyboard" #define DEFAULT_MACHINE_NAME "MB Replicator" // diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h index ad1b737e02d2..16fad0067f35 100644 --- a/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -38,7 +38,7 @@ #error "Minitronics supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Minitronics v1.0/1.1" +#define BOARD_INFO_NAME "Minitronics v1.0/1.1" // // Limit Switches // diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 8a9e3f5bda86..b6043c018c50 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -31,8 +31,8 @@ #error "Overlord Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "OVERLORD" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "OVERLORD" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // // Limit Switches diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 2d1bb12a970c..2ea2b09f5aac 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -25,7 +25,7 @@ #error "Oops! Select 'Silvergate' in 'Tools > Board.'" #endif -#define BOARD_NAME "Silver Gate" +#define BOARD_INFO_NAME "Silver Gate" #define X_STEP_PIN 43 #define X_DIR_PIN 44 diff --git a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h index 86f295b6226f..1cceef8dab21 100644 --- a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h +++ b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Wanhao i3 Mini 0ne+" +#define BOARD_INFO_NAME "Wanhao i3 Mini 0ne+" #define DEFAULT_MACHINE_NAME "i3 Mini" #define BOARD_WEBSITE_URL "https://tinyurl.com/yyxw7se7" @@ -92,20 +92,20 @@ #define KILL_PIN 64 // -// LCD / Controller +// LCD / Controller (Integrated MINIPANEL) // - -#if HAS_SPI_LCD +#if ENABLED(MINIPANEL) #define DOGLCD_A0 40 #define DOGLCD_CS 41 #define LCD_BACKLIGHT_PIN 65 // Backlight LED on A11/D65 #define LCD_RESET_PIN 27 - #define LCD_CONTRAST 255 + #define BTN_EN1 2 + #define BTN_EN2 3 + #define BTN_ENC 5 - #if ENABLED(NEWPANEL) - #define BTN_EN1 2 - #define BTN_EN2 3 - #define BTN_ENC 5 - #endif + // This display has adjustable contrast + #define LCD_CONTRAST_MIN 0 + #define LCD_CONTRAST_MAX 255 + #define LCD_CONTRAST_INIT LCD_CONTRAST_MAX #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 5e10f081d33c..3f4bf1f41b2f 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -202,6 +202,8 @@ #include "mega/pins_CNCONTROLS_11.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 #elif MB(CNCONTROLS_12) #include "mega/pins_CNCONTROLS_12.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 +#elif MB(CNCONTROLS_15) + #include "mega/pins_CNCONTROLS_15.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 #elif MB(MIGHTYBOARD_REVE) #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 #elif MB(CHEAPTRONIC) @@ -236,6 +238,8 @@ #include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:megaatmega2560 #elif MB(OVERLORD) #include "mega/pins_OVERLORD.h" // ATmega2560 env:megaatmega2560 +#elif MB(HJC2560C_REV2) + #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:megaatmega2560 // // ATmega1281, ATmega2561 @@ -349,8 +353,6 @@ #include "lpc1768/pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768 #elif MB(BIGTREE_SKR_V1_3) #include "lpc1768/pins_BIGTREE_SKR_V1.3.h" // LPC1768 env:LPC1768 -#elif MB(TH3D_EZBOARD) - #include "lpc1768/pins_TH3D_EZBOARD.h" // LPC1768 env:LPC1768 #elif MB(GMARSH_X6_REV1) #include "lpc1768/pins_GMARSH_X6_REV1.h" // LPC1768 env:LPC1768 @@ -372,6 +374,8 @@ #include "lpc1769/pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769 #elif MB(SMOOTHIEBOARD) #include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769 +#elif MB(TH3D_EZBOARD) + #include "lpc1769/pins_TH3D_EZBOARD.h" // LPC1769 env:LPC1769 // // Due (ATSAM) boards @@ -502,6 +506,8 @@ #include "stm32/pins_STEVAL.h" // STM32F4 env:STM32F4 #elif MB(BIGTREE_SKR_PRO_V1_1) #include "stm32/pins_BIGTREE_SKR_PRO_V1.1.h" // STM32F4 env:BIGTREE_SKR_PRO +#elif MB(BIGTREE_BTT002_V1_0) + #include "stm32/pins_BIGTREE_BTT002_V1.0.h" // STM32F4 env:BIGTREE_BTT002 // // ARM Cortex M7 @@ -938,7 +944,7 @@ #define LCD_PINS_D4 -1 #endif -#if HAS_CHARACTER_LCD +#if HAS_CHARACTER_LCD || TOUCH_UI_ULTIPANEL #ifndef LCD_PINS_D5 #define LCD_PINS_D5 -1 #endif @@ -948,10 +954,6 @@ #ifndef LCD_PINS_D7 #define LCD_PINS_D7 -1 #endif -#else - #undef LCD_PINS_D5 - #undef LCD_PINS_D6 - #undef LCD_PINS_D7 #endif /** diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index 56a597ffc3a4..d667032c9c58 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" #endif -#define BOARD_NAME "Einsy Rambo" +#define BOARD_INFO_NAME "Einsy Rambo" // // TMC2130 Configuration_adv defaults for EinsyRambo @@ -149,11 +149,11 @@ // // LCD / Controller // -#if HAS_SPI_LCD +#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL #define KILL_PIN 32 - #if ENABLED(NEWPANEL) + #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS 85 @@ -176,5 +176,5 @@ #define BEEPER_PIN 84 // AUX-4 #define SD_DETECT_PIN 15 - #endif // NEWPANEL + #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 675f5e3de0b6..cd42f48404f8 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" #endif -#define BOARD_NAME "Einsy Retro" +#define BOARD_INFO_NAME "Einsy Retro" // // TMC2130 Configuration_adv defaults for EinsyRetro @@ -163,11 +163,11 @@ // // LCD / Controller // -#if HAS_SPI_LCD +#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL #define KILL_PIN 32 - #if ENABLED(NEWPANEL) + #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS 85 @@ -188,7 +188,8 @@ #define BTN_ENC 9 // AUX-2 #define BEEPER_PIN 84 // AUX-4 + #define SD_DETECT_PIN 15 - #endif // NEWPANEL + #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index da4f77f7dd8e..51c5fab892b2 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -30,9 +30,9 @@ #endif #if MB(MINIRAMBO_10A) - #define BOARD_NAME "Mini RAMBo 1.0a" + #define BOARD_INFO_NAME "Mini RAMBo 1.0a" #else - #define BOARD_NAME "Mini RAMBo" + #define BOARD_INFO_NAME "Mini RAMBo" #endif // @@ -141,13 +141,13 @@ // // LCD / Controller // -#if HAS_SPI_LCD +#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL #if !MB(MINIRAMBO_10A) #define KILL_PIN 32 #endif - #if ENABLED(NEWPANEL) + #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL #if MB(MINIRAMBO_10A) @@ -187,6 +187,6 @@ #endif // !MINIRAMBO_10A - #endif // NEWPANEL + #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 10a6a1b5b9b8..1094e0687e01 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -45,7 +45,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Rambo" +#define BOARD_INFO_NAME "Rambo" // // Servos @@ -169,11 +169,11 @@ // // LCD / Controller // -#if HAS_SPI_LCD +#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL #define KILL_PIN 80 - #if ENABLED(NEWPANEL) + #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL #define LCD_PINS_RS 70 #define LCD_PINS_ENABLE 71 @@ -219,7 +219,7 @@ // No Beeper added #define BEEPER_PIN 33 - // buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index c9affcba6a19..e8c9b2ebc0de 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Scoovo X9H" +#define BOARD_INFO_NAME "Scoovo X9H" // // Servos diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index eae958da699f..e6c3bdc2eae0 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -25,12 +25,12 @@ * 3DRAG (and K8200 / K8400) Arduino Mega with RAMPS v1.4 pin assignments */ -#ifndef BOARD_NAME - #define BOARD_NAME "3Drag" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "3Drag" #endif #ifndef DEFAULT_MACHINE_NAME - #define DEFAULT_MACHINE_NAME BOARD_NAME + #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #endif #ifndef DEFAULT_SOURCE_CODE_URL diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h index 06686a016b93..692d4f8a6ef5 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h @@ -34,7 +34,7 @@ #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) #define CASE_LIGHT_PIN 6 // Define before RAMPS pins include #endif -#define BOARD_NAME "Azteeg X3" +#define BOARD_INFO_NAME "Azteeg X3" // // Servos diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 195f742ad413..62014217fff4 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -31,7 +31,7 @@ #error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Azteeg X3 Pro" +#define BOARD_INFO_NAME "Azteeg X3 Pro" // // RAMPS pins overrides diff --git a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h index 74a69fb8c405..4cadf481f3f5 100644 --- a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h +++ b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h @@ -29,7 +29,7 @@ #error "2PrintBeta Due supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "2PrintBeta Due" +#define BOARD_INFO_NAME "2PrintBeta Due" // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h b/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h index 2c370efdf7da..7f27df6eb4a7 100644 --- a/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h +++ b/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h @@ -29,7 +29,7 @@ #error "KFB 2.0 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "KFB 2.0" +#define BOARD_INFO_NAME "KFB 2.0" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 5a49c0a3b613..14013d874c69 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "ZUM Mega 3D" +#define BOARD_INFO_NAME "ZUM Mega 3D" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index 290637eb7be8..0ffc70aa73b4 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Duplicator i3 Plus" +#define BOARD_INFO_NAME "Duplicator i3 Plus" // // Limit Switches diff --git a/Marlin/src/pins/ramps/pins_FELIX2.h b/Marlin/src/pins/ramps/pins_FELIX2.h index 5a1f6505830e..c2c2b4bbf442 100644 --- a/Marlin/src/pins/ramps/pins_FELIX2.h +++ b/Marlin/src/pins/ramps/pins_FELIX2.h @@ -29,7 +29,7 @@ #error "Felix 2.0+ supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Felix 2.0+" +#define BOARD_INFO_NAME "Felix 2.0+" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 292e713af42e..e7a2a5da01d1 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -31,8 +31,8 @@ #error "Formbot supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Formbot Raptor" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "Formbot Raptor" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // // Servos diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h index b5c69a06d15f..1c2424ccfdb6 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h @@ -25,8 +25,8 @@ * Formbot Raptor 2 pin assignments */ -#define BOARD_NAME "Formbot Raptor2" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "Formbot Raptor2" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define FAN_PIN 6 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 325076b214e1..665462c01238 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -31,8 +31,8 @@ #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Formbot" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "Formbot" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // // Servos diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index 111a10d645f0..a96585eb693c 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -31,8 +31,8 @@ #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Formbot" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "Formbot" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // // Servos diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 678b9c30acff..1168948d9369 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -33,7 +33,7 @@ //#error "SD_DETECT_INVERTED must be disabled for the FYSETC_F6_13 board." #endif -#define BOARD_NAME "FYSETC F6 1.3" +#define BOARD_INFO_NAME "FYSETC F6 1.3" #define RESET_PIN 30 #define SPI_FLASH_CS 83 diff --git a/Marlin/src/pins/ramps/pins_K8200.h b/Marlin/src/pins/ramps/pins_K8200.h index c134585daa77..41cc4dfbf83b 100644 --- a/Marlin/src/pins/ramps/pins_K8200.h +++ b/Marlin/src/pins/ramps/pins_K8200.h @@ -26,7 +26,7 @@ * Identical to 3DRAG */ -#define BOARD_NAME "Velleman K8200" +#define BOARD_INFO_NAME "Velleman K8200" #define DEFAULT_MACHINE_NAME "K8200" #define DEFAULT_SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200" diff --git a/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h index 908b6e61e027..a47d21c91462 100644 --- a/Marlin/src/pins/ramps/pins_K8400.h +++ b/Marlin/src/pins/ramps/pins_K8400.h @@ -32,7 +32,7 @@ * - Second heater has moved pin */ -#define BOARD_NAME "K8400" +#define BOARD_INFO_NAME "K8400" #define DEFAULT_MACHINE_NAME "Vertex" #include "pins_3DRAG.h" diff --git a/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/src/pins/ramps/pins_K8800.h index 22b5081db480..bfc61d0182e3 100644 --- a/Marlin/src/pins/ramps/pins_K8800.h +++ b/Marlin/src/pins/ramps/pins_K8800.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "K8800" +#define BOARD_INFO_NAME "K8800" #define DEFAULT_MACHINE_NAME "Vertex Delta" //#define LCD_SCREEN_ROT_180 diff --git a/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h b/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h index 03f6ca0396fa..66dddbef4508 100644 --- a/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h +++ b/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h @@ -21,7 +21,7 @@ */ #pragma once -#define BOARD_NAME "MAKEboard Mini" +#define BOARD_INFO_NAME "MAKEboard Mini" // // Only 3 Limit Switch plugs on Micromake C1 diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE.h b/Marlin/src/pins/ramps/pins_MKS_BASE.h index 9ec23c1a80d0..75c7eb284845 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE.h @@ -31,7 +31,7 @@ #error "MKS BASE 1.0 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS BASE 1.0" +#define BOARD_INFO_NAME "MKS BASE 1.0" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h index 7681f6cd9b90..700e2a410c14 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h @@ -29,7 +29,7 @@ #error "MKS BASE 1.4 only supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS BASE 1.4" +#define BOARD_INFO_NAME "MKS BASE 1.4" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 705d358e02d6..9596214cb206 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -34,7 +34,7 @@ #error "MKS GEN 1.3/1.4 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS GEN >= v1.3" +#define BOARD_INFO_NAME "MKS GEN >= v1.3" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index 7b6ea178c7d0..88973baa1a56 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -29,7 +29,7 @@ #error "MKS GEN L supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS GEN L" +#define BOARD_INFO_NAME "MKS GEN L" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 5e6b5fa11752..0c407096256d 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -45,7 +45,7 @@ * 7 | 11 */ -#if ENABLED(TARGET_LPC1768) +#ifdef TARGET_LPC1768 #error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768." #elif defined(__STM32F1__) #error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1." @@ -57,8 +57,8 @@ #endif #endif -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.4" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "RAMPS 1.4" #endif // @@ -477,7 +477,7 @@ #endif #if DISABLED(NEWPANEL) - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_13.h b/Marlin/src/pins/ramps/pins_RAMPS_13.h index 70bfd51d5478..508064e66fd4 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_13.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_13.h @@ -34,8 +34,8 @@ * */ -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.3" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "RAMPS 1.3" #endif #define IS_RAMPS_13 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 2e5471a5bb79..9be7bdef32dc 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -25,7 +25,7 @@ #error "Creality3D RAMPS supports only 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Creality3D RAMPS" +#define BOARD_INFO_NAME "Creality3D RAMPS" // // Heaters / Fans @@ -35,6 +35,11 @@ #define MOSFET_D_PIN 7 #define FIL_RUNOUT_PIN 2 +#if NUM_RUNOUT_SENSORS > 1 + #define FIL_RUNOUT2_PIN 15 // Creality CR-X can use dual runout sensors +#endif + +#define SD_DETECT_PIN 49 // Always define onboard SD detect #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS_DAGOMA.h b/Marlin/src/pins/ramps/pins_RAMPS_DAGOMA.h index cacdb83819ec..43937e213706 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_DAGOMA.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_DAGOMA.h @@ -25,7 +25,7 @@ #error "Dagoma3D F5 RAMPS supports only 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Dagoma3D F5 RAMPS" +#define BOARD_INFO_NAME "Dagoma3D F5 RAMPS" #define X_STOP_PIN 2 #define Y_STOP_PIN 3 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h index 3a452f9862ab..0eb3035c1d19 100755 --- a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h @@ -25,7 +25,7 @@ #error "Ender-4 supports only 1 hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "Ender-4" +#define BOARD_INFO_NAME "Ender-4" #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index 13a2d9dee4a7..a55348fec116 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "RAMPS <1.2" +#define BOARD_INFO_NAME "RAMPS <1.2" // Uncomment the following line for RAMPS v1.0 //#define RAMPS_V_1_0 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index 77b5ee6f5cf5..02193a5a0374 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -42,7 +42,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "RAMPS 1.4 Plus" +#define BOARD_INFO_NAME "RAMPS 1.4 Plus" #define RAMPS_D8_PIN 10 #define RAMPS_D10_PIN 8 diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index f4b38d630a01..c69843c62101 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -25,8 +25,8 @@ * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments */ -#ifndef BOARD_NAME - #define BOARD_NAME "RigidBoard" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "RigidBoard" #endif // diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h index b9ccd45f13ee..01ccb5927aaf 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h @@ -25,7 +25,7 @@ * RIGIDBOARD V2 Arduino Mega with RAMPS v1.4 pin assignments */ -#define BOARD_NAME "RigidBoard V2" +#define BOARD_INFO_NAME "RigidBoard V2" #include "pins_RIGIDBOARD.h" diff --git a/Marlin/src/pins/ramps/pins_RL200.h b/Marlin/src/pins/ramps/pins_RL200.h index 381b882e962c..1202638d1c7b 100644 --- a/Marlin/src/pins/ramps/pins_RL200.h +++ b/Marlin/src/pins/ramps/pins_RL200.h @@ -26,7 +26,7 @@ * extruder motors due to dual Z motors. Pinout therefore based on pins_RUMBA.h. */ -#define BOARD_NAME "RL200" +#define BOARD_INFO_NAME "RL200" #define DEFAULT_MACHINE_NAME "Rapide Lite 200" #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 0f8ea6ee96f8..2f934b3a42f8 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -31,11 +31,11 @@ #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Rumba" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Rumba" #endif #ifndef DEFAULT_MACHINE_NAME - #define DEFAULT_MACHINE_NAME BOARD_NAME + #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #endif // diff --git a/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h b/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h index d04695e29200..0cc4ebb3baef 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h +++ b/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h @@ -21,7 +21,7 @@ */ #pragma once -#define BOARD_NAME "Raise3D Rumba" +#define BOARD_INFO_NAME "Raise3D Rumba" #define DEFAULT_MACHINE_NAME "Raise3D N Series" // Raise3D uses thermocouples on the standard input pins diff --git a/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h b/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h index a3d24017d569..27c746ad252a 100644 --- a/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h +++ b/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h @@ -29,7 +29,7 @@ #error "Sainsmart 2-in-1 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "Sainsmart" +#define BOARD_INFO_NAME "Sainsmart" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h index 77e0bdf04c53..fd0b67c88aac 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h @@ -25,7 +25,7 @@ * Arduino Mega with RAMPS v1.3 for Anycubic */ -#define BOARD_NAME "Anycubic RAMPS 1.3" +#define BOARD_INFO_NAME "Anycubic RAMPS 1.3" #define IS_RAMPS_EFB #define RAMPS_D9_PIN 44 diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index c5c3ac0ac729..031ab8e16bcb 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -25,7 +25,7 @@ * Arduino Mega with RAMPS v1.4 for Anycubic */ -#define BOARD_NAME "Anycubic RAMPS 1.4" +#define BOARD_INFO_NAME "Anycubic RAMPS 1.4" // // Servos diff --git a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h index a1202213e7bd..48b510d8c2bd 100644 --- a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h +++ b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h @@ -31,7 +31,7 @@ #error "TRONXY-V3-1.0 supports only 2 hotends/E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "TRONXY-V3-1.0" +#define BOARD_INFO_NAME "TRONXY-V3-1.0" // // Servos diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index edc326fe9db3..1c40729a8788 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -28,8 +28,8 @@ #error "TTOSCAR supports up to 5 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "TT OSCAR" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "TT OSCAR" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // // Servos @@ -337,7 +337,7 @@ #endif #if DISABLED(NEWPANEL) - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 @@ -436,7 +436,7 @@ #define DOGLCD_CS 25 // GLCD features - //#define LCD_CONTRAST 190 + //#define LCD_CONTRAST_INIT 190 // Uncomment screen orientation //#define LCD_SCREEN_ROT_90 //#define LCD_SCREEN_ROT_180 @@ -463,7 +463,7 @@ #define DOGLCD_CS 66 // GLCD features - //#define LCD_CONTRAST 190 + //#define LCD_CONTRAST_INIT 190 // Uncomment screen orientation //#define LCD_SCREEN_ROT_90 //#define LCD_SCREEN_ROT_180 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index da1eecbdb13f..c182aa96f046 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -37,7 +37,7 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Ultimaker 2.x" +#define BOARD_INFO_NAME "Ultimaker 2.x" #define DEFAULT_MACHINE_NAME "Ultimaker" #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index f6239ae163d5..b2594acebced 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -37,8 +37,8 @@ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "Ultimaker" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "Ultimaker" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" // @@ -129,7 +129,7 @@ #define LCD_PINS_D6 5 #define LCD_PINS_D7 6 - // buttons are directly attached + // Buttons directly attached #define BTN_EN1 40 #define BTN_EN2 42 #define BTN_ENC 19 @@ -138,7 +138,7 @@ #else // !NEWPANEL - Old style panel with shift register - // buttons are attached to a shift register + // Buttons attached to a shift register #define SHIFT_CLK 38 #define SHIFT_LD 42 #define SHIFT_OUT 40 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 6a25b509e36f..dd9aaf1292ab 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -36,7 +36,7 @@ * the revisions provided inconsistent information. * * As best I can determine: - * 1.5.3 boards should use the pins_ULTIMAKER.h file which means the BOARD_NAME + * 1.5.3 boards should use the pins_ULTIMAKER.h file which means the BOARD_INFO_NAME * define in this file should say 1.5.3 rather than 1.5.4 * This file is meant for 1.1 - 1.3 boards. * The endstops for the 1.0 boards use different definitions than on the 1.1 - 1.3 @@ -65,13 +65,13 @@ #endif #ifdef BOARD_REV_1_1_TO_1_3 - #define BOARD_NAME "Ultimaker 1.1-1.3" + #define BOARD_INFO_NAME "Ultimaker 1.1-1.3" #elif defined(BOARD_REV_1_0) - #define BOARD_NAME "Ultimaker 1.0" + #define BOARD_INFO_NAME "Ultimaker 1.0" #elif defined(BOARD_REV_1_5) - #define BOARD_NAME "Ultimaker 1.5" + #define BOARD_INFO_NAME "Ultimaker 1.5" #else - #define BOARD_NAME "Ultimaker 1.5.4+" + #define BOARD_INFO_NAME "Ultimaker 1.5.4+" #endif #define DEFAULT_MACHINE_NAME "Ultimaker" #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" @@ -187,7 +187,7 @@ #define LCD_PINS_D6 5 #define LCD_PINS_D7 6 - // buttons are directly attached + // Buttons directly attached #define BTN_EN1 40 #define BTN_EN2 42 #define BTN_ENC 19 @@ -196,7 +196,7 @@ #else // !NEWPANEL - Old style panel with shift register - // buttons are attached to a shift register + // Buttons attached to a shift register #define SHIFT_CLK 38 #define SHIFT_LD 42 #define SHIFT_OUT 40 diff --git a/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/src/pins/ramps/pins_VORON.h index 13c93e1879a0..43c33171644d 100644 --- a/Marlin/src/pins/ramps/pins_VORON.h +++ b/Marlin/src/pins/ramps/pins_VORON.h @@ -26,7 +26,7 @@ * See https://github.com/mzbotreprap/VORON/blob/master/Firmware/Marlin/pins_RAMPS_VORON.h */ -#define BOARD_NAME "VORON Design v2" +#define BOARD_INFO_NAME "VORON Design v2" #define RAMPS_D8_PIN 11 diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index de1899e7ff69..aa80818577c1 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -31,7 +31,7 @@ #error "Z-Bolt X Series board supports up to 4 hotends / E-steppers." #endif -#define BOARD_NAME "Z-Bolt X Series" +#define BOARD_INFO_NAME "Z-Bolt X Series" // // Servos diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index e18a14dedc02..c502f076718b 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -25,7 +25,7 @@ * Arduino DUE Shield Kit (ADSK) pin assignments */ -#define BOARD_NAME "ADSK" +#define BOARD_INFO_NAME "ADSK" #if !defined(__SAM3X8E__) && !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index 538f4b4f506c..75dd0046480f 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -30,7 +30,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "Alligator Board R2" +#define BOARD_INFO_NAME "Alligator Board R2" // // Servos diff --git a/Marlin/src/pins/sam/pins_ARCHIM1.h b/Marlin/src/pins/sam/pins_ARCHIM1.h index 73f78ba1e509..990c8fc1f156 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM1.h +++ b/Marlin/src/pins/sam/pins_ARCHIM1.h @@ -41,7 +41,7 @@ #error "Oops! Select 'Archim' in 'Tools > Board.'" #endif -#define BOARD_NAME "Archim 1.0" +#define BOARD_INFO_NAME "Archim 1.0" // // Items marked * have been altered from Archim v1.0 diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index 95200adb3440..f3052ddcfd27 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -43,7 +43,7 @@ #error "Archim2 requires Software SPI. Enable TMC_USE_SW_SPI in Configuration_adv.h." #endif -#define BOARD_NAME "Archim 2.0" +#define BOARD_INFO_NAME "Archim 2.0" // // Items marked * have been altered from Archim v1.0 @@ -231,7 +231,7 @@ // // LCD / Controller // -#if HAS_SPI_LCD +#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL #define BEEPER_PIN 23 // D24 PA15_CTS1 #define LCD_PINS_RS 17 // D17 PA12_RXD1 #define LCD_PINS_ENABLE 24 // D23 PA14_RTS1 @@ -242,10 +242,10 @@ #define SD_DETECT_PIN 2 // D2 PB25_TIOA0 - #if ENABLED(NEWPANEL) + #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL // Buttons on AUX-2 #define BTN_EN1 60 // D60 PA3_TIOB1 #define BTN_EN2 13 // D13 PB27_TIOB0 #define BTN_ENC 16 // D16 PA13_TXD1 // the click - #endif // NEWPANEL + #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index 2eb79c9dceb3..731e31defad6 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "DUE3DOM" +#define BOARD_INFO_NAME "DUE3DOM" // // Servos diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 3783b7612d56..ed9781388a5b 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "DUE3DOM MINI" +#define BOARD_INFO_NAME "DUE3DOM MINI" // // Servos diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index b23c1af084c2..4df3bc7f1af1 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -29,8 +29,8 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "PRINTRBOARD_G2" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "PRINTRBOARD_G2" #endif // diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index 52c6388268aa..85db7492e32d 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "RADDS" +#define BOARD_INFO_NAME "RADDS" // // Servos diff --git a/Marlin/src/pins/sam/pins_RAMPS4DUE.h b/Marlin/src/pins/sam/pins_RAMPS4DUE.h index c36ed150e456..36c0717bce8c 100644 --- a/Marlin/src/pins/sam/pins_RAMPS4DUE.h +++ b/Marlin/src/pins/sam/pins_RAMPS4DUE.h @@ -43,7 +43,7 @@ #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "RAMPS4DUE" +#define BOARD_INFO_NAME "RAMPS4DUE" #define IS_RAMPS4DUE // diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index bfee7c753a7a..4f9053b8caef 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -47,7 +47,7 @@ #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif -#define BOARD_NAME "RAMPS Duo" +#define BOARD_INFO_NAME "RAMPS Duo" #define IS_RAMPS_DUO #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index c0e3584c3c08..5add612cc1ea 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -32,8 +32,8 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS-FD v1" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "RAMPS-FD v1" #endif #define INVERTED_HEATER_PINS diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V2.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V2.h index d4f25af16de1..22fdafd68ec7 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V2.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V2.h @@ -28,7 +28,7 @@ * Use 1k thermistor tables */ -#define BOARD_NAME "RAMPS-FD v2" +#define BOARD_INFO_NAME "RAMPS-FD v2" #ifndef E0_CS_PIN #define E0_CS_PIN 69 // moved from A13 to A15 on v2.2, if not earlier diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h index 0ba41148043c..f1f593991f72 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_SMART.h +++ b/Marlin/src/pins/sam/pins_RAMPS_SMART.h @@ -64,7 +64,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "RAMPS-SMART" +#define BOARD_INFO_NAME "RAMPS-SMART" #define IS_RAMPS_SMART #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 85dc9eaea601..b457c7852cb8 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -36,7 +36,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "RuRAMPS4Due v1.1" +#define BOARD_INFO_NAME "RuRAMPS4Due v1.1" // // Servos diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 1c22f8f5a0ba..6931654a7ae1 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -36,7 +36,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "RuRAMPS4Due v1.3" +#define BOARD_INFO_NAME "RuRAMPS4Due v1.3" // // Servos diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index b77469b0d890..94fb7cddc107 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -29,7 +29,7 @@ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif -#define BOARD_NAME "Ultratronics v1.0" +#define BOARD_INFO_NAME "Ultratronics v1.0" // // Servos diff --git a/Marlin/src/pins/samd/pins_AGCM4_RURAMPS4D_13.h b/Marlin/src/pins/samd/pins_AGCM4_RURAMPS4D_13.h index ee5f16a1e66a..dfd8113a0d26 100644 --- a/Marlin/src/pins/samd/pins_AGCM4_RURAMPS4D_13.h +++ b/Marlin/src/pins/samd/pins_AGCM4_RURAMPS4D_13.h @@ -26,7 +26,7 @@ #error "Oops! Select 'Adafruit Grand Central M4' in 'Tools > Board.'" #endif -#define BOARD_NAME "RuRAMPS4AGCM4 v1.3" +#define BOARD_INFO_NAME "RuRAMPS4AGCM4 v1.3" // // Servos @@ -102,7 +102,7 @@ #if HAS_FILAMENT_SENSOR #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN Y_MIN_PIN + #define FIL_RUNOUT_PIN Y_MIN_PIN #endif #endif @@ -170,64 +170,69 @@ // #if HAS_SPI_LCD - #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER) + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BEEPER_PIN 75 - #define LCD_PINS_D4 48 - #define LCD_PINS_D7 53 - #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI - #define LCD_PINS_RS 76 - #define LCD_PINS_ENABLE 77 + #define BEEPER_PIN 54 + #define LCD_PINS_D4 48 + #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI + #define LCD_PINS_RS 55 + #define LCD_PINS_ENABLE 56 - #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #elif EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER) - #define BEEPER_PIN 75 - #define LCD_PINS_D4 48 - #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI - #define LCD_PINS_RS 76 - #define LCD_PINS_ENABLE 77 + #error "Pin compatibility check needed!" + #define BEEPER_PIN 54 + #define LCD_PINS_D4 48 + #define LCD_PINS_D5 -1 // 50 can't be used, it's MISO + #define LCD_PINS_D6 -1 // 52 can't be used, it's SCK + #define LCD_PINS_D7 53 + #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI + #define LCD_PINS_RS 55 + #define LCD_PINS_ENABLE 56 #elif HAS_SSD1306_OLED_I2C - #define BEEPER_PIN 75 - #define LCD_SDSS 10 - #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI + #error "Pin compatibility check needed!" + #define BEEPER_PIN 54 + #define LCD_SDSS 10 + #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI #elif ENABLED(FYSETC_MINI_12864) - #define BEEPER_PIN 75 - #define DOGLCD_CS 77 - #define DOGLCD_A0 76 + #define BEEPER_PIN 54 + #define DOGLCD_CS 56 + #define DOGLCD_A0 55 - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN 48 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN 48 // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #error "Pin compatibility check needed! Grand central M4 pins 50, 51 and 52 are not GPIO pins, they are wired to MISO, MOSI, and SCK." + #error "Pin compatibility check needed!" #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN 50 // D5 + #define RGB_LED_R_PIN 50 // 50 can't be used, it's MISO #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN 52 // D6 + #define RGB_LED_G_PIN 52 // 52 can't be used, it's SCK #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN 53 // D7 + #define RGB_LED_B_PIN 53 #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #error "Pin compatibility check needed! Grand central M4 pins 50, 51 and 52 are not GPIO pins, they are wired to MISO, MOSI, and SCK." - #define NEOPIXEL_PIN 50 // D5 + #error "Pin compatibility check needed!" + #define NEOPIXEL_PIN 50 // 50 can't be used, it's MISO #endif #elif ENABLED(MKS_MINI_12864) - #error "Pin compatibility check needed! Grand central M4 pins 50, 51 and 52 are not GPIO pins, they are wired to MISO, MOSI, and SCK." + + #error "Pin compatibility check needed!" #define ORIG_BEEPER_PIN 75 - #define DOGLCD_A0 52 - #define DOGLCD_CS 50 + #define DOGLCD_A0 52 // 52 can't be used, it's SCK + #define DOGLCD_CS 50 // 50 can't be used, it's MISO - #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI + #define SD_DETECT_PIN -1 // 51 can't be used, it's MOSI #endif diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index b10a7cfa08a6..81c479c85a45 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -93,7 +93,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'melzi' or 'melzi_optiboot.')" #endif -#define BOARD_NAME "Anet 1.0" +#define BOARD_INFO_NAME "Anet 1.0" // // Limit Switches diff --git a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h index 8c10bc8fbfc6..4140dc4b950c 100644 --- a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h +++ b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h @@ -25,6 +25,6 @@ * Azteeg X1 pin assignments */ -#define BOARD_NAME "Azteeg X1" +#define BOARD_INFO_NAME "Azteeg X1" #include "pins_SANGUINOLOLU_12.h" diff --git a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h index e48b340e1f05..3059f6c898b4 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h @@ -54,7 +54,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Board.'" #endif -#define BOARD_NAME "Gen3 Monolithic" +#define BOARD_INFO_NAME "Gen3 Monolithic" #define DEBUG_PIN 0 // diff --git a/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h b/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h index 9b5f42caa6be..e370a888f375 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h @@ -55,7 +55,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif -#define BOARD_NAME "Gen3+" +#define BOARD_INFO_NAME "Gen3+" // // Limit Switches diff --git a/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/src/pins/sanguino/pins_GEN6.h index 2857f6f7774d..294b4df2f5c7 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6.h +++ b/Marlin/src/pins/sanguino/pins_GEN6.h @@ -56,8 +56,8 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Gen6" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Gen6" #endif // diff --git a/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h b/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h index 359f4e64ac36..fc4d8b6e10bd 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h +++ b/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h @@ -51,6 +51,6 @@ */ -#define BOARD_NAME "Gen6 Deluxe" +#define BOARD_INFO_NAME "Gen6 Deluxe" #include "pins_GEN6.h" diff --git a/Marlin/src/pins/sanguino/pins_GEN7_12.h b/Marlin/src/pins/sanguino/pins_GEN7_12.h index cd1b5b599865..53e4e04df86e 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_12.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_12.h @@ -56,8 +56,8 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Gen7 v1.1 / 1.2" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Gen7 v1.1 / 1.2" #endif #ifndef GEN7_VERSION diff --git a/Marlin/src/pins/sanguino/pins_GEN7_13.h b/Marlin/src/pins/sanguino/pins_GEN7_13.h index d3802552434f..7f66ac1a9ab9 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_13.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_13.h @@ -50,7 +50,7 @@ * */ -#define BOARD_NAME "Gen7 v1.3" +#define BOARD_INFO_NAME "Gen7 v1.3" #define GEN7_VERSION 13 // v1.3 #include "pins_GEN7_12.h" diff --git a/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/src/pins/sanguino/pins_GEN7_14.h index 064ffd81e285..df18f6e7812e 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_14.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_14.h @@ -56,7 +56,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif -#define BOARD_NAME "Gen7 v1.4" +#define BOARD_INFO_NAME "Gen7 v1.4" #define GEN7_VERSION 14 // v1.4 diff --git a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h index d3e2b35a6d1d..8605f0d4691b 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h @@ -59,7 +59,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif -#define BOARD_NAME "Gen7 Custom" +#define BOARD_INFO_NAME "Gen7 Custom" // // Limit Switches diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index e4dcc427775e..1ccf5ac064ae 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -25,8 +25,8 @@ * Melzi pin assignments */ -#ifndef BOARD_NAME - #define BOARD_NAME "Melzi" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Melzi" #endif #define IS_MELZI diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 2d08dbc551b9..3052daba9406 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -31,7 +31,7 @@ * See http://www.instructables.com/id/Burn-Arduino-Bootloader-with-Arduino-MEGA/ */ -#define BOARD_NAME "Melzi (Creality)" +#define BOARD_INFO_NAME "Melzi (Creality)" #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h b/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h index a9124245c35e..ef1f1332c1c9 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h @@ -25,5 +25,5 @@ * Melzi with ATmega1284 (MaKr3d version) pin assignments */ -#define BOARD_NAME "Melzi (ATmega1284)" +#define BOARD_INFO_NAME "Melzi (ATmega1284)" #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index 99671d671df1..eab9940816c7 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -25,7 +25,7 @@ * Melzi (Malyan M150) pin assignments */ -#define BOARD_NAME "Melzi (Malyan)" +#define BOARD_INFO_NAME "Melzi (Malyan)" #include "pins_MELZI.h" #undef LCD_SDSS diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index bb8e2e32445b..b49f94998f26 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -25,7 +25,7 @@ * Melzi pin assignments */ -#define BOARD_NAME "Melzi (Tronxy)" +#define BOARD_INFO_NAME "Melzi (Tronxy)" #include "pins_MELZI.h" #undef Z_ENABLE_PIN diff --git a/Marlin/src/pins/sanguino/pins_OMCA.h b/Marlin/src/pins/sanguino/pins_OMCA.h index b4b23b79062b..8c50483574e4 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA.h +++ b/Marlin/src/pins/sanguino/pins_OMCA.h @@ -81,7 +81,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega644' or 'ATmega644P' in 'Tools > Processor.'" #endif -#define BOARD_NAME "Final OMCA" +#define BOARD_INFO_NAME "Final OMCA" // // Limit Switches diff --git a/Marlin/src/pins/sanguino/pins_OMCA_A.h b/Marlin/src/pins/sanguino/pins_OMCA_A.h index 63eb362620f1..94a186241b5c 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA_A.h +++ b/Marlin/src/pins/sanguino/pins_OMCA_A.h @@ -80,7 +80,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Board' and ATmega644 in 'Tools > Processor.'" #endif -#define BOARD_NAME "Alpha OMCA" +#define BOARD_INFO_NAME "Alpha OMCA" // // Limit Switches diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 978a21d2e7d7..0b119a422ccf 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -56,8 +56,8 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Sanguinololu <1.2" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Sanguinololu <1.2" #endif // diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h index 3ef9e1c95d20..f4b05e4f6ef1 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h @@ -34,8 +34,8 @@ * STB_11 */ -#ifndef BOARD_NAME - #define BOARD_NAME "Sanguinololu 1.2" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Sanguinololu 1.2" #endif #define SANGUINOLOLU_V_1_2 diff --git a/Marlin/src/pins/sanguino/pins_SETHI.h b/Marlin/src/pins/sanguino/pins_SETHI.h index 23b985fbac24..79c3209b4bb9 100644 --- a/Marlin/src/pins/sanguino/pins_SETHI.h +++ b/Marlin/src/pins/sanguino/pins_SETHI.h @@ -54,7 +54,7 @@ #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif -#define BOARD_NAME "Sethi 3D_1" +#define BOARD_INFO_NAME "Sethi 3D_1" #ifndef GEN7_VERSION #define GEN7_VERSION 12 // v1.x diff --git a/Marlin/src/pins/sanguino/pins_STB_11.h b/Marlin/src/pins/sanguino/pins_STB_11.h index 511b938c4b63..9a79853467d8 100644 --- a/Marlin/src/pins/sanguino/pins_STB_11.h +++ b/Marlin/src/pins/sanguino/pins_STB_11.h @@ -25,6 +25,6 @@ * STB V1.1 pin assignments */ -#define BOARD_NAME "STB V1.1" +#define BOARD_INFO_NAME "STB V1.1" #include "pins_SANGUINOLOLU_12.h" diff --git a/Marlin/src/pins/stm32/pins_ARMED.h b/Marlin/src/pins/stm32/pins_ARMED.h index ea1c11f39b6f..495654a82cbf 100644 --- a/Marlin/src/pins/stm32/pins_ARMED.h +++ b/Marlin/src/pins/stm32/pins_ARMED.h @@ -31,9 +31,9 @@ #define ARMED_V1_1 #endif -#undef BOARD_NAME // Defined on the command line by Arduino Core STM32 -#define BOARD_NAME "Arm'ed" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#undef BOARD_INFO_NAME // Defined on the command line by Arduino Core STM32 +#define BOARD_INFO_NAME "Arm'ed" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define I2C_EEPROM diff --git a/Marlin/src/pins/stm32/pins_BEAST.h b/Marlin/src/pins/stm32/pins_BEAST.h index 44204f0c9ce3..7b1f61d918f0 100644 --- a/Marlin/src/pins/stm32/pins_BEAST.h +++ b/Marlin/src/pins/stm32/pins_BEAST.h @@ -29,7 +29,7 @@ * 21017 Victor Perez Marlin for stm32f1 test */ -#define BOARD_NAME "Beast STM32" +#define BOARD_INFO_NAME "Beast STM32" #define DEFAULT_MACHINE_NAME "STM32F103RET6" // Enable I2C_EEPROM for testing @@ -142,7 +142,7 @@ #define LCD_PINS_D7 PB15 #if DISABLED(NEWPANEL) #define BEEPER_PIN 33 - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 @@ -254,7 +254,7 @@ // Beeper on AUX-4 #define BEEPER_PIN 33 - // buttons are directly attached to AUX-2 + // Buttons directly attached to AUX-2 #if ENABLED(REPRAPWORLD_KEYPAD) #define BTN_EN1 64 #define BTN_EN2 59 diff --git a/Marlin/src/pins/stm32/pins_BIGTREE_BTT002_V1.0.h b/Marlin/src/pins/stm32/pins_BIGTREE_BTT002_V1.0.h new file mode 100644 index 000000000000..a66a2b8a2197 --- /dev/null +++ b/Marlin/src/pins/stm32/pins_BIGTREE_BTT002_V1.0.h @@ -0,0 +1,254 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +#ifndef TARGET_STM32F4 + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 3 || E_STEPPERS > 3 + #error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers." +#endif + +#define BOARD_INFO_NAME "BIGTREE Btt002 1.0" + +#define SRAM_EEPROM_EMULATION + +// Ignore temp readings during development. +//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 + +// +// Servos +// +#define SERVO0_PIN PC3 + +// +// Limit Switches +// +#define X_MIN_PIN PD3 +#define X_MAX_PIN PD3 +#define Y_MIN_PIN PD2 +#define Y_MAX_PIN PD2 +#define Z_MIN_PIN PD1 +#define Z_MAX_PIN PD1 + +// +// Z Probe must be this pins ## +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PD1 +#endif + +// +// Steppers +// +#define X_STEP_PIN PA9 +#define X_DIR_PIN PA10 +#define X_ENABLE_PIN PA8 +#ifndef X_CS_PIN + #define X_CS_PIN PE2 +#endif + +#define Y_STEP_PIN PC8 +#define Y_DIR_PIN PC9 +#define Y_ENABLE_PIN PC7 + #ifndef Y_CS_PIN + #define Y_CS_PIN PE3 +#endif + +#define Z_STEP_PIN PD15 +#define Z_DIR_PIN PC6 +#define Z_ENABLE_PIN PD14 +#ifndef Z_CS_PIN + #define Z_CS_PIN PE4 +#endif + +#define E0_STEP_PIN PD12 +#define E0_DIR_PIN PD13 +#define E0_ENABLE_PIN PD11 +#ifndef E0_CS_PIN + #define E0_CS_PIN PD7 +#endif + +/* +//SKR_PRO_V1.1 +#define E1_STEP_PIN PD15 +#define E1_DIR_PIN PE7 +#define E1_ENABLE_PIN PA3 +#ifndef E1_CS_PIN + #define E1_CS_PIN PG15 +#endif + +#define E2_STEP_PIN PD13 +#define E2_DIR_PIN PG9 +#define E2_ENABLE_PIN PF0 +#ifndef E2_CS_PIN + #define E2_CS_PIN PG12 +#endif +*/ +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PB15 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PB14 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PB13 + #endif +#endif + +#if HAS_TMC220x + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL Serial1 + //#define X2_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Y2_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define Z2_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + //#define E2_HARDWARE_SERIAL Serial1 + //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 + + // + // Software serial ## + // + #define X_SERIAL_TX_PIN PE2 + #define X_SERIAL_RX_PIN PE2 + + #define Y_SERIAL_TX_PIN PE3 + #define Y_SERIAL_RX_PIN PE3 + + #define Z_SERIAL_TX_PIN PE4 + #define Z_SERIAL_RX_PIN PE4 + + #define E0_SERIAL_TX_PIN PD7 + #define E0_SERIAL_RX_PIN PD7 + + //#define E1_SERIAL_TX_PIN PD1 + //#define E1_SERIAL_RX_PIN PD1 + + //#define E2_SERIAL_TX_PIN PD6 + //#define E2_SERIAL_RX_PIN PD6 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PA2 // T1 <-> E0 +#define TEMP_1_PIN PA0 // T2 <-> E1 +//#define TEMP_2_PIN PC2 // T3 <-> E2 SKR_PRO +#define TEMP_BED_PIN PA1 // T0 <-> Bed + +// +// Heaters / Fans +// +#define HEATER_0_PIN PE6 // Heater0 +//#define HEATER_1_PIN PD14 // Heater1 +//#define HEATER_2_PIN PB0 // Heater1 +#define HEATER_BED_PIN PE5 // Hotbed +#define FAN_PIN PB9 // Fan0 +#define FAN1_PIN PB8 // Fan1 +//#define FAN2_PIN PE6 // Fan2 + +// HAL SPI pins group +#define SCK_PIN PA5 // SPI SCLK +#define MYSSEL PA4 // SPI SSEL +#define MISO_PIN PA6 // SPI MISO +#define MOSI_PIN PA7 // SPI MOSI + +// +// Misc. Functions +// +#define SDSS PA4 + +/** + * -------------------------------------SKR_MK3----------------------------------------------- + * _____ _____ | + * PA3 | · · | GND 5V | · · | GND | + * NRESET | · · | PC4(SD_DET) (LCD_D7) PE13 | · · | PE12 (LCD_D6) | + * (MOSI)PA7 | · · | PB0(BTN_EN2) (LCD_D5) PE11 | · · | PE10 (LCD_D4) | + * (SD_SS)PA4 | · · | PC5(BTN_EN1) (LCD_RS) PE8 | · · | PE9 (LCD_EN) | + * (SCK)PA5 | · · | PA6(MISO) (BTN_ENC) PB1 | · · | PE7 (BEEPER) | + *  ̄ ̄  ̄ ̄ | + * EXP2 EXP1 | + * --------------------------------------------------------------------------------------------- + */ +// +// LCDs and Controllers +// +#if HAS_SPI_LCD + #define BEEPER_PIN PE7 + #define BTN_ENC PB1 + + #if ENABLED(CR10_STOCKDISPLAY) + #define LCD_PINS_RS PE12 + + #define BTN_EN1 PE9 + #define BTN_EN2 PE10 + + #define LCD_PINS_ENABLE PE13 + #define LCD_PINS_D4 PE11 + + #else + + #define LCD_PINS_RS PE8 + + #define BTN_EN1 PC5 + #define BTN_EN2 PB0 + #define SD_DETECT_PIN PC4 + + #define LCD_SDSS PA4 + + #define LCD_PINS_ENABLE PE9 + #define LCD_PINS_D4 PE10 + + #if ENABLED(ULTIPANEL) + #define LCD_PINS_D5 PE11 + #define LCD_PINS_D6 PE12 + #define LCD_PINS_D7 PE13 + #endif + + #endif + + // Alter timing for graphical display + #if HAS_GRAPHICAL_LCD + #ifndef ST7920_DELAY_1 + #define ST7920_DELAY_1 DELAY_NS(96) + #endif + #ifndef ST7920_DELAY_2 + #define ST7920_DELAY_2 DELAY_NS(48) + #endif + #ifndef ST7920_DELAY_3 + #define ST7920_DELAY_3 DELAY_NS(600) + #endif + #endif + +#endif // HAS_SPI_LCD diff --git a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_E3_DIP.h b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_E3_DIP.h index dc2cd1ce602a..0c5d88354cda 100644 --- a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_E3_DIP.h @@ -25,7 +25,7 @@ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#define BOARD_NAME "BIGTREE SKR E3 DIP V1.0" +#define BOARD_INFO_NAME "BIGTREE SKR E3 DIP V1.0" // Release PB3/PB4 (TMC_SW Pins) from JTAG pins #define DISABLE_JTAG diff --git a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_E3.h b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_E3.h index 57331e65f968..852226eff373 100644 --- a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_E3.h +++ b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_E3.h @@ -25,7 +25,7 @@ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#define BOARD_NAME "BIGTREE SKR Mini E3" +#define BOARD_INFO_NAME "BIGTREE SKR Mini E3" // Release PB3/PB4 (E0 STP/DIR) from JTAG pins #define DISABLE_JTAG @@ -33,6 +33,12 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +#define FLASH_EEPROM_EMULATION +#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB +#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE) +#undef E2END +#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB + // // Servos // diff --git a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_V1_1.h index cabfc254fbd6..3d7f8d98d423 100644 --- a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_V1_1.h @@ -25,7 +25,7 @@ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#define BOARD_NAME "BIGTREE SKR Mini 1.1" +#define BOARD_INFO_NAME "BIGTREE SKR Mini 1.1" //#define DISABLE_DEBUG #define DISABLE_JTAG @@ -191,3 +191,8 @@ #ifndef ST7920_DELAY_3 #define ST7920_DELAY_3 DELAY_NS(125) #endif + +#define FLASH_EEPROM_EMULATION +#define EEPROM_PAGE_SIZE (0x800) // 2KB +#define EEPROM_START_ADDRESS (0x8000000 + (256 * 1024) - 2 * EEPROM_PAGE_SIZE) +#define E2END (EEPROM_PAGE_SIZE - 1) diff --git a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h index 840bbb8eeddd..89e7fe73e350 100644 --- a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h +++ b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h @@ -27,7 +27,7 @@ #error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers." #endif -#define BOARD_NAME "BIGTREE SKR Pro 1.1" +#define BOARD_INFO_NAME "BIGTREE SKR Pro 1.1" // redefined? // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation diff --git a/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h index 3edc77460b24..0e405608da8c 100644 --- a/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h @@ -33,8 +33,8 @@ #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers." #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Black STM32F4VET6" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Black STM32F4VET6" #endif #define DEFAULT_MACHINE_NAME "STM32F407VET6" diff --git a/Marlin/src/pins/stm32/pins_CHITU3D.h b/Marlin/src/pins/stm32/pins_CHITU3D.h index 7a42dc9e4efc..48b57b35020b 100644 --- a/Marlin/src/pins/stm32/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32/pins_CHITU3D.h @@ -29,7 +29,7 @@ * 2017 Victor Perez Marlin for stm32f1 test */ -#define BOARD_NAME "Chitu3D" +#define BOARD_INFO_NAME "Chitu3D" #define DEFAULT_MACHINE_NAME "STM32F103RET6" // Enable I2C_EEPROM for testing @@ -141,12 +141,12 @@ #define LCD_PINS_D7 PB15 #if DISABLED(NEWPANEL) #define BEEPER_PIN 33 - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet - //#define SHIFT_CLK 38 - //#define SHIFT_LD 42 - //#define SHIFT_OUT 40 - //#define SHIFT_EN 17 + //#define SHIFT_CLK 38 + //#define SHIFT_LD 42 + //#define SHIFT_OUT 40 + //#define SHIFT_EN 17 #endif #endif @@ -252,7 +252,7 @@ // Beeper on AUX-4 #define BEEPER_PIN 33 - // buttons are directly attached to AUX-2 + // Buttons directly attached to AUX-2 #if ENABLED(REPRAPWORLD_KEYPAD) #define BTN_EN1 64 #define BTN_EN2 59 diff --git a/Marlin/src/pins/stm32/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32/pins_FYSETC_AIO_II.h index ed44f94717e0..5d30aaec3172 100644 --- a/Marlin/src/pins/stm32/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32/pins_FYSETC_AIO_II.h @@ -25,8 +25,8 @@ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#define BOARD_NAME "FYSETC AIO II" -#define BOARD_WEBSITE_URL "https://fysetc.com" +#define BOARD_INFO_NAME "FYSETC AIO II" +#define BOARD_WEBSITE_URL "fysetc.com" #define DISABLE_JTAG @@ -137,7 +137,7 @@ #define DOGLCD_CS PB7 #endif - //#define LCD_CONTRAST 190 + //#define LCD_CONTRAST_INIT 190 //#define LCD_SCREEN_ROT_90 //#define LCD_SCREEN_ROT_180 //#define LCD_SCREEN_ROT_270 diff --git a/Marlin/src/pins/stm32/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32/pins_FYSETC_CHEETAH.h index e3aac9e84ad0..8fee5d23bbb2 100644 --- a/Marlin/src/pins/stm32/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32/pins_FYSETC_CHEETAH.h @@ -27,14 +27,20 @@ #define DEFAULT_MACHINE_NAME "3D Printer" -#define BOARD_NAME "FYSETC Cheetah" -#define BOARD_WEBSITE_URL "https://fysetc.com" +#define BOARD_INFO_NAME "FYSETC Cheetah" +#define BOARD_WEBSITE_URL "fysetc.com" // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 #define DISABLE_JTAG +#define FLASH_EEPROM_EMULATION +#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB +#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE) +#undef E2END +#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB + // // Servos // @@ -134,7 +140,7 @@ #define RGB_LED_B_PIN PB6 #endif - //#define LCD_CONTRAST 190 + //#define LCD_CONTRAST_INIT 190 #if ENABLED(NEWPANEL) #define BTN_EN1 PC11 diff --git a/Marlin/src/pins/stm32/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32/pins_GTM32_PRO_VB.h index c2f5cbc5eadc..95a90e753923 100644 --- a/Marlin/src/pins/stm32/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32/pins_GTM32_PRO_VB.h @@ -30,7 +30,7 @@ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#define BOARD_NAME "GTM32 Pro VB" +#define BOARD_INFO_NAME "GTM32 Pro VB" #define DEFAULT_MACHINE_NAME "STM32F103VET6" //#define DISABLE_DEBUG diff --git a/Marlin/src/pins/stm32/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32/pins_JGAURORA_A5S_A1.h index 77730bc415da..51c1e8f79a97 100644 --- a/Marlin/src/pins/stm32/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32/pins_JGAURORA_A5S_A1.h @@ -33,7 +33,7 @@ #elif HOTENDS > 1 || E_STEPPERS > 1 #error "JGAurora 32-bit board only supports 1 hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "JGAurora A5S A1 board" +#define BOARD_INFO_NAME "JGAurora A5S A1 board" #define STM32_XL_DENSITY // #define MCU_STM32F103ZE // not yet required @@ -122,7 +122,6 @@ // Touch support // #if ENABLED(TOUCH_BUTTONS) - #define BTN_ENC PA11 // Real pin needed to enable encoder's push button functionality used by touch screen. PA11 gives stable value. #define TOUCH_CS_PIN PA4 #define TOUCH_INT_PIN PC4 #endif diff --git a/Marlin/src/pins/stm32/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32/pins_LONGER3D_LK.h index 5be4eb57de1f..5862449e8795 100644 --- a/Marlin/src/pins/stm32/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32/pins_LONGER3D_LK.h @@ -28,7 +28,7 @@ #error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "Longer3D" +#define BOARD_INFO_NAME "Longer3D" #define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets) //#define DISABLE_DEBUG // We still want to debug with STLINK... @@ -94,12 +94,16 @@ #define LED_PIN PC2 // pin 17 // -// PWM +// PWM for a servo probe +// Other servo devices are not supported on this board! // -#define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V) -#define SERVO0_PWM_OD // Comment this if using PE5 +#if HAS_Z_SERVO_PROBE + #define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V) + #define SERVO0_PWM_OD // Comment this if using PE5 -//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0) + //#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0) + //#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5) +#endif /** * Note: Alfawise screens use various TFT controllers. Supported screens @@ -136,23 +140,30 @@ #define TOUCH_MOSI_PIN PB14 // pin 53 #define TOUCH_MISO_PIN PB15 // pin 54 #define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843) - - #define BTN_ENC PB0 // pin 35 unconnected pin on Alfawise. (PC13 to try) - #define BTN_EN1 -1 // Real pin is needed to enable encoder's push button - #define BTN_EN2 -1 // functionality used by touch screen #endif // -// SPI1 (EEPROM W25Q64 + DAC OUT) +// Persistent Storage +// If no option is selected below the SD Card will be used // +//#define SPI_EEPROM +#define FLASH_EEPROM_EMULATION + #undef E2END -#define E2END 0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits) -/* -#define SPI_EEPROM 1 // If commented this will create a file on the SD card as a replacement -#define SPI_CHAN_EEPROM1 1 -#define SPI_EEPROM1_CS PC5 // pin 34 - -//#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30 -//#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31 -//#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32 -*/ +#if ENABLED(SPI_EEPROM) + // SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits) + #define SPI_CHAN_EEPROM1 1 + #define SPI_EEPROM1_CS PC5 // pin 34 + #define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30 + #define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31 + #define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32 + #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) + #define E2END ((16 * EEPROM_PAGE_SIZE)-1) // Limit to 64KB for now... +#elif ENABLED(FLASH_EEPROM_EMULATION) + // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) + #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) + #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) + #define E2END (EEPROM_PAGE_SIZE - 1) +#else + #define E2END (0x7FFU) // On SD, Limit to 2KB, require this amount of RAM +#endif diff --git a/Marlin/src/pins/stm32/pins_MALYAN_M200.h b/Marlin/src/pins/stm32/pins_MALYAN_M200.h index 0d15441ad39c..646cb0b3747f 100644 --- a/Marlin/src/pins/stm32/pins_MALYAN_M200.h +++ b/Marlin/src/pins/stm32/pins_MALYAN_M200.h @@ -29,7 +29,7 @@ #error "Oops! You must be compiling for STM32." #endif -#define BOARD_NAME "Malyan M200" +#define BOARD_INFO_NAME "Malyan M200" // Enable EEPROM Emulation for this board // This setting should probably be in configuration.h diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN.h index 1cd120091fa3..7623f3fe234e 100644 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN.h @@ -31,7 +31,7 @@ #error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS Robin" +#define BOARD_INFO_NAME "MKS Robin" // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h index 9a6901d17a1d..d8870f9bf1f0 100644 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h @@ -29,10 +29,10 @@ #error "MKS Robin Lite supports up to 1 hotends / E-steppers. Comment out this line to continue." #endif -#ifndef BOARD_NAME - #define BOARD_NAME "MKS Robin Lite" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "MKS Robin Lite" #endif -#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks" +#define BOARD_WEBSITE_URL "github.com/makerbase-mks" //#define DISABLE_DEBUG #define DISABLE_JTAG diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h index 0b1649d01765..7be36b61fcc4 100755 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h @@ -31,7 +31,7 @@ #error "MKS Robin mini supports up to 1 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS Robin mini" +#define BOARD_INFO_NAME "MKS Robin mini" // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -125,7 +125,6 @@ #define LCD_BACKLIGHT_PIN PD13 #if ENABLED(TOUCH_BUTTONS) - #define BTN_ENC PB3 // Not connected. TODO: Replace this hack to enable button code #define TOUCH_CS_PIN PC2 #endif #endif @@ -134,7 +133,7 @@ #define MOTOR_CURRENT_PWM_XY_PIN PA6 #define MOTOR_CURRENT_PWM_Z_PIN PA7 #define MOTOR_CURRENT_PWM_E_PIN PB0 -#define MOTOR_CURRENT_PWM_RANGE 65535 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp +#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp #define DEFAULT_PWM_MOTOR_CURRENT { 1030, 1030, 1030 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically. // This is a kind of workaround in case native marlin "digipot" interface won't work. diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h index e2ca88e710ba..dab92328b606 100755 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h @@ -31,7 +31,7 @@ #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS Robin nano" +#define BOARD_INFO_NAME "MKS Robin nano" // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -129,7 +129,6 @@ #define LCD_BACKLIGHT_PIN PD13 #if ENABLED(TOUCH_BUTTONS) - #define BTN_ENC PC13 // Not connected. TODO: Replace this hack to enable button code #define TOUCH_CS_PIN PA7 #endif #endif diff --git a/Marlin/src/pins/stm32/pins_MORPHEUS.h b/Marlin/src/pins/stm32/pins_MORPHEUS.h index fe9c9dce3b9e..fd4da1ab7de5 100644 --- a/Marlin/src/pins/stm32/pins_MORPHEUS.h +++ b/Marlin/src/pins/stm32/pins_MORPHEUS.h @@ -34,7 +34,7 @@ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#define BOARD_NAME "Bluepill based board" +#define BOARD_INFO_NAME "Bluepill based board" // // Limit Switches diff --git a/Marlin/src/pins/stm32/pins_REMRAM_V1.h b/Marlin/src/pins/stm32/pins_REMRAM_V1.h index 6e72bdc2eca6..aa9d6ea17813 100644 --- a/Marlin/src/pins/stm32/pins_REMRAM_V1.h +++ b/Marlin/src/pins/stm32/pins_REMRAM_V1.h @@ -25,7 +25,7 @@ #error "Oops! Select an STM32F7 board in 'Tools > Board.'" #endif -#define BOARD_NAME "RemRam v1" +#define BOARD_INFO_NAME "RemRam v1" #define DEFAULT_MACHINE_NAME "RemRam" #define SRAM_EEPROM_EMULATION // Emulate the EEPROM using Backup SRAM diff --git a/Marlin/src/pins/stm32/pins_RUMBA32.h b/Marlin/src/pins/stm32/pins_RUMBA32.h index 5ac70744ffb5..26b4540c2b8c 100644 --- a/Marlin/src/pins/stm32/pins_RUMBA32.h +++ b/Marlin/src/pins/stm32/pins_RUMBA32.h @@ -28,8 +28,8 @@ #endif #define RUMBA32_V1_0 -#define BOARD_NAME "RUMBA32" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "RUMBA32" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME //#define I2C_EEPROM #define E2END 0xFFF // 4KB diff --git a/Marlin/src/pins/stm32/pins_STM32F1R.h b/Marlin/src/pins/stm32/pins_STM32F1R.h index 7b3e9104796b..ccafcad1f7b4 100644 --- a/Marlin/src/pins/stm32/pins_STM32F1R.h +++ b/Marlin/src/pins/stm32/pins_STM32F1R.h @@ -29,7 +29,7 @@ * 21017 Victor Perez Marlin for stm32f1 test */ -#define BOARD_NAME "Misc. STM32F1R" +#define BOARD_INFO_NAME "Misc. STM32F1R" #define DEFAULT_MACHINE_NAME "STM32F103RET6" // Ignore temp readings during development. @@ -119,7 +119,7 @@ #define LCD_PINS_D7 PB15 #if DISABLED(NEWPANEL) #define BEEPER_PIN 33 - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 @@ -230,7 +230,7 @@ // Beeper on AUX-4 #define BEEPER_PIN 33 - // buttons are directly attached to AUX-2 + // Buttons directly attached to AUX-2 #if ENABLED(REPRAPWORLD_KEYPAD) #define BTN_EN1 64 #define BTN_EN2 59 diff --git a/Marlin/src/pins/stm32/pins_STM32F4.h b/Marlin/src/pins/stm32/pins_STM32F4.h index 23c5b3c118ac..48ae32f108c0 100644 --- a/Marlin/src/pins/stm32/pins_STM32F4.h +++ b/Marlin/src/pins/stm32/pins_STM32F4.h @@ -27,12 +27,14 @@ #error "STM32F4 supports up to 2 hotends / E-steppers." #endif -#define BOARD_NAME "Misc. STM32F4" +#define BOARD_INFO_NAME "Misc. STM32F4" #define DEFAULT_MACHINE_NAME "STM32F407VET6" //#define I2C_EEPROM -#define E2END 0xFFF // 4KB +#ifndef E2END + #define E2END 0xFFF // 4KB +#endif // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 diff --git a/Marlin/src/pins/stm32/pins_STM3R_MINI.h b/Marlin/src/pins/stm32/pins_STM3R_MINI.h index 5ababb36bf21..9192ae453e67 100644 --- a/Marlin/src/pins/stm32/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32/pins_STM3R_MINI.h @@ -29,8 +29,8 @@ * 21017 Victor Perez Marlin for stm32f1 test */ -#define BOARD_NAME "STM3R Mini" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "STM3R Mini" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // Enable I2C_EEPROM for testing #define I2C_EEPROM @@ -134,7 +134,7 @@ #define LCD_PINS_D7 PB15 #if DISABLED(NEWPANEL) #define BEEPER_PIN 33 - // Buttons are attached to a shift register + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 @@ -254,7 +254,7 @@ // Beeper on AUX-4 #define BEEPER_PIN 33 - // buttons are directly attached to AUX-2 + // Buttons directly attached to AUX-2 #if ENABLED(REPRAPWORLD_KEYPAD) #define BTN_EN1 64 #define BTN_EN2 59 diff --git a/Marlin/src/pins/stm32/pins_THE_BORG.h b/Marlin/src/pins/stm32/pins_THE_BORG.h index 8069076e5eb3..1f8569e4ea6a 100644 --- a/Marlin/src/pins/stm32/pins_THE_BORG.h +++ b/Marlin/src/pins/stm32/pins_THE_BORG.h @@ -27,8 +27,8 @@ #error "The-Borg supports up to 3 hotends / E-steppers." #endif -#define BOARD_NAME "The-Borge" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "The-Borge" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define E2END 0xFFF // EEPROM end address diff --git a/Marlin/src/pins/teensy2/pins_5DPRINT.h b/Marlin/src/pins/teensy2/pins_5DPRINT.h index 27e26e242a59..80c6975279d1 100755 --- a/Marlin/src/pins/teensy2/pins_5DPRINT.h +++ b/Marlin/src/pins/teensy2/pins_5DPRINT.h @@ -73,7 +73,7 @@ #endif #define DEFAULT_MACHINE_NAME "Makibox" -#define BOARD_NAME "5DPrint D8" +#define BOARD_INFO_NAME "5DPrint D8" // // Servos diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h index c254aa89f95f..3c38ad0b0108 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h @@ -72,7 +72,7 @@ #error "Oops! Select 'AT90USB646_TEENSYPP' in 'Tools > Board.'" #endif -#define BOARD_NAME "Brainwave" +#define BOARD_INFO_NAME "Brainwave" // // Limit Switches diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h index 920d02f15d6b..cd4dd33695f4 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h @@ -79,7 +79,7 @@ #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif -#define BOARD_NAME "Brainwave Pro" +#define BOARD_INFO_NAME "Brainwave Pro" // // Limit Switches diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index eef617fe8c18..6f6ba5b8c106 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -66,7 +66,7 @@ #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif -#define BOARD_NAME "Printrboard" +#define BOARD_INFO_NAME "Printrboard" // Disable JTAG pins so they can be used for the Extrudrboard #define DISABLE_JTAG diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 096283e4c438..90c31132a790 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -71,7 +71,7 @@ #error "USBCON should be defined by the platform for this board." #endif -#define BOARD_NAME "Printrboard Rev.F" +#define BOARD_INFO_NAME "Printrboard Rev.F" // Disable JTAG pins so EXP1 pins work correctly // (Its pins are used for the Extrudrboard and filament sensor, for example). diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index 17928cd1399f..1ae186ab598b 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -66,8 +66,8 @@ #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif -#define BOARD_NAME "SAV MkI" -#define DEFAULT_MACHINE_NAME BOARD_NAME +#define BOARD_INFO_NAME "SAV MkI" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define DEFAULT_SOURCE_CODE_URL "https://tinyurl.com/onru38b" // diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index 572cb0707979..a91a019121f8 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -111,7 +111,7 @@ #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif -#define BOARD_NAME "Teensy++2.0" +#define BOARD_INFO_NAME "Teensy++2.0" // // Limit Switches diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index c61e751c8716..5fde57180b70 100755 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -77,7 +77,7 @@ #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif -#define BOARD_NAME "Teensylu" +#define BOARD_INFO_NAME "Teensylu" // // Limit Switch definitions that match the SCHEMATIC diff --git a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h index 7eb57bc08879..a68b9e31c4d7 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h @@ -31,8 +31,8 @@ #error "Oops! Select 'Teensy 3.1' or 'Teensy 3.2' in 'Tools > Board.'" #endif -#ifndef BOARD_NAME - #define BOARD_NAME "Teensy3.2" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Teensy3.2" #endif #define AT90USB 1286 // Disable MarlinSerial etc. diff --git a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h index 922eeb9fa4c9..b0f0e4d474bb 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h @@ -32,9 +32,9 @@ #endif #if IS_TEENSY35 - #define BOARD_NAME "Teensy3.5" + #define BOARD_INFO_NAME "Teensy3.5" #elif IS_TEENSY36 - #define BOARD_NAME "Teensy3.6" + #define BOARD_INFO_NAME "Teensy3.6" #endif #define AT90USB 1286 // Disable MarlinSerial etc. diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp index d63a2b9f0fd7..a50d874eb057 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp @@ -22,12 +22,75 @@ #include "../../inc/MarlinConfigPre.h" +/** + * Adjust USB_DEBUG to select debugging verbosity. + * 0 - no debug messages + * 1 - basic insertion/removal messages + * 2 - show USB state transitions + * 3 - perform block range checking + * 4 - print each block access + */ +#define USB_DEBUG 1 +#define USB_STARTUP_DELAY 0 + +// uncomment to get 'printf' console debugging. NOT FOR UNO! +//#define HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} +//#define BS_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} +//#define MAX_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) +#include "../../Marlin.h" #include "../../core/serial.h" +#include "../../module/temperature.h" + +static_assert(USB_CS_PIN != -1, "USB_CS_PIN must be defined"); +static_assert(USB_INTR_PIN != -1, "USB_INTR_PIN must be defined"); + +#if ENABLED(USE_UHS3_USB) + #define NO_AUTO_SPEED + #define UHS_MAX3421E_SPD 8000000 >> SPI_SPEED + #define UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE 1 + #define UHS_HOST_MAX_INTERFACE_DRIVERS 2 + #define MASS_MAX_SUPPORTED_LUN 1 + #define USB_HOST_SERIAL MYSERIAL0 + + // Workaround for certain issues with UHS3 + #define SKIP_PAGE3F // Required for IOGEAR media adapter + #define USB_NO_TEST_UNIT_READY // Required for removable media adapter + #define USB_HOST_MANUAL_POLL // Optimization to shut off IRQ automatically + + // Workarounds for keeping Marlin's watchdog timer from barking... + void marlin_yield() { + thermalManager.manage_heater(); + } + #define SYSTEM_OR_SPECIAL_YIELD(...) marlin_yield(); + #define delay(x) safe_delay(x) + + #define LOAD_USB_HOST_SYSTEM + #define LOAD_USB_HOST_SHIELD + #define LOAD_UHS_BULK_STORAGE + + #define MARLIN_UHS_WRITE_SS(v) WRITE(USB_CS_PIN, v) + #define MARLIN_UHS_READ_IRQ() READ(USB_INTR_PIN) + + #include "lib-uhs3/UHS_host/UHS_host.h" + + MAX3421E_HOST usb(USB_CS_PIN, USB_INTR_PIN); + UHS_Bulk_Storage bulk(&usb); + + #define UHS_START (usb.Init() == 0) + #define UHS_STATE(state) UHS_USB_HOST_STATE_##state +#else + #include "lib-uhs2/Usb.h" + #include "lib-uhs2/masstorage.h" -#include "lib/Usb.h" -#include "lib/masstorage.h" + USB usb; + BulkOnly bulk(&usb); + + #define UHS_START usb.start() + #define UHS_STATE(state) USB_STATE_##state +#endif #include "Sd2Card_FlashDrive.h" @@ -35,10 +98,41 @@ #include "../../lcd/ultralcd.h" #endif -USB usb; -BulkOnly bulk(&usb); +static enum { + UNINITIALIZED, + DO_STARTUP, + WAIT_FOR_DEVICE, + WAIT_FOR_LUN, + MEDIA_READY, + MEDIA_ERROR +} state; + +#if USB_DEBUG >= 3 + uint32_t lun0_capacity; +#endif + +bool Sd2Card::usbStartup() { + if (state <= DO_STARTUP) { + SERIAL_ECHOPGM("Starting USB host..."); + if (!UHS_START) { + SERIAL_ECHOLNPGM(" failed."); + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) + LCD_MESSAGEPGM("USB start failed"); + #endif + return false; + } -Sd2Card::state_t Sd2Card::state; + // SPI quick test - check revision register + switch (usb.regRd(rREVISION)) { + case 0x01: SERIAL_ECHOLNPGM("rev.01 started"); break; + case 0x12: SERIAL_ECHOLNPGM("rev.02 started"); break; + case 0x13: SERIAL_ECHOLNPGM("rev.03 started"); break; + default: SERIAL_ECHOLNPGM("started. rev unknown."); break; + } + state = WAIT_FOR_DEVICE; + } + return true; +} // The USB library needs to be called periodically to detect USB thumbdrive // insertion and removals. Call this idle() function periodically to allow @@ -46,75 +140,145 @@ Sd2Card::state_t Sd2Card::state; // of initializing the USB library for the first time. void Sd2Card::idle() { - static uint32_t next_retry; - - switch (state) { - case USB_HOST_DELAY_INIT: - next_retry = millis() + 2000; - state = USB_HOST_WAITING; - break; - case USB_HOST_WAITING: - if (ELAPSED(millis(), next_retry)) { - next_retry = millis() + 2000; - state = USB_HOST_UNINITIALIZED; - } - break; - case USB_HOST_UNINITIALIZED: - SERIAL_ECHOPGM("Starting USB host..."); - if (!usb.start()) { - SERIAL_ECHOPGM(" Failed. Retrying in 2s."); - #if HAS_DISPLAY - LCD_MESSAGEPGM("USB start failed"); - #endif - state = USB_HOST_DELAY_INIT; + usb.Task(); + + const uint8_t task_state = usb.getUsbTaskState(); + + #if USB_DEBUG >= 2 + if (state > DO_STARTUP) { + static uint8_t laststate = 232; + if (task_state != laststate) { + laststate = task_state; + #define UHS_USB_DEBUG(x) case UHS_STATE(x): SERIAL_ECHOLNPGM(#x); break + switch (task_state) { + UHS_USB_DEBUG(IDLE); + UHS_USB_DEBUG(RESET_DEVICE); + UHS_USB_DEBUG(RESET_NOT_COMPLETE); + UHS_USB_DEBUG(DEBOUNCE); + UHS_USB_DEBUG(DEBOUNCE_NOT_COMPLETE); + UHS_USB_DEBUG(WAIT_SOF); + UHS_USB_DEBUG(ERROR); + UHS_USB_DEBUG(CONFIGURING); + UHS_USB_DEBUG(CONFIGURING_DONE); + UHS_USB_DEBUG(RUNNING); + default: + SERIAL_ECHOLNPAIR("UHS_USB_HOST_STATE: ", task_state); + break; + } } - else - state = USB_HOST_INITIALIZED; - SERIAL_EOL(); - break; - case USB_HOST_INITIALIZED: - const uint8_t lastUsbTaskState = usb.getUsbTaskState(); - usb.Task(); - const uint8_t newUsbTaskState = usb.getUsbTaskState(); - - if (lastUsbTaskState == USB_STATE_RUNNING && newUsbTaskState != USB_STATE_RUNNING) { - // the user pulled the flash drive. Make sure the bulk storage driver releases the address - #ifdef USB_DEBUG - SERIAL_ECHOLNPGM("USB drive removed"); + } + #endif + + static millis_t next_state_ms = millis(); + + #define GOTO_STATE_AFTER_DELAY(STATE, DELAY) do{ state = STATE; next_state_ms = millis() + DELAY; }while(0) + + if (ELAPSED(millis(), next_state_ms)) { + GOTO_STATE_AFTER_DELAY(state, 250); // Default delay + + switch (state) { + + case UNINITIALIZED: + #ifndef MANUAL_USB_STARTUP + GOTO_STATE_AFTER_DELAY( DO_STARTUP, USB_STARTUP_DELAY ); #endif - //bulk.Release(); - } - if (lastUsbTaskState != USB_STATE_RUNNING && newUsbTaskState == USB_STATE_RUNNING) { - #ifdef USB_DEBUG - SERIAL_ECHOLNPGM("USB drive inserted"); + break; + + case DO_STARTUP: usbStartup(); break; + + case WAIT_FOR_DEVICE: + if (task_state == UHS_STATE(RUNNING)) { + #if USB_DEBUG >= 1 + SERIAL_ECHOLNPGM("USB device inserted"); + #endif + GOTO_STATE_AFTER_DELAY( WAIT_FOR_LUN, 250 ); + } + break; + + case WAIT_FOR_LUN: + /* USB device is inserted, but if it is an SD card, + * adapter it may not have an SD card in it yet. */ + if (bulk.LUNIsGood(0)) { + #if USB_DEBUG >= 1 + SERIAL_ECHOLNPGM("LUN is good"); + #endif + GOTO_STATE_AFTER_DELAY( MEDIA_READY, 100 ); + } + else { + #ifdef USB_HOST_MANUAL_POLL + // Make sure we catch disconnect events + usb.busprobe(); + usb.VBUS_changed(); + #endif + #if USB_DEBUG >= 1 + SERIAL_ECHOLNPGM("Waiting for media"); + #endif + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) + LCD_MESSAGEPGM("Waiting for media"); + #endif + GOTO_STATE_AFTER_DELAY(state, 2000); + } + break; + + case MEDIA_READY: break; + case MEDIA_ERROR: break; + } + + if (state > WAIT_FOR_DEVICE && task_state != UHS_STATE(RUNNING)) { + // Handle device removal events + #if USB_DEBUG >= 1 + SERIAL_ECHOLNPGM("USB device removed"); + #endif + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) + if (state != MEDIA_READY) + LCD_MESSAGEPGM("USB device removed"); + #endif + GOTO_STATE_AFTER_DELAY( WAIT_FOR_DEVICE, 0 ); + } + + else if (state > WAIT_FOR_LUN && !bulk.LUNIsGood(0)) { + // Handle media removal events + #if USB_DEBUG >= 1 + SERIAL_ECHOLNPGM("Media removed"); + #endif + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) + LCD_MESSAGEPGM("Media removed"); + #endif + GOTO_STATE_AFTER_DELAY( WAIT_FOR_DEVICE, 0 ); + } + + else if (task_state == UHS_STATE(ERROR)) { + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) + LCD_MESSAGEPGM("Media read error"); #endif - } - break; + GOTO_STATE_AFTER_DELAY( MEDIA_ERROR, 0 ); + } } } // Marlin calls this function to check whether an USB drive is inserted. // This is equivalent to polling the SD_DETECT when using SD cards. bool Sd2Card::isInserted() { - return usb.getUsbTaskState() == USB_STATE_RUNNING; + return state == MEDIA_READY; } -// Marlin calls this to initialize an SD card once it is inserted. -bool Sd2Card::init(const uint8_t sckRateID/*=0*/, const pin_t chipSelectPin/*=SD_CHIP_SELECT_PIN*/) { - if (!ready()) return false; +bool Sd2Card::ready() { + return state > DO_STARTUP; +} - if (!bulk.LUNIsGood(0)) { - SERIAL_ECHOLNPGM("LUN zero is not good"); - return false; - } +// Marlin calls this to initialize an SD card once it is inserted. +bool Sd2Card::init(const uint8_t, const pin_t) { + if (!isInserted()) return false; + #if USB_DEBUG >= 1 const uint32_t sectorSize = bulk.GetSectorSize(0); if (sectorSize != 512) { SERIAL_ECHOLNPAIR("Expecting sector size of 512. Got: ", sectorSize); return false; } + #endif - #ifdef USB_DEBUG + #if USB_DEBUG >= 3 lun0_capacity = bulk.GetCapacity(0); SERIAL_ECHOLNPAIR("LUN Capacity (in blocks): ", lun0_capacity); #endif @@ -123,8 +287,8 @@ bool Sd2Card::init(const uint8_t sckRateID/*=0*/, const pin_t chipSelectPin/*=SD // Returns the capacity of the card in blocks. uint32_t Sd2Card::cardSize() { - if (!ready()) return 0; - #ifndef USB_DEBUG + if (!isInserted()) return false; + #if USB_DEBUG < 3 const uint32_t #endif lun0_capacity = bulk.GetCapacity(0); @@ -132,13 +296,13 @@ uint32_t Sd2Card::cardSize() { } bool Sd2Card::readBlock(uint32_t block, uint8_t* dst) { - if (!ready()) return false; - #ifdef USB_DEBUG + if (!isInserted()) return false; + #if USB_DEBUG >= 3 if (block >= lun0_capacity) { SERIAL_ECHOLNPAIR("Attempt to read past end of LUN: ", block); return false; } - #if USB_DEBUG > 1 + #if USB_DEBUG >= 4 SERIAL_ECHOLNPAIR("Read block ", block); #endif #endif @@ -146,13 +310,13 @@ bool Sd2Card::readBlock(uint32_t block, uint8_t* dst) { } bool Sd2Card::writeBlock(uint32_t block, const uint8_t* src) { - if (!ready()) return false; - #ifdef USB_DEBUG + if (!isInserted()) return false; + #if USB_DEBUG >= 3 if (block >= lun0_capacity) { SERIAL_ECHOLNPAIR("Attempt to write past end of LUN: ", block); return false; } - #if USB_DEBUG > 1 + #if USB_DEBUG >= 4 SERIAL_ECHOLNPAIR("Write block ", block); #endif #endif diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h index eafb85c3ad4b..5ab82d3af723 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h @@ -26,12 +26,6 @@ * \brief Sd2Card class for V2 SD/SDHC cards */ -/* Uncomment USB_DEBUG to enable debugging. - * 1 - basic debugging and bounds checking - * 2 - print each block access - */ -//#define USB_DEBUG 1 - #include "../SdFatConfig.h" #include "../SdInfo.h" @@ -52,24 +46,13 @@ class Sd2Card { private: - - typedef enum : uint8_t { - USB_HOST_UNINITIALIZED, - USB_HOST_INITIALIZED, - USB_HOST_DELAY_INIT, - USB_HOST_WAITING - } state_t; - - static state_t state; - uint32_t pos; - #ifdef USB_DEBUG - uint32_t lun0_capacity; - #endif - static inline bool ready() { return state == USB_HOST_INITIALIZED; } + static void usbStateDebug(); public: + static bool usbStartup(); + bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=SD_CHIP_SELECT_PIN); static void idle(); @@ -87,4 +70,5 @@ class Sd2Card { uint32_t cardSize(); static bool isInserted(); + static bool ready(); }; diff --git a/Marlin/src/sd/usb_flashdrive/SOURCES.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt similarity index 74% rename from Marlin/src/sd/usb_flashdrive/SOURCES.txt rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt index 66f170a203ac..5abcc8f2adfb 100644 --- a/Marlin/src/sd/usb_flashdrive/SOURCES.txt +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt @@ -1,15 +1,4 @@ -==== SUMMARY ==== - -Source Path: Repository: License: ------------- ----------- -------- -usb_flashdrive/lib github.com/felis/USB_Host_Shield_2.0 GPLv2 or later -usb_flashdrive/lib/masstorage.cpp [1] github.com/greiman/UsbFat MIT -usb_flashdrive/lib/settings.h [1] github.com/greiman/UsbFat MIT - -[1] Changes related to SKIP_WRITE_PROTECT and DELAY only - - ==== USB HOST SHIELD 2.0 LIBRARY ==== The lib/ folder contains a subset of the files from the USB Host Shield 2.0 @@ -26,6 +15,15 @@ files needed for Marlin as "GPLv2 or later", as documented in this thread. Small modifications have been made to the source. Please search for USB_FLASH_DRIVE_SUPPORT or look at the patch file to see what was changed. +==== LICENSE SUMMARY ==== + +Source Path: Repository: License: +------------ ----------- -------- +lib-uhs3/ github.com/felis/USB_Host_Shield_2.0 GPLv2 or later +lib-uhs3/lib/masstorage.cpp github.com/greiman/UsbFat [1] MIT +lib-uhs3/lib/settings.h github.com/greiman/UsbFat [1] MIT + +[1] Changes related to SKIP_WRITE_PROTECT and DELAY only ==== PERFORMANCE ENHANCEMENTS FOR USB DRIVES ==== diff --git a/Marlin/src/sd/usb_flashdrive/lib/Usb.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp similarity index 99% rename from Marlin/src/sd/usb_flashdrive/lib/Usb.cpp rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp index b0a6d2943d6c..11d54b28447c 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/Usb.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp @@ -26,7 +26,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(USB_FLASH_DRIVE_SUPPORT) +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && DISABLED(USE_UHS3_USB) #include "Usb.h" diff --git a/Marlin/src/sd/usb_flashdrive/lib/Usb.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.h similarity index 96% rename from Marlin/src/sd/usb_flashdrive/lib/Usb.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.h index 5880f9de0015..195b26e940ca 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/Usb.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.h @@ -45,8 +45,7 @@ #include "address.h" //#include "avrpins.h" #include "usb_ch9.h" -//#include "usbhost.h" -#include "../usb_host.h" +#include "usbhost.h" #include "UsbCore.h" #include "parsetools.h" #include "confdescparser.h" diff --git a/Marlin/src/sd/usb_flashdrive/lib/UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/UsbCore.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/address.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/address.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/address.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/address.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/confdescparser.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/confdescparser.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/hexdump.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/hexdump.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/hexdump.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/hexdump.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/macros.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/macros.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/macros.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/macros.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp similarity index 99% rename from Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp index 74a6187d56c7..a57245f78a70 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp @@ -25,7 +25,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(USB_FLASH_DRIVE_SUPPORT) +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && DISABLED(USE_UHS3_USB) #include "masstorage.h" @@ -762,7 +762,7 @@ uint8_t BulkOnly::Page3F(uint8_t lun) { buf[i] = 0x00; } WriteOk[lun] = true; - #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(SKIP_WRITE_PROTECT) + #ifdef SKIP_WRITE_PROTECT return 0; #endif uint8_t rc = ModeSense6(lun, 0, 0x3f, 0, 192, buf); diff --git a/Marlin/src/sd/usb_flashdrive/lib/masstorage.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/masstorage.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/max3421e.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h similarity index 98% rename from Marlin/src/sd/usb_flashdrive/lib/max3421e.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h index 35011f55f15d..39845fb730b2 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/max3421e.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h @@ -191,6 +191,15 @@ #define bmSNDTOG1 0x80 #define rHXFR 0xf0 //30<<3 + +#undef tokSETUP +#undef tokIN +#undef tokOUT +#undef tokINHS +#undef tokOUTHS +#undef tokISOIN +#undef tokISOOUT + /* Host transfer token values for writing the HXFR register (R30) */ /* OR this bit field with the endpoint number in bits 3:0 */ #define tokSETUP 0x10 // HS=0, ISO=0, OUTNIN=0, SETUP=1 diff --git a/Marlin/src/sd/usb_flashdrive/lib/message.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/message.cpp similarity index 98% rename from Marlin/src/sd/usb_flashdrive/lib/message.cpp rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/message.cpp index 3148afb5b983..8e2d40d3d3ac 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/message.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/message.cpp @@ -25,7 +25,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(USB_FLASH_DRIVE_SUPPORT) +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && DISABLED(USE_UHS3_USB) #include "Usb.h" diff --git a/Marlin/src/sd/usb_flashdrive/lib/message.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/message.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/message.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/message.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/parsetools.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/parsetools.cpp similarity index 97% rename from Marlin/src/sd/usb_flashdrive/lib/parsetools.cpp rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/parsetools.cpp index c03ce55cb31e..0c7061b77c30 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/parsetools.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/parsetools.cpp @@ -25,7 +25,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(USB_FLASH_DRIVE_SUPPORT) +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && DISABLED(USE_UHS3_USB) #include "Usb.h" diff --git a/Marlin/src/sd/usb_flashdrive/lib/parsetools.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/parsetools.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/parsetools.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/parsetools.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/printhex.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/printhex.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/printhex.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/printhex.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/settings.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/settings.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h diff --git a/Marlin/src/sd/usb_flashdrive/lib/usb_ch9.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/lib/usb_ch9.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h diff --git a/Marlin/src/sd/usb_flashdrive/usb_host.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp similarity index 97% rename from Marlin/src/sd/usb_flashdrive/usb_host.cpp rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp index 41895e86d740..e37da93ad2a5 100644 --- a/Marlin/src/sd/usb_flashdrive/usb_host.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp @@ -23,12 +23,12 @@ * lib/usbhost.c". This has been rewritten to use SPI routines from the * Marlin HAL */ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" -#if ENABLED(USB_FLASH_DRIVE_SUPPORT) +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && DISABLED(USE_UHS3_USB) -#include "lib/Usb.h" -#include "usb_host.h" +#include "Usb.h" +#include "usbhost.h" uint8_t MAX3421e::vbusState = 0; diff --git a/Marlin/src/sd/usb_flashdrive/usb_host.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h similarity index 100% rename from Marlin/src/sd/usb_flashdrive/usb_host.h rename to Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt new file mode 100644 index 000000000000..710b3f20b584 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt @@ -0,0 +1,31 @@ +==== USB HOST SHIELD 3.0 LIBRARY ==== + +The lib-uhs3/ folder contains a subset of the files from the USB Host Shield +3.0 library: + + https://github.com/felis/UHS30 + + +==== LICENSE SUMMARY ==== + +Source Path: Repository: License: +------------ ----------- -------- +usb_flashdrive/lib github.com/felis/UHS30 GPLv2 or later + + +==== MARLIN INTEGRATION WORK ==== + +All additional work done to integrate USB into Marlin was performed by +AlephObjects, Inc. and is licensed under the GPLv3. + +This version of UHS3 has been modified for better compatibility with Marlin. +The upstream version of UHS 3.0 runs a frame timer interrupt every 1 ms to +handle device polling. This timer interrupt interferes with Marlin's stepper +IRQ, so the flag USB_HOST_MANUAL_POLL has been added to move the polling to +the idle task. Additional logic was added to disable and enable the frame +IRQ. + +SKIP_PAGE3F and USB_NO_TEST_UNIT_READY were added to work around bugs with +certain devices. + +-- marcio@alephobjects.com diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h new file mode 100644 index 000000000000..54458d116e8c --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h @@ -0,0 +1,249 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and + Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(__UHS_BULK_STORAGE_H__) +#define __UHS_BULK_STORAGE_H__ + + +//////////////////////////////////////////////////////////////////////////////// +// Define any of these options at the top of your sketch to override +// the defaults contained herewith. Do NOT do modifications here. +// Macro | Settings and notes | Default +// -----------------------------------------+-----------------------+----------- +// | 1 to 8 | +// | Each LUN needs | +// MASS_MAX_SUPPORTED_LUN | ~13 bytes to be able | 8 +// | to track the state of | +// | each unit. | +// -----------------------------------------+-----------------------+----------- +// | Just define to use. | +// DEBUG_PRINTF_EXTRA_HUGE_UHS_BULK_STORAGE | works only if extra | +// | huge debug is on too. | +// -----------------------------------------^-----------------------^----------- + +#ifndef MASS_MAX_SUPPORTED_LUN +#define MASS_MAX_SUPPORTED_LUN 8 +#endif + +#include "UHS_SCSI.h" + +#define UHS_BULK_bmREQ_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE +#define UHS_BULK_bmREQ_IN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE + +// Request Codes +#define UHS_BULK_REQ_ADSC 0x00U +#define UHS_BULK_REQ_GET 0xFCU +#define UHS_BULK_REQ_PUT 0xFDU +#define UHS_BULK_REQ_GET_MAX_LUN 0xFEU +#define UHS_BULK_REQ_BOMSR 0xFFU // Mass Storage Reset + +#define UHS_BULK_CBW_SIGNATURE 0x43425355LU +#define UHS_BULK_CSW_SIGNATURE 0x53425355LU + +#define UHS_BULK_CMD_DIR_OUT 0x00U +#define UHS_BULK_CMD_DIR_IN 0x80U + +/* Bulk error codes */ +#define UHS_BULK_ERR_SUCCESS UHS_HOST_ERROR_NONE +#define UHS_BULK_ERR_PHASE_ERROR 0x22U +#define UHS_BULK_ERR_UNIT_NOT_READY 0x23U +#define UHS_BULK_ERR_UNIT_BUSY 0x24U +#define UHS_BULK_ERR_STALL 0x25U +#define UHS_BULK_ERR_CMD_NOT_SUPPORTED 0x26U +#define UHS_BULK_ERR_INVALID_CSW 0x27U +#define UHS_BULK_ERR_NO_MEDIA 0x28U +#define UHS_BULK_ERR_BAD_LBA 0x29U +#define UHS_BULK_ERR_MEDIA_CHANGED 0x2AU +#define UHS_BULK_ERR_DEVICE_DISCONNECTED UHS_HOST_ERROR_UNPLUGGED +#define UHS_BULK_ERR_UNABLE_TO_RECOVER 0x32U // Reset recovery error +#define UHS_BULK_ERR_INVALID_LUN 0x33U +#define UHS_BULK_ERR_WRITE_STALL 0x34U +#define UHS_BULK_ERR_READ_NAKS 0x35U +#define UHS_BULK_ERR_WRITE_NAKS 0x36U +#define UHS_BULK_ERR_WRITE_PROTECTED 0x37U +#define UHS_BULK_ERR_NOT_IMPLEMENTED 0xFDU +#define UHS_BULK_ERR_GENERAL_SCSI_ERROR 0xF0U +#define UHS_BULK_ERR_GENERAL_USB_ERROR 0xFFU +#define UHS_BULK_ERR_USER 0xA0U // For subclasses to define their own error codes + +#define MASS_MAX_ENDPOINTS 3 + +struct UHS_BULK_CommandBlockWrapperBase { + volatile uint32_t dCBWSignature; + volatile uint32_t dCBWTag; + volatile uint32_t dCBWDataTransferLength; + volatile uint8_t bmCBWFlags; +public: + + UHS_BULK_CommandBlockWrapperBase(void) { + } + + UHS_BULK_CommandBlockWrapperBase(uint32_t tag, uint32_t xflen, uint8_t flgs) : + dCBWSignature(UHS_BULK_CBW_SIGNATURE), dCBWTag(tag), dCBWDataTransferLength(xflen), bmCBWFlags(flgs) { + } +} __attribute__((packed)); + +struct UHS_BULK_CommandBlockWrapper : public UHS_BULK_CommandBlockWrapperBase { + + struct { + uint8_t bmCBWLUN : 4; + uint8_t bmReserved1 : 4; + }; + + struct { + uint8_t bmCBWCBLength : 4; + uint8_t bmReserved2 : 4; + }; + + uint8_t CBWCB[16]; + +public: + // All zeroed. + + UHS_BULK_CommandBlockWrapper() : + UHS_BULK_CommandBlockWrapperBase(0, 0, 0), bmReserved1(0), bmReserved2(0) { + for(int i = 0; i < 16; i++) CBWCB[i] = 0; + } + + // Generic Wrap, CDB zeroed. + + UHS_BULK_CommandBlockWrapper(uint32_t tag, uint32_t xflen, uint8_t flgs, uint8_t lu, uint8_t cmdlen, uint8_t cmd) : + UHS_BULK_CommandBlockWrapperBase(tag, xflen, flgs), + bmCBWLUN(lu), bmReserved1(0), bmCBWCBLength(cmdlen), bmReserved2(0) { + for(int i = 0; i < 16; i++) CBWCB[i] = 0; + SCSI_CDB_BASE_t *x = reinterpret_cast(CBWCB); + x->LUN = cmd; + } + + // Wrap for CDB of 6 + + UHS_BULK_CommandBlockWrapper(uint32_t tag, uint32_t xflen, SCSI_CDB6_t *cdb, uint8_t dir) : + UHS_BULK_CommandBlockWrapperBase(tag, xflen, dir), + bmCBWLUN(cdb->LUN), bmReserved1(0), bmCBWCBLength(6), bmReserved2(0) { + memcpy(&CBWCB, cdb, 6); + } + // Wrap for CDB of 10 + + UHS_BULK_CommandBlockWrapper(uint32_t tag, uint32_t xflen, SCSI_CDB10_t *cdb, uint8_t dir) : + UHS_BULK_CommandBlockWrapperBase(tag, xflen, dir), + bmCBWLUN(cdb->LUN), bmReserved1(0), bmCBWCBLength(10), bmReserved2(0) { + memcpy(&CBWCB, cdb, 10); + } +} __attribute__((packed)); + +struct UHS_BULK_CommandStatusWrapper { + uint32_t dCSWSignature; + uint32_t dCSWTag; + uint32_t dCSWDataResidue; + uint8_t bCSWStatus; +} __attribute__((packed)); + +class UHS_Bulk_Storage : public UHS_USBInterface { +protected: + static const uint8_t epDataInIndex = 1; // DataIn endpoint index + static const uint8_t epDataOutIndex = 2; // DataOUT endpoint index + static const uint8_t epInterruptInIndex = 3; // InterruptIN endpoint index + + uint8_t bMaxLUN; // Max LUN + volatile uint32_t dCBWTag; // Tag + volatile uint8_t bTheLUN; // Active LUN + volatile uint32_t CurrentCapacity[MASS_MAX_SUPPORTED_LUN]; // Total sectors + volatile uint16_t CurrentSectorSize[MASS_MAX_SUPPORTED_LUN]; // Sector size, clipped to 16 bits + volatile bool LUNOk[MASS_MAX_SUPPORTED_LUN]; // use this to check for media changes. + volatile bool WriteOk[MASS_MAX_SUPPORTED_LUN]; + void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr); + +public: + UHS_Bulk_Storage(UHS_USB_HOST_BASE *p); + + volatile UHS_EpInfo epInfo[MASS_MAX_ENDPOINTS]; + + uint8_t GetbMaxLUN(void) { + return bMaxLUN; // Max LUN + } + + uint8_t GetbTheLUN(void) { + return bTheLUN; // Active LUN + } + + bool WriteProtected(uint8_t lun); + uint8_t MediaCTL(uint8_t lun, uint8_t ctl); + uint8_t Read(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, uint8_t *buf); + uint8_t Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, const uint8_t *buf); + uint8_t LockMedia(uint8_t lun, uint8_t lock); + + bool LUNIsGood(uint8_t lun); + uint32_t GetCapacity(uint8_t lun); + uint16_t GetSectorSize(uint8_t lun); + uint8_t SCSITransaction6(SCSI_CDB6_t *cdb, uint16_t buf_size, void *buf, uint8_t dir); + uint8_t SCSITransaction10(SCSI_CDB10_t *cdb, uint16_t buf_size, void *buf, uint8_t dir); + + + // Configure and internal methods, these should never be called by a user's sketch. + uint8_t Start(void); + bool OKtoEnumerate(ENUMERATION_INFO *ei); + uint8_t SetInterface(ENUMERATION_INFO *ei); + + uint8_t GetAddress(void) { + return bAddress; + }; + + + void Poll(void); + + void DriverDefaults(void); + + +private: + void Reset(void); + void CheckMedia(void); + + bool IsValidCBW(uint8_t size, uint8_t *pcbw); + bool IsMeaningfulCBW(uint8_t size, uint8_t *pcbw); + bool IsValidCSW(UHS_BULK_CommandStatusWrapper *pcsw, UHS_BULK_CommandBlockWrapperBase *pcbw); + + bool CheckLUN(uint8_t lun); + + uint8_t Inquiry(uint8_t lun, uint16_t size, uint8_t *buf); + uint8_t TestUnitReady(uint8_t lun); + uint8_t RequestSense(uint8_t lun, uint16_t size, uint8_t *buf); + uint8_t ModeSense6(uint8_t lun, uint8_t pc, uint8_t page, uint8_t subpage, uint8_t len, uint8_t *buf); + uint8_t GetMaxLUN(uint8_t *max_lun); + uint8_t SetCurLUN(uint8_t lun); + uint8_t ResetRecovery(); + uint8_t ReadCapacity10(uint8_t lun, uint8_t *buf); + uint8_t Page3F(uint8_t lun); + uint8_t ClearEpHalt(uint8_t index); + uint8_t Transaction(UHS_BULK_CommandBlockWrapper *cbw, uint16_t bsize, void *buf); + uint8_t HandleUsbError(uint8_t error, uint8_t index); + uint8_t HandleSCSIError(uint8_t status); + +}; + +#if defined(LOAD_UHS_BULK_STORAGE) && !defined(UHS_BULK_STORAGE_LOADED) +#include "UHS_BULK_STORAGE_INLINE.h" +#endif +#endif // __MASSTORAGE_H__ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h new file mode 100644 index 000000000000..5cf45ce53ccf --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h @@ -0,0 +1,1210 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if defined(LOAD_UHS_BULK_STORAGE) && defined(__UHS_BULK_STORAGE_H__) && !defined(UHS_BULK_STORAGE_LOADED) +#define UHS_BULK_STORAGE_LOADED + +// uncomment to get 'printf' console debugging. NOT FOR UNO! +//#define DEBUG_PRINTF_EXTRA_HUGE_UHS_BULK_STORAGE + +#if DEBUG_PRINTF_EXTRA_HUGE +#ifdef DEBUG_PRINTF_EXTRA_HUGE_UHS_BULK_STORAGE +#define BS_HOST_DEBUG(...) printf(__VA_ARGS__) +#else +#define BS_HOST_DEBUG(...) VOID0 +#endif +#else +#define BS_HOST_DEBUG(...) VOID0 +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// Interface code + +//////////////////////////////////////////////////////////////////////////////// + +/** + * Get the capacity of the media + * + * @param lun Logical Unit Number + * @return media capacity + */ +uint32_t UHS_NI UHS_Bulk_Storage::GetCapacity(uint8_t lun) { + uint32_t v = 0LU; + pUsb->DisablePoll(); + if(LUNOk[lun]) + v = CurrentCapacity[lun]; + pUsb->EnablePoll(); + return v; +} + +/** + * Get the sector (block) size used on the media + * + * @param lun Logical Unit Number + * @return media sector size + */ +uint16_t UHS_NI UHS_Bulk_Storage::GetSectorSize(uint8_t lun) { + uint16_t v = 0U; + pUsb->DisablePoll(); + if(LUNOk[lun]) + v = CurrentSectorSize[lun]; + pUsb->EnablePoll(); + return v; +} + +/** + * Test if LUN is ready for use + * + * @param lun Logical Unit Number + * @return true if LUN is ready for use + */ +bool UHS_NI UHS_Bulk_Storage::LUNIsGood(uint8_t lun) { + bool v; + pUsb->DisablePoll(); + v = LUNOk[lun]; + pUsb->EnablePoll(); + return v; +} + +/** + * Test if LUN is write protected + * + * @param lun Logical Unit Number + * @return cached status of write protect switch + */ +bool UHS_NI UHS_Bulk_Storage::WriteProtected(uint8_t lun) { + bool v; + pUsb->DisablePoll(); + v = WriteOk[lun]; + pUsb->EnablePoll(); + return v; +} + +/** + * Wrap and execute a SCSI CDB with length of 6 + * + * @param cdb CDB to execute + * @param buf_size Size of expected transaction + * @param buf Buffer + * @param dir MASS_CMD_DIR_IN | MASS_CMD_DIR_OUT + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::SCSITransaction6(SCSI_CDB6_t *cdb, uint16_t buf_size, void *buf, uint8_t dir) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + pUsb->DisablePoll(); + // promote buf_size to 32bits. + UHS_BULK_CommandBlockWrapper cbw = UHS_BULK_CommandBlockWrapper(++dCBWTag, (uint32_t)buf_size, cdb, dir); + +#if 0 + // Lets check the CBW here: + printf("\r\n"); + printf("\r\n"); + uint8_t *dump = (uint8_t*)(&cbw); + + for(int i=0; i<(sizeof (UHS_BULK_CommandBlockWrapper)); i++) { + printf("%02.2x ", *dump); + dump++; + } + printf("\r\n"); + printf("\r\n"); +#endif + + uint8_t v = (HandleSCSIError(Transaction(&cbw, buf_size, buf))); + pUsb->EnablePoll(); + return v; +} + +/** + * Wrap and execute a SCSI CDB with length of 10 + * + * @param cdb CDB to execute + * @param buf_size Size of expected transaction + * @param buf Buffer + * @param dir MASS_CMD_DIR_IN | MASS_CMD_DIR_OUT + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::SCSITransaction10(SCSI_CDB10_t *cdb, uint16_t buf_size, void *buf, uint8_t dir) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + pUsb->DisablePoll(); + // promote buf_size to 32bits. + UHS_BULK_CommandBlockWrapper cbw = UHS_BULK_CommandBlockWrapper(++dCBWTag, (uint32_t)buf_size, cdb, dir); + //SetCurLUN(cdb->LUN); + uint8_t v = (HandleSCSIError(Transaction(&cbw, buf_size, buf))); + pUsb->EnablePoll(); + return v; +} + +/** + * Lock or Unlock the tray or door on device. + * Caution: Some devices with buggy firmware will lock up. + * + * @param lun Logical Unit Number + * @param lock 1 to lock, 0 to unlock + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::LockMedia(uint8_t lun, uint8_t lock) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + pUsb->DisablePoll(); + Notify(PSTR("\r\nLockMedia\r\n"), 0x80); + Notify(PSTR("---------\r\n"), 0x80); + + SCSI_CDB6_t cdb = SCSI_CDB6_t(SCSI_CMD_PREVENT_REMOVAL, lun, (uint8_t)0, lock); + + uint8_t v = SCSITransaction6(&cdb, (uint16_t)0, NULL, (uint8_t)UHS_BULK_CMD_DIR_IN); + pUsb->EnablePoll(); + return v; +} + +/** + * Media control, for spindle motor and media tray or door. + * This includes CDROM, TAPE and anything with a media loader. + * + * @param lun Logical Unit Number + * @param ctl 0x00 Stop Motor, 0x01 Start Motor, 0x02 Eject Media, 0x03 Load Media + * @return 0 on success + */ +uint8_t UHS_NI UHS_Bulk_Storage::MediaCTL(uint8_t lun, uint8_t ctl) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + pUsb->DisablePoll(); + Notify(PSTR("\r\nMediaCTL\r\n"), 0x80); + Notify(PSTR("-----------------\r\n"), 0x80); + + uint8_t rcode = UHS_BULK_ERR_UNIT_NOT_READY; + if(bAddress) { + SCSI_CDB6_t cdb = SCSI_CDB6_t(SCSI_CMD_START_STOP_UNIT, lun, ctl & 0x03, 0); + rcode = SCSITransaction6(&cdb, (uint16_t)0, NULL, (uint8_t)UHS_BULK_CMD_DIR_OUT); + } else { + SetCurLUN(lun); + } + pUsb->EnablePoll(); + return rcode; +} + +/** + * Read data from media + * + * @param lun Logical Unit Number + * @param addr LBA address on media to read + * @param bsize size of a block (we should probably use the cached size) + * @param blocks how many blocks to read + * @param buf memory that is able to hold the requested data + * @return 0 on success + */ +uint8_t UHS_NI UHS_Bulk_Storage::Read(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, uint8_t *buf) { + if(!bAddress) return UHS_BULK_ERR_NO_MEDIA; + uint8_t er = UHS_BULK_ERR_NO_MEDIA; + pUsb->DisablePoll(); + if(LUNOk[lun]) { + Notify(PSTR("\r\nRead LUN:\t"), 0x80); + D_PrintHex (lun, 0x90); + Notify(PSTR("\r\nLBA:\t\t"), 0x90); + D_PrintHex (addr, 0x90); + Notify(PSTR("\r\nblocks:\t\t"), 0x90); + D_PrintHex (blocks, 0x90); + Notify(PSTR("\r\nblock size:\t"), 0x90); + D_PrintHex (bsize, 0x90); + Notify(PSTR("\r\n---------\r\n"), 0x80); + SCSI_CDB10_t cdb = SCSI_CDB10_t(SCSI_CMD_READ_10, lun, blocks, addr); + +again: + er = SCSITransaction10(&cdb, ((uint16_t)bsize * blocks), buf, (uint8_t)UHS_BULK_CMD_DIR_IN); + + if(er == UHS_BULK_ERR_STALL) { + MediaCTL(lun, 1); + + if(UHS_SLEEP_MS(150)) { + if(!TestUnitReady(lun)) goto again; + } + } + } + qNextPollTime = millis() + 100; + pUsb->EnablePoll(); + + return er; +} + +/** + * Write data to media + * + * @param lun Logical Unit Number + * @param addr LBA address on media to write + * @param bsize size of a block (we should probably use the cached size) + * @param blocks how many blocks to write + * @param buf memory that contains the data to write + * @return 0 on success + */ +uint8_t UHS_NI UHS_Bulk_Storage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, const uint8_t * buf) { + if(!bAddress) return UHS_BULK_ERR_NO_MEDIA; + uint8_t er = UHS_BULK_ERR_NO_MEDIA; + pUsb->DisablePoll(); + if(LUNOk[lun]) { + if(!WriteOk[lun]) { + er = UHS_BULK_ERR_WRITE_PROTECTED; + } else { + Notify(PSTR("\r\nWrite LUN:\t"), 0x80); + D_PrintHex (lun, 0x90); + Notify(PSTR("\r\nLBA:\t\t"), 0x90); + D_PrintHex (addr, 0x90); + Notify(PSTR("\r\nblocks:\t\t"), 0x90); + D_PrintHex (blocks, 0x90); + Notify(PSTR("\r\nblock size:\t"), 0x90); + D_PrintHex (bsize, 0x90); + Notify(PSTR("\r\n---------\r\n"), 0x80); + SCSI_CDB10_t cdb = SCSI_CDB10_t(SCSI_CMD_WRITE_10, lun, blocks, addr); + +again: + er = SCSITransaction10(&cdb, ((uint16_t)bsize * blocks), (void*)buf, (uint8_t)UHS_BULK_CMD_DIR_OUT); + + if(er == UHS_BULK_ERR_WRITE_STALL) { + MediaCTL(lun, 1); + + if(UHS_SLEEP_MS(150)) { + if(!TestUnitReady(lun)) goto again; + } + } + } + } + qNextPollTime = millis() + 100; + pUsb->EnablePoll(); + + return er; +} + +// End of user functions, the remaining code below is driver internals. +// Only developer serviceable parts below! + +//////////////////////////////////////////////////////////////////////////////// + +// Main driver code + +//////////////////////////////////////////////////////////////////////////////// + +UHS_NI UHS_Bulk_Storage::UHS_Bulk_Storage(UHS_USB_HOST_BASE *p) { + pUsb = p; + dCBWTag = 0; + if(pUsb) { + + DriverDefaults(); + pUsb->RegisterDeviceClass(this); + // Serial.print("Bulk Register to USB Host @ 0x"); + // Serial.println((uint32_t)pUsb, HEX); + // Serial.print("Bulk Register to USB Host Address Pool @ 0x"); + // Serial.println((uint32_t)pUsb->GetAddressPool(), HEX); + } +} + +/** + * + * @param ei Enumeration information + * @return true if this interface driver can handle this interface description + */ +bool UHS_NI UHS_Bulk_Storage::OKtoEnumerate(ENUMERATION_INFO *ei) { + BS_HOST_DEBUG("BulkOnly: checking numep %i, klass %2.2x, subklass %2.2x\r\n", ei->interface.numep, ei->klass, ei->subklass); + BS_HOST_DEBUG("BulkOnly: checking protocol %2.2x, interface.klass %2.2x, interface.subklass %2.2x\r\n", ei->protocol, ei->interface.klass, ei->interface.subklass); + BS_HOST_DEBUG("BulkOnly: checking interface.protocol %2.2x\r\n", ei->interface.protocol); + // + // TO-DO? + // Check that we have 2 bulk endpoints, and one in each direction?? + // e.g. (ei->interface.numep > 1) && // two or more endpoints AND check types + // This will work with proper hardware though. + // + + return ( + ((ei->klass == UHS_USB_CLASS_MASS_STORAGE) || (ei->interface.klass == UHS_USB_CLASS_MASS_STORAGE)) && // mass storage class AND + ((ei->subklass == UHS_BULK_SUBCLASS_SCSI) || (ei->interface.subklass == UHS_BULK_SUBCLASS_SCSI)) && // SCSI command set AND + ((ei->protocol == UHS_STOR_PROTO_BBB) || (ei->interface.protocol == UHS_STOR_PROTO_BBB)) // Bulk Only transport + ); +} + +/** + * @param ei Enumeration information + * @return 0 always + */ +uint8_t UHS_NI UHS_Bulk_Storage::SetInterface(ENUMERATION_INFO *ei) { + uint8_t index; + + bAddress = ei->address; + BS_HOST_DEBUG("BS SetInterface\r\n"); + // Fill in the endpoint info structure + for(uint8_t ep = 0; ep < ei->interface.numep; ep++) { + BS_HOST_DEBUG("ep: 0x%2.2x bmAttributes: 0x%2.2x ", ep, ei->interface.epInfo[ep].bmAttributes); + if(ei->interface.epInfo[ep].bmAttributes == USB_TRANSFER_TYPE_BULK) { + index = ((ei->interface.epInfo[ep].bEndpointAddress & USB_TRANSFER_DIRECTION_IN) == USB_TRANSFER_DIRECTION_IN) ? epDataInIndex : epDataOutIndex; + epInfo[index].epAddr = (ei->interface.epInfo[ep].bEndpointAddress & 0x0F); + epInfo[index].maxPktSize = ei->interface.epInfo[ep].wMaxPacketSize; + epInfo[index].epAttribs = 0; + epInfo[index].bmNakPower = UHS_USB_NAK_MAX_POWER; + epInfo[index].bmSndToggle = 0; + epInfo[index].bmRcvToggle = 0; + epInfo[index].bIface=ei->interface.bInterfaceNumber; + BS_HOST_DEBUG("index: %i\r\n", index); + } + BS_HOST_DEBUG("\r\n"); + } + bNumEP = 3; + epInfo[0].epAddr = 0; + epInfo[0].maxPktSize = ei->bMaxPacketSize0; + epInfo[0].bmNakPower = UHS_USB_NAK_MAX_POWER; + bIface = ei->interface.bInterfaceNumber; + + return 0; +}; + +/** + * + * @return 0 for success + */ +uint8_t UHS_NI UHS_Bulk_Storage::Start(void) { + uint8_t rcode; + // Serial.print("Bulk Start from USB Host @ 0x"); + // Serial.println((uint32_t)pUsb, HEX); + // Serial.print("Bulk Start USB Host Address Pool @ 0x"); + // Serial.println((uint32_t)pUsb->GetAddressPool(), HEX); + + BS_HOST_DEBUG("BS Start, speed: %i\r\n", pUsb->GetAddressPool()->GetUsbDevicePtr(bAddress)->speed); + BS_HOST_DEBUG("BS Start\r\n"); + rcode = pUsb->setEpInfoEntry(bAddress, bIface, 3, epInfo); + // Serial.println(rcode,HEX); + if(rcode) goto FailOnInit; + + // Do a 1 second delay before LUN query + if(!UHS_SLEEP_MS(1000)) goto FailUnPlug; + + rcode = GetMaxLUN(&bMaxLUN); + BS_HOST_DEBUG("GetMaxLUN 0x%2.2x\r\n", rcode); + if(rcode) { + goto FailGetMaxLUN; + } + if(bMaxLUN >= MASS_MAX_SUPPORTED_LUN) bMaxLUN = MASS_MAX_SUPPORTED_LUN - 1; + BS_HOST_DEBUG("MaxLUN %u\r\n", bMaxLUN); + //ErrorMessage (PSTR("MaxLUN"), bMaxLUN); + if(!UHS_SLEEP_MS(150)) goto FailUnPlug; // Delay a bit for slow firmware. (again) + + for(uint8_t lun = 0; lun <= bMaxLUN; lun++) { + if(!UHS_SLEEP_MS(3)) goto FailUnPlug; + SCSI_Inquiry_Response response; + rcode = Inquiry(lun, sizeof (SCSI_Inquiry_Response), (uint8_t*) & response); + BS_HOST_DEBUG("Inquiry 0x%2.2x 0x%2.2x\r\n", sizeof (SCSI_Inquiry_Response), rcode); + if(rcode) { + goto FailInquiry; +#if 0 + } else { + BS_HOST_DEBUG("LUN %i `", lun); + uint8_t *buf = response.VendorID; + for(int i = 0; i < 28; i++) BS_HOST_DEBUG("%c", buf[i]); + BS_HOST_DEBUG("'\r\nQualifier %1.1X ", response.PeripheralQualifier); + BS_HOST_DEBUG("Device type %2.2X ", response.DeviceType); + BS_HOST_DEBUG("RMB %1.1X ", response.Removable); + BS_HOST_DEBUG("SSCS %1.1X ", response.SCCS); + uint8_t sv = response.Version; + BS_HOST_DEBUG("SCSI version %2.2X\r\nDevice conforms to ", sv); + switch(sv) { + case 0: + BS_HOST_DEBUG("No specific"); + break; + case 1: + BS_HOST_DEBUG("ANSI X3.131-1986 (ANSI 1)"); + break; + case 2: + BS_HOST_DEBUG("ANSI X3.131-1994 (ANSI 2)"); + break; + case 3: + BS_HOST_DEBUG("ANSI INCITS 301-1997 (SPC)"); + break; + case 4: + BS_HOST_DEBUG("ANSI INCITS 351-2001 (SPC-2)"); + break; + case 5: + BS_HOST_DEBUG("ANSI INCITS 408-2005 (SPC-4)"); + break; + case 6: + BS_HOST_DEBUG("T10/1731-D (SPC-4)"); + break; + default: + BS_HOST_DEBUG("unknown"); + } + BS_HOST_DEBUG(" standards.\r\n"); +#endif + } + } + + for(uint8_t lun = 0; lun <= bMaxLUN; lun++) { + if(!UHS_SLEEP_MS(3)) goto FailUnPlug; + #ifndef USB_NO_TEST_UNIT_READY + uint8_t tries = 0xf0; + while((rcode = TestUnitReady(lun))) { + BS_HOST_DEBUG("\r\nTry %2.2x TestUnitReady %2.2x\r\n", tries - 0xf0, rcode); + if(rcode == 0x08) break; // break on no media, this is OK to do. + if(rcode == UHS_BULK_ERR_DEVICE_DISCONNECTED) goto FailUnPlug; + if(rcode == UHS_BULK_ERR_INVALID_CSW) goto Fail; + if(rcode != UHS_BULK_ERR_MEDIA_CHANGED) goto Fail; + if(!UHS_SLEEP_MS(2 * (tries + 1))) goto FailUnPlug; + tries++; + if(!tries) break; + } + #else + // Don't wait for the LUN to become ready, as this will + // trigger Marlin's watchdog timer + rcode = -1; + #endif + if(!UHS_SLEEP_MS(3)) goto FailUnPlug; + LockMedia(lun, 1); + if(rcode == 0x08) { + if(!UHS_SLEEP_MS(3)) goto FailUnPlug; + if(MediaCTL(lun, 1) == UHS_BULK_ERR_DEVICE_DISCONNECTED) goto FailUnPlug; // I actually have a USB stick that needs this! + } + BS_HOST_DEBUG("\r\nTry %2.2x TestUnitReady %2.2x\r\n", tries - 0xf0, rcode); + if(!rcode) { + if(!UHS_SLEEP_MS(3)) goto FailUnPlug; + BS_HOST_DEBUG("CheckLUN...\r\n"); + BS_HOST_DEBUG("%lu\r\n", millis()/1000); + // Stalls on ***some*** devices, ***WHY***?! Device SAID it is READY!! + LUNOk[lun] = CheckLUN(lun); + BS_HOST_DEBUG("%lu\r\n", millis()/1000); + if(!LUNOk[lun]) LUNOk[lun] = CheckLUN(lun); + if(!UHS_SLEEP_MS(1)) goto FailUnPlug; + BS_HOST_DEBUG("Checked LUN...\r\n"); + } else { + LUNOk[lun] = false; + } + } + + rcode = OnStart(); + + if(rcode) goto FailOnInit; + +#ifdef DEBUG_USB_HOST + USBTRACE("BS configured\r\n\r\n"); +#endif + qNextPollTime = millis() + 100; + bPollEnable = true; + + return 0; +FailUnPlug: + rcode = UHS_BULK_ERR_DEVICE_DISCONNECTED; + goto Fail; + +FailOnInit: +#ifdef DEBUG_USB_HOST + USBTRACE("OnStart:"); + goto Fail; +#endif + +FailGetMaxLUN: +#ifdef DEBUG_USB_HOST + USBTRACE("GetMaxLUN:"); + goto Fail; +#endif + +FailInquiry: +#ifdef DEBUG_USB_HOST + USBTRACE("Inquiry:"); +#endif + +Fail: +#ifdef DEBUG_USB_HOST + NotifyFail(rcode); +#endif + Release(); + + return rcode; +} + +// Base class definition of Release() used. See UHS_USBInterface class definition for details + +/** + * For driver use only. + * + * @return + */ +//void UHS_NI UHS_Bulk_Storage::Release(void) { +// pUsb->DisablePoll(); +// OnRelease(); +// DriverDefaults(); +// pUsb->EnablePoll(); +// return; +//} + +/** + * For driver use only. + * + * @param lun Logical Unit Number + * @return true if LUN is ready for use. + */ +bool UHS_NI UHS_Bulk_Storage::CheckLUN(uint8_t lun) { + uint8_t rcode; + SCSI_Capacity capacity; + for(uint8_t i = 0; i < 8; i++) capacity.data[i] = 0; + + rcode = ReadCapacity10(lun, (uint8_t*)capacity.data); + if(rcode) { + BS_HOST_DEBUG(">>>>>>>>>>>>>>>>ReadCapacity returned %i\r\n", rcode); + return false; + } +#ifdef DEBUG_USB_HOST + ErrorMessage (PSTR(">>>>>>>>>>>>>>>>CAPACITY OK ON LUN"), lun); + for(uint8_t i = 0; i < 8 /*sizeof (Capacity)*/; i++) + D_PrintHex (capacity.data[i], 0x80); + Notify(PSTR("\r\n\r\n"), 0x80); +#endif + // Only 512/1024/2048/4096 are valid values! + uint32_t c = UHS_BYTES_TO_UINT32(capacity.data[4], capacity.data[5], capacity.data[6], capacity.data[7]); + if(c != 0x0200LU && c != 0x0400LU && c != 0x0800LU && c != 0x1000LU) { + return false; + } + // Store capacity information. + CurrentSectorSize[lun] = (uint16_t)(c); // & 0xFFFF); + + CurrentCapacity[lun] = UHS_BYTES_TO_UINT32(capacity.data[0], capacity.data[1], capacity.data[2], capacity.data[3]) + 1; + if(CurrentCapacity[lun] == /*0xffffffffLU */ 0x01LU || CurrentCapacity[lun] == 0x00LU) { + // Buggy firmware will report 0xffffffff or 0 for no media +#ifdef DEBUG_USB_HOST + if(CurrentCapacity[lun]) + ErrorMessage (PSTR(">>>>>>>>>>>>>>>>BUGGY FIRMWARE. CAPACITY FAIL ON LUN"), lun); +#endif + return false; + } + if(!UHS_SLEEP_MS(20)) return false; + #ifndef SKIP_PAGE3F + Page3F(lun); + #endif + if(!TestUnitReady(lun)) return true; + + return false; +} + +/** + * For driver use only. + * + * Scan for media change on all LUNs + */ +void UHS_NI UHS_Bulk_Storage::CheckMedia(void) { + if(!bAddress) return; + for(uint8_t lun = 0; lun <= bMaxLUN; lun++) { + if(TestUnitReady(lun)) { + LUNOk[lun] = false; + continue; + } + if(!LUNOk[lun]) + LUNOk[lun] = CheckLUN(lun); + } +#if 0 + BS_HOST_DEBUG("}}}}}}}}}}}}}}}}STATUS "); + for(uint8_t lun = 0; lun <= bMaxLUN; lun++) { + if(LUNOk[lun]) + BS_HOST_DEBUG("#"); + + else BS_HOST_DEBUG("."); + } + BS_HOST_DEBUG("\r\n"); +#endif + OnPoll(); + qNextPollTime = millis() + 100; +} + +/** + * For driver use only. + * + */ +void UHS_NI UHS_Bulk_Storage::Poll(void) { + if((long)(millis() - qNextPollTime) >= 0L) { + + CheckMedia(); + } + + return; +} + +//////////////////////////////////////////////////////////////////////////////// + + +// SCSI code + + +//////////////////////////////////////////////////////////////////////////////// + +/** + * For driver use only. + * + * @param plun + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::GetMaxLUN(uint8_t *plun) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + uint8_t ret = pUsb->ctrlReq(bAddress, mkSETUP_PKT16(UHS_BULK_bmREQ_IN, UHS_BULK_REQ_GET_MAX_LUN, 0x0000U, bIface, 1), 1, plun); + + if(ret == UHS_HOST_ERROR_STALL) { + + *plun = 0; + Notify(PSTR("\r\nGetMaxLUN Stalled\r\n"), 0x80); + } + return 0; +} + +/** + * For driver use only. Used during Driver Start + * + * @param lun Logical Unit Number + * @param bsize + * @param buf + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::Inquiry(uint8_t lun, uint16_t bsize, uint8_t *buf) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + Notify(PSTR("\r\nInquiry\r\n"), 0x80); + Notify(PSTR("---------\r\n"), 0x80); + + SCSI_CDB6_t cdb = SCSI_CDB6_t(SCSI_CMD_INQUIRY, lun, 0LU, (uint8_t)bsize, 0); + uint8_t rc = SCSITransaction6(&cdb, bsize, buf, (uint8_t)UHS_BULK_CMD_DIR_IN); + + return rc; +} + +/** + * For driver use only. + * + * @param lun Logical Unit Number + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::TestUnitReady(uint8_t lun) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + //SetCurLUN(lun); + if(!bAddress) + return UHS_BULK_ERR_UNIT_NOT_READY; + + Notify(PSTR("\r\nTestUnitReady\r\n"), 0x80); + Notify(PSTR("-----------------\r\n"), 0x80); + + SCSI_CDB6_t cdb = SCSI_CDB6_t(SCSI_CMD_TEST_UNIT_READY, lun, (uint8_t)0, 0); + + return SCSITransaction6(&cdb, 0, NULL, (uint8_t)UHS_BULK_CMD_DIR_IN); + +} + +/** + * For driver use only. + * + * @param lun Logical Unit Number + * @param pc + * @param page + * @param subpage + * @param len + * @param pbuf + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::ModeSense6(uint8_t lun, uint8_t pc, uint8_t page, uint8_t subpage, uint8_t len, uint8_t * pbuf) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + Notify(PSTR("\r\rModeSense\r\n"), 0x80); + Notify(PSTR("------------\r\n"), 0x80); + + SCSI_CDB6_t cdb = SCSI_CDB6_t(SCSI_CMD_MODE_SENSE_6, lun, (uint32_t)((((pc << 6) | page) << 8) | subpage), len, 0); + + return SCSITransaction6(&cdb, len, pbuf, (uint8_t)UHS_BULK_CMD_DIR_IN); +} + +/** + * For driver use only. + * + * @param lun Logical Unit Number + * @param bsize + * @param buf + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::ReadCapacity10(uint8_t lun, uint8_t *buf) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + Notify(PSTR("\r\nReadCapacity\r\n"), 0x80); + Notify(PSTR("---------------\r\n"), 0x80); + + SCSI_CDB10_t cdb = SCSI_CDB10_t(SCSI_CMD_READ_CAPACITY_10, lun); + + return SCSITransaction10(&cdb, 8, buf, (uint8_t)UHS_BULK_CMD_DIR_IN); +} + +/** + * For driver use only. + * + * Page 3F contains write protect status. + * + * @param lun Logical Unit Number to test. + * @return Write protect switch status. + */ +uint8_t UHS_NI UHS_Bulk_Storage::Page3F(uint8_t lun) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + uint8_t buf[192]; + for(int i = 0; i < 192; i++) { + buf[i] = 0x00; + } + WriteOk[lun] = true; + uint8_t rc = ModeSense6(lun, 0, 0x3f, 0, 192, buf); + if(!rc) { + WriteOk[lun] = ((buf[2] & 0x80) == 0); +#ifdef DEBUG_USB_HOST + Notify(PSTR("Mode Sense: "), 0x80); + for(int i = 0; i < 4; i++) { + + D_PrintHex (buf[i], 0x80); + Notify(PSTR(" "), 0x80); + } + Notify(PSTR("\r\n"), 0x80); +#endif + } + return rc; +} + +/** + * For driver use only. + * + * @param lun Logical Unit Number + * @param size + * @param buf + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::RequestSense(uint8_t lun, uint16_t size, uint8_t *buf) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + pUsb->DisablePoll(); + Notify(PSTR("\r\nRequestSense\r\n"), 0x80); + Notify(PSTR("----------------\r\n"), 0x80); + + SCSI_CDB6_t cdb = SCSI_CDB6_t(SCSI_CMD_REQUEST_SENSE, lun, 0LU, (uint8_t)size, 0); + UHS_BULK_CommandBlockWrapper cbw = UHS_BULK_CommandBlockWrapper(++dCBWTag, (uint32_t)size, &cdb, (uint8_t)UHS_BULK_CMD_DIR_IN); + uint8_t v = Transaction(&cbw, size, buf); + pUsb->EnablePoll(); + + return v; +} + + +//////////////////////////////////////////////////////////////////////////////// + + +// USB code + + +//////////////////////////////////////////////////////////////////////////////// + +/** + * For driver use only. + * + * @param index + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::ClearEpHalt(uint8_t index) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + uint8_t ret = 0; + if(index != 0) { + uint8_t ep = (index == epDataInIndex) ? (0x80 | epInfo[index].epAddr) : epInfo[index].epAddr; + do { + ret = pUsb->EPClearHalt(bAddress, ep); + if(!UHS_SLEEP_MS(6)) break; + } while(ret == 0x01); + + if(ret) { + ErrorMessage (PSTR("ClearEpHalt"), ret); + ErrorMessage (PSTR("EP"), ep); + epInfo[index].bmSndToggle = 0; + epInfo[index].bmRcvToggle = 0; + return ret; + } else { + + epInfo[index].bmSndToggle = 0; + epInfo[index].bmRcvToggle = 0; + } + } + return ret; +} + +/** + * For driver use only. + * + */ +void UHS_NI UHS_Bulk_Storage::Reset(void) { + if(!bAddress) return; + + while(pUsb->ctrlReq(bAddress, mkSETUP_PKT16(UHS_BULK_bmREQ_OUT, UHS_BULK_REQ_BOMSR, 0x0000U, bIface, 0), 0, NULL) == 0x01) { + if(!UHS_SLEEP_MS(6)) break; + } + + if(!bAddress) return; + + UHS_SLEEP_MS(2500); +} + +/** + * For driver use only. + * + * @return 0 if successful + */ +uint8_t UHS_NI UHS_Bulk_Storage::ResetRecovery(void) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + Notify(PSTR("\r\nResetRecovery\r\n"), 0x80); + Notify(PSTR("-----------------\r\n"), 0x80); + qNextPollTime = millis() + 90000; + uint8_t bLastUsbError = UHS_HOST_ERROR_UNPLUGGED; + if(UHS_SLEEP_MS(6)) { + Reset(); + if(UHS_SLEEP_MS(6)) { + bLastUsbError = ClearEpHalt(epDataInIndex); + if(UHS_SLEEP_MS(6)) { + + bLastUsbError = ClearEpHalt(epDataOutIndex); + UHS_SLEEP_MS(6); + } + } + } + return bLastUsbError; +} + +/** + * For driver use only. + * + * Clear all EP data and clear all LUN status + */ +void UHS_NI UHS_Bulk_Storage::DriverDefaults(void) { + + pUsb->DeviceDefaults(MASS_MAX_ENDPOINTS, this); + + for(uint8_t i = 0; i < MASS_MAX_SUPPORTED_LUN; i++) { + + LUNOk[i] = false; + WriteOk[i] = false; + CurrentCapacity[i] = 0lu; + CurrentSectorSize[i] = 0; + } + + dCBWTag = 0; + bMaxLUN = 0; + bTheLUN = 0; +} + +/** + * For driver use only. + * + * @param pcsw + * @param pcbw + * @return + */ +bool UHS_NI UHS_Bulk_Storage::IsValidCSW(UHS_BULK_CommandStatusWrapper *pcsw, UHS_BULK_CommandBlockWrapperBase *pcbw) { + if(!bAddress) return false; + if(pcsw->dCSWSignature != UHS_BULK_CSW_SIGNATURE) { + Notify(PSTR("CSW:Sig error\r\n"), 0x80); + return false; + } + if(pcsw->dCSWTag != pcbw->dCBWTag) { + Notify(PSTR("CSW:Wrong tag\r\n"), 0x80); + ErrorMessage (PSTR("dCSWTag"), pcsw->dCSWTag); + ErrorMessage (PSTR("dCBWTag"), pcbw->dCBWTag); + + return false; + } + return true; +} + +/** + * For driver use only. + * + * @param error + * @param index + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::HandleUsbError(uint8_t error, uint8_t index) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + + uint8_t count = 3; + while(error && count) { + if(error != UHS_HOST_ERROR_NONE) { + ErrorMessage (PSTR("USB Error"), error); + ErrorMessage (PSTR("Index"), index); + } + switch(error) { + // case UHS_HOST_ERROR_WRONGPID: + case UHS_HOST_ERROR_NONE: + return UHS_BULK_ERR_SUCCESS; + case UHS_HOST_ERROR_BUSY: + // SIE is busy, just hang out and try again. + return UHS_BULK_ERR_UNIT_BUSY; + case UHS_HOST_ERROR_NAK: + return UHS_BULK_ERR_UNIT_BUSY; + case UHS_HOST_ERROR_UNPLUGGED: + case UHS_HOST_ERROR_TIMEOUT: + case UHS_HOST_ERROR_JERR: + return UHS_BULK_ERR_DEVICE_DISCONNECTED; + case UHS_HOST_ERROR_STALL: + if(index == 0) return UHS_BULK_ERR_STALL; + ClearEpHalt(index); + if(index != epDataInIndex) return UHS_BULK_ERR_WRITE_STALL; + return UHS_BULK_ERR_STALL; + + + case UHS_HOST_ERROR_TOGERR: + // Handle a very super rare corner case, where toggles become de-synched. + // I have only ran into one device that has this firmware bug, and this is + // the only clean way to get back into sync with the buggy device firmware. + // --AJK + if(bAddress && bConfNum) { + error = pUsb->setConf(bAddress, bConfNum); + + if(error) break; + } + return UHS_BULK_ERR_SUCCESS; + + default: + ErrorMessage (PSTR("\r\nUSB"), error); + + return UHS_BULK_ERR_GENERAL_USB_ERROR; + } + count--; + } // while + + return ((error && !count) ? UHS_BULK_ERR_GENERAL_USB_ERROR : UHS_BULK_ERR_SUCCESS); +} + +/** + * For driver use only. + * + * @param pcbw + * @param buf_size + * @param buf + * @param flags + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::Transaction(UHS_BULK_CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + + uint16_t bytes = buf_size; + bool write = (pcbw->bmCBWFlags & UHS_BULK_CMD_DIR_IN) != UHS_BULK_CMD_DIR_IN; + uint8_t ret = 0; + uint8_t usberr; + UHS_BULK_CommandStatusWrapper csw; // up here, we allocate ahead to save cpu cycles. + SetCurLUN(pcbw->bmCBWLUN); + ErrorMessage (PSTR("CBW.dCBWTag"), pcbw->dCBWTag); + + while((usberr = pUsb->outTransfer(bAddress, epInfo[epDataOutIndex].epAddr, sizeof (UHS_BULK_CommandBlockWrapper), (uint8_t*)pcbw)) == UHS_HOST_ERROR_BUSY) { + if(!UHS_SLEEP_MS(1)) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + } + ret = HandleUsbError(usberr, epDataOutIndex); + if(ret) { + ErrorMessage (PSTR("============================ CBW"), ret); + } else { + if(bytes) { + if(!write) { + while((usberr = pUsb->inTransfer(bAddress, epInfo[epDataInIndex].epAddr, &bytes, (uint8_t*)buf)) == UHS_HOST_ERROR_BUSY) { + if(!UHS_SLEEP_MS(1)) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + } + ret = HandleUsbError(usberr, epDataInIndex); + } else { + while((usberr = pUsb->outTransfer(bAddress, epInfo[epDataOutIndex].epAddr, bytes, (uint8_t*)buf)) == UHS_HOST_ERROR_BUSY) { + if(!UHS_SLEEP_MS(1)) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + } + ret = HandleUsbError(usberr, epDataOutIndex); + } + if(ret) { + ErrorMessage (PSTR("============================ DAT"), ret); + } + } + } + + { + bytes = sizeof (UHS_BULK_CommandStatusWrapper); + int tries = 2; + while(tries--) { + while((usberr = pUsb->inTransfer(bAddress, epInfo[epDataInIndex].epAddr, &bytes, (uint8_t*) & csw)) == UHS_HOST_ERROR_BUSY) { + if(!UHS_SLEEP_MS(1)) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + } + if(!usberr) break; + if(tries) { + if(usberr == UHS_HOST_ERROR_STALL) { + ResetRecovery(); + } else { + ClearEpHalt(epDataInIndex); + } + } + } + if(!ret) { + Notify(PSTR("CBW:\t\tOK\r\n"), 0x80); + Notify(PSTR("Data Stage:\tOK\r\n"), 0x80); + } else { + // Throw away csw, IT IS NOT OF ANY USE. + ResetRecovery(); + return ret; + } + ret = HandleUsbError(usberr, epDataInIndex); + if(ret) { + ErrorMessage (PSTR("============================ CSW"), ret); + } + if(usberr == UHS_HOST_ERROR_NONE) { + if(IsValidCSW(&csw, pcbw)) { + //ErrorMessage (PSTR("CSW.dCBWTag"), csw.dCSWTag); + //ErrorMessage (PSTR("bCSWStatus"), csw.bCSWStatus); + //ErrorMessage (PSTR("dCSWDataResidue"), csw.dCSWDataResidue); + Notify(PSTR("CSW:\t\tOK\r\n\r\n"), 0x80); + return csw.bCSWStatus; + } else { + // NOTE! Sometimes this is caused by the reported residue being wrong. + // Get a different device. It isn't compliant, and should have never passed Q&A. + // I own one... 05e3:0701 Genesys Logic, Inc. USB 2.0 IDE Adapter. + // Other devices that exhibit this behavior exist in the wild too. + // Be sure to check quirks in the Linux source code before reporting a bug. --xxxajk + Notify(PSTR("Invalid CSW\r\n"), 0x80); + Reset(); + ResetRecovery(); + + return UHS_BULK_ERR_INVALID_CSW; + } + } + } + return ret; +} + +/** + * For driver use only. + * + * @param lun Logical Unit Number + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::SetCurLUN(uint8_t lun) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + if(lun > bMaxLUN) + return UHS_BULK_ERR_INVALID_LUN; + bTheLUN = lun; + + return UHS_BULK_ERR_SUCCESS; +}; + +/** + * For driver use only. + * + * @param status + * @return + */ +uint8_t UHS_NI UHS_Bulk_Storage::HandleSCSIError(uint8_t status) { + if(!bAddress) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + uint8_t ret = 0; + switch(status) { + case 0: return UHS_BULK_ERR_SUCCESS; + + case 2: + ErrorMessage (PSTR("Phase Error"), status); + ErrorMessage (PSTR("LUN"), bTheLUN); + ResetRecovery(); + return UHS_BULK_ERR_GENERAL_SCSI_ERROR; + + case 1: + ErrorMessage (PSTR("SCSI Error"), status); + ErrorMessage (PSTR("LUN"), bTheLUN); + SCSI_Request_Sense_Response rsp; + + ret = RequestSense(bTheLUN, sizeof (SCSI_Request_Sense_Response), (uint8_t*) & rsp); + + if(ret) { + if(ret == UHS_BULK_ERR_DEVICE_DISCONNECTED) return UHS_BULK_ERR_DEVICE_DISCONNECTED; + return UHS_BULK_ERR_GENERAL_SCSI_ERROR; + } +#if ENABLE_UHS_DEBUGGING + ErrorMessage (PSTR("Response Code"), rsp.bResponseCode); + if(rsp.bResponseCode & 0x80) { + Notify(PSTR("Information field: "), 0x80); + for(int i = 0; i < 4; i++) { + D_PrintHex (rsp.CmdSpecificInformation[i], 0x80); + Notify(PSTR(" "), 0x80); + } + Notify(PSTR("\r\n"), 0x80); + } + ErrorMessage (PSTR("Sense Key"), rsp.bmSenseKey); + ErrorMessage (PSTR("Add Sense Code"), rsp.bAdditionalSenseCode); + ErrorMessage (PSTR("Add Sense Qual"), rsp.bAdditionalSenseQualifier); +#endif + // warning, this is not testing ASQ, only SK and ASC. + switch(rsp.bmSenseKey) { + case SCSI_S_UNIT_ATTENTION: + switch(rsp.bAdditionalSenseCode) { + case SCSI_ASC_MEDIA_CHANGED: + return UHS_BULK_ERR_MEDIA_CHANGED; + default: + return UHS_BULK_ERR_UNIT_NOT_READY; + } + case SCSI_S_NOT_READY: + switch(rsp.bAdditionalSenseCode) { + case SCSI_ASC_MEDIUM_NOT_PRESENT: + return UHS_BULK_ERR_NO_MEDIA; + default: + return UHS_BULK_ERR_UNIT_NOT_READY; + } + case SCSI_S_ILLEGAL_REQUEST: + switch(rsp.bAdditionalSenseCode) { + case SCSI_ASC_LBA_OUT_OF_RANGE: + return UHS_BULK_ERR_BAD_LBA; + default: + return UHS_BULK_ERR_CMD_NOT_SUPPORTED; + } + default: + return UHS_BULK_ERR_GENERAL_SCSI_ERROR; + } + + // case 4: return MASS_ERR_UNIT_BUSY; // Busy means retry later. + // case 0x05/0x14: we stalled out + // case 0x15/0x16: we naked out. + default: + ErrorMessage (PSTR("Gen SCSI Err"), status); + ErrorMessage (PSTR("LUN"), bTheLUN); + + return status; + } // switch +} + + +//////////////////////////////////////////////////////////////////////////////// + + +// Debugging code + + +//////////////////////////////////////////////////////////////////////////////// + +/** + * + * @param ep_ptr + */ +void UHS_NI UHS_Bulk_Storage::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR * ep_ptr) { + Notify(PSTR("Endpoint descriptor:"), 0x80); + Notify(PSTR("\r\nLength:\t\t"), 0x80); + D_PrintHex (ep_ptr->bLength, 0x80); + Notify(PSTR("\r\nType:\t\t"), 0x80); + D_PrintHex (ep_ptr->bDescriptorType, 0x80); + Notify(PSTR("\r\nAddress:\t"), 0x80); + D_PrintHex (ep_ptr->bEndpointAddress, 0x80); + Notify(PSTR("\r\nAttributes:\t"), 0x80); + D_PrintHex (ep_ptr->bmAttributes, 0x80); + Notify(PSTR("\r\nMaxPktSize:\t"), 0x80); + D_PrintHex (ep_ptr->wMaxPacketSize, 0x80); + Notify(PSTR("\r\nPoll Intrv:\t"), 0x80); + D_PrintHex (ep_ptr->bInterval, 0x80); + Notify(PSTR("\r\n"), 0x80); +} + +#else +#error "Never include UHS_BULK_STORAGE_INLINE.h, include UHS_host.h instead" +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_SCSI.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_SCSI.h new file mode 100644 index 000000000000..3655d8183f0a --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_SCSI.h @@ -0,0 +1,328 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#ifndef UHS_SCSI_H +#define UHS_SCSI_H + +/* + * Reference documents from T10 (http://www.t10.org) + * SCSI Primary Commands - 3 (SPC-3) + * SCSI Block Commands - 2 (SBC-2) + * Multi-Media Commands - 5 (MMC-5) + */ + +/* Group 1 commands (CDB's here are should all be 6-bytes) */ +#define SCSI_CMD_TEST_UNIT_READY 0x00U +#define SCSI_CMD_REQUEST_SENSE 0x03U +#define SCSI_CMD_FORMAT_UNIT 0x04U +#define SCSI_CMD_READ_6 0x08U +#define SCSI_CMD_WRITE_6 0x0AU +#define SCSI_CMD_INQUIRY 0x12U +#define SCSI_CMD_MODE_SELECT_6 0x15U +#define SCSI_CMD_MODE_SENSE_6 0x1AU +#define SCSI_CMD_START_STOP_UNIT 0x1BU +#define SCSI_CMD_PREVENT_REMOVAL 0x1EU +/* Group 2 Commands (CDB's here are 10-bytes) */ +#define SCSI_CMD_READ_FORMAT_CAPACITIES 0x23U +#define SCSI_CMD_READ_CAPACITY_10 0x25U +#define SCSI_CMD_READ_10 0x28U +#define SCSI_CMD_WRITE_10 0x2AU +#define SCSI_CMD_SEEK_10 0x2BU +#define SCSI_CMD_ERASE_10 0x2CU +#define SCSI_CMD_WRITE_AND_VERIFY_10 0x2EU +#define SCSI_CMD_VERIFY_10 0x2FU +#define SCSI_CMD_SYNCHRONIZE_CACHE 0x35U +#define SCSI_CMD_WRITE_BUFFER 0x3BU +#define SCSI_CMD_READ_BUFFER 0x3CU +#define SCSI_CMD_READ_SUBCHANNEL 0x42U +#define SCSI_CMD_READ_TOC 0x43U +#define SCSI_CMD_READ_HEADER 0x44U +#define SCSI_CMD_PLAY_AUDIO_10 0x45U +#define SCSI_CMD_GET_CONFIGURATION 0x46U +#define SCSI_CMD_PLAY_AUDIO_MSF 0x47U +#define SCSI_CMD_PLAY_AUDIO_TI 0x48U +#define SCSI_CMD_PLAY_TRACK_REL_10 0x49U +#define SCSI_CMD_GET_EVENT_STATUS 0x4AU +#define SCSI_CMD_PAUSE_RESUME 0x4BU +#define SCSI_CMD_READ_DISC_INFORMATION 0x51U +#define SCSI_CMD_READ_TRACK_INFORMATION 0x52U +#define SCSI_CMD_RESERVE_TRACK 0x53U +#define SCSI_CMD_SEND_OPC_INFORMATION 0x54U +#define SCSI_CMD_MODE_SELECT_10 0x55U +#define SCSI_CMD_REPAIR_TRACK 0x58U +#define SCSI_CMD_MODE_SENSE_10 0x5AU +#define SCSI_CMD_CLOSE_TRACK_SESSION 0x5BU +#define SCSI_CMD_READ_BUFFER_CAPACITY 0x5CU +#define SCSI_CMD_SEND_CUE_SHEET 0x5DU +/* Group 5 Commands (CDB's here are 12-bytes) */ +#define SCSI_CMD_REPORT_LUNS 0xA0U +#define SCSI_CMD_BLANK 0xA1U +#define SCSI_CMD_SECURITY_PROTOCOL_IN 0xA2U +#define SCSI_CMD_SEND_KEY 0xA3U +#define SCSI_CMD_REPORT_KEY 0xA4U +#define SCSI_CMD_PLAY_AUDIO_12 0xA5U +#define SCSI_CMD_LOAD_UNLOAD 0xA6U +#define SCSI_CMD_SET_READ_AHEAD 0xA7U +#define SCSI_CMD_READ_12 0xA8U +#define SCSI_CMD_PLAY_TRACK_REL_12 0xA9U +#define SCSI_CMD_WRITE_12 0xAAU +#define SCSI_CMD_READ_MEDIA_SERIAL_12 0xABU +#define SCSI_CMD_GET_PERFORMANCE 0xACU +#define SCSI_CMD_READ_DVD_STRUCTURE 0xADU +#define SCSI_CMD_SECURITY_PROTOCOL_OUT 0xB5U +#define SCSI_CMD_SET_STREAMING 0xB6U +#define SCSI_CMD_READ_MSF 0xB9U +#define SCSI_CMD_SET_SPEED 0xBBU +#define SCSI_CMD_MECHANISM_STATUS 0xBDU +#define SCSI_CMD_READ_CD 0xBEU +#define SCSI_CMD_SEND_DISC_STRUCTURE 0xBFU +/* Vendor-unique Commands, included for completeness */ +#define SCSI_CMD_CD_PLAYBACK_STATUS 0xC4U /* SONY unique */ +#define SCSI_CMD_PLAYBACK_CONTROL 0xC9U /* SONY unique */ +#define SCSI_CMD_READ_CDDA 0xD8U /* Vendor unique */ +#define SCSI_CMD_READ_CDXA 0xDBU /* Vendor unique */ +#define SCSI_CMD_READ_ALL_SUBCODES 0xDFU /* Vendor unique */ + +/* SCSI error codes */ +#define SCSI_S_NOT_READY 0x02U +#define SCSI_S_MEDIUM_ERROR 0x03U +#define SCSI_S_ILLEGAL_REQUEST 0x05U +#define SCSI_S_UNIT_ATTENTION 0x06U +#define SCSI_ASC_LBA_OUT_OF_RANGE 0x21U +#define SCSI_ASC_MEDIA_CHANGED 0x28U +#define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3AU + +struct SCSI_Capacity { + uint8_t data[8]; + //uint32_t dwBlockAddress; + //uint32_t dwBlockLength; +} __attribute__((packed)); + +struct SCSI_CDB_BASE { + uint8_t Opcode; + + unsigned unused : 5; + unsigned LUN : 3; + + uint8_t info[12]; +} __attribute__((packed)); + +typedef SCSI_CDB_BASE SCSI_CDB_BASE_t; + +struct SCSI_CDB6 { + uint8_t Opcode; + + unsigned LBAMSB : 5; + unsigned LUN : 3; + + uint8_t LBAHB; + uint8_t LBALB; + uint8_t AllocationLength; + uint8_t Control; + +public: + + SCSI_CDB6(uint8_t _Opcode, uint8_t _LUN, uint32_t LBA, uint8_t _AllocationLength, uint8_t _Control) : + Opcode(_Opcode), LBAMSB(UHS_UINT8_BYTE2(LBA) & 0x1f), LUN(_LUN), LBAHB(UHS_UINT8_BYTE1(LBA)), LBALB(UHS_UINT8_BYTE0(LBA)), + AllocationLength(_AllocationLength), Control(_Control) { + } + + SCSI_CDB6(uint8_t _Opcode, uint8_t _LUN, uint8_t _AllocationLength, uint8_t _Control) : + Opcode(_Opcode), LBAMSB(0), LUN(_LUN), LBAHB(0), LBALB(0), + AllocationLength(_AllocationLength), Control(_Control) { + } +} __attribute__((packed)); + +typedef SCSI_CDB6 SCSI_CDB6_t; + +struct SCSI_CDB10 { + uint8_t Opcode; + + unsigned Service_Action : 5; + unsigned LUN : 3; + + uint8_t LBA_L_M_MB; + uint8_t LBA_L_M_LB; + uint8_t LBA_L_L_MB; + uint8_t LBA_L_L_LB; + + uint8_t Misc2; + + uint8_t ALC_MB; + uint8_t ALC_LB; + + uint8_t Control; +public: + + SCSI_CDB10(uint8_t _Opcode, uint8_t _LUN) : + Opcode(_Opcode), Service_Action(0), LUN(_LUN), + LBA_L_M_MB(0), LBA_L_M_LB(0), LBA_L_L_MB(0), LBA_L_L_LB(0), + Misc2(0), ALC_MB(0), ALC_LB(0), Control(0) { + } + + SCSI_CDB10(uint8_t _Opcode, uint8_t _LUN, uint16_t xflen, uint32_t _LBA) : + Opcode(_Opcode), Service_Action(0), LUN(_LUN), + LBA_L_M_MB(UHS_UINT8_BYTE3(_LBA)), LBA_L_M_LB(UHS_UINT8_BYTE2(_LBA)), LBA_L_L_MB(UHS_UINT8_BYTE1(_LBA)), LBA_L_L_LB(UHS_UINT8_BYTE0(_LBA)), + Misc2(0), ALC_MB(UHS_UINT8_BYTE1(xflen)), ALC_LB(UHS_UINT8_BYTE0(xflen)), Control(0) { + } +} __attribute__((packed)); + +typedef SCSI_CDB10 SCSI_CDB10_t; + +struct SCSI_CDB12 { + uint8_t Opcode; + + unsigned Service_Action : 5; + unsigned Misc : 3; + + uint8_t LBA_L_M_LB; + uint8_t LBA_L_L_MB; + uint8_t LBA_L_L_LB; + + uint8_t ALC_M_LB; + uint8_t ALC_L_MB; + uint8_t ALC_L_LB; + uint8_t Control; +} __attribute__((packed)); + +typedef SCSI_CDB12 SCSI_CDB12_t; + +struct SCSI_CDB_LBA32_16 { + uint8_t Opcode; + + unsigned Service_Action : 5; + unsigned Misc : 3; + + uint8_t LBA_L_M_MB; + uint8_t LBA_L_M_LB; + uint8_t LBA_L_L_MB; + uint8_t LBA_L_L_LB; + + uint8_t A_M_M_MB; + uint8_t A_M_M_LB; + uint8_t A_M_L_MB; + uint8_t A_M_L_LB; + + uint8_t ALC_M_MB; + uint8_t ALC_M_LB; + uint8_t ALC_L_MB; + uint8_t ALC_L_LB; + + uint8_t Misc2; + uint8_t Control; +} __attribute__((packed)); + +struct SCSI_CDB_LBA64_16 { + uint8_t Opcode; + uint8_t Misc; + + uint8_t LBA_M_M_MB; + uint8_t LBA_M_M_LB; + uint8_t LBA_M_L_MB; + uint8_t LBA_M_L_LB; + + uint8_t LBA_L_M_MB; + uint8_t LBA_L_M_LB; + uint8_t LBA_L_L_MB; + uint8_t LBA_L_L_LB; + + uint8_t ALC_M_MB; + uint8_t ALC_M_LB; + uint8_t ALC_L_MB; + uint8_t ALC_L_LB; + + uint8_t Misc2; + uint8_t Control; +} __attribute__((packed)); + +struct SCSI_Inquiry_Response { + uint8_t DeviceType : 5; + uint8_t PeripheralQualifier : 3; + + unsigned Reserved : 7; + unsigned Removable : 1; + + uint8_t Version; + + unsigned ResponseDataFormat : 4; + unsigned HISUP : 1; + unsigned NormACA : 1; + unsigned TrmTsk : 1; + unsigned AERC : 1; + + uint8_t AdditionalLength; + + unsigned PROTECT : 1; + unsigned Res : 2; + unsigned ThreePC : 1; + unsigned TPGS : 2; + unsigned ACC : 1; + unsigned SCCS : 1; + + unsigned ADDR16 : 1; + unsigned R1 : 1; + unsigned R2 : 1; + unsigned MCHNGR : 1; + unsigned MULTIP : 1; + unsigned VS : 1; + unsigned ENCSERV : 1; + unsigned BQUE : 1; + + unsigned SoftReset : 1; + unsigned CmdQue : 1; + unsigned Reserved4 : 1; + unsigned Linked : 1; + unsigned Sync : 1; + unsigned WideBus16Bit : 1; + unsigned WideBus32Bit : 1; + unsigned RelAddr : 1; + + uint8_t VendorID[8]; + uint8_t ProductID[16]; + uint8_t RevisionID[4]; +} __attribute__((packed)); + +struct SCSI_Request_Sense_Response { + uint8_t bResponseCode; + uint8_t bSegmentNumber; + + uint8_t bmSenseKey : 4; + uint8_t bmReserved : 1; + uint8_t bmILI : 1; + uint8_t bmEOM : 1; + uint8_t bmFileMark : 1; + + uint8_t Information[4]; + uint8_t bAdditionalLength; + uint8_t CmdSpecificInformation[4]; + uint8_t bAdditionalSenseCode; + uint8_t bAdditionalSenseQualifier; + uint8_t bFieldReplaceableUnitCode; + uint8_t SenseKeySpecific[3]; +} __attribute__((packed)); + +#endif /* UHS_SCSI_H */ + diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UNOFFICIAL_IDs.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UNOFFICIAL_IDs.h new file mode 100644 index 000000000000..5c60f2d1839a --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UNOFFICIAL_IDs.h @@ -0,0 +1,33 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ +#ifndef _UHS_UNOFFICIAL_IDs_h +#define _UHS_UNOFFICIAL_IDs_h + +// Bogus unofficial and unregistered VIDs from cloners to be listed here. + +#define UHS_VID_UNOFFICIAL_JOYTECH 0x162EU // For unofficial Joytech controllers + +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_USB_IDs.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_USB_IDs.h new file mode 100644 index 000000000000..68d7885c6ba8 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_USB_IDs.h @@ -0,0 +1,2995 @@ +/* + * USB vendor ids + * This file was generated by running python ./make-USB_IDs.py > UHS_USB_IDs.h + * Don't change it directly. + * + * Copyright 2014, Andrew J. Kroll for Circuits At Home, LTD. All rights reserved. + * + * Copyright 2012, Michal Labedzki for Tieto Corporation + * Other values imported from libghoto2/camlibs/ptp2/library.c, music-players.h + * Copyright (C) 2001-2005 Mariusz Woloszyn + * Copyright (C) 2003-2013 Marcus Meissner + * Copyright (C) 2005 Hubert Figuiere + * Copyright (C) 2009 Axel Waggershauser + * Copyright (C) 2005-2007 Richard A. Low + * Copyright (C) 2005-2012 Linus Walleij + * Copyright (C) 2007 Ted Bullock + * Copyright (C) 2012 Sony Mobile Communications AB + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#ifndef _UHS_USB_IDs_h_ +#define _UHS_USB_IDs_h_ +#include "UHS_UNOFFICIAL_IDs.h" + +#define UHS_VID_FRYS_ELECTRONICS 0x0001U // Fry's Electronics +#define UHS_VID_INGRAM 0x0002U // Ingram +#define UHS_VID_CLUB_MAC 0x0003U // Club Mac +#define UHS_VID_NEBRASKA_FURNITURE_MART 0x0004U // Nebraska Furniture Mart +#define UHS_VID_UNKNOWN 0x0011U // Unknown +#define UHS_VID_PLANEX 0x0053U // Planex +#define UHS_VID_DRAGONRISE 0x0079U // DragonRise Inc. +#define UHS_VID_TRUST_INTERNATIONAL_BV 0x0105U // Trust International B.V. +#define UHS_VID_IBP 0x0127U // IBP +#define UHS_VID_UNKNOWN_1 0x0145U // Unknown +#define UHS_VID_MLK 0x017cU // MLK +#define UHS_VID_TP_LINK 0x0200U // TP-Link +#define UHS_VID_CHIPSBANK_MICROELECTRONICS 0x0204U // Chipsbank Microelectronics Co., Ltd +#define UHS_VID_HANGZHOU_WORLDE 0x0218U // Hangzhou Worlde +#define UHS_VID_HUMAX 0x02adU // HUMAX Co., Ltd. +#define UHS_VID_MM300_EBOOK_READER 0x0300U // MM300 eBook Reader +#define UHS_VID_OCZ_TECHNOLOGY 0x0324U // OCZ Technology Inc +#define UHS_VID_OCZ_TECHNOLOGY_1 0x0325U // OCZ Technology Inc +#define UHS_VID_LTS 0x0386U // LTS +#define UHS_VID_SHENZHEN_SINOTE_TECH_ELECTRON 0x03d9U // Shenzhen Sinote Tech-Electron Co., Ltd +#define UHS_VID_BERND_WALTER_COMPUTER_TECHNOLOGY 0x03daU // Bernd Walter Computer Technology +#define UHS_VID_ENDPOINTS 0x03e8U // EndPoints, Inc. +#define UHS_VID_THESYS_MICROELECTRONICS 0x03e9U // Thesys Microelectronics +#define UHS_VID_DATA_BROADCASTING 0x03eaU // Data Broadcasting Corp. +#define UHS_VID_ATMEL 0x03ebU // Atmel Corp. +#define UHS_VID_IWATSU_AMERICA 0x03ecU // Iwatsu America, Inc. +#define UHS_VID_MITEL 0x03edU // Mitel Corp. +#define UHS_VID_MITSUMI 0x03eeU // Mitsumi +#define UHS_VID_HEWLETT_PACKARD 0x03f0U // Hewlett-Packard +#define UHS_VID_GENOA_TECHNOLOGY 0x03f1U // Genoa Technology +#define UHS_VID_OAK_TECHNOLOGY 0x03f2U // Oak Technology, Inc. +#define UHS_VID_ADAPTEC 0x03f3U // Adaptec, Inc. +#define UHS_VID_DIEBOLD 0x03f4U // Diebold, Inc. +#define UHS_VID_SIEMENS_ELECTROMECHANICAL 0x03f5U // Siemens Electromechanical +#define UHS_VID_EPSON_IMAGING_TECHNOLOGY_CENTER 0x03f8U // Epson Imaging Technology Center +#define UHS_VID_KEYTRONIC 0x03f9U // KeyTronic Corp. +#define UHS_VID_OPTI 0x03fbU // OPTi, Inc. +#define UHS_VID_ELITEGROUP_COMPUTER_SYSTEMS 0x03fcU // Elitegroup Computer Systems +#define UHS_VID_XILINX 0x03fdU // Xilinx, Inc. +#define UHS_VID_FARALLON_COMUNICATIONS 0x03feU // Farallon Comunications +#define UHS_VID_NATIONAL_SEMICONDUCTOR 0x0400U // National Semiconductor Corp. +#define UHS_VID_NATIONAL_REGISTRY 0x0401U // National Registry, Inc. +#define UHS_VID_ALI 0x0402U // ALi Corp. +#define UHS_VID_FUTURE_TECHNOLOGY_DEVICES_INTERNATIONAL 0x0403U // Future Technology Devices International, Ltd +#define UHS_VID_NCR 0x0404U // NCR Corp. +#define UHS_VID_SYNOPSYS 0x0405U // Synopsys, Inc. +#define UHS_VID_FUJITSU_ICL_COMPUTERS 0x0406U // Fujitsu-ICL Computers +#define UHS_VID_FUJITSU_PERSONAL_SYSTEMS 0x0407U // Fujitsu Personal Systems, Inc. +#define UHS_VID_QUANTA_COMPUTER 0x0408U // Quanta Computer, Inc. +#define UHS_VID_NEC 0x0409U // NEC Corp. +#define UHS_VID_KODAK 0x040aU // Kodak Co. +#define UHS_VID_WELTREND_SEMICONDUCTOR 0x040bU // Weltrend Semiconductor +#define UHS_VID_VTECH_COMPUTERS 0x040cU // VTech Computers, Ltd +#define UHS_VID_VIA_TECHNOLOGIES 0x040dU // VIA Technologies, Inc. +#define UHS_VID_MCCI 0x040eU // MCCI +#define UHS_VID_ECHO_SPEECH 0x040fU // Echo Speech Corp. +#define UHS_VID_BUFFALO_INC_FORMERLY_MELCO 0x0411U // BUFFALO INC. (formerly MelCo., Inc.) +#define UHS_VID_AWARD_SOFTWARE_INTERNATIONAL 0x0412U // Award Software International +#define UHS_VID_LEADTEK_RESEARCH 0x0413U // Leadtek Research, Inc. +#define UHS_VID_GIGA_BYTE_TECHNOLOGY 0x0414U // Giga-Byte Technology Co., Ltd +#define UHS_VID_WINBOND_ELECTRONICS 0x0416U // Winbond Electronics Corp. +#define UHS_VID_SYMBIOS_LOGIC 0x0417U // Symbios Logic +#define UHS_VID_AST_RESEARCH 0x0418U // AST Research +#define UHS_VID_SAMSUNG_INFO_SYSTEMS_AMERICA 0x0419U // Samsung Info. Systems America, Inc. +#define UHS_VID_PHOENIX_TECHNOLOGIES 0x041aU // Phoenix Technologies, Ltd +#define UHS_VID_DTV 0x041bU // d'TV +#define UHS_VID_S3 0x041dU // S3, Inc. +#define UHS_VID_CREATIVE_TECHNOLOGY 0x041eU // Creative Technology, Ltd +#define UHS_VID_LCS_TELEGRAPHICS 0x041fU // LCS Telegraphics +#define UHS_VID_CHIPS_AND_TECHNOLOGIES 0x0420U // Chips and Technologies +#define UHS_VID_NOKIA_MOBILE_PHONES 0x0421U // Nokia Mobile Phones +#define UHS_VID_ADI_SYSTEMS 0x0422U // ADI Systems, Inc. +#define UHS_VID_COMPUTER_ACCESS_TECHNOLOGY 0x0423U // Computer Access Technology Corp. +#define UHS_VID_STANDARD_MICROSYSTEMS 0x0424U // Standard Microsystems Corp. +#define UHS_VID_MOTOROLA_SEMICONDUCTORS_HK 0x0425U // Motorola Semiconductors HK, Ltd +#define UHS_VID_INTEGRATED_DEVICE_TECHNOLOGY 0x0426U // Integrated Device Technology, Inc. +#define UHS_VID_MOTOROLA_ELECTRONICS_TAIWAN 0x0427U // Motorola Electronics Taiwan, Ltd +#define UHS_VID_ADVANCED_GRAVIS_COMPUTER_TECH 0x0428U // Advanced Gravis Computer Tech, Ltd +#define UHS_VID_CIRRUS_LOGIC 0x0429U // Cirrus Logic +#define UHS_VID_ERICSSON_AUSTRIAN_AG 0x042aU // Ericsson Austrian, AG +#define UHS_VID_INTEL 0x042bU // Intel Corp. +#define UHS_VID_INNOVATIVE_SEMICONDUCTORS 0x042cU // Innovative Semiconductors, Inc. +#define UHS_VID_MICRONICS 0x042dU // Micronics +#define UHS_VID_ACER 0x042eU // Acer, Inc. +#define UHS_VID_MOLEX 0x042fU // Molex, Inc. +#define UHS_VID_SUN_MICROSYSTEMS 0x0430U // Sun Microsystems, Inc. +#define UHS_VID_ITAC_SYSTEMS 0x0431U // Itac Systems, Inc. +#define UHS_VID_UNISYS 0x0432U // Unisys Corp. +#define UHS_VID_ALPS_ELECTRIC 0x0433U // Alps Electric, Inc. +#define UHS_VID_SAMSUNG_INFO_SYSTEMS_AMERICA_1 0x0434U // Samsung Info. Systems America, Inc. +#define UHS_VID_HYUNDAI_ELECTRONICS_AMERICA 0x0435U // Hyundai Electronics America +#define UHS_VID_TAUGAGREINING_HF 0x0436U // Taugagreining HF +#define UHS_VID_FRAMATOME_CONNECTORS_USA 0x0437U // Framatome Connectors USA +#define UHS_VID_ADVANCED_MICRO_DEVICES 0x0438U // Advanced Micro Devices, Inc. +#define UHS_VID_VOICE_TECHNOLOGIES_GROUP 0x0439U // Voice Technologies Group +#define UHS_VID_LEXMARK_INTERNATIONAL 0x043dU // Lexmark International, Inc. +#define UHS_VID_LG_ELECTRONICS_USA 0x043eU // LG Electronics USA, Inc. +#define UHS_VID_RADISYS 0x043fU // RadiSys Corp. +#define UHS_VID_EIZO_NANAO 0x0440U // Eizo Nanao Corp. +#define UHS_VID_WINBOND_SYSTEMS_LAB 0x0441U // Winbond Systems Lab. +#define UHS_VID_ERICSSON 0x0442U // Ericsson, Inc. +#define UHS_VID_GATEWAY 0x0443U // Gateway, Inc. +#define UHS_VID_LUCENT_TECHNOLOGIES 0x0445U // Lucent Technologies, Inc. +#define UHS_VID_NMB_TECHNOLOGIES 0x0446U // NMB Technologies Corp. +#define UHS_VID_MOMENTUM_MICROSYSTEMS 0x0447U // Momentum Microsystems +#define UHS_VID_SHAMROCK_TECH 0x044aU // Shamrock Tech. Co., Ltd +#define UHS_VID_WSI 0x044bU // WSI +#define UHS_VID_CCLITRI 0x044cU // CCL/ITRI +#define UHS_VID_SIEMENS_NIXDORF_AG 0x044dU // Siemens Nixdorf AG +#define UHS_VID_ALPS_ELECTRIC_1 0x044eU // Alps Electric Co., Ltd +#define UHS_VID_THRUSTMASTER 0x044fU // ThrustMaster, Inc. +#define UHS_VID_DFI 0x0450U // DFI, Inc. +#define UHS_VID_TEXAS_INSTRUMENTS 0x0451U // Texas Instruments, Inc. +#define UHS_VID_MITSUBISHI_ELECTRONICS_AMERICA 0x0452U // Mitsubishi Electronics America, Inc. +#define UHS_VID_CMD_TECHNOLOGY 0x0453U // CMD Technology +#define UHS_VID_VOBIS_MICROCOMPUTER_AG 0x0454U // Vobis Microcomputer AG +#define UHS_VID_TELEMATICS_INTERNATIONAL 0x0455U // Telematics International, Inc. +#define UHS_VID_ANALOG_DEVICES 0x0456U // Analog Devices, Inc. +#define UHS_VID_SILICON_INTEGRATED_SYSTEMS 0x0457U // Silicon Integrated Systems Corp. +#define UHS_VID_KYE_SYSTEMS_CORP_MOUSE_SYSTEMS 0x0458U // KYE Systems Corp. (Mouse Systems) +#define UHS_VID_ADOBE_SYSTEMS 0x0459U // Adobe Systems, Inc. +#define UHS_VID_SONICBLUE 0x045aU // SONICblue, Inc. +#define UHS_VID_HITACHI 0x045bU // Hitachi, Ltd +#define UHS_VID_NORTEL_NETWORKS 0x045dU // Nortel Networks, Ltd +#define UHS_VID_MICROSOFT 0x045eU // Microsoft Corp. +#define UHS_VID_ACE_CAD_ENTERPRISE 0x0460U // Ace Cad Enterprise Co., Ltd +#define UHS_VID_PRIMAX_ELECTRONICS 0x0461U // Primax Electronics, Ltd +#define UHS_VID_MGE_UPS_SYSTEMS 0x0463U // MGE UPS Systems +#define UHS_VID_AMPTYCOELECTRONICS 0x0464U // AMP/Tycoelectronics Corp. +#define UHS_VID_ATANDT_PARADYNE 0x0467U // AT&T Paradyne +#define UHS_VID_WIESON_TECHNOLOGIES 0x0468U // Wieson Technologies Co., Ltd +#define UHS_VID_CHERRY 0x046aU // Cherry GmbH +#define UHS_VID_AMERICAN_MEGATRENDS 0x046bU // American Megatrends, Inc. +#define UHS_VID_TOSHIBA_CORP_DIGITAL_MEDIA_EQUIPMENT 0x046cU // Toshiba Corp., Digital Media Equipment +#define UHS_VID_LOGITECH 0x046dU // Logitech, Inc. +#define UHS_VID_BEHAVIOR_TECH_COMPUTER 0x046eU // Behavior Tech. Computer Corp. +#define UHS_VID_CRYSTAL_SEMICONDUCTOR 0x046fU // Crystal Semiconductor +#define UHS_VID_PHILIPS_OR_NXP 0x0471U // Philips (or NXP) +#define UHS_VID_CHICONY_ELECTRONICS 0x0472U // Chicony Electronics Co., Ltd +#define UHS_VID_SANYO_INFORMATION_BUSINESS 0x0473U // Sanyo Information Business Co., Ltd +#define UHS_VID_SANYO_ELECTRIC 0x0474U // Sanyo Electric Co., Ltd +#define UHS_VID_RELISYSTECO_INFORMATION_SYSTEM 0x0475U // Relisys/Teco Information System +#define UHS_VID_AESP 0x0476U // AESP +#define UHS_VID_SEAGATE_TECHNOLOGY 0x0477U // Seagate Technology, Inc. +#define UHS_VID_CONNECTIX 0x0478U // Connectix Corp. +#define UHS_VID_ADVANCED_PERIPHERAL_LABORATORIES 0x0479U // Advanced Peripheral Laboratories +#define UHS_VID_SEMTECH 0x047aU // Semtech Corp. +#define UHS_VID_SILITEK 0x047bU // Silitek Corp. +#define UHS_VID_DELL_COMPUTER 0x047cU // Dell Computer Corp. +#define UHS_VID_KENSINGTON 0x047dU // Kensington +#define UHS_VID_AGERE_SYSTEMS_INC_LUCENT 0x047eU // Agere Systems, Inc. (Lucent) +#define UHS_VID_PLANTRONICS 0x047fU // Plantronics, Inc. +#define UHS_VID_TOSHIBA_AMERICA 0x0480U // Toshiba America Inc +#define UHS_VID_ZENITH_DATA_SYSTEMS 0x0481U // Zenith Data Systems +#define UHS_VID_KYOCERA 0x0482U // Kyocera Corp. +#define UHS_VID_STMICROELECTRONICS 0x0483U // STMicroelectronics +#define UHS_VID_SPECIALIX 0x0484U // Specialix +#define UHS_VID_NOKIA_MONITORS 0x0485U // Nokia Monitors +#define UHS_VID_ASUS_COMPUTERS 0x0486U // ASUS Computers, Inc. +#define UHS_VID_STEWART_CONNECTOR 0x0487U // Stewart Connector +#define UHS_VID_CIRQUE 0x0488U // Cirque Corp. +#define UHS_VID_FOXCONN_HON_HAI 0x0489U // Foxconn / Hon Hai +#define UHS_VID_S_MOS_SYSTEMS 0x048aU // S-MOS Systems, Inc. +#define UHS_VID_ALPS_ELECTRIC_IRELAND 0x048cU // Alps Electric Ireland, Ltd +#define UHS_VID_INTEGRATED_TECHNOLOGY_EXPRESS 0x048dU // Integrated Technology Express, Inc. +#define UHS_VID_EICON_TECH 0x048fU // Eicon Tech. +#define UHS_VID_UNITED_MICROELECTRONICS 0x0490U // United Microelectronics Corp. +#define UHS_VID_CAPETRONIC 0x0491U // Capetronic +#define UHS_VID_SAMSUNG_SEMICONDUCTOR 0x0492U // Samsung SemiConductor, Inc. +#define UHS_VID_MAG_TECHNOLOGY 0x0493U // MAG Technology Co., Ltd +#define UHS_VID_ESS_TECHNOLOGY 0x0495U // ESS Technology, Inc. +#define UHS_VID_MICRON_ELECTRONICS 0x0496U // Micron Electronics +#define UHS_VID_SMILE_INTERNATIONAL 0x0497U // Smile International +#define UHS_VID_CAPETRONIC_KAOHSIUNG 0x0498U // Capetronic (Kaohsiung) Corp. +#define UHS_VID_YAMAHA 0x0499U // Yamaha Corp. +#define UHS_VID_GANDALF_TECHNOLOGIES 0x049aU // Gandalf Technologies, Ltd +#define UHS_VID_CURTIS_COMPUTER_PRODUCTS 0x049bU // Curtis Computer Products +#define UHS_VID_ACER_ADVANCED_LABS 0x049cU // Acer Advanced Labs, Inc. +#define UHS_VID_VLSI_TECHNOLOGY 0x049dU // VLSI Technology +#define UHS_VID_COMPAQ_COMPUTER 0x049fU // Compaq Computer Corp. +#define UHS_VID_DIGITAL_EQUIPMENT 0x04a0U // Digital Equipment Corp. +#define UHS_VID_SYSTEMSOFT 0x04a1U // SystemSoft Corp. +#define UHS_VID_FIREPOWER_SYSTEMS 0x04a2U // FirePower Systems +#define UHS_VID_TRIDENT_MICROSYSTEMS 0x04a3U // Trident Microsystems, Inc. +#define UHS_VID_HITACHI_1 0x04a4U // Hitachi, Ltd +#define UHS_VID_ACER_PERIPHERALS_INC_NOW_BENQ 0x04a5U // Acer Peripherals Inc. (now BenQ Corp.) +#define UHS_VID_NOKIA_DISPLAY_PRODUCTS 0x04a6U // Nokia Display Products +#define UHS_VID_VISIONEER 0x04a7U // Visioneer +#define UHS_VID_MULTIVIDEO_LABS 0x04a8U // Multivideo Labs, Inc. +#define UHS_VID_CANON 0x04a9U // Canon, Inc. +#define UHS_VID_DAEWOO_TELECOM 0x04aaU // DaeWoo Telecom, Ltd +#define UHS_VID_CHROMATIC_RESEARCH 0x04abU // Chromatic Research +#define UHS_VID_MICRO_AUDIOMETRICS 0x04acU // Micro Audiometrics Corp. +#define UHS_VID_DOOIN_ELECTRONICS 0x04adU // Dooin Electronics +#define UHS_VID_WINNOV_LP 0x04afU // Winnov L.P. +#define UHS_VID_NIKON 0x04b0U // Nikon Corp. +#define UHS_VID_PAN_INTERNATIONAL 0x04b1U // Pan International +#define UHS_VID_IBM 0x04b3U // IBM Corp. +#define UHS_VID_CYPRESS_SEMICONDUCTOR 0x04b4U // Cypress Semiconductor Corp. +#define UHS_VID_ROHM_LSI_SYSTEMS_USA 0x04b5U // ROHM LSI Systems USA, LLC +#define UHS_VID_HINT 0x04b6U // Hint Corp. +#define UHS_VID_COMPAL_ELECTRONICS 0x04b7U // Compal Electronics, Inc. +#define UHS_VID_SEIKO_EPSON 0x04b8U // Seiko Epson Corp. +#define UHS_VID_RAINBOW_TECHNOLOGIES 0x04b9U // Rainbow Technologies, Inc. +#define UHS_VID_TOUCAN_SYSTEMS 0x04baU // Toucan Systems, Ltd +#define UHS_VID_I_O_DATA_DEVICE 0x04bbU // I-O Data Device, Inc. +#define UHS_VID_TOSHIBA_ELECTRONICS_TAIWAN 0x04bdU // Toshiba Electronics Taiwan Corp. +#define UHS_VID_TELIA_RESEARCH 0x04beU // Telia Research AB +#define UHS_VID_TDK 0x04bfU // TDK Corp. +#define UHS_VID_US_ROBOTICS_3COM 0x04c1U // U.S. Robotics (3Com) +#define UHS_VID_METHODE_ELECTRONICS_FAR_EAST_PTE 0x04c2U // Methode Electronics Far East PTE, Ltd +#define UHS_VID_MAXI_SWITCH 0x04c3U // Maxi Switch, Inc. +#define UHS_VID_LOCKHEED_MARTIN_ENERGY_RESEARCH 0x04c4U // Lockheed Martin Energy Research +#define UHS_VID_FUJITSU 0x04c5U // Fujitsu, Ltd +#define UHS_VID_TOSHIBA_AMERICA_ELECTRONIC_COMPONENTS 0x04c6U // Toshiba America Electronic Components +#define UHS_VID_MICRO_MACRO_TECHNOLOGIES 0x04c7U // Micro Macro Technologies +#define UHS_VID_KONICA 0x04c8U // Konica Corp. +#define UHS_VID_LITE_ON_TECHNOLOGY 0x04caU // Lite-On Technology Corp. +#define UHS_VID_FUJI_PHOTO_FILM 0x04cbU // Fuji Photo Film Co., Ltd +#define UHS_VID_ST_ERICSSON 0x04ccU // ST-Ericsson +#define UHS_VID_TATUNG_CO_OF_AMERICA 0x04cdU // Tatung Co. Of America +#define UHS_VID_SCANLOGIC 0x04ceU // ScanLogic Corp. +#define UHS_VID_MYSON_CENTURY 0x04cfU // Myson Century, Inc. +#define UHS_VID_DIGI_INTERNATIONAL 0x04d0U // Digi International +#define UHS_VID_ITT_CANON 0x04d1U // ITT Canon +#define UHS_VID_ALTEC_LANSING_TECHNOLOGIES 0x04d2U // Altec Lansing Technologies +#define UHS_VID_VIDUS 0x04d3U // VidUS, Inc. +#define UHS_VID_LSI_LOGIC 0x04d4U // LSI Logic, Inc. +#define UHS_VID_FORTE_TECHNOLOGIES 0x04d5U // Forte Technologies, Inc. +#define UHS_VID_MENTOR_GRAPHICS 0x04d6U // Mentor Graphics +#define UHS_VID_OKI_SEMICONDUCTOR 0x04d7U // Oki Semiconductor +#define UHS_VID_MICROCHIP_TECHNOLOGY 0x04d8U // Microchip Technology, Inc. +#define UHS_VID_HOLTEK_SEMICONDUCTOR 0x04d9U // Holtek Semiconductor, Inc. +#define UHS_VID_PANASONIC_MATSUSHITA 0x04daU // Panasonic (Matsushita) +#define UHS_VID_HYPERTEC_PTY 0x04dbU // Hypertec Pty, Ltd +#define UHS_VID_HUAN_HSIN_HOLDINGS 0x04dcU // Huan Hsin Holdings, Ltd +#define UHS_VID_SHARP 0x04ddU // Sharp Corp. +#define UHS_VID_MINDSHARE 0x04deU // MindShare, Inc. +#define UHS_VID_INTERLINK_ELECTRONICS 0x04dfU // Interlink Electronics +#define UHS_VID_IIYAMA_NORTH_AMERICA 0x04e1U // Iiyama North America, Inc. +#define UHS_VID_EXAR 0x04e2U // Exar Corp. +#define UHS_VID_ZILOG 0x04e3U // Zilog, Inc. +#define UHS_VID_ACC_MICROELECTRONICS 0x04e4U // ACC Microelectronics +#define UHS_VID_PROMISE_TECHNOLOGY 0x04e5U // Promise Technology +#define UHS_VID_SCM_MICROSYSTEMS 0x04e6U // SCM Microsystems, Inc. +#define UHS_VID_ELO_TOUCHSYSTEMS 0x04e7U // Elo TouchSystems +#define UHS_VID_SAMSUNG_ELECTRONICS 0x04e8U // Samsung Electronics Co., Ltd +#define UHS_VID_PC_TEL 0x04e9U // PC-Tel, Inc. +#define UHS_VID_BROOKTREE 0x04eaU // Brooktree Corp. +#define UHS_VID_NORTHSTAR_SYSTEMS 0x04ebU // Northstar Systems, Inc. +#define UHS_VID_TOKYO_ELECTRON_DEVICE 0x04ecU // Tokyo Electron Device, Ltd +#define UHS_VID_ANNABOOKS 0x04edU // Annabooks +#define UHS_VID_PACIFIC_ELECTRONIC_INTERNATIONAL 0x04efU // Pacific Electronic International, Inc. +#define UHS_VID_DAEWOO_ELECTRONICS 0x04f0U // Daewoo Electronics Co., Ltd +#define UHS_VID_VICTOR_COMPANY_OF_JAPAN 0x04f1U // Victor Company of Japan, Ltd +#define UHS_VID_CHICONY_ELECTRONICS_1 0x04f2U // Chicony Electronics Co., Ltd +#define UHS_VID_ELAN_MICROELECTRONICS 0x04f3U // Elan Microelectronics Corp. +#define UHS_VID_HARTING_ELEKTRONIK 0x04f4U // Harting Elektronik, Inc. +#define UHS_VID_FUJITSU_ICL_SYSTEMS 0x04f5U // Fujitsu-ICL Systems, Inc. +#define UHS_VID_NORAND 0x04f6U // Norand Corp. +#define UHS_VID_NEWNEX_TECHNOLOGY 0x04f7U // Newnex Technology Corp. +#define UHS_VID_FUTUREPLUS_SYSTEMS 0x04f8U // FuturePlus Systems +#define UHS_VID_BROTHER_INDUSTRIES 0x04f9U // Brother Industries, Ltd +#define UHS_VID_DALLAS_SEMICONDUCTOR 0x04faU // Dallas Semiconductor +#define UHS_VID_BIOSTAR_MICROTECH_INTERNATIONAL 0x04fbU // Biostar Microtech International Corp. +#define UHS_VID_SUNPLUS_TECHNOLOGY 0x04fcU // Sunplus Technology Co., Ltd +#define UHS_VID_SOLITON_SYSTEMS_KK 0x04fdU // Soliton Systems, K.K. +#define UHS_VID_PFU 0x04feU // PFU, Ltd +#define UHS_VID_E_CMOS 0x04ffU // E-CMOS Corp. +#define UHS_VID_SIAM_UNITED_HI_TECH 0x0500U // Siam United Hi-Tech +#define UHS_VID_FUJIKURA_DDK 0x0501U // Fujikura DDK, Ltd +#define UHS_VID_ACER_1 0x0502U // Acer, Inc. +#define UHS_VID_HITACHI_AMERICA 0x0503U // Hitachi America, Ltd +#define UHS_VID_HAYES_MICROCOMPUTER_PRODUCTS 0x0504U // Hayes Microcomputer Products +#define UHS_VID_3COM 0x0506U // 3Com Corp. +#define UHS_VID_HOSIDEN 0x0507U // Hosiden Corp. +#define UHS_VID_CLARION 0x0508U // Clarion Co., Ltd +#define UHS_VID_AZTECH_SYSTEMS 0x0509U // Aztech Systems, Ltd +#define UHS_VID_CINCH_CONNECTORS 0x050aU // Cinch Connectors +#define UHS_VID_CABLE_SYSTEM_INTERNATIONAL 0x050bU // Cable System International +#define UHS_VID_INNOMEDIA 0x050cU // InnoMedia, Inc. +#define UHS_VID_BELKIN_COMPONENTS 0x050dU // Belkin Components +#define UHS_VID_NEON_TECHNOLOGY 0x050eU // Neon Technology, Inc. +#define UHS_VID_KC_TECHNOLOGY 0x050fU // KC Technology, Inc. +#define UHS_VID_SEJIN_ELECTRON 0x0510U // Sejin Electron, Inc. +#define UHS_VID_NABLE_DATABOOK_TECHNOLOGIES 0x0511U // N'Able (DataBook) Technologies, Inc. +#define UHS_VID_HUALON_MICROELECTRONICS 0x0512U // Hualon Microelectronics Corp. +#define UHS_VID_DIGITAL_X 0x0513U // digital-X, Inc. +#define UHS_VID_FCI_ELECTRONICS 0x0514U // FCI Electronics +#define UHS_VID_ACTC 0x0515U // ACTC +#define UHS_VID_LONGWELL_ELECTRONICS 0x0516U // Longwell Electronics +#define UHS_VID_BUTTERFLY_COMMUNICATIONS 0x0517U // Butterfly Communications +#define UHS_VID_EZKEY 0x0518U // EzKEY Corp. +#define UHS_VID_STAR_MICRONICS 0x0519U // Star Micronics Co., Ltd +#define UHS_VID_WYSE_TECHNOLOGY 0x051aU // WYSE Technology +#define UHS_VID_SILICON_GRAPHICS 0x051bU // Silicon Graphics +#define UHS_VID_SHUTTLE 0x051cU // Shuttle, Inc. +#define UHS_VID_AMERICAN_POWER_CONVERSION 0x051dU // American Power Conversion +#define UHS_VID_SCIENTIFIC_ATLANTA 0x051eU // Scientific Atlanta, Inc. +#define UHS_VID_IO_SYSTEMS_ELITE_ELECTRONICS 0x051fU // IO Systems (Elite Electronics), Inc. +#define UHS_VID_TAIWAN_SEMICONDUCTOR_MANUFACTURING 0x0520U // Taiwan Semiconductor Manufacturing Co. +#define UHS_VID_AIRBORN_CONNECTORS 0x0521U // Airborn Connectors +#define UHS_VID_ADVANCED_CONNECTEK 0x0522U // Advanced Connectek, Inc. +#define UHS_VID_ATEN 0x0523U // ATEN GmbH +#define UHS_VID_SOLA_ELECTRONICS 0x0524U // Sola Electronics +#define UHS_VID_NETCHIP_TECHNOLOGY 0x0525U // Netchip Technology, Inc. +#define UHS_VID_TEMIC_MHS 0x0526U // Temic MHS S.A. +#define UHS_VID_ALTRA 0x0527U // ALTRA +#define UHS_VID_ATI_TECHNOLOGIES 0x0528U // ATI Technologies, Inc. +#define UHS_VID_ALADDIN_KNOWLEDGE_SYSTEMS 0x0529U // Aladdin Knowledge Systems +#define UHS_VID_CRESCENT_HEART_SOFTWARE 0x052aU // Crescent Heart Software +#define UHS_VID_TEKOM_TECHNOLOGIES 0x052bU // Tekom Technologies, Inc. +#define UHS_VID_CANON_INFORMATION_SYSTEMS 0x052cU // Canon Information Systems, Inc. +#define UHS_VID_AVID_ELECTRONICS 0x052dU // Avid Electronics Corp. +#define UHS_VID_STANDARD_MICROSYSTEMS_1 0x052eU // Standard Microsystems Corp. +#define UHS_VID_UNICORE_SOFTWARE 0x052fU // Unicore Software, Inc. +#define UHS_VID_AMERICAN_MICROSYSTEMS 0x0530U // American Microsystems, Inc. +#define UHS_VID_WACOM_TECHNOLOGY 0x0531U // Wacom Technology Corp. +#define UHS_VID_SYSTECH 0x0532U // Systech Corp. +#define UHS_VID_ALCATEL_MOBILE_PHONES 0x0533U // Alcatel Mobile Phones +#define UHS_VID_MOTOROLA 0x0534U // Motorola, Inc. +#define UHS_VID_LIH_TZU_ELECTRIC 0x0535U // LIH TZU Electric Co., Ltd +#define UHS_VID_HAND_HELD_PRODUCTS_WELCH_ALLYN 0x0536U // Hand Held Products (Welch Allyn, Inc.) +#define UHS_VID_INVENTEC 0x0537U // Inventec Corp. +#define UHS_VID_CALDERA_INTERNATIONAL_INC_SCO 0x0538U // Caldera International, Inc. (SCO) +#define UHS_VID_SHYH_SHIUN_TERMINALS 0x0539U // Shyh Shiun Terminals Co., Ltd +#define UHS_VID_PREHKEYTEC 0x053aU // PrehKeyTec GmbH +#define UHS_VID_GLOBAL_VILLAGE_COMMUNICATION 0x053bU // Global Village Communication +#define UHS_VID_INSTITUT_OF_MICROELECTRONIC_AND_MECHATRONIC_SYSTEMS 0x053cU // Institut of Microelectronic & Mechatronic Systems +#define UHS_VID_SILICON_ARCHITECT 0x053dU // Silicon Architect +#define UHS_VID_MOBILITY_ELECTRONICS 0x053eU // Mobility Electronics +#define UHS_VID_SYNOPSYS_1 0x053fU // Synopsys, Inc. +#define UHS_VID_UNIACCESS 0x0540U // UniAccess AB +#define UHS_VID_SIRF_TECHNOLOGY 0x0541U // Sirf Technology, Inc. +#define UHS_VID_VIEWSONIC 0x0543U // ViewSonic Corp. +#define UHS_VID_CRISTIE_ELECTRONICS 0x0544U // Cristie Electronics, Ltd +#define UHS_VID_XIRLINK 0x0545U // Xirlink, Inc. +#define UHS_VID_POLAROID 0x0546U // Polaroid Corp. +#define UHS_VID_ANCHOR_CHIPS 0x0547U // Anchor Chips, Inc. +#define UHS_VID_TYAN_COMPUTER 0x0548U // Tyan Computer Corp. +#define UHS_VID_PIXERA 0x0549U // Pixera Corp. +#define UHS_VID_FUJITSU_MICROELECTRONICS 0x054aU // Fujitsu Microelectronics, Inc. +#define UHS_VID_NEW_MEDIA 0x054bU // New Media Corp. +#define UHS_VID_SONY 0x054cU // Sony Corp. +#define UHS_VID_TRY 0x054dU // Try Corp. +#define UHS_VID_PROSIDE 0x054eU // Proside Corp. +#define UHS_VID_WYSE_TECHNOLOGY_TAIWAN 0x054fU // WYSE Technology Taiwan +#define UHS_VID_FUJI_XEROX 0x0550U // Fuji Xerox Co., Ltd +#define UHS_VID_COMPUTREND_SYSTEMS 0x0551U // CompuTrend Systems, Inc. +#define UHS_VID_PHILIPS_MONITORS 0x0552U // Philips Monitors +#define UHS_VID_STMICROELECTRONICS_IMAGING_DIVISION_VLSI_VISION 0x0553U // STMicroelectronics Imaging Division (VLSI Vision) +#define UHS_VID_DICTAPHONE 0x0554U // Dictaphone Corp. +#define UHS_VID_ANAM_SANDT 0x0555U // ANAM S&T Co., Ltd +#define UHS_VID_ASAHI_KASEI_MICROSYSTEMS 0x0556U // Asahi Kasei Microsystems Co., Ltd +#define UHS_VID_ATEN_INTERNATIONAL 0x0557U // ATEN International Co., Ltd +#define UHS_VID_TRUEVISION 0x0558U // Truevision, Inc. +#define UHS_VID_CADENCE_DESIGN_SYSTEMS 0x0559U // Cadence Design Systems, Inc. +#define UHS_VID_KENWOOD_USA 0x055aU // Kenwood USA +#define UHS_VID_KNOWLEDGETEK 0x055bU // KnowledgeTek, Inc. +#define UHS_VID_PROTON_ELECTRONIC_IND 0x055cU // Proton Electronic Ind. +#define UHS_VID_SAMSUNG_ELECTRO_MECHANICS 0x055dU // Samsung Electro-Mechanics Co. +#define UHS_VID_CTX_OPTO_ELECTRONICS 0x055eU // CTX Opto-Electronics Corp. +#define UHS_VID_MUSTEK_SYSTEMS 0x055fU // Mustek Systems, Inc. +#define UHS_VID_INTERFACE 0x0560U // Interface Corp. +#define UHS_VID_OASIS_DESIGN 0x0561U // Oasis Design, Inc. +#define UHS_VID_TELEX_COMMUNICATIONS 0x0562U // Telex Communications, Inc. +#define UHS_VID_IMMERSION 0x0563U // Immersion Corp. +#define UHS_VID_KODAK_DIGITAL_PRODUCT_CENTER_JAPAN_LTD_FORMERLY_CHINON_INDUSTRIES 0x0564U // Kodak Digital Product Center, Japan Ltd. (formerly Chinon Industries Inc.) +#define UHS_VID_PERACOM_NETWORKS 0x0565U // Peracom Networks, Inc. +#define UHS_VID_MONTEREY_INTERNATIONAL 0x0566U // Monterey International Corp. +#define UHS_VID_XYRATEX_INTERNATIONAL 0x0567U // Xyratex International, Ltd +#define UHS_VID_QUARTZ_INGENIERIE 0x0568U // Quartz Ingenierie +#define UHS_VID_SEGASOFT 0x0569U // SegaSoft +#define UHS_VID_WACOM 0x056aU // Wacom Co., Ltd +#define UHS_VID_DECICON 0x056bU // Decicon, Inc. +#define UHS_VID_ETEK_LABS 0x056cU // eTEK Labs +#define UHS_VID_EIZO 0x056dU // EIZO Corp. +#define UHS_VID_ELECOM 0x056eU // Elecom Co., Ltd +#define UHS_VID_KOREA_DATA_SYSTEMS 0x056fU // Korea Data Systems Co., Ltd +#define UHS_VID_EPSON_AMERICA 0x0570U // Epson America +#define UHS_VID_INTEREX 0x0571U // Interex, Inc. +#define UHS_VID_CONEXANT_SYSTEMS_ROCKWELL 0x0572U // Conexant Systems (Rockwell), Inc. +#define UHS_VID_ZORAN_CO_PERSONAL_MEDIA_DIVISION_NOGATECH 0x0573U // Zoran Co. Personal Media Division (Nogatech) +#define UHS_VID_CITY_UNIVERSITY_OF_HONG_KONG 0x0574U // City University of Hong Kong +#define UHS_VID_PHILIPS_CREATIVE_DISPLAY_SOLUTIONS 0x0575U // Philips Creative Display Solutions +#define UHS_VID_BAFOQUALITY_COMPUTER_ACCESSORIES 0x0576U // BAFO/Quality Computer Accessories +#define UHS_VID_ELSA 0x0577U // ELSA +#define UHS_VID_INTRINSIX 0x0578U // Intrinsix Corp. +#define UHS_VID_GVC 0x0579U // GVC Corp. +#define UHS_VID_SAMSUNG_ELECTRONICS_AMERICA 0x057aU // Samsung Electronics America +#define UHS_VID_Y_E_DATA 0x057bU // Y-E Data, Inc. +#define UHS_VID_AVM 0x057cU // AVM GmbH +#define UHS_VID_SHARK_MULTIMEDIA 0x057dU // Shark Multimedia, Inc. +#define UHS_VID_NINTENDO 0x057eU // Nintendo Co., Ltd +#define UHS_VID_QUICKSHOT 0x057fU // QuickShot, Ltd +#define UHS_VID_DENRON 0x0580U // Denron, Inc. +#define UHS_VID_RACAL_DATA_GROUP 0x0581U // Racal Data Group +#define UHS_VID_ROLAND 0x0582U // Roland Corp. +#define UHS_VID_PADIX_CO_LTD_ROCKFIRE 0x0583U // Padix Co., Ltd (Rockfire) +#define UHS_VID_RATOC_SYSTEM 0x0584U // RATOC System, Inc. +#define UHS_VID_FLASHPOINT_TECHNOLOGY 0x0585U // FlashPoint Technology, Inc. +#define UHS_VID_ZYXEL_COMMUNICATIONS 0x0586U // ZyXEL Communications Corp. +#define UHS_VID_AMERICA_KOTOBUKI_ELECTRONICS_INDUSTRIES 0x0587U // America Kotobuki Electronics Industries, Inc. +#define UHS_VID_SAPIEN_DESIGN 0x0588U // Sapien Design +#define UHS_VID_VICTRON 0x0589U // Victron +#define UHS_VID_NOHAU 0x058aU // Nohau Corp. +#define UHS_VID_INFINEON_TECHNOLOGIES 0x058bU // Infineon Technologies +#define UHS_VID_IN_FOCUS_SYSTEMS 0x058cU // In Focus Systems +#define UHS_VID_MICREL_SEMICONDUCTOR 0x058dU // Micrel Semiconductor +#define UHS_VID_TRIPATH_TECHNOLOGY 0x058eU // Tripath Technology, Inc. +#define UHS_VID_ALCOR_MICRO 0x058fU // Alcor Micro Corp. +#define UHS_VID_OMRON 0x0590U // Omron Corp. +#define UHS_VID_QUESTRA_CONSULTING 0x0591U // Questra Consulting +#define UHS_VID_POWERWARE 0x0592U // Powerware Corp. +#define UHS_VID_INCITE 0x0593U // Incite +#define UHS_VID_PRINCETON_GRAPHIC_SYSTEMS 0x0594U // Princeton Graphic Systems +#define UHS_VID_ZORAN_MICROELECTRONICS 0x0595U // Zoran Microelectronics, Ltd +#define UHS_VID_MICROTOUCH_SYSTEMS 0x0596U // MicroTouch Systems, Inc. +#define UHS_VID_TRISIGNAL_COMMUNICATIONS 0x0597U // Trisignal Communications +#define UHS_VID_NIIGATA_CANOTEC 0x0598U // Niigata Canotec Co., Inc. +#define UHS_VID_BRILLIANCE_SEMICONDUCTOR 0x0599U // Brilliance Semiconductor, Inc. +#define UHS_VID_SPECTRUM_SIGNAL_PROCESSING 0x059aU // Spectrum Signal Processing, Inc. +#define UHS_VID_IOMEGA 0x059bU // Iomega Corp. +#define UHS_VID_A_TREND_TECHNOLOGY 0x059cU // A-Trend Technology Co., Ltd +#define UHS_VID_ADVANCED_INPUT_DEVICES 0x059dU // Advanced Input Devices +#define UHS_VID_INTELLIGENT_INSTRUMENTATION 0x059eU // Intelligent Instrumentation +#define UHS_VID_LACIE 0x059fU // LaCie, Ltd +#define UHS_VID_VETRONIX 0x05a0U // Vetronix Corp. +#define UHS_VID_USC 0x05a1U // USC Corp. +#define UHS_VID_FUJI_FILM_MICRODEVICES 0x05a2U // Fuji Film Microdevices Co., Ltd +#define UHS_VID_ARC_INTERNATIONAL 0x05a3U // ARC International +#define UHS_VID_ORTEK_TECHNOLOGY 0x05a4U // Ortek Technology, Inc. +#define UHS_VID_SAMPO_TECHNOLOGY 0x05a5U // Sampo Technology Corp. +#define UHS_VID_CISCO_SYSTEMS 0x05a6U // Cisco Systems, Inc. +#define UHS_VID_BOSE 0x05a7U // Bose Corp. +#define UHS_VID_SPACETEC_IMC 0x05a8U // Spacetec IMC Corp. +#define UHS_VID_OMNIVISION_TECHNOLOGIES 0x05a9U // OmniVision Technologies, Inc. +#define UHS_VID_UTILUX_SOUTH_CHINA 0x05aaU // Utilux South China, Ltd +#define UHS_VID_IN_SYSTEM_DESIGN 0x05abU // In-System Design +#define UHS_VID_APPLE 0x05acU // Apple, Inc. +#define UHS_VID_YC_CABLE_USA 0x05adU // Y.C. Cable U.S.A., Inc. +#define UHS_VID_SYNOPSYS_2 0x05aeU // Synopsys, Inc. +#define UHS_VID_JING_MOLD_ENTERPRISE 0x05afU // Jing-Mold Enterprise Co., Ltd +#define UHS_VID_FOUNTAIN_TECHNOLOGIES 0x05b0U // Fountain Technologies, Inc. +#define UHS_VID_FIRST_INTERNATIONAL_COMPUTER 0x05b1U // First International Computer, Inc. +#define UHS_VID_LG_SEMICON 0x05b4U // LG Semicon Co., Ltd +#define UHS_VID_DIALOGIC 0x05b5U // Dialogic Corp. +#define UHS_VID_PROXIMA 0x05b6U // Proxima Corp. +#define UHS_VID_MEDIANIX_SEMICONDUCTOR 0x05b7U // Medianix Semiconductor, Inc. +#define UHS_VID_AGILER 0x05b8U // Agiler, Inc. +#define UHS_VID_PHILIPS_RESEARCH_LABORATORIES 0x05b9U // Philips Research Laboratories +#define UHS_VID_DIGITALPERSONA 0x05baU // DigitalPersona, Inc. +#define UHS_VID_GREY_CELL_SYSTEMS 0x05bbU // Grey Cell Systems +#define UHS_VID_3G_GREEN_GREEN_GLOBE 0x05bcU // 3G Green Green Globe Co., Ltd +#define UHS_VID_RAFI_GMBH_AND_CO_KG 0x05bdU // RAFI GmbH & Co. KG +#define UHS_VID_TYCO_ELECTRONICS_RAYCHEM 0x05beU // Tyco Electronics (Raychem) +#define UHS_VID_S_AND_S_RESEARCH 0x05bfU // S & S Research +#define UHS_VID_KEIL_SOFTWARE 0x05c0U // Keil Software +#define UHS_VID_KAWASAKI_MICROELECTRONICS 0x05c1U // Kawasaki Microelectronics, Inc. +#define UHS_VID_MEDIA_PHONICS_SUISSE 0x05c2U // Media Phonics (Suisse) S.A. +#define UHS_VID_DIGI_INTERNATIONAL_1 0x05c5U // Digi International, Inc. +#define UHS_VID_QUALCOMM 0x05c6U // Qualcomm, Inc. +#define UHS_VID_QTRONIX 0x05c7U // Qtronix Corp. +#define UHS_VID_CHENG_UEI_PRECISION_INDUSTRY_CO_LTD_FOXLINK 0x05c8U // Cheng Uei Precision Industry Co., Ltd (Foxlink) +#define UHS_VID_SEMTECH_1 0x05c9U // Semtech Corp. +#define UHS_VID_RICOH 0x05caU // Ricoh Co., Ltd +#define UHS_VID_POWERVISION_TECHNOLOGIES 0x05cbU // PowerVision Technologies, Inc. +#define UHS_VID_ELSA_AG 0x05ccU // ELSA AG +#define UHS_VID_SILICOM 0x05cdU // Silicom, Ltd +#define UHS_VID_SCI_WORX 0x05ceU // sci-worx GmbH +#define UHS_VID_SUNG_FORN 0x05cfU // Sung Forn Co., Ltd +#define UHS_VID_GE_MEDICAL_SYSTEMS_LUNAR 0x05d0U // GE Medical Systems Lunar +#define UHS_VID_BRAINBOXES 0x05d1U // Brainboxes, Ltd +#define UHS_VID_WAVE_SYSTEMS 0x05d2U // Wave Systems Corp. +#define UHS_VID_TOHOKU_RICOH 0x05d3U // Tohoku Ricoh Co., Ltd +#define UHS_VID_SUPER_GATE_TECHNOLOGY 0x05d5U // Super Gate Technology Co., Ltd +#define UHS_VID_PHILIPS_SEMICONDUCTORS_CICT 0x05d6U // Philips Semiconductors, CICT +#define UHS_VID_THOMAS_AND_BETTS 0x05d7U // Thomas & Betts Corp. +#define UHS_VID_ULTIMA_ELECTRONICS 0x05d8U // Ultima Electronics Corp. +#define UHS_VID_AXIOHM_TRANSACTION_SOLUTIONS 0x05d9U // Axiohm Transaction Solutions +#define UHS_VID_MICROTEK_INTERNATIONAL 0x05daU // Microtek International, Inc. +#define UHS_VID_SUN_CORP_SUNTAC_UNKNOWN 0x05dbU // Sun Corp. (Suntac?) +#define UHS_VID_LEXAR_MEDIA 0x05dcU // Lexar Media, Inc. +#define UHS_VID_DELTA_ELECTRONICS 0x05ddU // Delta Electronics, Inc. +#define UHS_VID_SILICON_VISION 0x05dfU // Silicon Vision, Inc. +#define UHS_VID_SYMBOL_TECHNOLOGIES 0x05e0U // Symbol Technologies +#define UHS_VID_SYNTEK_SEMICONDUCTOR 0x05e1U // Syntek Semiconductor Co., Ltd +#define UHS_VID_ELECVISION 0x05e2U // ElecVision, Inc. +#define UHS_VID_GENESYS_LOGIC 0x05e3U // Genesys Logic, Inc. +#define UHS_VID_RED_WING 0x05e4U // Red Wing Corp. +#define UHS_VID_FUJI_ELECTRIC 0x05e5U // Fuji Electric Co., Ltd +#define UHS_VID_KEITHLEY_INSTRUMENTS 0x05e6U // Keithley Instruments +#define UHS_VID_ICC 0x05e8U // ICC, Inc. +#define UHS_VID_KAWASAKI_LSI 0x05e9U // Kawasaki LSI +#define UHS_VID_FFC 0x05ebU // FFC, Ltd +#define UHS_VID_COM21 0x05ecU // COM21, Inc. +#define UHS_VID_CYTECHINFO 0x05eeU // Cytechinfo Inc. +#define UHS_VID_AVB_INC_ANKO_UNKNOWN_ 0x05efU // AVB, Inc. [anko?] +#define UHS_VID_CANOPUS 0x05f0U // Canopus Co., Ltd +#define UHS_VID_COMPASS_COMMUNICATIONS 0x05f1U // Compass Communications +#define UHS_VID_DEXIN 0x05f2U // Dexin Corp., Ltd +#define UHS_VID_PI_ENGINEERING 0x05f3U // PI Engineering, Inc. +#define UHS_VID_UNIXTAR_TECHNOLOGY 0x05f5U // Unixtar Technology, Inc. +#define UHS_VID_AOC_INTERNATIONAL 0x05f6U // AOC International +#define UHS_VID_RFC_DISTRIBUTIONS_PTE 0x05f7U // RFC Distribution(s) PTE, Ltd +#define UHS_VID_PSC_SCANNING 0x05f9U // PSC Scanning, Inc. +#define UHS_VID_SIEMENS_TELECOMMUNICATIONS_SYSTEMS 0x05faU // Siemens Telecommunications Systems, Ltd +#define UHS_VID_HARMAN 0x05fcU // Harman +#define UHS_VID_INTERACT 0x05fdU // InterAct, Inc. +#define UHS_VID_CHIC_TECHNOLOGY 0x05feU // Chic Technology Corp. +#define UHS_VID_LECROY 0x05ffU // LeCroy Corp. +#define UHS_VID_BARCO_DISPLAY_SYSTEMS 0x0600U // Barco Display Systems +#define UHS_VID_JAZZ_HIPSTER 0x0601U // Jazz Hipster Corp. +#define UHS_VID_VISTA_IMAGING 0x0602U // Vista Imaging, Inc. +#define UHS_VID_NOVATEK_MICROELECTRONICS 0x0603U // Novatek Microelectronics Corp. +#define UHS_VID_JEAN 0x0604U // Jean Co., Ltd +#define UHS_VID_ANCHOR_CANDC 0x0605U // Anchor C&C Co., Ltd +#define UHS_VID_ROYAL_INFORMATION_ELECTRONICS 0x0606U // Royal Information Electronics Co., Ltd +#define UHS_VID_BRIDGE_INFORMATION 0x0607U // Bridge Information Co., Ltd +#define UHS_VID_GENRAD_ADS 0x0608U // Genrad Ads +#define UHS_VID_SMK_MANUFACTURING 0x0609U // SMK Manufacturing, Inc. +#define UHS_VID_WORTHINGTON_DATA_SOLUTIONS 0x060aU // Worthington Data Solutions, Inc. +#define UHS_VID_SOLID_YEAR 0x060bU // Solid Year +#define UHS_VID_EEH_DATALINK 0x060cU // EEH Datalink GmbH +#define UHS_VID_AUCTOR 0x060dU // Auctor Corp. +#define UHS_VID_TRANSMONDE_TECHNOLOGIES 0x060eU // Transmonde Technologies, Inc. +#define UHS_VID_JOINSOON_ELECTRONICS_MFG 0x060fU // Joinsoon Electronics Mfg. Co., Ltd +#define UHS_VID_COSTAR_ELECTRONICS 0x0610U // Costar Electronics, Inc. +#define UHS_VID_TOTOKU_ELECTRIC 0x0611U // Totoku Electric Co., Ltd +#define UHS_VID_TRANSACT_TECHNOLOGIES 0x0613U // TransAct Technologies, Inc. +#define UHS_VID_BIO_RAD_LABORATORIES 0x0614U // Bio-Rad Laboratories +#define UHS_VID_QUABBIN_WIRE_AND_CABLE 0x0615U // Quabbin Wire & Cable Co., Inc. +#define UHS_VID_FUTURE_TECHNO_DESIGNS_PVT 0x0616U // Future Techno Designs PVT, Ltd +#define UHS_VID_SWISS_FEDERAL_INSITUTE_OF_TECHNOLOGY 0x0617U // Swiss Federal Insitute of Technology +#define UHS_VID_MACALLY 0x0618U // MacAlly +#define UHS_VID_SEIKO_INSTRUMENTS 0x0619U // Seiko Instruments, Inc. +#define UHS_VID_VERIDICOM_INTERNATIONAL 0x061aU // Veridicom International, Inc. +#define UHS_VID_PROMPTUS_COMMUNICATIONS 0x061bU // Promptus Communications, Inc. +#define UHS_VID_ACT_LABS 0x061cU // Act Labs, Ltd +#define UHS_VID_QUATECH 0x061dU // Quatech, Inc. +#define UHS_VID_NISSEI_ELECTRIC 0x061eU // Nissei Electric Co. +#define UHS_VID_ALARIS 0x0620U // Alaris, Inc. +#define UHS_VID_ODU_STECKVERBINDUNGSSYSTEME_GMBH_AND_CO_KG 0x0621U // ODU-Steckverbindungssysteme GmbH & Co. KG +#define UHS_VID_IOTECH 0x0622U // Iotech, Inc. +#define UHS_VID_LITTELFUSE 0x0623U // Littelfuse, Inc. +#define UHS_VID_AVOCENT 0x0624U // Avocent Corp. +#define UHS_VID_TIMEDIA_TECHNOLOGY 0x0625U // TiMedia Technology Co., Ltd +#define UHS_VID_NIPPON_SYSTEMS_DEVELOPMENT 0x0626U // Nippon Systems Development Co., Ltd +#define UHS_VID_ADOMAX_TECHNOLOGY 0x0627U // Adomax Technology Co., Ltd +#define UHS_VID_TASKING_SOFTWARE 0x0628U // Tasking Software, Inc. +#define UHS_VID_ZIDA_TECHNOLOGIES 0x0629U // Zida Technologies, Ltd +#define UHS_VID_CREATIVE_LABS 0x062aU // Creative Labs +#define UHS_VID_GREATLINK_ELECTRONICS_TAIWAN 0x062bU // Greatlink Electronics Taiwan, Ltd +#define UHS_VID_INSTITUTE_FOR_INFORMATION_INDUSTRY 0x062cU // Institute for Information Industry +#define UHS_VID_TAIWAN_TAI_HAO_ENTERPRISES 0x062dU // Taiwan Tai-Hao Enterprises Co., Ltd +#define UHS_VID_MAINSUPER_ENTERPRISES 0x062eU // Mainsuper Enterprises Co., Ltd +#define UHS_VID_SIN_SHENG_TERMINAL_AND_MACHINE 0x062fU // Sin Sheng Terminal & Machine, Inc. +#define UHS_VID_JUJO_ELECTRONICS 0x0631U // JUJO Electronics Corp. +#define UHS_VID_CYRIX 0x0633U // Cyrix Corp. +#define UHS_VID_MICRON_TECHNOLOGY 0x0634U // Micron Technology, Inc. +#define UHS_VID_METHODE_ELECTRONICS 0x0635U // Methode Electronics, Inc. +#define UHS_VID_SIERRA_IMAGING 0x0636U // Sierra Imaging, Inc. +#define UHS_VID_AVISION 0x0638U // Avision, Inc. +#define UHS_VID_CHRONTEL 0x0639U // Chrontel, Inc. +#define UHS_VID_TECHWIN 0x063aU // Techwin Corp. +#define UHS_VID_TAUGAGREINING_HF_1 0x063bU // Taugagreining HF +#define UHS_VID_YAMAICHI_ELECTRONICS_CO_LTD_SAKURA 0x063cU // Yamaichi Electronics Co., Ltd (Sakura) +#define UHS_VID_FONG_KAI_INDUSTRIAL 0x063dU // Fong Kai Industrial Co., Ltd +#define UHS_VID_REALMEDIA_TECHNOLOGY 0x063eU // RealMedia Technology, Inc. +#define UHS_VID_NEW_TECHNOLOGY_CABLE 0x063fU // New Technology Cable, Ltd +#define UHS_VID_HITEX_DEVELOPMENT_TOOLS 0x0640U // Hitex Development Tools +#define UHS_VID_WOODS_INDUSTRIES 0x0641U // Woods Industries, Inc. +#define UHS_VID_VIA_MEDICAL 0x0642U // VIA Medical Corp. +#define UHS_VID_TEAC 0x0644U // TEAC Corp. +#define UHS_VID_WHO_UNKNOWN_VISION_SYSTEMS 0x0645U // Who? Vision Systems, Inc. +#define UHS_VID_UMAX 0x0646U // UMAX +#define UHS_VID_ACTON_RESEARCH 0x0647U // Acton Research Corp. +#define UHS_VID_INSIDE_OUT_NETWORKS 0x0648U // Inside Out Networks +#define UHS_VID_WELI_SCIENCE 0x0649U // Weli Science Co., Ltd +#define UHS_VID_ANALOG_DEVICES_INC_WHITE_MOUNTAIN_DSP 0x064bU // Analog Devices, Inc. (White Mountain DSP) +#define UHS_VID_JI_HAW_INDUSTRIAL 0x064cU // Ji-Haw Industrial Co., Ltd +#define UHS_VID_TRITECH_MICROELECTRONICS 0x064dU // TriTech Microelectronics, Ltd +#define UHS_VID_SUYIN 0x064eU // Suyin Corp. +#define UHS_VID_WIBU_SYSTEMS_AG 0x064fU // WIBU-Systems AG +#define UHS_VID_DYNAPRO_SYSTEMS 0x0650U // Dynapro Systems +#define UHS_VID_LIKOM_TECHNOLOGY_SDN_BHD 0x0651U // Likom Technology Sdn. Bhd. +#define UHS_VID_STARGATE_SOLUTIONS 0x0652U // Stargate Solutions, Inc. +#define UHS_VID_CNF 0x0653U // CNF, Inc. +#define UHS_VID_GRANITE_MICROSYSTEMS 0x0654U // Granite Microsystems, Inc. +#define UHS_VID_SPACE_SHUTTLE_HI_TECH 0x0655U // Space Shuttle Hi-Tech Co., Ltd +#define UHS_VID_GLORY_MARK_ELECTRONIC 0x0656U // Glory Mark Electronic, Ltd +#define UHS_VID_TEKCON_ELECTRONICS 0x0657U // Tekcon Electronics Corp. +#define UHS_VID_SIGMA_DESIGNS 0x0658U // Sigma Designs, Inc. +#define UHS_VID_AETHRA 0x0659U // Aethra +#define UHS_VID_OPTOELECTRONICS 0x065aU // Optoelectronics Co., Ltd +#define UHS_VID_TRACEWELL_SYSTEMS 0x065bU // Tracewell Systems +#define UHS_VID_SILICON_GRAPHICS_1 0x065eU // Silicon Graphics +#define UHS_VID_GOOD_WAY_TECHNOLOGY_CO_LTD_AND_GWC_TECHNOLOGY 0x065fU // Good Way Technology Co., Ltd & GWC technology Inc. +#define UHS_VID_TSAY_E_BVI_INTERNATIONAL 0x0660U // TSAY-E (BVI) International, Inc. +#define UHS_VID_HAMAMATSU_PHOTONICS_KK 0x0661U // Hamamatsu Photonics K.K. +#define UHS_VID_KANSAI_ELECTRIC 0x0662U // Kansai Electric Co., Ltd +#define UHS_VID_TOPMAX_ELECTRONIC 0x0663U // Topmax Electronic Co., Ltd +#define UHS_VID_ETANDT_TECHNOLOGY 0x0664U // ET&T Technology Co., Ltd. +#define UHS_VID_CYPRESS_SEMICONDUCTOR_1 0x0665U // Cypress Semiconductor +#define UHS_VID_AIWA 0x0667U // Aiwa Co., Ltd +#define UHS_VID_WORDWAND 0x0668U // WordWand +#define UHS_VID_OCE_PRINTING_SYSTEMS 0x0669U // Oce' Printing Systems GmbH +#define UHS_VID_TOTAL_TECHNOLOGIES 0x066aU // Total Technologies, Ltd +#define UHS_VID_LINKSYS 0x066bU // Linksys, Inc. +#define UHS_VID_ENTREGA 0x066dU // Entrega, Inc. +#define UHS_VID_ACER_SEMICONDUCTOR_AMERICA 0x066eU // Acer Semiconductor America, Inc. +#define UHS_VID_SIGMATEL 0x066fU // SigmaTel, Inc. +#define UHS_VID_SEQUEL_IMAGING 0x0670U // Sequel Imaging +#define UHS_VID_LABTEC 0x0672U // Labtec, Inc. +#define UHS_VID_HCL 0x0673U // HCL +#define UHS_VID_KEY_MOUSE_ELECTRONIC_ENTERPRISE 0x0674U // Key Mouse Electronic Enterprise Co., Ltd +#define UHS_VID_DRAYTEK 0x0675U // DrayTek Corp. +#define UHS_VID_TELES_AG 0x0676U // Teles AG +#define UHS_VID_AIWA_1 0x0677U // Aiwa Co., Ltd +#define UHS_VID_ACARD_TECHNOLOGY 0x0678U // ACard Technology Corp. +#define UHS_VID_PROLIFIC_TECHNOLOGY 0x067bU // Prolific Technology, Inc. +#define UHS_VID_EFFICIENT_NETWORKS 0x067cU // Efficient Networks, Inc. +#define UHS_VID_HOHNER 0x067dU // Hohner Corp. +#define UHS_VID_INTERMEC_TECHNOLOGIES 0x067eU // Intermec Technologies Corp. +#define UHS_VID_VIRATA 0x067fU // Virata, Ltd +#define UHS_VID_REALTEK_SEMICONDUCTOR_CORP_CPP_DIV_AVANCE_LOGIC 0x0680U // Realtek Semiconductor Corp., CPP Div. (Avance Logic) +#define UHS_VID_SIEMENS_INFORMATION_AND_COMMUNICATION_PRODUCTS 0x0681U // Siemens Information and Communication Products +#define UHS_VID_VICTOR_COMPANY_OF_JAPAN_1 0x0682U // Victor Company of Japan, Ltd +#define UHS_VID_ACTIONTEC_ELECTRONICS 0x0684U // Actiontec Electronics, Inc. +#define UHS_VID_ZD_INCORPORATED 0x0685U // ZD Incorporated +#define UHS_VID_MINOLTA 0x0686U // Minolta Co., Ltd +#define UHS_VID_PERTECH 0x068aU // Pertech, Inc. +#define UHS_VID_POTRANS_INTERNATIONAL 0x068bU // Potrans International, Inc. +#define UHS_VID_CH_PRODUCTS 0x068eU // CH Products, Inc. +#define UHS_VID_GOLDEN_BRIDGE_ELECTECH 0x0690U // Golden Bridge Electech, Inc. +#define UHS_VID_HAGIWARA_SYS_COM 0x0693U // Hagiwara Sys-Com Co., Ltd +#define UHS_VID_LEGO_GROUP 0x0694U // Lego Group +#define UHS_VID_CHUNTEX_CTX 0x0698U // Chuntex (CTX) +#define UHS_VID_TEKTRONIX 0x0699U // Tektronix, Inc. +#define UHS_VID_ASKEY_COMPUTER 0x069aU // Askey Computer Corp. +#define UHS_VID_THOMSON 0x069bU // Thomson, Inc. +#define UHS_VID_HUGHES_NETWORK_SYSTEMS_HNS 0x069dU // Hughes Network Systems (HNS) +#define UHS_VID_WELCAT 0x069eU // Welcat Inc. +#define UHS_VID_ALLIED_DATA_TECHNOLOGIES_BV 0x069fU // Allied Data Technologies BV +#define UHS_VID_TOPRO_TECHNOLOGY 0x06a2U // Topro Technology, Inc. +#define UHS_VID_SAITEK_PLC 0x06a3U // Saitek PLC +#define UHS_VID_XIAMEN_DOOWELL_ELECTRON 0x06a4U // Xiamen Doowell Electron Co., Ltd +#define UHS_VID_DIVIO 0x06a5U // Divio +#define UHS_VID_MICROSTORE 0x06a7U // MicroStore, Inc. +#define UHS_VID_TOPAZ_SYSTEMS 0x06a8U // Topaz Systems, Inc. +#define UHS_VID_WESTELL 0x06a9U // Westell +#define UHS_VID_SYSGRATION 0x06aaU // Sysgration, Ltd +#define UHS_VID_FUJITSU_LABORATORIES_OF_AMERICA 0x06acU // Fujitsu Laboratories of America, Inc. +#define UHS_VID_GREATLAND_ELECTRONICS_TAIWAN 0x06adU // Greatland Electronics Taiwan, Ltd +#define UHS_VID_PROFESSIONAL_MULTIMEDIA_TESTING_CENTRE 0x06aeU // Professional Multimedia Testing Centre +#define UHS_VID_HARTING_INC_OF_NORTH_AMERICA 0x06afU // Harting, Inc. of North America +#define UHS_VID_PIXELA 0x06b8U // Pixela Corp. +#define UHS_VID_ALCATEL_TELECOM 0x06b9U // Alcatel Telecom +#define UHS_VID_SMOOTH_CORD_AND_CONNECTOR 0x06baU // Smooth Cord & Connector Co., Ltd +#define UHS_VID_EDA 0x06bbU // EDA, Inc. +#define UHS_VID_OKI_DATA 0x06bcU // Oki Data Corp. +#define UHS_VID_AGFA_GEVAERT_NV 0x06bdU // AGFA-Gevaert NV +#define UHS_VID_AME_OPTIMEDIA_TECHNOLOGY 0x06beU // AME Optimedia Technology Co., Ltd +#define UHS_VID_LEOCO 0x06bfU // Leoco Corp. +#define UHS_VID_PHIDGETS_INC_FORMERLY_GLAB 0x06c2U // Phidgets Inc. (formerly GLAB) +#define UHS_VID_BIZLINK_INTERNATIONAL 0x06c4U // Bizlink International Corp. +#define UHS_VID_HAGENUK 0x06c5U // Hagenuk, GmbH +#define UHS_VID_INFOWAVE_SOFTWARE 0x06c6U // Infowave Software, Inc. +#define UHS_VID_SIIG 0x06c8U // SIIG, Inc. +#define UHS_VID_TAXAN_EUROPE 0x06c9U // Taxan (Europe), Ltd +#define UHS_VID_NEWER_TECHNOLOGY 0x06caU // Newer Technology, Inc. +#define UHS_VID_SYNAPTICS 0x06cbU // Synaptics, Inc. +#define UHS_VID_TERAYON_COMMUNICATION_SYSTEMS 0x06ccU // Terayon Communication Systems +#define UHS_VID_KEYSPAN 0x06cdU // Keyspan +#define UHS_VID_CONTEC 0x06ceU // Contec +#define UHS_VID_SPHERONVR_AG 0x06cfU // SpheronVR AG +#define UHS_VID_LAPLINK 0x06d0U // LapLink, Inc. +#define UHS_VID_DAEWOO_ELECTRONICS_1 0x06d1U // Daewoo Electronics Co., Ltd +#define UHS_VID_MITSUBISHI_ELECTRIC 0x06d3U // Mitsubishi Electric Corp. +#define UHS_VID_CISCO_SYSTEMS_1 0x06d4U // Cisco Systems +#define UHS_VID_TOSHIBA 0x06d5U // Toshiba +#define UHS_VID_AASHIMA_TECHNOLOGY_BV 0x06d6U // Aashima Technology B.V. +#define UHS_VID_NETWORK_COMPUTING_DEVICES_NCD 0x06d7U // Network Computing Devices (NCD) +#define UHS_VID_TECHNICAL_MARKETING_RESEARCH 0x06d8U // Technical Marketing Research, Inc. +#define UHS_VID_PHOENIXTEC_POWER 0x06daU // Phoenixtec Power Co., Ltd +#define UHS_VID_PARADYNE 0x06dbU // Paradyne +#define UHS_VID_FOXLINK_IMAGE_TECHNOLOGY 0x06dcU // Foxlink Image Technology Co., Ltd +#define UHS_VID_HEISEI_ELECTRONICS 0x06deU // Heisei Electronics Co., Ltd +#define UHS_VID_MULTI_TECH_SYSTEMS 0x06e0U // Multi-Tech Systems, Inc. +#define UHS_VID_ADS_TECHNOLOGIES 0x06e1U // ADS Technologies, Inc. +#define UHS_VID_ALCATEL_MICROELECTRONICS 0x06e4U // Alcatel Microelectronics +#define UHS_VID_TIGER_JET_NETWORK 0x06e6U // Tiger Jet Network, Inc. +#define UHS_VID_SIRIUS_TECHNOLOGIES 0x06eaU // Sirius Technologies +#define UHS_VID_PC_EXPERT_TECH 0x06ebU // PC Expert Tech. Co., Ltd +#define UHS_VID_IAC_GEOMETRISCHE_INGENIEURS_BV 0x06efU // I.A.C. Geometrische Ingenieurs B.V. +#define UHS_VID_TNC_INDUSTRIAL 0x06f0U // T.N.C Industrial Co., Ltd +#define UHS_VID_OPCODE_SYSTEMS 0x06f1U // Opcode Systems, Inc. +#define UHS_VID_EMINE_TECHNOLOGY 0x06f2U // Emine Technology Co. +#define UHS_VID_WINTREND_TECHNOLOGY 0x06f6U // Wintrend Technology Co., Ltd +#define UHS_VID_WAILLY_TECHNOLOGY 0x06f7U // Wailly Technology Ltd +#define UHS_VID_GUILLEMOT 0x06f8U // Guillemot Corp. +#define UHS_VID_ASYST_ELECTRONIC_DOO 0x06f9U // ASYST electronic d.o.o. +#define UHS_VID_HSD_SRL 0x06faU // HSD S.r.L +#define UHS_VID_MOTOROLA_SEMICONDUCTOR_PRODUCTS_SECTOR 0x06fcU // Motorola Semiconductor Products Sector +#define UHS_VID_BOSTON_ACOUSTICS 0x06fdU // Boston Acoustics +#define UHS_VID_GALLANT_COMPUTER 0x06feU // Gallant Computer, Inc. +#define UHS_VID_SUPERCOMAL_WIRE_AND_CABLE_SDN_BHD 0x0701U // Supercomal Wire & Cable SDN. BHD. +#define UHS_VID_BVTECH_INDUSTRY 0x0703U // Bvtech Industry, Inc. +#define UHS_VID_NKK 0x0705U // NKK Corp. +#define UHS_VID_ARIEL 0x0706U // Ariel Corp. +#define UHS_VID_STANDARD_MICROSYSTEMS_2 0x0707U // Standard Microsystems Corp. +#define UHS_VID_PUTERCOM 0x0708U // Putercom Co., Ltd +#define UHS_VID_SILICON_SYSTEMS_LTD_SSL 0x0709U // Silicon Systems, Ltd (SSL) +#define UHS_VID_OKI_ELECTRIC_INDUSTRY 0x070aU // Oki Electric Industry Co., Ltd +#define UHS_VID_COMOSS_ELECTRONIC 0x070dU // Comoss Electronic Co., Ltd +#define UHS_VID_EXCEL_CELL_ELECTRONIC 0x070eU // Excel Cell Electronic Co., Ltd +#define UHS_VID_CONNECT_TECH 0x0710U // Connect Tech, Inc. +#define UHS_VID_MAGIC_CONTROL_TECHNOLOGY 0x0711U // Magic Control Technology Corp. +#define UHS_VID_INTERVAL_RESEARCH 0x0713U // Interval Research Corp. +#define UHS_VID_NEWMOTION 0x0714U // NewMotion, Inc. +#define UHS_VID_ZNK 0x0717U // ZNK Corp. +#define UHS_VID_IMATION 0x0718U // Imation Corp. +#define UHS_VID_TREMON_ENTERPRISES 0x0719U // Tremon Enterprises Co., Ltd +#define UHS_VID_DOMAIN_TECHNOLOGIES 0x071bU // Domain Technologies, Inc. +#define UHS_VID_XIONICS_DOCUMENT_TECHNOLOGIES 0x071cU // Xionics Document Technologies, Inc. +#define UHS_VID_EICON_NETWORKS 0x071dU // Eicon Networks Corp. +#define UHS_VID_ARISTON_TECHNOLOGIES 0x071eU // Ariston Technologies +#define UHS_VID_CENTILLIUM_COMMUNICATIONS 0x0723U // Centillium Communications Corp. +#define UHS_VID_VANGUARD_INTERNATIONAL_SEMICONDUCTOR_AMERICA 0x0726U // Vanguard International Semiconductor-America +#define UHS_VID_AMITM 0x0729U // Amitm +#define UHS_VID_SUNIX 0x072eU // Sunix Co., Ltd +#define UHS_VID_ADVANCED_CARD_SYSTEMS 0x072fU // Advanced Card Systems, Ltd +#define UHS_VID_SUSTEEN 0x0731U // Susteen, Inc. +#define UHS_VID_GOLDFULL_ELECTRONICS_AND_TELECOMMUNICATIONS 0x0732U // Goldfull Electronics & Telecommunications Corp. +#define UHS_VID_VIEWQUEST_TECHNOLOGIES 0x0733U // ViewQuest Technologies, Inc. +#define UHS_VID_LASAT_COMMUNICATIONS_AS 0x0734U // Lasat Communications A/S +#define UHS_VID_ASUSCOM_NETWORK 0x0735U // Asuscom Network +#define UHS_VID_LOROM_INDUSTRIAL 0x0736U // Lorom Industrial Co., Ltd +#define UHS_VID_MAD_CATZ 0x0738U // Mad Catz, Inc. +#define UHS_VID_CHAPLET_SYSTEMS 0x073aU // Chaplet Systems, Inc. +#define UHS_VID_SUNCOM_TECHNOLOGIES 0x073bU // Suncom Technologies +#define UHS_VID_INDUSTRIAL_ELECTRONIC_ENGINEERS 0x073cU // Industrial Electronic Engineers, Inc. +#define UHS_VID_EUTRON_SPA 0x073dU // Eutron S.p.a. +#define UHS_VID_NEC_1 0x073eU // NEC, Inc. +#define UHS_VID_STOLLMANN 0x0742U // Stollmann +#define UHS_VID_SYNTECH_INFORMATION 0x0745U // Syntech Information Co., Ltd +#define UHS_VID_ONKYO 0x0746U // Onkyo Corp. +#define UHS_VID_LABWAY 0x0747U // Labway Corp. +#define UHS_VID_STRONG_MAN_ENTERPRISE 0x0748U // Strong Man Enterprise Co., Ltd +#define UHS_VID_EVER_ELECTRONICS 0x0749U // EVer Electronics Corp. +#define UHS_VID_MING_FORTUNE_INDUSTRY 0x074aU // Ming Fortune Industry Co., Ltd +#define UHS_VID_POLESTAR_TECH 0x074bU // Polestar Tech. Corp. +#define UHS_VID_C_C_C_GROUP_PLC 0x074cU // C-C-C Group PLC +#define UHS_VID_MICRONAS 0x074dU // Micronas GmbH +#define UHS_VID_DIGITAL_STREAM 0x074eU // Digital Stream Corp. +#define UHS_VID_AUREAL_SEMICONDUCTOR 0x0755U // Aureal Semiconductor +#define UHS_VID_NETWORK_TECHNOLOGIES 0x0757U // Network Technologies, Inc. +#define UHS_VID_SOPHISTICATED_CIRCUITS 0x075bU // Sophisticated Circuits, Inc. +#define UHS_VID_MIDIMAN 0x0763U // Midiman +#define UHS_VID_CYBER_POWER_SYSTEM 0x0764U // Cyber Power System, Inc. +#define UHS_VID_X_RITE 0x0765U // X-Rite, Inc. +#define UHS_VID_JESS_LINK_PRODUCTS 0x0766U // Jess-Link Products Co., Ltd +#define UHS_VID_TOKHEIM 0x0767U // Tokheim Corp. +#define UHS_VID_CAMTEL_TECHNOLOGY 0x0768U // Camtel Technology Corp. +#define UHS_VID_SURECOM_TECHNOLOGY 0x0769U // Surecom Technology Corp. +#define UHS_VID_SMART_TECHNOLOGY_ENABLERS 0x076aU // Smart Technology Enablers, Inc. +#define UHS_VID_OMNIKEY_AG 0x076bU // OmniKey AG +#define UHS_VID_PARTNER_TECH 0x076cU // Partner Tech +#define UHS_VID_DENSO 0x076dU // Denso Corp. +#define UHS_VID_KUAN_TECH_ENTERPRISE 0x076eU // Kuan Tech Enterprise Co., Ltd +#define UHS_VID_JHEN_VEI_ELECTRONIC 0x076fU // Jhen Vei Electronic Co., Ltd +#define UHS_VID_WELCH_ALLYN_INC__MEDICAL_DIVISION 0x0770U // Welch Allyn, Inc - Medical Division +#define UHS_VID_OBSERVATOR_INSTRUMENTS_BV 0x0771U // Observator Instruments BV +#define UHS_VID_YOUR_DATA_OUR_CARE 0x0772U // Your data Our Care +#define UHS_VID_AMTRAN_TECHNOLOGY 0x0774U // AmTRAN Technology Co., Ltd +#define UHS_VID_LONGSHINE_ELECTRONICS 0x0775U // Longshine Electronics Corp. +#define UHS_VID_INALWAYS 0x0776U // Inalways Corp. +#define UHS_VID_COMDA_ENTERPRISE 0x0777U // Comda Enterprise Corp. +#define UHS_VID_VOLEX 0x0778U // Volex, Inc. +#define UHS_VID_FAIRCHILD_SEMICONDUCTOR 0x0779U // Fairchild Semiconductor +#define UHS_VID_SANKYO_SEIKI_MFG 0x077aU // Sankyo Seiki Mfg. Co., Ltd +#define UHS_VID_LINKSYS_1 0x077bU // Linksys +#define UHS_VID_FORWARD_ELECTRONICS 0x077cU // Forward Electronics Co., Ltd +#define UHS_VID_GRIFFIN_TECHNOLOGY 0x077dU // Griffin Technology +#define UHS_VID_WELL_EXCELLENT_AND_MOST 0x077fU // Well Excellent & Most Corp. +#define UHS_VID_SAGEM_MONETEL 0x0780U // Sagem Monetel GmbH +#define UHS_VID_SANDISK 0x0781U // SanDisk Corp. +#define UHS_VID_TRACKERBALL 0x0782U // Trackerball +#define UHS_VID_C3PO 0x0783U // C3PO +#define UHS_VID_VIVITAR 0x0784U // Vivitar, Inc. +#define UHS_VID_NTT_ME 0x0785U // NTT-ME +#define UHS_VID_LOGITEC 0x0789U // Logitec Corp. +#define UHS_VID_HAPP_CONTROLS 0x078bU // Happ Controls, Inc. +#define UHS_VID_GTCOCALCOMP 0x078cU // GTCO/CalComp +#define UHS_VID_BRINCOM 0x078eU // Brincom, Inc. +#define UHS_VID_PRO_IMAGE_MANUFACTURING 0x0790U // Pro-Image Manufacturing Co., Ltd +#define UHS_VID_COPARTNER_WIRE_AND_CABLE_MFG 0x0791U // Copartner Wire and Cable Mfg. Corp. +#define UHS_VID_AXIS_COMMUNICATIONS 0x0792U // Axis Communications AB +#define UHS_VID_WHA_YU_INDUSTRIAL 0x0793U // Wha Yu Industrial Co., Ltd +#define UHS_VID_ABL_ELECTRONICS 0x0794U // ABL Electronics Corp. +#define UHS_VID_REALCHIP 0x0795U // RealChip, Inc. +#define UHS_VID_CERTICOM 0x0796U // Certicom Corp. +#define UHS_VID_GRANDTECH_SEMICONDUCTOR 0x0797U // Grandtech Semiconductor Corp. +#define UHS_VID_OPTELEC 0x0798U // Optelec +#define UHS_VID_ALTERA 0x0799U // Altera +#define UHS_VID_SAGEM 0x079bU // Sagem +#define UHS_VID_ALFADATA_COMPUTER 0x079dU // Alfadata Computer Corp. +#define UHS_VID_DIGICOM_SPA 0x07a1U // Digicom S.p.A. +#define UHS_VID_NATIONAL_TECHNICAL_SYSTEMS 0x07a2U // National Technical Systems +#define UHS_VID_ONNTO 0x07a3U // Onnto Corp. +#define UHS_VID_BE 0x07a4U // Be, Inc. +#define UHS_VID_ADMTEK 0x07a6U // ADMtek, Inc. +#define UHS_VID_COREGA_KK 0x07aaU // Corega K.K. +#define UHS_VID_FREECOM_TECHNOLOGIES 0x07abU // Freecom Technologies +#define UHS_VID_MICROTECH 0x07afU // Microtech +#define UHS_VID_TRUST_TECHNOLOGIES 0x07b0U // Trust Technologies +#define UHS_VID_IMP 0x07b1U // IMP, Inc. +#define UHS_VID_MOTOROLA_BCS 0x07b2U // Motorola BCS, Inc. +#define UHS_VID_PLUSTEK 0x07b3U // Plustek, Inc. +#define UHS_VID_OLYMPUS_OPTICAL 0x07b4U // Olympus Optical Co., Ltd +#define UHS_VID_MEGA_WORLD_INTERNATIONAL 0x07b5U // Mega World International, Ltd +#define UHS_VID_MARUBUN 0x07b6U // Marubun Corp. +#define UHS_VID_TIME_INTERCONNECT 0x07b7U // TIME Interconnect, Ltd +#define UHS_VID_ABOCOM_SYSTEMS 0x07b8U // AboCom Systems Inc +#define UHS_VID_CANON_COMPUTER_SYSTEMS 0x07bcU // Canon Computer Systems, Inc. +#define UHS_VID_WEBGEAR 0x07bdU // Webgear, Inc. +#define UHS_VID_VERIDICOM 0x07beU // Veridicom +#define UHS_VID_CODE_MERCENARIES_HARD_UND_SOFTWARE 0x07c0U // Code Mercenaries Hard- und Software GmbH +#define UHS_VID_KEISOKUGIKEN 0x07c1U // Keisokugiken +#define UHS_VID_DATAFAB_SYSTEMS 0x07c4U // Datafab Systems, Inc. +#define UHS_VID_APG_CASH_DRAWER 0x07c5U // APG Cash Drawer +#define UHS_VID_SHAREWAVE 0x07c6U // ShareWave, Inc. +#define UHS_VID_POWERTECH_INDUSTRIAL 0x07c7U // Powertech Industrial Co., Ltd +#define UHS_VID_BUG 0x07c8U // B.U.G., Inc. +#define UHS_VID_ALLIED_TELESYN_INTERNATIONAL 0x07c9U // Allied Telesyn International +#define UHS_VID_AVERMEDIA_TECHNOLOGIES 0x07caU // AVerMedia Technologies, Inc. +#define UHS_VID_KINGMAX_TECHNOLOGY 0x07cbU // Kingmax Technology, Inc. +#define UHS_VID_CARRY_COMPUTER_ENG 0x07ccU // Carry Computer Eng., Co., Ltd +#define UHS_VID_ELEKTOR 0x07cdU // Elektor +#define UHS_VID_CASIO_COMPUTER 0x07cfU // Casio Computer Co., Ltd +#define UHS_VID_DAZZLE 0x07d0U // Dazzle +#define UHS_VID_D_LINK_SYSTEM 0x07d1U // D-Link System +#define UHS_VID_APTIO_PRODUCTS 0x07d2U // Aptio Products, Inc. +#define UHS_VID_CYBERDATA 0x07d3U // Cyberdata Corp. +#define UHS_VID_RADIANT_SYSTEMS 0x07d5U // Radiant Systems +#define UHS_VID_GCC_TECHNOLOGIES 0x07d7U // GCC Technologies, Inc. +#define UHS_VID_ARASAN_CHIP_SYSTEMS 0x07daU // Arasan Chip Systems +#define UHS_VID_DIAMOND_MULTIMEDIA 0x07deU // Diamond Multimedia +#define UHS_VID_DAVID_ELECTRONICS 0x07dfU // David Electronics Co., Ltd +#define UHS_VID_AMBIENT_TECHNOLOGIES 0x07e1U // Ambient Technologies, Inc. +#define UHS_VID_ELMEG_GMBH_AND 0x07e2U // Elmeg GmbH & Co., Ltd +#define UHS_VID_PLANEX_COMMUNICATIONS 0x07e3U // Planex Communications, Inc. +#define UHS_VID_MOVADO_ENTERPRISE 0x07e4U // Movado Enterprise Co., Ltd +#define UHS_VID_QPS 0x07e5U // QPS, Inc. +#define UHS_VID_ALLIED_CABLE 0x07e6U // Allied Cable Corp. +#define UHS_VID_MIRVO_TOYS 0x07e7U // Mirvo Toys, Inc. +#define UHS_VID_LABSYSTEMS 0x07e8U // Labsystems +#define UHS_VID_IWATSU_ELECTRIC 0x07eaU // Iwatsu Electric Co., Ltd +#define UHS_VID_DOUBLE_H_TECHNOLOGY 0x07ebU // Double-H Technology Co., Ltd +#define UHS_VID_TAIYO_ELECTRIC_WIRE_AND_CABLE 0x07ecU // Taiyo Electric Wire & Cable Co., Ltd +#define UHS_VID_TOREX_RETAIL_FORMERLY_LOGWARE 0x07eeU // Torex Retail (formerly Logware) +#define UHS_VID_STSN 0x07efU // STSN +#define UHS_VID_MICROCOMPUTER_APPLICATIONS 0x07f2U // Microcomputer Applications, Inc. +#define UHS_VID_CIRCUIT_ASSEMBLY 0x07f6U // Circuit Assembly Corp. +#define UHS_VID_CENTURY 0x07f7U // Century Corp. +#define UHS_VID_DOTOP_TECHNOLOGY 0x07f9U // Dotop Technology, Inc. +#define UHS_VID_DRAYTEK_1 0x07faU // DrayTek Corp. +#define UHS_VID_MARK_OF_THE_UNICORN 0x07fdU // Mark of the Unicorn +#define UHS_VID_UNKNOWN_2 0x07ffU // Unknown +#define UHS_VID_MAGTEK 0x0801U // MagTek +#define UHS_VID_MAKO_TECHNOLOGIES 0x0802U // Mako Technologies, LLC +#define UHS_VID_ZOOM_TELEPHONICS 0x0803U // Zoom Telephonics, Inc. +#define UHS_VID_GENICOM_TECHNOLOGY 0x0809U // Genicom Technology, Inc. +#define UHS_VID_EVERMUCH_TECHNOLOGY 0x080aU // Evermuch Technology Co., Ltd +#define UHS_VID_CROSS_MATCH_TECHNOLOGIES 0x080bU // Cross Match Technologies +#define UHS_VID_DATALOGIC_SPA 0x080cU // Datalogic S.p.A. +#define UHS_VID_TECO_IMAGE_SYSTEMS 0x080dU // Teco Image Systems Co., Ltd +#define UHS_VID_PERSONAL_COMMUNICATION_SYSTEMS 0x0810U // Personal Communication Systems, Inc. +#define UHS_VID_MATTEL 0x0813U // Mattel, Inc. +#define UHS_VID_ELICENSER 0x0819U // eLicenser +#define UHS_VID_MG_LOGIC 0x081aU // MG Logic +#define UHS_VID_INDIGITA 0x081bU // Indigita Corp. +#define UHS_VID_MIPSYS 0x081cU // Mipsys +#define UHS_VID_ALPHASMART 0x081eU // AlphaSmart, Inc. +#define UHS_VID_REUDO 0x0822U // Reudo Corp. +#define UHS_VID_GC_PROTRONICS 0x0825U // GC Protronics +#define UHS_VID_DATA_TRANSIT 0x0826U // Data Transit +#define UHS_VID_BROADLOGIC 0x0827U // BroadLogic, Inc. +#define UHS_VID_SATO 0x0828U // Sato Corp. +#define UHS_VID_DIRECTV_BROADBAND_INC_TELOCITY 0x0829U // DirecTV Broadband, Inc. (Telocity) +#define UHS_VID_HANDSPRING 0x082dU // Handspring +#define UHS_VID_PALM 0x0830U // Palm, Inc. +#define UHS_VID_KOUWELL_ELECTRONICS 0x0832U // Kouwell Electronics Corp. +#define UHS_VID_SOURCENEXT 0x0833U // Sourcenext Corp. +#define UHS_VID_ACTION_STAR_ENTERPRISE 0x0835U // Action Star Enterprise Co., Ltd +#define UHS_VID_TREKSTOR 0x0836U // TrekStor +#define UHS_VID_SAMSUNG_TECHWIN 0x0839U // Samsung Techwin Co., Ltd +#define UHS_VID_ACCTON_TECHNOLOGY 0x083aU // Accton Technology Corp. +#define UHS_VID_GLOBAL_VILLAGE 0x083fU // Global Village +#define UHS_VID_ARGOSY_RESEARCH 0x0840U // Argosy Research, Inc. +#define UHS_VID_RIOPORTCOM 0x0841U // Rioport.com, Inc. +#define UHS_VID_WELLAND_INDUSTRIAL 0x0844U // Welland Industrial Co., Ltd +#define UHS_VID_NETGEAR 0x0846U // NetGear, Inc. +#define UHS_VID_MINTON_OPTIC_INDUSTRY 0x084dU // Minton Optic Industry Co., Inc. +#define UHS_VID_KB_GEAR 0x084eU // KB Gear +#define UHS_VID_EMPEG 0x084fU // Empeg +#define UHS_VID_FAST_POINT_TECHNOLOGIES 0x0850U // Fast Point Technologies, Inc. +#define UHS_VID_MACRONIX_INTERNATIONAL 0x0851U // Macronix International Co., Ltd +#define UHS_VID_CSEM 0x0852U // CSEM +#define UHS_VID_TOPRE_CORPORATION 0x0853U // Topre Corporation +#define UHS_VID_ACTIVEWIRE 0x0854U // ActiveWire, Inc. +#define UHS_VID_BANDB_ELECTRONICS 0x0856U // B&B Electronics +#define UHS_VID_HITACHI_MAXELL 0x0858U // Hitachi Maxell, Ltd +#define UHS_VID_MINOLTA_SYSTEMS_LABORATORY 0x0859U // Minolta Systems Laboratory, Inc. +#define UHS_VID_XIRCOM 0x085aU // Xircom +#define UHS_VID_COLORVISION 0x085cU // ColorVision, Inc. +#define UHS_VID_TELETROL_SYSTEMS 0x0862U // Teletrol Systems, Inc. +#define UHS_VID_FILANET 0x0863U // Filanet Corp. +#define UHS_VID_NETGEAR_1 0x0864U // NetGear, Inc. +#define UHS_VID_DATA_TRANSLATION 0x0867U // Data Translation, Inc. +#define UHS_VID_EMAGIC_SOFT_UND_HARDWARE 0x086aU // Emagic Soft- und Hardware GmbH +#define UHS_VID_DETEWE__DEUTSCHE_TELEPHONWERKE_AG_AND 0x086cU // DeTeWe - Deutsche Telephonwerke AG & Co. +#define UHS_VID_SYSTEM_TALKS 0x086eU // System TALKS, Inc. +#define UHS_VID_MEC_IMEX 0x086fU // MEC IMEX, Inc. +#define UHS_VID_METRICOM 0x0870U // Metricom +#define UHS_VID_SANDISK_1 0x0871U // SanDisk, Inc. +#define UHS_VID_XPEED 0x0873U // Xpeed, Inc. +#define UHS_VID_A_TEC_SUBSYSTEM 0x0874U // A-Tec Subsystem, Inc. +#define UHS_VID_COMTROL 0x0879U // Comtrol Corp. +#define UHS_VID_ADESSOKBTEK_AMERICA 0x087cU // Adesso/Kbtek America, Inc. +#define UHS_VID_JATON 0x087dU // Jaton Corp. +#define UHS_VID_FUJITSU_COMPUTER_PRODUCTS_OF_AMERICA 0x087eU // Fujitsu Computer Products of America +#define UHS_VID_QUALCORE_LOGIC 0x087fU // QualCore Logic Inc. +#define UHS_VID_APT_TECHNOLOGIES 0x0880U // APT Technologies, Inc. +#define UHS_VID_RECORDING_INDUSTRY_ASSOCIATION_OF_AMERICA_RIAA 0x0883U // Recording Industry Association of America (RIAA) +#define UHS_VID_BOCA_RESEARCH 0x0885U // Boca Research, Inc. +#define UHS_VID_XAC_AUTOMATION 0x0886U // XAC Automation Corp. +#define UHS_VID_HANNSTAR_ELECTRONICS 0x0887U // Hannstar Electronics Corp. +#define UHS_VID_TECHTOOLS 0x088aU // TechTools +#define UHS_VID_MASSWORKS 0x088bU // MassWorks, Inc. +#define UHS_VID_SWECOIN 0x088cU // Swecoin AB +#define UHS_VID_ILOK 0x088eU // iLok +#define UHS_VID_DIOGRAPHY 0x0892U // DioGraphy, Inc. +#define UHS_VID_TSI_INCORPORATED 0x0894U // TSI Incorporated +#define UHS_VID_LAUTERBACH 0x0897U // Lauterbach +#define UHS_VID_UNITED_TECHNOLOGIES_RESEARCH_CNTR 0x089cU // United Technologies Research Cntr. +#define UHS_VID_ICRON_TECHNOLOGIES 0x089dU // Icron Technologies Corp. +#define UHS_VID_NST 0x089eU // NST Co., Ltd +#define UHS_VID_PRIMEX_AEROSPACE 0x089fU // Primex Aerospace Co. +#define UHS_VID_E9 0x08a5U // e9, Inc. +#define UHS_VID_TOSHIBA_TEC 0x08a6U // Toshiba TEC +#define UHS_VID_ANDREA_ELECTRONICS 0x08a8U // Andrea Electronics +#define UHS_VID_CWAV 0x08a9U // CWAV Inc. +#define UHS_VID_MACRAIGOR_SYSTEMS 0x08acU // Macraigor Systems LLC +#define UHS_VID_MACALLY_MACE_GROUP 0x08aeU // Macally (Mace Group, Inc.) +#define UHS_VID_METROHM 0x08b0U // Metrohm +#define UHS_VID_SORENSON_VISION 0x08b4U // Sorenson Vision, Inc. +#define UHS_VID_NATSU 0x08b7U // NATSU +#define UHS_VID_J_GORDON_ELECTRONIC_DESIGN 0x08b8U // J. Gordon Electronic Design, Inc. +#define UHS_VID_RADIOSHACK_CORP_TANDY 0x08b9U // RadioShack Corp. (Tandy) +#define UHS_VID_TEXAS_INSTRUMENTS_1 0x08bbU // Texas Instruments +#define UHS_VID_CITIZEN_WATCH 0x08bdU // Citizen Watch Co., Ltd +#define UHS_VID_PRECISE_BIOMETRICS 0x08c3U // Precise Biometrics +#define UHS_VID_PROXIM 0x08c4U // Proxim, Inc. +#define UHS_VID_KEY_NICE_ENTERPRISE 0x08c7U // Key Nice Enterprise Co., Ltd +#define UHS_VID_2WIRE 0x08c8U // 2Wire, Inc. +#define UHS_VID_NIPPON_TELEGRAPH_AND_TELEPHONE 0x08c9U // Nippon Telegraph and Telephone Corp. +#define UHS_VID_AIPTEK_INTERNATIONAL 0x08caU // Aiptek International, Inc. +#define UHS_VID_JUE_HSUN_IND 0x08cdU // Jue Hsun Ind. Corp. +#define UHS_VID_LONG_WELL_ELECTRONICS 0x08ceU // Long Well Electronics Corp. +#define UHS_VID_PRODUCTIVITY_ENHANCEMENT_PRODUCTS 0x08cfU // Productivity Enhancement Products +#define UHS_VID_SMARTBRIDGES 0x08d1U // smartBridges, Inc. +#define UHS_VID_VIRTUAL_INK 0x08d3U // Virtual Ink +#define UHS_VID_FUJITSU_SIEMENS_COMPUTERS 0x08d4U // Fujitsu Siemens Computers +#define UHS_VID_IXXAT_AUTOMATION 0x08d8U // IXXAT Automation GmbH +#define UHS_VID_INCREMENT_P 0x08d9U // Increment P Corp. +#define UHS_VID_BILLIONTON_SYSTEMS 0x08ddU // Billionton Systems, Inc. +#define UHS_VID__UNKNOWN 0x08deU // ? +#define UHS_VID_SPYRUS 0x08dfU // Spyrus, Inc. +#define UHS_VID_OLITEC 0x08e3U // Olitec, Inc. +#define UHS_VID_PIONEER 0x08e4U // Pioneer Corp. +#define UHS_VID_LITRONIC 0x08e5U // Litronic +#define UHS_VID_GEMALTO_WAS_GEMPLUS 0x08e6U // Gemalto (was Gemplus) +#define UHS_VID_PAN_INTERNATIONAL_WIRE_AND_CABLE 0x08e7U // Pan-International Wire & Cable +#define UHS_VID_INTEGRATED_MEMORY_LOGIC 0x08e8U // Integrated Memory Logic +#define UHS_VID_EXTENDED_SYSTEMS 0x08e9U // Extended Systems, Inc. +#define UHS_VID_ERICSSON_INC_BLUE_RIDGE_LABS 0x08eaU // Ericsson, Inc., Blue Ridge Labs +#define UHS_VID_M_SYSTEMS_FLASH_DISK_PIONEERS 0x08ecU // M-Systems Flash Disk Pioneers +#define UHS_VID_MEDIATEK 0x08edU // MediaTek Inc. +#define UHS_VID_CCSIHESSO 0x08eeU // CCSI/Hesso +#define UHS_VID_COREX_TECHNOLOGIES 0x08f0U // Corex Technologies +#define UHS_VID_CTI_ELECTRONICS 0x08f1U // CTI Electronics Corp. +#define UHS_VID_GOTOP_INFORMATION 0x08f2U // Gotop Information Inc. +#define UHS_VID_SYSTEC 0x08f5U // SysTec Co., Ltd +#define UHS_VID_LOGIC_3_INTERNATIONAL 0x08f6U // Logic 3 International, Ltd +#define UHS_VID_VERNIER 0x08f7U // Vernier +#define UHS_VID_KEEN_TOP_INTERNATIONAL_ENTERPRISE 0x08f8U // Keen Top International Enterprise Co., Ltd +#define UHS_VID_WIPRO_TECHNOLOGIES 0x08f9U // Wipro Technologies +#define UHS_VID_CAERE 0x08faU // Caere +#define UHS_VID_SOCKET_COMMUNICATIONS 0x08fbU // Socket Communications +#define UHS_VID_SICON_CABLE_TECHNOLOGY 0x08fcU // Sicon Cable Technology Co., Ltd +#define UHS_VID_DIGIANSWER_AS 0x08fdU // Digianswer A/S +#define UHS_VID_AUTHENTEC 0x08ffU // AuthenTec, Inc. +#define UHS_VID_PINNACLE_SYSTEMS 0x0900U // Pinnacle Systems, Inc. +#define UHS_VID_VST_TECHNOLOGIES 0x0901U // VST Technologies +#define UHS_VID_FARADAY_TECHNOLOGY 0x0906U // Faraday Technology Corp. +#define UHS_VID_SIEMENS_AG 0x0908U // Siemens AG +#define UHS_VID_AUDIO_TECHNICA 0x0909U // Audio-Technica Corp. +#define UHS_VID_TRUMPION_MICROELECTRONICS 0x090aU // Trumpion Microelectronics, Inc. +#define UHS_VID_NEUROSMITH 0x090bU // Neurosmith +#define UHS_VID_SILICON_MOTION_INC__TAIWAN_FORMERLY_FEIYA_TECHNOLOGY 0x090cU // Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) +#define UHS_VID_MULTIPORT_COMPUTER_VERTRIEBS 0x090dU // Multiport Computer Vertriebs GmbH +#define UHS_VID_SHINING_TECHNOLOGY 0x090eU // Shining Technology, Inc. +#define UHS_VID_FUJITSU_DEVICES 0x090fU // Fujitsu Devices, Inc. +#define UHS_VID_ALATION_SYSTEMS 0x0910U // Alation Systems, Inc. +#define UHS_VID_PHILIPS_SPEECH_PROCESSING 0x0911U // Philips Speech Processing +#define UHS_VID_VOQUETTE 0x0912U // Voquette, Inc. +#define UHS_VID_GLOBESPAN 0x0915U // GlobeSpan, Inc. +#define UHS_VID_SMARTDISK 0x0917U // SmartDisk Corp. +#define UHS_VID_TIGER_ELECTRONICS 0x0919U // Tiger Electronics +#define UHS_VID_GARMIN_INTERNATIONAL 0x091eU // Garmin International +#define UHS_VID_ECHELON 0x0920U // Echelon Co. +#define UHS_VID_GOHUBS 0x0921U // GoHubs, Inc. +#define UHS_VID_DYMO_COSTAR 0x0922U // Dymo-CoStar Corp. +#define UHS_VID_IC_MEDIA 0x0923U // IC Media Corp. +#define UHS_VID_XEROX 0x0924U // Xerox +#define UHS_VID_LAKEVIEW_RESEARCH 0x0925U // Lakeview Research +#define UHS_VID_SUMMUS 0x0927U // Summus, Ltd +#define UHS_VID_PLX_TECHNOLOGY_INC_FORMERLY_OXFORD_SEMICONDUCTOR 0x0928U // PLX Technology, Inc. (formerly Oxford Semiconductor, Ltd) +#define UHS_VID_AMERICAN_BIOMETRIC 0x0929U // American Biometric Co. +#define UHS_VID_TOSHIBA_INFORMATION_AND_INDUSTRIAL_SYS_AND_SERVICES 0x092aU // Toshiba Information & Industrial Sys. And Services +#define UHS_VID_SENA_TECHNOLOGIES 0x092bU // Sena Technologies, Inc. +#define UHS_VID_NORTHERN_EMBEDDED_SCIENCECAVNEX 0x092fU // Northern Embedded Science/CAVNEX +#define UHS_VID_TOSHIBA_1 0x0930U // Toshiba Corp. +#define UHS_VID_HARMONIC_DATA_SYSTEMS 0x0931U // Harmonic Data Systems, Ltd +#define UHS_VID_CRESCENTEC 0x0932U // Crescentec Corp. +#define UHS_VID_QUANTUM 0x0933U // Quantum Corp. +#define UHS_VID_SPIRENT_COMMUNICATIONS 0x0934U // Spirent Communications +#define UHS_VID_NUTESLA 0x0936U // NuTesla +#define UHS_VID_LUMBERG 0x0939U // Lumberg, Inc. +#define UHS_VID_PIXART_IMAGING 0x093aU // Pixart Imaging, Inc. +#define UHS_VID_PLEXTOR 0x093bU // Plextor Corp. +#define UHS_VID_INTREPID_CONTROL_SYSTEMS 0x093cU // Intrepid Control Systems, Inc. +#define UHS_VID_INNOSYNC 0x093dU // InnoSync, Inc. +#define UHS_VID_JST_MFG 0x093eU // J.S.T. Mfg. Co., Ltd +#define UHS_VID_OLYMPIA_TELECOM_VERTRIEBS 0x093fU // Olympia Telecom Vertriebs GmbH +#define UHS_VID_JAPAN_STORAGE_BATTERY 0x0940U // Japan Storage Battery Co., Ltd +#define UHS_VID_PHOTOBIT 0x0941U // Photobit Corp. +#define UHS_VID_I2GOCOM 0x0942U // i2Go.com, LLC +#define UHS_VID_HCL_TECHNOLOGIES_INDIA_PRIVATE 0x0943U // HCL Technologies India Private, Ltd +#define UHS_VID_KORG 0x0944U // KORG, Inc. +#define UHS_VID_PASCO_SCIENTIFIC 0x0945U // Pasco Scientific +#define UHS_VID_KRONAUER_MUSIC_IN_DIGITAL 0x0948U // Kronauer music in digital +#define UHS_VID_LINKUP_SYSTEMS 0x094bU // Linkup Systems Corp. +#define UHS_VID_CABLE_TELEVISION_LABORATORIES 0x094dU // Cable Television Laboratories +#define UHS_VID_YANO 0x094fU // Yano +#define UHS_VID_KINGSTON_TECHNOLOGY 0x0951U // Kingston Technology +#define UHS_VID_RPM_SYSTEMS 0x0954U // RPM Systems Corp. +#define UHS_VID_NVIDIA 0x0955U // NVidia Corp. +#define UHS_VID_BSQUARE 0x0956U // BSquare Corp. +#define UHS_VID_AGILENT_TECHNOLOGIES 0x0957U // Agilent Technologies, Inc. +#define UHS_VID_COMPULINK_RESEARCH 0x0958U // CompuLink Research, Inc. +#define UHS_VID_COLOGNE_CHIP_AG 0x0959U // Cologne Chip AG +#define UHS_VID_PORTSMITH 0x095aU // Portsmith +#define UHS_VID_MEDIALOGIC 0x095bU // Medialogic Corp. +#define UHS_VID_K_TEC_ELECTRONICS 0x095cU // K-Tec Electronics +#define UHS_VID_POLYCOM 0x095dU // Polycom, Inc. +#define UHS_VID_ACER_NEWEB 0x0967U // Acer NeWeb Corp. +#define UHS_VID_CATALYST_ENTERPRISES 0x0968U // Catalyst Enterprises, Inc. +#define UHS_VID_FEITIAN_TECHNOLOGIES 0x096eU // Feitian Technologies, Inc. +#define UHS_VID_GRETAG_MACBETH_AG 0x0971U // Gretag-Macbeth AG +#define UHS_VID_SCHLUMBERGER 0x0973U // Schlumberger +#define UHS_VID_DATAGRAPHIX_A_BUSINESS_UNIT_OF_ANACOMP 0x0974U // Datagraphix, a business unit of Anacomp +#define UHS_VID_OLE_COMMUNICATIONS 0x0975U // OL'E Communications, Inc. +#define UHS_VID_ADIRONDACK_WIRE_AND_CABLE 0x0976U // Adirondack Wire & Cable +#define UHS_VID_LIGHTSURF_TECHNOLOGIES 0x0977U // Lightsurf Technologies +#define UHS_VID_BECKHOFF 0x0978U // Beckhoff GmbH +#define UHS_VID_JEILIN_TECHNOLOGY 0x0979U // Jeilin Technology Corp., Ltd +#define UHS_VID_MINDS_AT_WORK 0x097aU // Minds At Work LLC +#define UHS_VID_KNUDSEN_ENGINEERING 0x097bU // Knudsen Engineering, Ltd +#define UHS_VID_MARUNIX 0x097cU // Marunix Co., Ltd +#define UHS_VID_ROSUN_TECHNOLOGIES 0x097dU // Rosun Technologies, Inc. +#define UHS_VID_BIOPAC_SYSTEMS 0x097eU // Biopac Systems Inc. +#define UHS_VID_BARUN_ELECTRONICS 0x097fU // Barun Electronics Co., Ltd +#define UHS_VID_OAK_TECHNOLOGY_1 0x0981U // Oak Technology, Ltd +#define UHS_VID_APRICORN 0x0984U // Apricorn +#define UHS_VID_CAB_PRODUKTTECHNIK_GMBH_AND_CO_KG 0x0985U // cab Produkttechnik GmbH & Co KG +#define UHS_VID_MATSUSHITA_ELECTRIC_WORKS 0x0986U // Matsushita Electric Works, Ltd. +#define UHS_VID_VITANA 0x098cU // Vitana Corp. +#define UHS_VID_INDESIGN 0x098dU // INDesign +#define UHS_VID_INTEGRATED_INTELLECTUAL_PROPERTY 0x098eU // Integrated Intellectual Property, Inc. +#define UHS_VID_KENWOOD_TMI 0x098fU // Kenwood TMI Corp. +#define UHS_VID_GEMSTAR_EBOOK_GROUP 0x0993U // Gemstar eBook Group, Ltd +#define UHS_VID_INTEGRATED_TELECOM_EXPRESS 0x0996U // Integrated Telecom Express, Inc. +#define UHS_VID_ZIPPY_TECHNOLOGY 0x099aU // Zippy Technology Corp. +#define UHS_VID_PAIRGAIN_TECHNOLOGIES 0x09a3U // PairGain Technologies +#define UHS_VID_CONTECH_RESEARCH 0x09a4U // Contech Research, Inc. +#define UHS_VID_VCON_TELECOMMUNICATIONS 0x09a5U // VCON Telecommunications +#define UHS_VID_POINCHIPS 0x09a6U // Poinchips +#define UHS_VID_DATA_TRANSMISSION_NETWORK 0x09a7U // Data Transmission Network Corp. +#define UHS_VID_LIN_SHIUNG_ENTERPRISE 0x09a8U // Lin Shiung Enterprise Co., Ltd +#define UHS_VID_SMART_CARD_TECHNOLOGIES 0x09a9U // Smart Card Technologies Co., Ltd +#define UHS_VID_INTERSIL 0x09aaU // Intersil Corp. +#define UHS_VID_JAPAN_CASH_MACHINE 0x09abU // Japan Cash Machine Co., Ltd. +#define UHS_VID_TRIPP_LITE 0x09aeU // Tripp Lite +#define UHS_VID_FRANKLIN_ELECTRONIC_PUBLISHERS 0x09b2U // Franklin Electronic Publishers, Inc. +#define UHS_VID_ALTIUS_SOLUTIONS 0x09b3U // Altius Solutions, Inc. +#define UHS_VID_MDS_TELEPHONE_SYSTEMS 0x09b4U // MDS Telephone Systems +#define UHS_VID_CELLTRIX_TECHNOLOGY 0x09b5U // Celltrix Technology Co., Ltd +#define UHS_VID_GRUNDIG 0x09bcU // Grundig +#define UHS_VID_MYSMARTCOM 0x09beU // MySmart.Com +#define UHS_VID_AUERSWALD_GMBH_AND_CO_KG 0x09bfU // Auerswald GmbH & Co. KG +#define UHS_VID_GENPIX_ELECTRONICS 0x09c0U // Genpix Electronics, LLC +#define UHS_VID_ARRIS_INTERACTIVE 0x09c1U // Arris Interactive LLC +#define UHS_VID_NISCA 0x09c2U // Nisca Corp. +#define UHS_VID_ACTIVCARD 0x09c3U // ActivCard, Inc. +#define UHS_VID_ACTISYS 0x09c4U // ACTiSYS Corp. +#define UHS_VID_MEMORY 0x09c5U // Memory Corp. +#define UHS_VID_BMC_MESSSYSTEME 0x09caU // BMC Messsysteme GmbH +#define UHS_VID_WORKBIT 0x09ccU // Workbit Corp. +#define UHS_VID_PSION_DACOM_HOME_NETWORKS 0x09cdU // Psion Dacom Home Networks, Ltd +#define UHS_VID_CITY_ELECTRONICS 0x09ceU // City Electronics, Ltd +#define UHS_VID_ELECTRONICS_TESTING_CENTER_TAIWAN 0x09cfU // Electronics Testing Center, Taiwan +#define UHS_VID_NEOMAGIC 0x09d1U // NeoMagic, Inc. +#define UHS_VID_VREELIN_ENGINEERING 0x09d2U // Vreelin Engineering, Inc. +#define UHS_VID_COM_ONE 0x09d3U // Com One +#define UHS_VID_NOVATEL_WIRELESS 0x09d7U // Novatel Wireless +#define UHS_VID_KRF_TECH 0x09d9U // KRF Tech, Ltd +#define UHS_VID_A4TECH 0x09daU // A4Tech Co., Ltd. +#define UHS_VID_MEASUREMENT_COMPUTING 0x09dbU // Measurement Computing Corp. +#define UHS_VID_AIMEX 0x09dcU // Aimex Corp. +#define UHS_VID_FELLOWES 0x09ddU // Fellowes, Inc. +#define UHS_VID_ADDONICS_TECHNOLOGIES 0x09dfU // Addonics Technologies Corp. +#define UHS_VID_INTELLON 0x09e1U // Intellon Corp. +#define UHS_VID_JO_DAN_INTERNATIONAL 0x09e5U // Jo-Dan International, Inc. +#define UHS_VID_SILUTIA 0x09e6U // Silutia, Inc. +#define UHS_VID_REAL_3D 0x09e7U // Real 3D, Inc. +#define UHS_VID_AKAI_PROFESSIONAL_MI 0x09e8U // AKAI Professional M.I. Corp. +#define UHS_VID_CHEN_SOURCE 0x09e9U // Chen-Source, Inc. +#define UHS_VID_IM_NETWORKS 0x09ebU // IM Networks, Inc. +#define UHS_VID_XITEL 0x09efU // Xitel +#define UHS_VID_GOFLIGHT 0x09f3U // GoFlight, Inc. +#define UHS_VID_ARESCOM 0x09f5U // AresCom +#define UHS_VID_ROCKETCHIPS 0x09f6U // RocketChips, Inc. +#define UHS_VID_EDU_SCIENCE_HK 0x09f7U // Edu-Science (H.K.), Ltd +#define UHS_VID_SOFTCONNEX_TECHNOLOGIES 0x09f8U // SoftConnex Technologies, Inc. +#define UHS_VID_BAY_ASSOCIATES 0x09f9U // Bay Associates +#define UHS_VID_MTEK_VISION 0x09faU // Mtek Vision +#define UHS_VID_ALTERA_1 0x09fbU // Altera +#define UHS_VID_GAIN_TECHNOLOGY 0x09ffU // Gain Technology Corp. +#define UHS_VID_LIQUID_AUDIO 0x0a00U // Liquid Audio +#define UHS_VID_VIA 0x0a01U // ViA, Inc. +#define UHS_VID_UNKNOWN_MANUFACTURER 0x0a05U // Unknown Manufacturer +#define UHS_VID_ONTRAK_CONTROL_SYSTEMS 0x0a07U // Ontrak Control Systems Inc. +#define UHS_VID_CYBEX_COMPUTER_PRODUCTS 0x0a0bU // Cybex Computer Products Co. +#define UHS_VID_SERVERGY 0x0a0dU // Servergy, Inc +#define UHS_VID_XENTEC 0x0a11U // Xentec, Inc. +#define UHS_VID_CAMBRIDGE_SILICON_RADIO 0x0a12U // Cambridge Silicon Radio, Ltd +#define UHS_VID_TELEBYTE 0x0a13U // Telebyte, Inc. +#define UHS_VID_SPACELABS_MEDICAL 0x0a14U // Spacelabs Medical, Inc. +#define UHS_VID_SCALAR 0x0a15U // Scalar Corp. +#define UHS_VID_TREK_TECHNOLOGY_S_PTE 0x0a16U // Trek Technology (S) PTE, Ltd +#define UHS_VID_PENTAX 0x0a17U // Pentax Corp. +#define UHS_VID_HEIDELBERGER_DRUCKMASCHINEN_AG 0x0a18U // Heidelberger Druckmaschinen AG +#define UHS_VID_HUA_GENG_TECHNOLOGIES 0x0a19U // Hua Geng Technologies, Inc. +#define UHS_VID_MEDTRONIC_PHYSIO_CONTROL 0x0a21U // Medtronic Physio Control Corp. +#define UHS_VID_CENTURY_SEMICONDUCTOR_USA 0x0a22U // Century Semiconductor USA, Inc. +#define UHS_VID_DATACARD_GROUP 0x0a27U // Datacard Group +#define UHS_VID_AK_MODUL_BUS_COMPUTER 0x0a2cU // AK-Modul-Bus Computer GmbH +#define UHS_VID_TG3_ELECTRONICS 0x0a34U // TG3 Electronics, Inc. +#define UHS_VID_RADIKAL_TECHNOLOGIES 0x0a35U // Radikal Technologies +#define UHS_VID_GILAT_SATELLITE_NETWORKS 0x0a39U // Gilat Satellite Networks, Ltd +#define UHS_VID_PENTAMEDIA 0x0a3aU // PentaMedia Co., Ltd +#define UHS_VID_NTT_DOCOMO 0x0a3cU // NTT DoCoMo, Inc. +#define UHS_VID_VARO_VISION 0x0a3dU // Varo Vision +#define UHS_VID_SWISSONIC_AG 0x0a3fU // Swissonic AG +#define UHS_VID_BOCA_SYSTEMS 0x0a43U // Boca Systems, Inc. +#define UHS_VID_DAVICOM_SEMICONDUCTOR 0x0a46U // Davicom Semiconductor, Inc. +#define UHS_VID_HIROSE_ELECTRIC 0x0a47U // Hirose Electric +#define UHS_VID_IO_INTERCONNECT 0x0a48U // I/O Interconnect +#define UHS_VID_PLOYTEC 0x0a4aU // Ploytec GmbH +#define UHS_VID_FUJITSU_MEDIA_DEVICES 0x0a4bU // Fujitsu Media Devices, Ltd +#define UHS_VID_COMPUTEX 0x0a4cU // Computex Co., Ltd +#define UHS_VID_EVOLUTION_ELECTRONICS 0x0a4dU // Evolution Electronics, Ltd +#define UHS_VID_STEINBERG_SOFT_UND_HARDWARE 0x0a4eU // Steinberg Soft-und Hardware GmbH +#define UHS_VID_LITTON_SYSTEMS 0x0a4fU // Litton Systems, Inc. +#define UHS_VID_MIMAKI_ENGINEERING 0x0a50U // Mimaki Engineering Co., Ltd +#define UHS_VID_SONY_ELECTRONICS 0x0a51U // Sony Electronics, Inc. +#define UHS_VID_JEBSEE_ELECTRONICS 0x0a52U // Jebsee Electronics Co., Ltd +#define UHS_VID_PORTABLE_PERIPHERAL 0x0a53U // Portable Peripheral Co., Ltd +#define UHS_VID_ELECTRONICS_FOR_IMAGING 0x0a5aU // Electronics For Imaging, Inc. +#define UHS_VID_EASICS_NV 0x0a5bU // EAsics NV +#define UHS_VID_BROADCOM 0x0a5cU // Broadcom Corp. +#define UHS_VID_DIATREND 0x0a5dU // Diatrend Corp. +#define UHS_VID_ZEBRA 0x0a5fU // Zebra +#define UHS_VID_MPMAN 0x0a62U // MPMan +#define UHS_VID_CLEARCUBE_TECHNOLOGY 0x0a66U // ClearCube Technology +#define UHS_VID_MEDELI_ELECTRONICS 0x0a67U // Medeli Electronics Co., Ltd +#define UHS_VID_COMAIDE 0x0a68U // Comaide Corp. +#define UHS_VID_CHROMA_ATE 0x0a69U // Chroma ate, Inc. +#define UHS_VID_GREEN_HOUSE 0x0a6bU // Green House Co., Ltd +#define UHS_VID_INTEGRATED_CIRCUIT_SYSTEMS 0x0a6cU // Integrated Circuit Systems, Inc. +#define UHS_VID_UPS_MANUFACTURING 0x0a6dU // UPS Manufacturing +#define UHS_VID_BENWIN 0x0a6eU // Benwin +#define UHS_VID_CORE_TECHNOLOGY 0x0a6fU // Core Technology, Inc. +#define UHS_VID_INTERNATIONAL_GAME_TECHNOLOGY 0x0a70U // International Game Technology +#define UHS_VID_VIPCOLOR_TECHNOLOGIES_USA 0x0a71U // VIPColor Technologies USA, Inc. +#define UHS_VID_SANWA_DENSHI 0x0a72U // Sanwa Denshi +#define UHS_VID_MACKIE_DESIGNS 0x0a73U // Mackie Designs +#define UHS_VID_NSTL 0x0a7dU // NSTL, Inc. +#define UHS_VID_OCTAGON_SYSTEMS 0x0a7eU // Octagon Systems Corp. +#define UHS_VID_REXON_TECHNOLOGY 0x0a80U // Rexon Technology Corp., Ltd +#define UHS_VID_CHESEN_ELECTRONICS 0x0a81U // Chesen Electronics Corp. +#define UHS_VID_SYSCAN 0x0a82U // Syscan +#define UHS_VID_NEXTCOMM 0x0a83U // NextComm, Inc. +#define UHS_VID_MAUI_INNOVATIVE_PERIPHERALS 0x0a84U // Maui Innovative Peripherals +#define UHS_VID_IDEXX_LABS 0x0a85U // Idexx Labs +#define UHS_VID_NITGEN 0x0a86U // NITGen Co., Ltd +#define UHS_VID_AKTIV 0x0a89U // Aktiv +#define UHS_VID_PICTURETEL 0x0a8dU // Picturetel +#define UHS_VID_JAPAN_AVIATION_ELECTRONICS_INDUSTRY 0x0a8eU // Japan Aviation Electronics Industry, Ltd +#define UHS_VID_CANDY_TECHNOLOGY 0x0a90U // Candy Technology Co., Ltd +#define UHS_VID_GLOBLINK_TECHNOLOGY 0x0a91U // Globlink Technology, Inc. +#define UHS_VID_EGO_SYSTEMS 0x0a92U // EGO SYStems, Inc. +#define UHS_VID_C_TECHNOLOGIES 0x0a93U // C Technologies AB +#define UHS_VID_INTERSENSE 0x0a94U // Intersense +#define UHS_VID_LAVA_COMPUTER_MFG 0x0aa3U // Lava Computer Mfg., Inc. +#define UHS_VID_DEVELCO_ELEKTRONIK 0x0aa4U // Develco Elektronik +#define UHS_VID_FIRST_INTERNATIONAL_DIGITAL 0x0aa5U // First International Digital +#define UHS_VID_PERCEPTION_DIGITAL 0x0aa6U // Perception Digital, Ltd +#define UHS_VID_WINCOR_NIXDORF_INTERNATIONAL 0x0aa7U // Wincor Nixdorf International GmbH +#define UHS_VID_TRIGEM_COMPUTER 0x0aa8U // TriGem Computer, Inc. +#define UHS_VID_BAROMTEC 0x0aa9U // Baromtec Co. +#define UHS_VID_JAPAN_CBM 0x0aaaU // Japan CBM Corp. +#define UHS_VID_VISION_SHAPE_EUROPE 0x0aabU // Vision Shape Europe SA +#define UHS_VID_ICOMPRESSION 0x0aacU // iCompression, Inc. +#define UHS_VID_ROHDE_AND_SCHWARZ_GMBH_AND_CO_KG 0x0aadU // Rohde & Schwarz GmbH & Co. KG +#define UHS_VID_NEC_INFRONTIA_CORP_NITSUKO 0x0aaeU // NEC infrontia Corp. (Nitsuko) +#define UHS_VID_DIGITALWAY 0x0aafU // Digitalway Co., Ltd +#define UHS_VID_ARROW_STRONG_ELECTRONICS 0x0ab0U // Arrow Strong Electronics Co., Ltd +#define UHS_VID_FEIG_ELECTRONIC 0x0ab1U // FEIG ELECTRONIC GmbH +#define UHS_VID_ELLISYS 0x0abaU // Ellisys +#define UHS_VID_STEREO_LINK 0x0abeU // Stereo-Link +#define UHS_VID_DIOLAN 0x0abfU // Diolan +#define UHS_VID_SANYO_SEMICONDUCTOR_COMPANY_MICRO 0x0ac3U // Sanyo Semiconductor Company Micro +#define UHS_VID_LECO 0x0ac4U // Leco Corp. +#define UHS_VID_I_AND_C 0x0ac5U // I & C Corp. +#define UHS_VID_SINGING_ELECTRONS 0x0ac6U // Singing Electrons, Inc. +#define UHS_VID_PANWEST 0x0ac7U // Panwest Corp. +#define UHS_VID_Z_STAR_MICROELECTRONICS 0x0ac8U // Z-Star Microelectronics Corp. +#define UHS_VID_MICRO_SOLUTIONS 0x0ac9U // Micro Solutions, Inc. +#define UHS_VID_OPEN_NETWORKS 0x0acaU // OPEN Networks Ltd +#define UHS_VID_KOGA_ELECTRONICS 0x0accU // Koga Electronics Co. +#define UHS_VID_ID_TECH 0x0acdU // ID Tech +#define UHS_VID_ZYDAS 0x0aceU // ZyDAS +#define UHS_VID_INTOTO 0x0acfU // Intoto, Inc. +#define UHS_VID_INTELLIX 0x0ad0U // Intellix Corp. +#define UHS_VID_REMOTEC_TECHNOLOGY 0x0ad1U // Remotec Technology, Ltd +#define UHS_VID_SERVICE_AND_QUALITY_TECHNOLOGY 0x0ad2U // Service & Quality Technology Co., Ltd +#define UHS_VID_DATA_ENCRYPTION_SYSTEMS 0x0adaU // Data Encryption Systems Ltd. +#define UHS_VID_ALLION_COMPUTER 0x0ae3U // Allion Computer, Inc. +#define UHS_VID_TAITO 0x0ae4U // Taito Corp. +#define UHS_VID_NEODYM_SYSTEMS 0x0ae7U // Neodym Systems, Inc. +#define UHS_VID_SYSTEM_SUPPORT 0x0ae8U // System Support Co., Ltd +#define UHS_VID_NORTH_SHORE_CIRCUIT_DESIGN_LLP 0x0ae9U // North Shore Circuit Design L.L.P. +#define UHS_VID_SCIESSENCE 0x0aeaU // SciEssence, LLC +#define UHS_VID_TTP_COMMUNICATIONS 0x0aebU // TTP Communications, Ltd +#define UHS_VID_NEODIO_TECHNOLOGIES 0x0aecU // Neodio Technologies Corp. +#define UHS_VID_OPTION 0x0af0U // Option +#define UHS_VID_SILVER_I 0x0af6U // Silver I Co., Ltd +#define UHS_VID_B2C2 0x0af7U // B2C2, Inc. +#define UHS_VID_HAMA 0x0af9U // Hama, Inc. +#define UHS_VID_DMC 0x0afaU // DMC Co., Ltd. +#define UHS_VID_ZAPTRONIX 0x0afcU // Zaptronix Ltd +#define UHS_VID_TATENO_DENNOU 0x0afdU // Tateno Dennou, Inc. +#define UHS_VID_CUMMINS_ENGINE 0x0afeU // Cummins Engine Co. +#define UHS_VID_JUMP_ZONE_NETWORK_PRODUCTS 0x0affU // Jump Zone Network Products, Inc. +#define UHS_VID_INGENICO 0x0b00U // INGENICO +#define UHS_VID_ASUSTEK_COMPUTER 0x0b05U // ASUSTek Computer, Inc. +#define UHS_VID_DATAMAX_ONEIL 0x0b0bU // Datamax-O'Neil +#define UHS_VID_TODOS 0x0b0cU // Todos AB +#define UHS_VID_PROJECTLAB 0x0b0dU // ProjectLab +#define UHS_VID_GN_NETCOM 0x0b0eU // GN Netcom +#define UHS_VID_AVID_TECHNOLOGY 0x0b0fU // AVID Technology +#define UHS_VID_PCALLY 0x0b10U // Pcally +#define UHS_VID_I_TECH_SOLUTIONS 0x0b11U // I Tech Solutions Co., Ltd +#define UHS_VID_ELECTRONIC_WARFARE_ASSOC_INC_EWA 0x0b1eU // Electronic Warfare Assoc., Inc. (EWA) +#define UHS_VID_INSYDE_SOFTWARE 0x0b1fU // Insyde Software Corp. +#define UHS_VID_TRANSDIMENSION 0x0b20U // TransDimension, Inc. +#define UHS_VID_YOKOGAWA_ELECTRIC 0x0b21U // Yokogawa Electric Corp. +#define UHS_VID_JAPAN_SYSTEM_DEVELOPMENT 0x0b22U // Japan System Development Co., Ltd +#define UHS_VID_PAN_ASIA_ELECTRONICS 0x0b23U // Pan-Asia Electronics Co., Ltd +#define UHS_VID_LINK_EVOLUTION 0x0b24U // Link Evolution Corp. +#define UHS_VID_RITEK 0x0b27U // Ritek Corp. +#define UHS_VID_KENWOOD 0x0b28U // Kenwood Corp. +#define UHS_VID_VILLAGE_CENTER 0x0b2cU // Village Center, Inc. +#define UHS_VID_PNY_TECHNOLOGIES 0x0b30U // PNY Technologies, Inc. +#define UHS_VID_CONTOUR_DESIGN 0x0b33U // Contour Design, Inc. +#define UHS_VID_HITACHI_ULSI_SYSTEMS 0x0b37U // Hitachi ULSI Systems Co., Ltd +#define UHS_VID_GEAR_HEAD 0x0b38U // Gear Head +#define UHS_VID_OMNIDIRECTIONAL_CONTROL_TECHNOLOGY 0x0b39U // Omnidirectional Control Technology, Inc. +#define UHS_VID_IPAXESS 0x0b3aU // IPaxess +#define UHS_VID_TEKRAM_TECHNOLOGY 0x0b3bU // Tekram Technology Co., Ltd +#define UHS_VID_OLIVETTI_TECHCENTER 0x0b3cU // Olivetti Techcenter +#define UHS_VID_KIKUSUI_ELECTRONICS 0x0b3eU // Kikusui Electronics Corp. +#define UHS_VID_HAL 0x0b41U // Hal Corp. +#define UHS_VID_PLAYCOM 0x0b43U // Play.com, Inc. +#define UHS_VID_SPORTBUGCOM 0x0b47U // Sportbug.com, Inc. +#define UHS_VID_TECHNOTREND_AG 0x0b48U // TechnoTrend AG +#define UHS_VID_ASCII 0x0b49U // ASCII Corp. +#define UHS_VID_PINE 0x0b4bU // Pine Corp. Ltd. +#define UHS_VID_GRAPHTEC_AMERICA 0x0b4dU // Graphtec America, Inc. +#define UHS_VID_MUSICAL_ELECTRONICS 0x0b4eU // Musical Electronics, Ltd +#define UHS_VID_DUMPRIES 0x0b50U // Dumpries Co., Ltd +#define UHS_VID_COMFORT_KEYBOARD 0x0b51U // Comfort Keyboard Co. +#define UHS_VID_COLORADO_MICRODISPLAY 0x0b52U // Colorado MicroDisplay, Inc. +#define UHS_VID_SINBON_ELECTRONICS 0x0b54U // Sinbon Electronics Co., Ltd +#define UHS_VID_TYI_SYSTEMS 0x0b56U // TYI Systems, Ltd +#define UHS_VID_BEIJING_HANWANGTECHNOLOGY 0x0b57U // Beijing HanwangTechnology Co., Ltd +#define UHS_VID_LAKE_COMMUNICATIONS 0x0b59U // Lake Communications, Ltd +#define UHS_VID_COREL 0x0b5aU // Corel Corp. +#define UHS_VID_GREEN_ELECTRONICS 0x0b5fU // Green Electronics Co., Ltd +#define UHS_VID_NSINE 0x0b60U // Nsine, Ltd +#define UHS_VID_NEC_VIEWTECHNOLOGY 0x0b61U // NEC Viewtechnology, Ltd +#define UHS_VID_ORANGE_MICRO 0x0b62U // Orange Micro, Inc. +#define UHS_VID_ADLINK_TECHNOLOGY 0x0b63U // ADLink Technology, Inc. +#define UHS_VID_WONDERFUL_WIRE_CABLE 0x0b64U // Wonderful Wire Cable Co., Ltd +#define UHS_VID_EXPERT_MAGNETICS 0x0b65U // Expert Magnetics Corp. +#define UHS_VID_CYBIKO 0x0b66U // Cybiko Inc. +#define UHS_VID_FAIRBANKS_SCALES 0x0b67U // Fairbanks Scales +#define UHS_VID_CACHEVISION 0x0b69U // CacheVision +#define UHS_VID_MAXIM_INTEGRATED_PRODUCTS 0x0b6aU // Maxim Integrated Products +#define UHS_VID_NAGANO_JAPAN_RADIO 0x0b6fU // Nagano Japan Radio Co., Ltd +#define UHS_VID_PORTALPLAYER 0x0b70U // PortalPlayer, Inc. +#define UHS_VID_SHIN_EI_SANGYO 0x0b71U // SHIN-EI Sangyo Co., Ltd +#define UHS_VID_EMBEDDED_WIRELESS_TECHNOLOGY 0x0b72U // Embedded Wireless Technology Co., Ltd +#define UHS_VID_COMPUTONE 0x0b73U // Computone Corp. +#define UHS_VID_ROLAND_DG 0x0b75U // Roland DG Corp. +#define UHS_VID_SUNRISE_TELECOM 0x0b79U // Sunrise Telecom, Inc. +#define UHS_VID_ZEEVO 0x0b7aU // Zeevo, Inc. +#define UHS_VID_TAIKO_DENKI 0x0b7bU // Taiko Denki Co., Ltd +#define UHS_VID_ITRAN_COMMUNICATIONS 0x0b7cU // ITRAN Communications, Ltd +#define UHS_VID_ASTRODESIGN 0x0b7dU // Astrodesign, Inc. +#define UHS_VID_ID3_TECHNOLOGIES 0x0b81U // id3 Technologies +#define UHS_VID_REXTRON_TECHNOLOGY 0x0b84U // Rextron Technology, Inc. +#define UHS_VID_ELKAT_ELECTRONICS_SDN_BHD 0x0b85U // Elkat Electronics, Sdn., Bhd. +#define UHS_VID_EXPUTER_SYSTEMS 0x0b86U // Exputer Systems, Inc. +#define UHS_VID_PLUS_ONE_I_AND_T 0x0b87U // Plus-One I & T, Inc. +#define UHS_VID_SIGMA_KOKI_CO_LTD_TECHNOLOGY_CENTER 0x0b88U // Sigma Koki Co., Ltd, Technology Center +#define UHS_VID_ADVANCED_DIGITAL_BROADCAST 0x0b89U // Advanced Digital Broadcast, Ltd +#define UHS_VID_SMART_TECHNOLOGIES 0x0b8cU // SMART Technologies Inc. +#define UHS_VID_ASIX_ELECTRONICS 0x0b95U // ASIX Electronics Corp. +#define UHS_VID_SEWON_TELECOM 0x0b96U // Sewon Telecom +#define UHS_VID_O2_MICRO 0x0b97U // O2 Micro, Inc. +#define UHS_VID_PLAYMATES_TOYS 0x0b98U // Playmates Toys, Inc. +#define UHS_VID_AUDIO_INTERNATIONAL 0x0b99U // Audio International, Inc. +#define UHS_VID_DIPL_ING_STEFAN_KUNDE 0x0b9bU // Dipl.-Ing. Stefan Kunde +#define UHS_VID_SOFTPROTEC 0x0b9dU // Softprotec Co. +#define UHS_VID_CHIPPO_TECHNOLOGIES 0x0b9fU // Chippo Technologies +#define UHS_VID_US_ROBOTICS 0x0bafU // U.S. Robotics +#define UHS_VID_CONCORD_CAMERA 0x0bb0U // Concord Camera Corp. +#define UHS_VID_INFINILINK 0x0bb1U // Infinilink Corp. +#define UHS_VID_AMBIT_MICROSYSTEMS 0x0bb2U // Ambit Microsystems Corp. +#define UHS_VID_OFUJI_TECHNOLOGY 0x0bb3U // Ofuji Technology +#define UHS_VID_HTC_HIGH_TECH_COMPUTER 0x0bb4U // HTC (High Tech Computer Corp.) +#define UHS_VID_MURATA_MANUFACTURING 0x0bb5U // Murata Manufacturing Co., Ltd +#define UHS_VID_NETWORK_ALCHEMY 0x0bb6U // Network Alchemy +#define UHS_VID_JOYTECH_COMPUTER 0x0bb7U // Joytech Computer Co., Ltd +#define UHS_VID_HITACHI_SEMICONDUCTOR_AND_DEVICES_SALES 0x0bb8U // Hitachi Semiconductor and Devices Sales Co., Ltd +#define UHS_VID_EIGER_MANDC 0x0bb9U // Eiger M&C Co., Ltd +#define UHS_VID_ZACCESS_SYSTEMS 0x0bbaU // ZAccess Systems +#define UHS_VID_GENERAL_METERS 0x0bbbU // General Meters Corp. +#define UHS_VID_ASSISTIVE_TECHNOLOGY 0x0bbcU // Assistive Technology, Inc. +#define UHS_VID_SYSTEM_CONNECTION 0x0bbdU // System Connection, Inc. +#define UHS_VID_KNILINK_TECHNOLOGY 0x0bc0U // Knilink Technology, Inc. +#define UHS_VID_FUW_YNG_ELECTRONICS 0x0bc1U // Fuw Yng Electronics Co., Ltd +#define UHS_VID_SEAGATE_RSS 0x0bc2U // Seagate RSS LLC +#define UHS_VID_IPWIRELESS 0x0bc3U // IPWireless, Inc. +#define UHS_VID_MICROCUBE 0x0bc4U // Microcube Corp. +#define UHS_VID_JCN 0x0bc5U // JCN Co., Ltd +#define UHS_VID_EXWAY 0x0bc6U // ExWAY, Inc. +#define UHS_VID_X10_WIRELESS_TECHNOLOGY 0x0bc7U // X10 Wireless Technology, Inc. +#define UHS_VID_TELMAX_COMMUNICATIONS 0x0bc8U // Telmax Communications +#define UHS_VID_ECI_TELECOM 0x0bc9U // ECI Telecom, Ltd +#define UHS_VID_STARTEK_ENGINEERING 0x0bcaU // Startek Engineering, Inc. +#define UHS_VID_PERFECT_TECHNIC_ENTERPRISE 0x0bcbU // Perfect Technic Enterprise Co., Ltd +#define UHS_VID_ANDREW_PARGETER_AND_ASSOCIATES 0x0bd7U // Andrew Pargeter & Associates +#define UHS_VID_REALTEK_SEMICONDUCTOR 0x0bdaU // Realtek Semiconductor Corp. +#define UHS_VID_ERICSSON_BUSINESS_MOBILE_NETWORKS_BV 0x0bdbU // Ericsson Business Mobile Networks BV +#define UHS_VID_Y_MEDIA 0x0bdcU // Y Media Corp. +#define UHS_VID_ORANGE_PCS 0x0bddU // Orange PCS +#define UHS_VID_KANDA_TSUSHIN_KOGYO 0x0be2U // Kanda Tsushin Kogyo Co., Ltd +#define UHS_VID_TOYO 0x0be3U // TOYO Corp. +#define UHS_VID_ELKA_INTERNATIONAL 0x0be4U // Elka International, Ltd +#define UHS_VID_DOME_IMAGING_SYSTEMS 0x0be5U // DOME imaging systems, Inc. +#define UHS_VID_DONG_GUAN_HUMEN_WONDERFUL_WIRE_CABLE_FACTORY 0x0be6U // Dong Guan Humen Wonderful Wire Cable Factory +#define UHS_VID_MEI 0x0bedU // MEI +#define UHS_VID_LTK_INDUSTRIES 0x0beeU // LTK Industries, Ltd +#define UHS_VID_WAY2CALL_COMMUNICATIONS 0x0befU // Way2Call Communications +#define UHS_VID_PACE_MICRO_TECHNOLOGY_PLC 0x0bf0U // Pace Micro Technology PLC +#define UHS_VID_INTRACOM 0x0bf1U // Intracom S.A. +#define UHS_VID_KONEXX 0x0bf2U // Konexx +#define UHS_VID_ADDONICS_TECHNOLOGIES_1 0x0bf6U // Addonics Technologies, Inc. +#define UHS_VID_SUNNY_GIKEN 0x0bf7U // Sunny Giken, Inc. +#define UHS_VID_FUJITSU_SIEMENS_COMPUTERS_1 0x0bf8U // Fujitsu Siemens Computers +#define UHS_VID_KVASER 0x0bfdU // Kvaser AB +#define UHS_VID_MOTO_DEVELOPMENT_GROUP 0x0c04U // MOTO Development Group, Inc. +#define UHS_VID_APPIAN_GRAPHICS 0x0c05U // Appian Graphics +#define UHS_VID_HASBRO_GAMES 0x0c06U // Hasbro Games, Inc. +#define UHS_VID_INFINITE_DATA_STORAGE 0x0c07U // Infinite Data Storage, Ltd +#define UHS_VID_AGATE 0x0c08U // Agate +#define UHS_VID_COMJET_INFORMATION_SYSTEM 0x0c09U // Comjet Information System +#define UHS_VID_HIGHPOINT_TECHNOLOGIES 0x0c0aU // Highpoint Technologies, Inc. +#define UHS_VID_DURA_MICRO_INC_ACOMDATA 0x0c0bU // Dura Micro, Inc. (Acomdata) +#define UHS_VID_ZEROPLUS 0x0c12U // Zeroplus +#define UHS_VID_IRIS_GRAPHICS 0x0c15U // Iris Graphics +#define UHS_VID_GYRATION 0x0c16U // Gyration, Inc. +#define UHS_VID_CYBERBOARD_AS 0x0c17U // Cyberboard A/S +#define UHS_VID_SYNERTEK_KOREA 0x0c18U // SynerTek Korea, Inc. +#define UHS_VID_CYBERPIXIE 0x0c19U // cyberPIXIE, Inc. +#define UHS_VID_SILICON_MOTION 0x0c1aU // Silicon Motion, Inc. +#define UHS_VID_MIPS_TECHNOLOGIES 0x0c1bU // MIPS Technologies +#define UHS_VID_HANG_ZHOU_SILAN_ELECTRONICS 0x0c1cU // Hang Zhou Silan Electronics Co., Ltd +#define UHS_VID_TALLY_PRINTER 0x0c22U // Tally Printer Corp. +#define UHS_VID_LERNOUT__HAUSPIE 0x0c23U // Lernout + Hauspie +#define UHS_VID_TAIYO_YUDEN 0x0c24U // Taiyo Yuden +#define UHS_VID_SAMPO 0x0c25U // Sampo Corp. +#define UHS_VID_PROLIFIC_TECHNOLOGY_1 0x0c26U // Prolific Technology Inc. +#define UHS_VID_RFIDEAS 0x0c27U // RFIDeas, Inc +#define UHS_VID_METROLOGIC_INSTRUMENTS 0x0c2eU // Metrologic Instruments +#define UHS_VID_EAGLETRON 0x0c35U // Eagletron, Inc. +#define UHS_VID_E_INK 0x0c36U // E Ink Corp. +#define UHS_VID_EDIGITAL 0x0c37U // e.Digital +#define UHS_VID_DER_AN_ELECTRIC_WIRE_AND_CABLE 0x0c38U // Der An Electric Wire & Cable Co., Ltd +#define UHS_VID_IFR 0x0c39U // IFR +#define UHS_VID_FURUI_PRECISE_COMPONENT_KUNSHAN 0x0c3aU // Furui Precise Component (Kunshan) Co., Ltd +#define UHS_VID_KOMATSU 0x0c3bU // Komatsu, Ltd +#define UHS_VID_RADIUS 0x0c3cU // Radius Co., Ltd +#define UHS_VID_INNOCOM 0x0c3dU // Innocom, Inc. +#define UHS_VID_NEXTCELL 0x0c3eU // Nextcell, Inc. +#define UHS_VID_MOTOROLA_IDEN 0x0c44U // Motorola iDEN +#define UHS_VID_MICRODIA 0x0c45U // Microdia +#define UHS_VID_WAVERIDER_COMMUNICATIONS 0x0c46U // WaveRider Communications, Inc. +#define UHS_VID_ALGE_TIMING 0x0c4aU // ALGE-TIMING GmbH +#define UHS_VID_REINER_SCT_KARTENSYSTEME 0x0c4bU // Reiner SCT Kartensysteme GmbH +#define UHS_VID_NEEDHAMS_ELECTRONICS 0x0c4cU // Needham's Electronics +#define UHS_VID_SEALEVEL_SYSTEMS 0x0c52U // Sealevel Systems, Inc. +#define UHS_VID_VIEWPLUS 0x0c53U // ViewPLUS, Inc. +#define UHS_VID_GLORY 0x0c54U // Glory, Ltd +#define UHS_VID_SPECTRUM_DIGITAL 0x0c55U // Spectrum Digital, Inc. +#define UHS_VID_BILLION_BRIGHT 0x0c56U // Billion Bright, Ltd +#define UHS_VID_IMAGINATIVE_DESIGN_OPERATION 0x0c57U // Imaginative Design Operation Co., Ltd +#define UHS_VID_VIDAR_SYSTEMS 0x0c58U // Vidar Systems Corp. +#define UHS_VID_DONG_GUAN_SHINKO_WIRE 0x0c59U // Dong Guan Shinko Wire Co., Ltd +#define UHS_VID_TRS_INTERNATIONAL_MFG 0x0c5aU // TRS International Mfg., Inc. +#define UHS_VID_XYTRONIX_RESEARCH_AND_DESIGN 0x0c5eU // Xytronix Research & Design +#define UHS_VID_APOGEE_ELECTRONICS 0x0c60U // Apogee Electronics Corp. +#define UHS_VID_CHANT_SINCERE 0x0c62U // Chant Sincere Co., Ltd +#define UHS_VID_TOKO 0x0c63U // Toko, Inc. +#define UHS_VID_SIGNALITY_SYSTEM_ENGINEERING 0x0c64U // Signality System Engineering Co., Ltd +#define UHS_VID_EMINENCE_ENTERPRISE 0x0c65U // Eminence Enterprise Co., Ltd +#define UHS_VID_REXON_ELECTRONICS 0x0c66U // Rexon Electronics Corp. +#define UHS_VID_CONCEPT_TELECOM 0x0c67U // Concept Telecom, Ltd +#define UHS_VID_ACS 0x0c6aU // ACS +#define UHS_VID_JETI_TECHNISCHE_INSTRUMENTE 0x0c6cU // JETI Technische Instrumente GmbH +#define UHS_VID_MCT_ELEKTRONIKLADEN 0x0c70U // MCT Elektronikladen +#define UHS_VID_PEAK_SYSTEM 0x0c72U // PEAK System +#define UHS_VID_OPTRONIC_LABORATORIES 0x0c74U // Optronic Laboratories Inc. +#define UHS_VID_JMTEK 0x0c76U // JMTek, LLC. +#define UHS_VID_SIPIX_GROUP 0x0c77U // Sipix Group, Ltd +#define UHS_VID_DETTO 0x0c78U // Detto Corp. +#define UHS_VID_NUCONNEX_TECHNOLOGIES_PTE 0x0c79U // NuConnex Technologies Pte., Ltd +#define UHS_VID_WING_SPAN_ENTERPRISE 0x0c7aU // Wing-Span Enterprise Co., Ltd +#define UHS_VID_NDA_TECHNOLOGIES 0x0c86U // NDA Technologies, Inc. +#define UHS_VID_KYOCERA_WIRELESS 0x0c88U // Kyocera Wireless Corp. +#define UHS_VID_HONDA_TSUSHIN_KOGYO 0x0c89U // Honda Tsushin Kogyo Co., Ltd +#define UHS_VID_PATHWAY_CONNECTIVITY 0x0c8aU // Pathway Connectivity, Inc. +#define UHS_VID_WAVEFLY 0x0c8bU // Wavefly Corp. +#define UHS_VID_COACTIVE_NETWORKS 0x0c8cU // Coactive Networks +#define UHS_VID_TEMPO 0x0c8dU // Tempo +#define UHS_VID_CESSCOM 0x0c8eU // Cesscom Co., Ltd +#define UHS_VID_APPLIED_MICROSYSTEMS 0x0c8fU // Applied Microsystems +#define UHS_VID_CRYPTERA 0x0c94U // Cryptera +#define UHS_VID_BERKSHIRE_PRODUCTS 0x0c98U // Berkshire Products, Inc. +#define UHS_VID_INNOCHIPS 0x0c99U // Innochips Co., Ltd +#define UHS_VID_HANWOOL_ROBOTICS 0x0c9aU // Hanwool Robotics Corp. +#define UHS_VID_JOBIN_YVON 0x0c9bU // Jobin Yvon, Inc. +#define UHS_VID_SEMTEK 0x0c9dU // SemTek +#define UHS_VID_ZYFER 0x0ca2U // Zyfer +#define UHS_VID_SEGA 0x0ca3U // Sega Corp. +#define UHS_VID_STANDT_INSTRUMENT 0x0ca4U // ST&T Instrument Corp. +#define UHS_VID_BAE_SYSTEMS_CANADA 0x0ca5U // BAE Systems Canada, Inc. +#define UHS_VID_CASTLES_TECHNOLOGY 0x0ca6U // Castles Technology Co., Ltd +#define UHS_VID_INFORMATION_SYSTEMS_LABORATORIES 0x0ca7U // Information Systems Laboratories +#define UHS_VID_MOTOROLA_CGISS 0x0cadU // Motorola CGISS +#define UHS_VID_ASCOM_BUSINESS_SYSTEMS 0x0caeU // Ascom Business Systems, Ltd +#define UHS_VID_BUSLINK 0x0cafU // Buslink +#define UHS_VID_FLYING_PIG_SYSTEMS 0x0cb0U // Flying Pig Systems +#define UHS_VID_INNOVONICS 0x0cb1U // Innovonics, Inc. +#define UHS_VID_CELESTIX_NETWORKS_PTE 0x0cb6U // Celestix Networks, Pte., Ltd +#define UHS_VID_SINGATRON_ENTERPRISE 0x0cb7U // Singatron Enterprise Co., Ltd +#define UHS_VID_OPTICIS 0x0cb8U // Opticis Co., Ltd +#define UHS_VID_TRUST_ELECTRONIC_SHANGHAI 0x0cbaU // Trust Electronic (Shanghai) Co., Ltd +#define UHS_VID_SHANGHAI_DARONG_ELECTRONICS 0x0cbbU // Shanghai Darong Electronics Co., Ltd +#define UHS_VID_PALMAX_TECHNOLOGY 0x0cbcU // Palmax Technology Co., Ltd +#define UHS_VID_PENTEL_CO_LTD_ELECTRONICS_EQUIPMENT_DIV 0x0cbdU // Pentel Co., Ltd (Electronics Equipment Div.) +#define UHS_VID_KERYX_TECHNOLOGIES 0x0cbeU // Keryx Technologies, Inc. +#define UHS_VID_UNION_GENIUS_COMPUTER 0x0cbfU // Union Genius Computer Co., Ltd +#define UHS_VID_KUON_YI_INDUSTRIAL 0x0cc0U // Kuon Yi Industrial Corp. +#define UHS_VID_GIVEN_IMAGING 0x0cc1U // Given Imaging, Ltd +#define UHS_VID_TIMEX 0x0cc2U // Timex Corp. +#define UHS_VID_RIMAGE 0x0cc3U // Rimage Corp. +#define UHS_VID_EMSYS 0x0cc4U // emsys GmbH +#define UHS_VID_SENDO 0x0cc5U // Sendo +#define UHS_VID_INTERMAGIC 0x0cc6U // Intermagic Corp. +#define UHS_VID_KONTRON_MEDICAL_AG 0x0cc7U // Kontron Medical AG +#define UHS_VID_TECHNOTOOLS 0x0cc8U // Technotools Corp. +#define UHS_VID_BROADMAX_TECHNOLOGIES 0x0cc9U // BroadMAX Technologies, Inc. +#define UHS_VID_AMPHENOL 0x0ccaU // Amphenol +#define UHS_VID_SKNET 0x0ccbU // SKNet Co., Ltd +#define UHS_VID_DOMEX_TECHNOLOGY 0x0cccU // Domex Technology Corp. +#define UHS_VID_TERRATEC_ELECTRONIC 0x0ccdU // TerraTec Electronic GmbH +#define UHS_VID_BANG_OLUFSEN 0x0cd4U // Bang Olufsen +#define UHS_VID_LABJACK_CORPORATION 0x0cd5U // LabJack Corporation +#define UHS_VID_NEWCHIP_SRL 0x0cd7U // NewChip S.r.l. +#define UHS_VID_JS_DIGITECH 0x0cd8U // JS Digitech, Inc. +#define UHS_VID_HITACHI_SHIN_DIN_CABLE 0x0cd9U // Hitachi Shin Din Cable, Ltd +#define UHS_VID_Z_COM 0x0cdeU // Z-Com +#define UHS_VID_VALIDATION_TECHNOLOGIES_INTERNATIONAL 0x0ce5U // Validation Technologies International +#define UHS_VID_PICO_TECHNOLOGY 0x0ce9U // Pico Technology +#define UHS_VID_E_CONN_ELECTRONIC 0x0cf1U // e-Conn Electronic Co., Ltd +#define UHS_VID_ENE_TECHNOLOGY 0x0cf2U // ENE Technology, Inc. +#define UHS_VID_ATHEROS_COMMUNICATIONS 0x0cf3U // Atheros Communications, Inc. +#define UHS_VID_FOMTEX 0x0cf4U // Fomtex Corp. +#define UHS_VID_CELLINK 0x0cf5U // Cellink Co., Ltd +#define UHS_VID_COMPUCABLE 0x0cf6U // Compucable Corp. +#define UHS_VID_ISHONI_NETWORKS 0x0cf7U // ishoni Networks +#define UHS_VID_CLARISYS 0x0cf8U // Clarisys, Inc. +#define UHS_VID_CENTRAL_SYSTEM_RESEARCH 0x0cf9U // Central System Research Co., Ltd +#define UHS_VID_INVISO 0x0cfaU // Inviso, Inc. +#define UHS_VID_MINOLTA_QMS 0x0cfcU // Minolta-QMS, Inc. +#define UHS_VID_SAFA_MEDIA 0x0cffU // SAFA MEDIA Co., Ltd. +#define UHS_VID_TELOS_EDV_SYSTEMENTWICKLUNG 0x0d06U // telos EDV Systementwicklung GmbH +#define UHS_VID_UTSTARCOM 0x0d08U // UTStarcom +#define UHS_VID_CONTEMPORARY_CONTROLS 0x0d0bU // Contemporary Controls +#define UHS_VID_ASTRON_ELECTRONICS 0x0d0cU // Astron Electronics Co., Ltd +#define UHS_VID_MKNET 0x0d0dU // MKNet Corp. +#define UHS_VID_HYBRID_NETWORKS 0x0d0eU // Hybrid Networks, Inc. +#define UHS_VID_FENG_SHIN_CABLE 0x0d0fU // Feng Shin Cable Co., Ltd +#define UHS_VID_ELASTIC_NETWORKS 0x0d10U // Elastic Networks +#define UHS_VID_MASPRO_DENKOH 0x0d11U // Maspro Denkoh Corp. +#define UHS_VID_HANSOL_ELECTRONICS 0x0d12U // Hansol Electronics, Inc. +#define UHS_VID_BMF 0x0d13U // BMF Corp. +#define UHS_VID_ARRAY_COMM 0x0d14U // Array Comm, Inc. +#define UHS_VID_ONSTREAM_BV 0x0d15U // OnStream b.v. +#define UHS_VID_HI_TOUCH_IMAGING_TECHNOLOGIES 0x0d16U // Hi-Touch Imaging Technologies Co., Ltd +#define UHS_VID_NALTEC 0x0d17U // NALTEC, Inc. +#define UHS_VID_COAXMEDIA 0x0d18U // coaXmedia +#define UHS_VID_HANK_CONNECTION_INDUSTRIAL 0x0d19U // Hank Connection Industrial Co., Ltd +#define UHS_VID_NXP 0x0d28U // NXP +#define UHS_VID_LEO_HUI_ELECTRIC_WIRE_AND_CABLE 0x0d32U // Leo Hui Electric Wire & Cable Co., Ltd +#define UHS_VID_AIRSPEAK 0x0d33U // AirSpeak, Inc. +#define UHS_VID_REARDEN_STEEL_TECHNOLOGIES 0x0d34U // Rearden Steel Technologies +#define UHS_VID_DAH_KUN 0x0d35U // Dah Kun Co., Ltd +#define UHS_VID_POSIFLEX_TECHNOLOGIES 0x0d3aU // Posiflex Technologies, Inc. +#define UHS_VID_SRI_CABLE_TECHNOLOGY 0x0d3cU // Sri Cable Technology, Ltd +#define UHS_VID_TANGTOP_TECHNOLOGY 0x0d3dU // Tangtop Technology Co., Ltd +#define UHS_VID_FITCOM 0x0d3eU // Fitcom, inc. +#define UHS_VID_MTS_SYSTEMS 0x0d3fU // MTS Systems Corp. +#define UHS_VID_ASCOR 0x0d40U // Ascor, Inc. +#define UHS_VID_TA_YUN_TERMINALS_INDUSTRIAL 0x0d41U // Ta Yun Terminals Industrial Co., Ltd +#define UHS_VID_FULL_DER 0x0d42U // Full Der Co., Ltd +#define UHS_VID_KOBIL_SYSTEMS 0x0d46U // Kobil Systems GmbH +#define UHS_VID_PROMETHEAN_LIMITED 0x0d48U // Promethean Limited +#define UHS_VID_MAXTOR 0x0d49U // Maxtor +#define UHS_VID_NF 0x0d4aU // NF Corp. +#define UHS_VID_GRAPE_SYSTEMS 0x0d4bU // Grape Systems, Inc. +#define UHS_VID_TEDAS_AG 0x0d4cU // Tedas AG +#define UHS_VID_COHERENT 0x0d4dU // Coherent, Inc. +#define UHS_VID_AGERE_SYSTEMS_NETHERLAND_BV 0x0d4eU // Agere Systems Netherland BV +#define UHS_VID_EADS_AIRBUS_FRANCE 0x0d4fU // EADS Airbus France +#define UHS_VID_CLEWARE 0x0d50U // Cleware GmbH +#define UHS_VID_VOLEX_ASIA_PTE 0x0d51U // Volex (Asia) Pte., Ltd +#define UHS_VID_HMI 0x0d53U // HMI Co., Ltd +#define UHS_VID_HOLON 0x0d54U // Holon Corp. +#define UHS_VID_ASKA_TECHNOLOGIES 0x0d55U // ASKA Technologies, Inc. +#define UHS_VID_AVLAB_TECHNOLOGY 0x0d56U // AVLAB Technology, Inc. +#define UHS_VID_SOLOMON_MICROTECH 0x0d57U // Solomon Microtech, Ltd +#define UHS_VID_SMC_NETWORKS 0x0d5cU // SMC Networks, Inc. +#define UHS_VID_MYACOM 0x0d5eU // Myacom, Ltd +#define UHS_VID_CSI 0x0d5fU // CSI, Inc. +#define UHS_VID_IVL_TECHNOLOGIES 0x0d60U // IVL Technologies, Ltd +#define UHS_VID_MEILU_ELECTRONICS_SHENZHEN 0x0d61U // Meilu Electronics (Shenzhen) Co., Ltd +#define UHS_VID_DARFON_ELECTRONICS 0x0d62U // Darfon Electronics Corp. +#define UHS_VID_FRITZ_GEGAUF_AG 0x0d63U // Fritz Gegauf AG +#define UHS_VID_DXG_TECHNOLOGY 0x0d64U // DXG Technology Corp. +#define UHS_VID_KMJP 0x0d65U // KMJP Co., Ltd +#define UHS_VID_TMT 0x0d66U // TMT +#define UHS_VID_ADVANET 0x0d67U // Advanet, Inc. +#define UHS_VID_SUPER_LINK_ELECTRONICS 0x0d68U // Super Link Electronics Co., Ltd +#define UHS_VID_NSI 0x0d69U // NSI +#define UHS_VID_MEGAPOWER_INTERNATIONAL 0x0d6aU // Megapower International Corp. +#define UHS_VID_AND_OR_LOGIC 0x0d6bU // And-Or Logic +#define UHS_VID_TRY_COMPUTER 0x0d70U // Try Computer Co., Ltd +#define UHS_VID_HIRAKAWA_HEWTECH 0x0d71U // Hirakawa Hewtech Corp. +#define UHS_VID_WINMATE_COMMUNICATION 0x0d72U // Winmate Communication, Inc. +#define UHS_VID_HITS_COMMUNICATIONS 0x0d73U // Hit's Communications, Inc. +#define UHS_VID_MFP_KOREA 0x0d76U // MFP Korea, Inc. +#define UHS_VID_POWER_SENTRYNEWPOINT 0x0d77U // Power Sentry/Newpoint +#define UHS_VID_JAPAN_DISTRIBUTOR 0x0d78U // Japan Distributor Corp. +#define UHS_VID_MARX_DATENTECHNIK 0x0d7aU // MARX Datentechnik GmbH +#define UHS_VID_WELLCO_TECHNOLOGY 0x0d7bU // Wellco Technology Co., Ltd +#define UHS_VID_TAIWAN_LINE_TEK_ELECTRONIC 0x0d7cU // Taiwan Line Tek Electronic Co., Ltd +#define UHS_VID_PHISON_ELECTRONICS 0x0d7dU // Phison Electronics Corp. +#define UHS_VID_AMERICAN_COMPUTER_AND_DIGITAL_COMPONENTS 0x0d7eU // American Computer & Digital Components +#define UHS_VID_ESSENTIAL_REALITY 0x0d7fU // Essential Reality LLC +#define UHS_VID_HR_SILVINE_ELECTRONICS 0x0d80U // H.R. Silvine Electronics, Inc. +#define UHS_VID_TECHNOVISION 0x0d81U // TechnoVision +#define UHS_VID_THINK_OUTSIDE 0x0d83U // Think Outside, Inc. +#define UHS_VID_DOLBY_LABORATORIES 0x0d87U // Dolby Laboratories Inc. +#define UHS_VID_OZ_SOFTWARE 0x0d89U // Oz Software +#define UHS_VID_KING_JIM 0x0d8aU // King Jim Co., Ltd +#define UHS_VID_ASCOM_TELECOMMUNICATIONS 0x0d8bU // Ascom Telecommunications, Ltd +#define UHS_VID_C_MEDIA_ELECTRONICS 0x0d8cU // C-Media Electronics, Inc. +#define UHS_VID_PROMOTION_AND_DISPLAY_TECHNOLOGY 0x0d8dU // Promotion & Display Technology, Ltd +#define UHS_VID_GLOBAL_SUN_TECHNOLOGY 0x0d8eU // Global Sun Technology, Inc. +#define UHS_VID_PITNEY_BOWES 0x0d8fU // Pitney Bowes +#define UHS_VID_SURE_FIRE_ELECTRICAL 0x0d90U // Sure-Fire Electrical Corp. +#define UHS_VID_SKANHEX_TECHNOLOGY 0x0d96U // Skanhex Technology, Inc. +#define UHS_VID_SANTA_BARBARA_INSTRUMENT_GROUP 0x0d97U // Santa Barbara Instrument Group +#define UHS_VID_MARS_SEMICONDUCTOR 0x0d98U // Mars Semiconductor Corp. +#define UHS_VID_TRAZER_TECHNOLOGIES 0x0d99U // Trazer Technologies, Inc. +#define UHS_VID_RTX_TELECOM_AS 0x0d9aU // RTX Telecom AS +#define UHS_VID_TAT_SHING_ELECTRICAL 0x0d9bU // Tat Shing Electrical Co. +#define UHS_VID_CHEE_CHEN_HI_TECHNOLOGY 0x0d9cU // Chee Chen Hi-Technology Co., Ltd +#define UHS_VID_SANWA_SUPPLY 0x0d9dU // Sanwa Supply, Inc. +#define UHS_VID_AVAYA 0x0d9eU // Avaya +#define UHS_VID_POWERCOM 0x0d9fU // Powercom Co., Ltd +#define UHS_VID_DANGER_RESEARCH 0x0da0U // Danger Research +#define UHS_VID_SUZHOU_PETERS_PRECISE_INDUSTRIAL 0x0da1U // Suzhou Peter's Precise Industrial Co., Ltd +#define UHS_VID_LAND_INSTRUMENTS_INTERNATIONAL 0x0da2U // Land Instruments International, Ltd +#define UHS_VID_NIPPON_ELECTRO_SENSORY_DEVICES 0x0da3U // Nippon Electro-Sensory Devices Corp. +#define UHS_VID_POLAR_ELECTRO_OY 0x0da4U // Polar Electro Oy +#define UHS_VID_IOGEAR 0x0da7U // IOGear, Inc. +#define UHS_VID_SOFTDSP 0x0da8U // softDSP Co., Ltd +#define UHS_VID_CUBIG_GROUP 0x0dabU // Cubig Group +#define UHS_VID_WESTOVER_SCIENTIFIC 0x0dadU // Westover Scientific +#define UHS_VID_MICRO_STAR_INTERNATIONAL 0x0db0U // Micro Star International +#define UHS_VID_WEN_TE_ELECTRONICS 0x0db1U // Wen Te Electronics Co., Ltd +#define UHS_VID_SHIAN_HWI_PLUG_PARTS_PLASTIC_FACTORY 0x0db2U // Shian Hwi Plug Parts, Plastic Factory +#define UHS_VID_TEKRAM_TECHNOLOGY_1 0x0db3U // Tekram Technology Co., Ltd +#define UHS_VID_CHUNG_FU_CHEN_YEH_ENTERPRISE 0x0db4U // Chung Fu Chen Yeh Enterprise Corp. +#define UHS_VID_ACCESS_IS 0x0db5U // Access IS +#define UHS_VID_ELCON_SYSTEMTECHNIK 0x0db7U // ELCON Systemtechnik +#define UHS_VID_DIGIDESIGN 0x0dbaU // Digidesign +#define UHS_VID_AANDD_MEDICAL 0x0dbcU // A&D Medical +#define UHS_VID_JIUH_SHIUH_PRECISION_INDUSTRY 0x0dbeU // Jiuh Shiuh Precision Industry Co., Ltd +#define UHS_VID_JESS_LINK_INTERNATIONAL 0x0dbfU // Jess-Link International +#define UHS_VID_G7_SOLUTIONS_FORMERLY_GREAT_NOTIONS 0x0dc0U // G7 Solutions (formerly Great Notions) +#define UHS_VID_TAMAGAWA_SEIKI 0x0dc1U // Tamagawa Seiki Co., Ltd +#define UHS_VID_ATHENA_SMARTCARD_SOLUTIONS 0x0dc3U // Athena Smartcard Solutions, Inc. +#define UHS_VID_MACPOWER_PERIPHERALS 0x0dc4U // Macpower Peripherals, Ltd +#define UHS_VID_SDK 0x0dc5U // SDK Co., Ltd +#define UHS_VID_PRECISION_SQUARED_TECHNOLOGY 0x0dc6U // Precision Squared Technology Corp. +#define UHS_VID_FIRST_CABLE_LINE 0x0dc7U // First Cable Line, Inc. +#define UHS_VID_NETWORKFAB 0x0dcdU // NetworkFab Corp. +#define UHS_VID_ACCESS_SOLUTIONS 0x0dd0U // Access Solutions +#define UHS_VID_CONTEK_ELECTRONICS 0x0dd1U // Contek Electronics Co., Ltd +#define UHS_VID_POWER_QUOTIENT_INTERNATIONAL 0x0dd2U // Power Quotient International Co., Ltd +#define UHS_VID_MEDIAQ 0x0dd3U // MediaQ +#define UHS_VID_CUSTOM_ENGINEERING_SPA 0x0dd4U // Custom Engineering SPA +#define UHS_VID_CALIFORNIA_MICRO_DEVICES 0x0dd5U // California Micro Devices +#define UHS_VID_KOCOM 0x0dd7U // Kocom Co., Ltd +#define UHS_VID_NETAC_TECHNOLOGY 0x0dd8U // Netac Technology Co., Ltd +#define UHS_VID_HIGHSPEED_SURFING 0x0dd9U // HighSpeed Surfing +#define UHS_VID_INTEGRATED_CIRCUIT_SOLUTION 0x0ddaU // Integrated Circuit Solution, Inc. +#define UHS_VID_TAMARACK 0x0ddbU // Tamarack, Inc. +#define UHS_VID_DATELINK_TECHNOLOGY 0x0dddU // Datelink Technology Co., Ltd +#define UHS_VID_UBICOM 0x0ddeU // Ubicom, Inc. +#define UHS_VID_BD_CONSUMER_HEALTHCARE 0x0de0U // BD Consumer Healthcare +#define UHS_VID_USBMICRO 0x0de7U // USBmicro +#define UHS_VID_UTECH_ELECTRONIC_DG 0x0deaU // UTECH Electronic (D.G.) Co., Ltd. +#define UHS_VID_NOVASONICS 0x0dedU // Novasonics +#define UHS_VID_LIFETIME_MEMORY_PRODUCTS 0x0deeU // Lifetime Memory Products +#define UHS_VID_FULL_RISE_ELECTRONIC 0x0defU // Full Rise Electronic Co., Ltd +#define UHS_VID_NETANDSYS 0x0df4U // NET&SYS +#define UHS_VID_SITECOM_EUROPE_BV 0x0df6U // Sitecom Europe B.V. +#define UHS_VID_MOBILE_ACTION_TECHNOLOGY 0x0df7U // Mobile Action Technology, Inc. +#define UHS_VID_TOYO_COMMUNICATION_EQUIPMENT 0x0dfaU // Toyo Communication Equipment Co., Ltd +#define UHS_VID_GENERALTOUCH_TECHNOLOGY 0x0dfcU // GeneralTouch Technology Co., Ltd +#define UHS_VID_NIPPON_SYSTEMWARE 0x0e03U // Nippon Systemware Co., Ltd +#define UHS_VID_WINBEST_TECHNOLOGY 0x0e08U // Winbest Technology Co., Ltd +#define UHS_VID_AMIGO_TECHNOLOGY 0x0e0bU // Amigo Technology Inc. +#define UHS_VID_GESYTEC 0x0e0cU // Gesytec +#define UHS_VID_PICOQUANT 0x0e0dU // PicoQuant GmbH +#define UHS_VID_VMWARE 0x0e0fU // VMware, Inc. +#define UHS_VID_JMTEK_1 0x0e16U // JMTek, LLC +#define UHS_VID_WALEX_ELECTRONIC 0x0e17U // Walex Electronic, Ltd +#define UHS_VID_UNISYS_1 0x0e1aU // Unisys +#define UHS_VID_CREWAVE 0x0e1bU // Crewave +#define UHS_VID_PEGASUS_TECHNOLOGIES 0x0e20U // Pegasus Technologies Ltd. +#define UHS_VID_COWON_SYSTEMS 0x0e21U // Cowon Systems, Inc. +#define UHS_VID_SYMBIAN 0x0e22U // Symbian Ltd. +#define UHS_VID_LIOU_YUANE_ENTERPRISE 0x0e23U // Liou Yuane Enterprise Co., Ltd +#define UHS_VID_VINCHIP_SYSTEMS 0x0e25U // VinChip Systems, Inc. +#define UHS_VID_J_PHONE_EAST 0x0e26U // J-Phone East Co., Ltd +#define UHS_VID_HEARTMATH 0x0e30U // HeartMath LLC +#define UHS_VID_MICRO_COMPUTER_CONTROL 0x0e34U // Micro Computer Control Corp. +#define UHS_VID_3PEA_TECHNOLOGIES 0x0e35U // 3Pea Technologies, Inc. +#define UHS_VID_TIEPIE_ENGINEERING 0x0e36U // TiePie engineering +#define UHS_VID_STRATITEC 0x0e38U // Stratitec, Inc. +#define UHS_VID_SMART_MODULAR_TECHNOLOGIES 0x0e39U // Smart Modular Technologies, Inc. +#define UHS_VID_NEOSTAR_TECHNOLOGY 0x0e3aU // Neostar Technology Co., Ltd +#define UHS_VID_MANSELLA 0x0e3bU // Mansella, Ltd +#define UHS_VID_LINE6 0x0e41U // Line6, Inc. +#define UHS_VID_SUN_RISEFUL_TECHNOLOGY 0x0e44U // Sun-Riseful Technology Co., Ltd. +#define UHS_VID_JULIA 0x0e48U // Julia Corp., Ltd +#define UHS_VID_SHENZHEN_BAO_HING_ELECTRIC_WIRE_AND_CABLE_MFR 0x0e4aU // Shenzhen Bao Hing Electric Wire & Cable Mfr. Co. +#define UHS_VID_RADICA_GAMES 0x0e4cU // Radica Games, Ltd +#define UHS_VID_TECHNODATA_INTERWARE 0x0e50U // TechnoData Interware +#define UHS_VID_SPEED_DRAGON_MULTIMEDIA 0x0e55U // Speed Dragon Multimedia, Ltd +#define UHS_VID_KINGSTON_TECHNOLOGY_COMPANY 0x0e56U // Kingston Technology Company, Inc. +#define UHS_VID_ACTIVE 0x0e5aU // Active Co., Ltd +#define UHS_VID_UNION_POWER_INFORMATION_INDUSTRIAL 0x0e5bU // Union Power Information Industrial Co., Ltd +#define UHS_VID_BITLAND_INFORMATION_TECHNOLOGY 0x0e5cU // Bitland Information Technology Co., Ltd +#define UHS_VID_NELTRON_INDUSTRIAL 0x0e5dU // Neltron Industrial Co., Ltd +#define UHS_VID_CONWISE_TECHNOLOGY 0x0e5eU // Conwise Technology Co., Ltd. +#define UHS_VID_HAWKING_TECHNOLOGIES 0x0e66U // Hawking Technologies +#define UHS_VID_FOSSIL 0x0e67U // Fossil, Inc. +#define UHS_VID_MEGAWIN_TECHNOLOGY 0x0e6aU // Megawin Technology Co., Ltd +#define UHS_VID_LOGIC3 0x0e6fU // Logic3 +#define UHS_VID_TOKYO_ELECTRONIC_INDUSTRY 0x0e70U // Tokyo Electronic Industry Co., Ltd +#define UHS_VID_HSI_CHIN_ELECTRONICS 0x0e72U // Hsi-Chin Electronics Co., Ltd +#define UHS_VID_TVS_ELECTRONICS 0x0e75U // TVS Electronics, Ltd +#define UHS_VID_ARCHOS 0x0e79U // Archos, Inc. +#define UHS_VID_ON_TECH_INDUSTRY 0x0e7bU // On-Tech Industry Co., Ltd +#define UHS_VID_GMATE 0x0e7eU // Gmate, Inc. +#define UHS_VID_CHING_TAI_ELECTRIC_WIRE_AND_CABLE 0x0e82U // Ching Tai Electric Wire & Cable Co., Ltd +#define UHS_VID_SHIN_AN_WIRE_AND_CABLE 0x0e83U // Shin An Wire & Cable Co. +#define UHS_VID_WELL_FORCE_ELECTRONIC 0x0e8cU // Well Force Electronic Co., Ltd +#define UHS_VID_MEDIATEK_1 0x0e8dU // MediaTek Inc. +#define UHS_VID_GREENASIA 0x0e8fU // GreenAsia Inc. +#define UHS_VID_WIEBETECH 0x0e90U // WiebeTech, LLC +#define UHS_VID_VTECH_ENGINEERING_CANADA 0x0e91U // VTech Engineering Canada, Ltd +#define UHS_VID_CS_GLORY_ENTERPRISE 0x0e92U // C's Glory Enterprise Co., Ltd +#define UHS_VID_EM_TECHNICS 0x0e93U // eM Technics Co., Ltd +#define UHS_VID_FUTURE_TECHNOLOGY 0x0e95U // Future Technology Co., Ltd +#define UHS_VID_APLUX_COMMUNICATIONS 0x0e96U // Aplux Communications, Ltd +#define UHS_VID_FINGERWORKS 0x0e97U // Fingerworks, Inc. +#define UHS_VID_ADVANCED_ANALOGIC_TECHNOLOGIES 0x0e98U // Advanced Analogic Technologies, Inc. +#define UHS_VID_PARALLEL_DICE 0x0e99U // Parallel Dice Co., Ltd +#define UHS_VID_TA_HSING_INDUSTRIES 0x0e9aU // TA HSING Industries, Ltd +#define UHS_VID_ADTEC 0x0e9bU // ADTEC Corp. +#define UHS_VID_STREAMZAP 0x0e9cU // Streamzap, Inc. +#define UHS_VID_TAMURA 0x0e9fU // Tamura Corp. +#define UHS_VID_OURS_TECHNOLOGY 0x0ea0U // Ours Technology, Inc. +#define UHS_VID_NIHON_COMPUTER 0x0ea6U // Nihon Computer Co., Ltd +#define UHS_VID_MSL_ENTERPRISES 0x0ea7U // MSL Enterprises Corp. +#define UHS_VID_CENDYNE 0x0ea8U // CenDyne, Inc. +#define UHS_VID_HUMAX_1 0x0eadU // Humax Co., Ltd +#define UHS_VID_NOVATECH 0x0eb0U // NovaTech +#define UHS_VID_WIS_TECHNOLOGIES 0x0eb1U // WIS Technologies, Inc. +#define UHS_VID_Y_S_ELECTRONIC 0x0eb2U // Y-S Electronic Co., Ltd +#define UHS_VID_SAINT_TECHNOLOGY 0x0eb3U // Saint Technology Corp. +#define UHS_VID_ENDOR_AG 0x0eb7U // Endor AG +#define UHS_VID_METTLER_TOLEDO 0x0eb8U // Mettler Toledo +#define UHS_VID_THERMO_FISHER_SCIENTIFIC 0x0ebbU // Thermo Fisher Scientific +#define UHS_VID_VWEB 0x0ebeU // VWeb Corp. +#define UHS_VID_OMEGA_TECHNOLOGY_OF_TAIWAN 0x0ebfU // Omega Technology of Taiwan, Inc. +#define UHS_VID_LHI_TECHNOLOGY_CHINA 0x0ec0U // LHI Technology (China) Co., Ltd +#define UHS_VID_ABIT_COMPUTER 0x0ec1U // Abit Computer Corp. +#define UHS_VID_SWEETRAY_INDUSTRIAL 0x0ec2U // Sweetray Industrial, Ltd +#define UHS_VID_AXELL 0x0ec3U // Axell Co., Ltd +#define UHS_VID_BALLRACING_DEVELOPMENTS 0x0ec4U // Ballracing Developments, Ltd +#define UHS_VID_GT_INFORMATION_SYSTEM 0x0ec5U // GT Information System Co., Ltd +#define UHS_VID_INNOVISION_MULTIMEDIA 0x0ec6U // InnoVISION Multimedia, Ltd +#define UHS_VID_THETA_LINK 0x0ec7U // Theta Link Corp. +#define UHS_VID_LITE_ON_IT 0x0ecdU // Lite-On IT Corp. +#define UHS_VID_TAISOL_ELECTRONICS 0x0eceU // TaiSol Electronics Co., Ltd +#define UHS_VID_PHOGENIX_IMAGING 0x0ecfU // Phogenix Imaging, LLC +#define UHS_VID_WINMAXGROUP 0x0ed1U // WinMaxGroup +#define UHS_VID_KYOTO_MICRO_COMPUTER 0x0ed2U // Kyoto Micro Computer Co., Ltd +#define UHS_VID_WING_TECH_ENTERPRISE 0x0ed3U // Wing-Tech Enterprise Co., Ltd +#define UHS_VID_FIBERBYTE 0x0ed5U // Fiberbyte +#define UHS_VID_NORIAKE_ITRON 0x0edaU // Noriake Itron Corp. +#define UHS_VID_E_MDT 0x0edfU // e-MDT Co., Ltd +#define UHS_VID_SHIMA_SEIKI_MFG 0x0ee0U // Shima Seiki Mfg., Ltd +#define UHS_VID_SAROTECH 0x0ee1U // Sarotech Co., Ltd +#define UHS_VID_AMI_SEMICONDUCTOR 0x0ee2U // AMI Semiconductor, Inc. +#define UHS_VID_COMTRUE_TECHNOLOGY 0x0ee3U // ComTrue Technology Corp. +#define UHS_VID_SUNRICH_TECHNOLOGY 0x0ee4U // Sunrich Technology, Ltd +#define UHS_VID_DIGITAL_STREAM_TECHNOLOGY 0x0eeeU // Digital Stream Technology, Inc. +#define UHS_VID_D_WAV_SCIENTIFIC 0x0eefU // D-WAV Scientific Co., Ltd +#define UHS_VID_HITACHI_CABLE 0x0ef0U // Hitachi Cable, Ltd +#define UHS_VID_AICHI_MICRO_INTELLIGENT 0x0ef1U // Aichi Micro Intelligent Corp. +#define UHS_VID_IO_MAGIC 0x0ef2U // I/O Magic Corp. +#define UHS_VID_LYNN_PRODUCTS 0x0ef3U // Lynn Products, Inc. +#define UHS_VID_DSI_DATOTECH 0x0ef4U // DSI Datotech +#define UHS_VID_POINTCHIPS 0x0ef5U // PointChips +#define UHS_VID_YIELD_MICROELECTRONICS 0x0ef6U // Yield Microelectronics Corp. +#define UHS_VID_SM_TECH_CO_LTD_TULIP 0x0ef7U // SM Tech Co., Ltd (Tulip) +#define UHS_VID_OASIS_SEMICONDUCTOR 0x0efdU // Oasis Semiconductor +#define UHS_VID_WEM_TECHNOLOGY 0x0efeU // Wem Technology, Inc. +#define UHS_VID_UNITEK_UPS_SYSTEMS 0x0f03U // Unitek UPS Systems +#define UHS_VID_VISUAL_FRONTIER_ENTERPRISE 0x0f06U // Visual Frontier Enterprise Co., Ltd +#define UHS_VID_CSL_WIRE_AND_PLUG_SHEN_ZHEN 0x0f08U // CSL Wire & Plug (Shen Zhen) Co. +#define UHS_VID_CAS 0x0f0cU // CAS Corp. +#define UHS_VID_HORI 0x0f0dU // Hori Co., Ltd +#define UHS_VID_ENERGY_FULL 0x0f0eU // Energy Full Corp. +#define UHS_VID_LD_DIDACTIC 0x0f11U // LD Didactic GmbH +#define UHS_VID_MARS_ENGINEERING 0x0f12U // Mars Engineering Corp. +#define UHS_VID_ACETEK_TECHNOLOGY 0x0f13U // Acetek Technology Co., Ltd +#define UHS_VID_INGENICO_1 0x0f14U // Ingenico +#define UHS_VID_FINGER_LAKES_INSTRUMENTATION 0x0f18U // Finger Lakes Instrumentation +#define UHS_VID_ORACOM 0x0f19U // Oracom Co., Ltd +#define UHS_VID_ONSET_COMPUTER 0x0f1bU // Onset Computer Corp. +#define UHS_VID_FUNAI_ELECTRIC 0x0f1cU // Funai Electric Co., Ltd +#define UHS_VID_IWILL 0x0f1dU // Iwill Corp. +#define UHS_VID_IOI_TECHNOLOGY 0x0f21U // IOI Technology Corp. +#define UHS_VID_SENIOR_INDUSTRIES 0x0f22U // Senior Industries, Inc. +#define UHS_VID_LEADER_TECH_MANUFACTURER 0x0f23U // Leader Tech Manufacturer Co., Ltd +#define UHS_VID_FLEX_P_INDUSTRIES_SND_BHD 0x0f24U // Flex-P Industries, Snd., Bhd. +#define UHS_VID_VIPOWER 0x0f2dU // ViPower, Inc. +#define UHS_VID_GENIALITY_MAPLE_TECHNOLOGY 0x0f2eU // Geniality Maple Technology Co., Ltd +#define UHS_VID_PRIVA_DESIGN_SERVICES 0x0f2fU // Priva Design Services +#define UHS_VID_JESS_TECHNOLOGY 0x0f30U // Jess Technology Co., Ltd +#define UHS_VID_CHRYSALIS_DEVELOPMENT 0x0f31U // Chrysalis Development +#define UHS_VID_YFC_BONEAGLE_ELECTRIC 0x0f32U // YFC-BonEagle Electric Co., Ltd +#define UHS_VID_KOKUYO 0x0f37U // Kokuyo Co., Ltd +#define UHS_VID_NIEN_YI_INDUSTRIAL 0x0f38U // Nien-Yi Industrial Corp. +#define UHS_VID_TG3_ELECTRONICS_1 0x0f39U // TG3 Electronics +#define UHS_VID_AIRPRIME_INCORPORATED 0x0f3dU // Airprime, Incorporated +#define UHS_VID_RDC_SEMICONDUCTOR 0x0f41U // RDC Semiconductor Co., Ltd +#define UHS_VID_NITAL_CONSULTING_SERVICES 0x0f42U // Nital Consulting Services, Inc. +#define UHS_VID_POLHEMUS 0x0f44U // Polhemus +#define UHS_VID_ST_JOHN_TECHNOLOGY 0x0f4bU // St. John Technology Co., Ltd +#define UHS_VID_WORLDWIDE_CABLE_OPTO 0x0f4cU // WorldWide Cable Opto Corp. +#define UHS_VID_MICROTUNE 0x0f4dU // Microtune, Inc. +#define UHS_VID_FREEDOM_SCIENTIFIC 0x0f4eU // Freedom Scientific +#define UHS_VID_WING_KEY_ELECTRICAL 0x0f52U // Wing Key Electrical Co., Ltd +#define UHS_VID_DONGGUAN_WHITE_HORSE_CABLE_FACTORY 0x0f53U // Dongguan White Horse Cable Factory, Ltd +#define UHS_VID_KAWAI_MUSICAL_INSTRUMENTS_MFG 0x0f54U // Kawai Musical Instruments Mfg. Co., Ltd +#define UHS_VID_AMBICOM 0x0f55U // AmbiCom, Inc. +#define UHS_VID_PRAIRIECOMM 0x0f5cU // Prairiecomm, Inc. +#define UHS_VID_NEWAGE_INTERNATIONAL 0x0f5dU // NewAge International, LLC +#define UHS_VID_KEY_TECHNOLOGY 0x0f5fU // Key Technology Corp. +#define UHS_VID_NTK 0x0f60U // NTK, Ltd +#define UHS_VID_VARIAN 0x0f61U // Varian, Inc. +#define UHS_VID_ACROX_TECHNOLOGIES 0x0f62U // Acrox Technologies Co., Ltd +#define UHS_VID_LEAPFROG_ENTERPRISES 0x0f63U // LeapFrog Enterprises +#define UHS_VID_KOBE_STEEL 0x0f68U // Kobe Steel, Ltd +#define UHS_VID_DIONEX 0x0f69U // Dionex Corp. +#define UHS_VID_VIBREN_TECHNOLOGIES 0x0f6aU // Vibren Technologies, Inc. +#define UHS_VID_INTELLIGENT_SYSTEMS 0x0f6eU // INTELLIGENT SYSTEMS +#define UHS_VID_DFI_1 0x0f73U // DFI +#define UHS_VID_GUNTERMANN_AND_DRUNCK 0x0f78U // Guntermann & Drunck GmbH +#define UHS_VID_DQ_TECHNOLOGY 0x0f7cU // DQ Technology, Inc. +#define UHS_VID_NETBOTZ 0x0f7dU // NetBotz, Inc. +#define UHS_VID_FLUKE 0x0f7eU // Fluke Corp. +#define UHS_VID_VTECH_HOLDINGS 0x0f88U // VTech Holdings, Ltd +#define UHS_VID_YAZAKI 0x0f8bU // Yazaki Corp. +#define UHS_VID_YOUNG_GENERATION_INTERNATIONAL 0x0f8cU // Young Generation International Corp. +#define UHS_VID_UNIWILL_COMPUTER 0x0f8dU // Uniwill Computer Corp. +#define UHS_VID_KINGNET_TECHNOLOGY 0x0f8eU // Kingnet Technology Co., Ltd +#define UHS_VID_SOMA_NETWORKS 0x0f8fU // Soma Networks +#define UHS_VID_CVILUX 0x0f97U // CviLux Corp. +#define UHS_VID_CYBERBANK 0x0f98U // CyberBank Corp. +#define UHS_VID_HYUN_WON 0x0f9cU // Hyun Won, Inc. +#define UHS_VID_LUCENT_TECHNOLOGIES_1 0x0f9eU // Lucent Technologies +#define UHS_VID_STARCONN_ELECTRONIC 0x0fa3U // Starconn Electronic Co., Ltd +#define UHS_VID_ATL_TECHNOLOGY 0x0fa4U // ATL Technology +#define UHS_VID_SOTEC 0x0fa5U // Sotec Co., Ltd +#define UHS_VID_EPOX_COMPUTER 0x0fa7U // Epox Computer Co., Ltd +#define UHS_VID_LOGIC_CONTROLS 0x0fa8U // Logic Controls, Inc. +#define UHS_VID_WINPOINT_ELECTRONIC 0x0fafU // Winpoint Electronic Corp. +#define UHS_VID_HAURTIAN_WIRE_AND_CABLE 0x0fb0U // Haurtian Wire & Cable Co., Ltd +#define UHS_VID_INCLOSE_DESIGN 0x0fb1U // Inclose Design, Inc. +#define UHS_VID_JUAN_CHERN_INDUSTRIAL 0x0fb2U // Juan-Chern Industrial Co., Ltd +#define UHS_VID_HEBER 0x0fb6U // Heber Ltd +#define UHS_VID_WISTRON 0x0fb8U // Wistron Corp. +#define UHS_VID_AACOM 0x0fb9U // AACom Corp. +#define UHS_VID_SAN_SHING_ELECTRONICS 0x0fbaU // San Shing Electronics Co., Ltd +#define UHS_VID_BITWISE_SYSTEMS 0x0fbbU // Bitwise Systems, Inc. +#define UHS_VID_MITAC_INTERNATINAL 0x0fc1U // Mitac Internatinal Corp. +#define UHS_VID_PLUG_AND_JACK_INDUSTRIAL 0x0fc2U // Plug and Jack Industrial, Inc. +#define UHS_VID_DELCOM_ENGINEERING 0x0fc5U // Delcom Engineering +#define UHS_VID_DATAPLUS_SUPPLIES 0x0fc6U // Dataplus Supplies, Inc. +#define UHS_VID_RESEARCH_IN_MOTION 0x0fcaU // Research In Motion, Ltd. +#define UHS_VID_SONY_ERICSSON_MOBILE_COMMUNICATIONS 0x0fceU // Sony Ericsson Mobile Communications AB +#define UHS_VID_DYNASTREAM_INNOVATIONS 0x0fcfU // Dynastream Innovations, Inc. +#define UHS_VID_TULIP_COMPUTERS_BV 0x0fd0U // Tulip Computers B.V. +#define UHS_VID_GIANT_ELECTRONICS 0x0fd1U // Giant Electronics Ltd. +#define UHS_VID_SEAC_BANCHE 0x0fd2U // Seac Banche +#define UHS_VID_TENOVIS_GMBH_AND_CO_KG 0x0fd4U // Tenovis GmbH & Co., KG +#define UHS_VID_DIRECT_ACCESS_TECHNOLOGY 0x0fd5U // Direct Access Technology, Inc. +#define UHS_VID_ELGATO_SYSTEMS 0x0fd9U // Elgato Systems GmbH +#define UHS_VID_QUANTEC_NETWORKS 0x0fdaU // Quantec Networks GmbH +#define UHS_VID_MICRO_PLUS 0x0fdcU // Micro Plus +#define UHS_VID_OREGON_SCIENTIFIC 0x0fdeU // Oregon Scientific +#define UHS_VID_OSTERHOUT_DESIGN_GROUP 0x0fe0U // Osterhout Design Group +#define UHS_VID_IN_TECH_ELECTRONICS 0x0fe4U // IN-Tech Electronics, Ltd +#define UHS_VID_GREENCONN_USA 0x0fe5U // Greenconn (U.S.A.), Inc. +#define UHS_VID_KONTRON_INDUSTRIAL_COMPUTER_SOURCE_ICS_ADVENT 0x0fe6U // Kontron (Industrial Computer Source / ICS Advent) +#define UHS_VID_DVICO 0x0fe9U // DVICO +#define UHS_VID_UNITED_COMPUTER_ACCESSORIES 0x0feaU // United Computer Accessories +#define UHS_VID_CRS_ELECTRONIC 0x0febU // CRS Electronic Co., Ltd +#define UHS_VID_UMC_ELECTRONICS 0x0fecU // UMC Electronics Co., Ltd +#define UHS_VID_ACCESS 0x0fedU // Access Co., Ltd +#define UHS_VID_XSIDO 0x0feeU // Xsido Corp. +#define UHS_VID_MJ_RESEARCH 0x0fefU // MJ Research, Inc. +#define UHS_VID_CORE_VALLEY 0x0ff6U // Core Valley Co., Ltd +#define UHS_VID_CHI_SHING_COMPUTER_ACCESSORIES 0x0ff7U // CHI SHING Computer Accessories Co., Ltd +#define UHS_VID_CLAVIA_DMI 0x0ffcU // Clavia DMI AB +#define UHS_VID_EARLYSENSE 0x0ffdU // EarlySense +#define UHS_VID_AOPEN 0x0fffU // Aopen, Inc. +#define UHS_VID_SPEED_TECH 0x1000U // Speed Tech Corp. +#define UHS_VID_RITRONICS_COMPONENTS_S_PTE 0x1001U // Ritronics Components (S) Pte., Ltd +#define UHS_VID_SIGMA 0x1003U // Sigma Corp. +#define UHS_VID_LG_ELECTRONICS 0x1004U // LG Electronics, Inc. +#define UHS_VID_APACER_TECHNOLOGY 0x1005U // Apacer Technology, Inc. +#define UHS_VID_IRIVER 0x1006U // iRiver, Ltd. +#define UHS_VID_EMUZED 0x1009U // Emuzed, Inc. +#define UHS_VID_AV_CHASEWAY 0x100aU // AV Chaseway, Ltd +#define UHS_VID_CHOU_CHIN_INDUSTRIAL 0x100bU // Chou Chin Industrial Co., Ltd +#define UHS_VID_NETOPIA 0x100dU // Netopia, Inc. +#define UHS_VID_FUKUDA_DENSHI 0x1010U // Fukuda Denshi Co., Ltd +#define UHS_VID_MOBILE_MEDIA_TECH 0x1011U // Mobile Media Tech. +#define UHS_VID_SDKM_FIBRES_WIRES_AND_CABLES_BERHAD 0x1012U // SDKM Fibres, Wires & Cables Berhad +#define UHS_VID_TST_TOUCHLESS_SENSOR_TECHNOLOGY_AG 0x1013U // TST-Touchless Sensor Technology AG +#define UHS_VID_DENSITRON_TECHNOLOGIES_PLC 0x1014U // Densitron Technologies PLC +#define UHS_VID_SOFTRONICS_PTY 0x1015U // Softronics Pty., Ltd +#define UHS_VID_XIAMEN_HUNGS_ENTERPRISE 0x1016U // Xiamen Hung's Enterprise Co., Ltd +#define UHS_VID_SPEEDY_INDUSTRIAL_SUPPLIES_PTE 0x1017U // Speedy Industrial Supplies, Pte., Ltd +#define UHS_VID_ELITEGROUP_COMPUTER_SYSTEMS_ECS 0x1019U // Elitegroup Computer Systems (ECS) +#define UHS_VID_LABTEC_1 0x1020U // Labtec +#define UHS_VID_SHINKO_SHOJI 0x1022U // Shinko Shoji Co., Ltd +#define UHS_VID_HYPER_PALTEK 0x1025U // Hyper-Paltek +#define UHS_VID_NEWLY 0x1026U // Newly Corp. +#define UHS_VID_TIME_DOMAIN 0x1027U // Time Domain +#define UHS_VID_INOVYS 0x1028U // Inovys Corp. +#define UHS_VID_ATLANTIC_COAST_TELESYS 0x1029U // Atlantic Coast Telesys +#define UHS_VID_RAMOS_TECHNOLOGY 0x102aU // Ramos Technology Co., Ltd +#define UHS_VID_INFOTRONIC_AMERICA 0x102bU // Infotronic America, Inc. +#define UHS_VID_ETOMS_ELECTRONICS 0x102cU // Etoms Electronics Corp. +#define UHS_VID_WINIC 0x102dU // Winic Corp. +#define UHS_VID_COMAX_TECHNOLOGY 0x1031U // Comax Technology, Inc. +#define UHS_VID_C_ONE_TECHNOLOGY 0x1032U // C-One Technology Corp. +#define UHS_VID_NUCAM 0x1033U // Nucam Corp. +#define UHS_VID_STEELSERIES_APS 0x1038U // SteelSeries ApS +#define UHS_VID_DEVOLO_AG 0x1039U // devolo AG +#define UHS_VID_PSA 0x103aU // PSA +#define UHS_VID_STANTON 0x103dU // Stanton +#define UHS_VID_ICREATE_TECHNOLOGIES 0x1043U // iCreate Technologies Corp. +#define UHS_VID_CHU_YUEN_ENTERPRISE 0x1044U // Chu Yuen Enterprise Co., Ltd +#define UHS_VID_WINBOND_ELECTRONICS_CORP_HEX_ 0x1046U // Winbond Electronics Corp. [hex] +#define UHS_VID_TARGUS_GROUP_INTERNATIONAL 0x1048U // Targus Group International +#define UHS_VID_MYLEX_BUSLOGIC 0x104bU // Mylex / Buslogic +#define UHS_VID_AMCO_TEC_INTERNATIONAL 0x104cU // AMCO TEC International, Inc. +#define UHS_VID_NEWPORT_CORPORATION 0x104dU // Newport Corporation +#define UHS_VID_WB_ELECTRONICS 0x104fU // WB Electronics +#define UHS_VID_YUBICOCOM 0x1050U // Yubico.com +#define UHS_VID_IMMANUEL_ELECTRONICS 0x1053U // Immanuel Electronics Co., Ltd +#define UHS_VID_BMS_INTERNATIONAL_BEHEER_NV 0x1054U // BMS International Beheer N.V. +#define UHS_VID_COMPLEX_MICRO_INTERCONNECTION 0x1055U // Complex Micro Interconnection Co., Ltd +#define UHS_VID_HSIN_CHEN_ENT 0x1056U // Hsin Chen Ent Co., Ltd +#define UHS_VID_ON_SEMICONDUCTOR 0x1057U // ON Semiconductor +#define UHS_VID_WESTERN_DIGITAL_TECHNOLOGIES 0x1058U // Western Digital Technologies, Inc. +#define UHS_VID_GIESECKE_AND_DEVRIENT 0x1059U // Giesecke & Devrient GmbH +#define UHS_VID_FOXCONN_INTERNATIONAL 0x105bU // Foxconn International, Inc. +#define UHS_VID_HONG_JI_ELECTRIC_WIRE_AND_CABLE_DONGGUAN 0x105cU // Hong Ji Electric Wire & Cable (Dongguan) Co., Ltd +#define UHS_VID_DELKIN_DEVICES 0x105dU // Delkin Devices, Inc. +#define UHS_VID_VALENCE_SEMICONDUCTOR_DESIGN 0x105eU // Valence Semiconductor Design, Ltd +#define UHS_VID_CHIN_SHONG_ENTERPRISE 0x105fU // Chin Shong Enterprise Co., Ltd +#define UHS_VID_EASTHOME_INDUSTRIAL 0x1060U // Easthome Industrial Co., Ltd +#define UHS_VID_MOTOROLA_ELECTRONICS_TAIWAN_LTD_HEX_ 0x1063U // Motorola Electronics Taiwan, Ltd [hex] +#define UHS_VID_CCYU_TECHNOLOGY 0x1065U // CCYU Technology +#define UHS_VID_LOYAL_LEGEND 0x106aU // Loyal Legend, Ltd +#define UHS_VID_CURITEL_COMMUNICATIONS 0x106cU // Curitel Communications, Inc. +#define UHS_VID_SAN_CHIEH_MANUFACTURING 0x106dU // San Chieh Manufacturing, Ltd +#define UHS_VID_CONECTL 0x106eU // ConectL +#define UHS_VID_MONEY_CONTROLS 0x106fU // Money Controls +#define UHS_VID_GCT_SEMICONDUCTOR 0x1076U // GCT Semiconductor, Inc. +#define UHS_VID_GATEWAY_1 0x107bU // Gateway, Inc. +#define UHS_VID_ARLEC_AUSTRALIA 0x107dU // Arlec Australia, Ltd +#define UHS_VID_MIDORIYA_ELECTRIC 0x107eU // Midoriya Electric Co., Ltd +#define UHS_VID_KIDZMOUSE 0x107fU // KidzMouse, Inc. +#define UHS_VID_SHIN_ETSUKAKEN 0x1082U // Shin-Etsukaken Co., Ltd +#define UHS_VID_CANON_ELECTRONICS 0x1083U // Canon Electronics, Inc. +#define UHS_VID_PANTECH 0x1084U // Pantech Co., Ltd +#define UHS_VID_CHLORIDE_POWER_PROTECTION 0x108aU // Chloride Power Protection +#define UHS_VID_GRAND_TEK_TECHNOLOGY 0x108bU // Grand-tek Technology Co., Ltd +#define UHS_VID_ROBERT_BOSCH 0x108cU // Robert Bosch GmbH +#define UHS_VID_LOTES 0x108eU // Lotes Co., Ltd. +#define UHS_VID_SURFACE_OPTICS 0x1099U // Surface Optics Corp. +#define UHS_VID_DATASOFT_SYSTEMS 0x109aU // DATASOFT Systems GmbH +#define UHS_VID_HISENSE 0x109bU // Hisense +#define UHS_VID_ESOL 0x109fU // eSOL Co., Ltd +#define UHS_VID_HIROTECH 0x10a0U // Hirotech, Inc. +#define UHS_VID_MITSUBISHI_MATERIALS 0x10a3U // Mitsubishi Materials Corp. +#define UHS_VID_SK_TELETECH 0x10a9U // SK Teletech Co., Ltd +#define UHS_VID_CABLES_TO_GO 0x10aaU // Cables To Go +#define UHS_VID_USI 0x10abU // USI Co., Ltd +#define UHS_VID_HONEYWELL 0x10acU // Honeywell, Inc. +#define UHS_VID_PRINCETON_TECHNOLOGY 0x10aeU // Princeton Technology Corp. +#define UHS_VID_LIEBERT 0x10afU // Liebert Corp. +#define UHS_VID_COMODO_PLX_UNKNOWN 0x10b5U // Comodo (PLX?) +#define UHS_VID_DIBCOM 0x10b8U // DiBcom +#define UHS_VID_TM_TECHNOLOGY 0x10bbU // TM Technology, Inc. +#define UHS_VID_DINGING_TECHNOLOGY 0x10bcU // Dinging Technology Co., Ltd +#define UHS_VID_TMT_TECHNOLOGY 0x10bdU // TMT Technology, Inc. +#define UHS_VID_SMARTHOME 0x10bfU // SmartHome +#define UHS_VID_UNIVERSAL_LASER_SYSTEMS 0x10c3U // Universal Laser Systems, Inc. +#define UHS_VID_CYGNAL_INTEGRATED_PRODUCTS 0x10c4U // Cygnal Integrated Products, Inc. +#define UHS_VID_SANEI_ELECTRIC 0x10c5U // Sanei Electric, Inc. +#define UHS_VID_INTEC 0x10c6U // Intec, Inc. +#define UHS_VID_ERATECH 0x10cbU // Eratech +#define UHS_VID_GBM_CONNECTOR 0x10ccU // GBM Connector Co., Ltd +#define UHS_VID_KYCON 0x10cdU // Kycon, Inc. +#define UHS_VID_SILICON_LABS 0x10ceU // Silicon Labs +#define UHS_VID_VELLEMAN_COMPONENTS 0x10cfU // Velleman Components, Inc. +#define UHS_VID_HOTTINGER_BALDWIN_MEASUREMENT 0x10d1U // Hottinger Baldwin Measurement +#define UHS_VID_RAYCOMPOSER__R_ADAMS 0x10d2U // RayComposer - R. Adams +#define UHS_VID_MAN_BOON_MANUFACTORY 0x10d4U // Man Boon Manufactory, Ltd +#define UHS_VID_UNI_CLASS_TECHNOLOGY 0x10d5U // Uni Class Technology Co., Ltd +#define UHS_VID_ACTIONS_SEMICONDUCTOR 0x10d6U // Actions Semiconductor Co., Ltd +#define UHS_VID_AUTHENEX 0x10deU // Authenex, Inc. +#define UHS_VID_IN_WIN_DEVELOPMENT 0x10dfU // In-Win Development, Inc. +#define UHS_VID_POST_OP_VIDEO 0x10e0U // Post-Op Video, Inc. +#define UHS_VID_CABLEPLUS 0x10e1U // CablePlus, Ltd +#define UHS_VID_NADA_ELECTRONICS 0x10e2U // Nada Electronics, Ltd +#define UHS_VID_VAST_TECHNOLOGIES 0x10ecU // Vast Technologies, Inc. +#define UHS_VID_NEXIO 0x10f0U // Nexio Co., Ltd +#define UHS_VID_IMPORTEK 0x10f1U // Importek +#define UHS_VID_TURTLE_BEACH 0x10f5U // Turtle Beach +#define UHS_VID_PICTOS_TECHNOLOGIES 0x10fbU // Pictos Technologies, Inc. +#define UHS_VID_ANUBIS_ELECTRONICS 0x10fdU // Anubis Electronics, Ltd +#define UHS_VID_THRANE_AND_THRANE 0x10feU // Thrane & Thrane +#define UHS_VID_VIRTOUCH 0x1100U // VirTouch, Ltd +#define UHS_VID_EASYPASS_INDUSTRIAL 0x1101U // EasyPass Industrial Co., Ltd +#define UHS_VID_BRIGHTCOM_TECHNOLOGIES 0x1108U // Brightcom Technologies, Ltd +#define UHS_VID_MOXA_TECHNOLOGIES 0x110aU // Moxa Technologies Co., Ltd. +#define UHS_VID_ANALOG_DEVICES_CANADA_LTD_ALLIED_TELESYN 0x1110U // Analog Devices Canada, Ltd (Allied Telesyn) +#define UHS_VID_PANDORA_INTERNATIONAL 0x1111U // Pandora International Ltd. +#define UHS_VID_YM_ELECTRIC 0x1112U // YM ELECTRIC CO., Ltd +#define UHS_VID_MEDION_AG 0x1113U // Medion AG +#define UHS_VID_VSO_ELECTRIC 0x111eU // VSO Electric Co., Ltd +#define UHS_VID_REDRAT 0x112aU // RedRat +#define UHS_VID_MASTER_HILL_ELECTRIC_WIRE_AND_CABLE 0x112eU // Master Hill Electric Wire and Cable Co., Ltd +#define UHS_VID_CELLON_INTERNATIONAL 0x112fU // Cellon International, Inc. +#define UHS_VID_TENX_TECHNOLOGY 0x1130U // Tenx Technology, Inc. +#define UHS_VID_INTEGRATED_SYSTEM_SOLUTION 0x1131U // Integrated System Solution Corp. +#define UHS_VID_TOSHIBA_CORP_DIGITAL_MEDIA_EQUIPMENT_HEX_ 0x1132U // Toshiba Corp., Digital Media Equipment [hex] +#define UHS_VID_CTS_ELECTRONINCS 0x1136U // CTS Electronincs +#define UHS_VID_ARIN_TECH 0x113cU // Arin Tech Co., Ltd +#define UHS_VID_MAPOWER_ELECTRONICS 0x113dU // Mapower Electronics Co., Ltd +#define UHS_VID_V_ONE_MULTIMEDIA_PTE 0x1141U // V One Multimedia, Pte., Ltd +#define UHS_VID_CYBERSCAN_TECHNOLOGIES 0x1142U // CyberScan Technologies, Inc. +#define UHS_VID_JAPAN_RADIO_COMPANY 0x1145U // Japan Radio Company +#define UHS_VID_SHIMANE_SANYO_ELECTRIC 0x1146U // Shimane SANYO Electric Co., Ltd. +#define UHS_VID_EVER_GREAT_ELECTRIC_WIRE_AND_CABLE 0x1147U // Ever Great Electric Wire and Cable Co., Ltd +#define UHS_VID_SPHAIRON_ACCESS_SYSTEMS 0x114bU // Sphairon Access Systems GmbH +#define UHS_VID_TINIUS_OLSEN_TESTING_MACHINE 0x114cU // Tinius Olsen Testing Machine Co., Inc. +#define UHS_VID_ALPHA_IMAGING_TECHNOLOGY 0x114dU // Alpha Imaging Technology Corp. +#define UHS_VID_WAVECOM 0x114fU // Wavecom +#define UHS_VID_SALIX_TECHNOLOGY 0x115bU // Salix Technology Co., Ltd. +#define UHS_VID_SECUGEN 0x1162U // Secugen Corp. +#define UHS_VID_DELORME_PUBLISHING 0x1163U // DeLorme Publishing, Inc. +#define UHS_VID_YUAN_HIGH_TECH_DEVELOPMENT 0x1164U // YUAN High-Tech Development Co., Ltd +#define UHS_VID_TELSON_ELECTRONICS 0x1165U // Telson Electronics Co., Ltd +#define UHS_VID_BANTAM_INTERACTIVE_TECHNOLOGIES 0x1166U // Bantam Interactive Technologies +#define UHS_VID_SALIENT_SYSTEMS 0x1167U // Salient Systems Corp. +#define UHS_VID_BIZCONN_INTERNATIONAL 0x1168U // BizConn International Corp. +#define UHS_VID_GIGASTORAGE 0x116eU // Gigastorage Corp. +#define UHS_VID_SILICON_10_TECHNOLOGY 0x116fU // Silicon 10 Technology Corp. +#define UHS_VID_SHENGYIH_STEEL_MOLD 0x1175U // Shengyih Steel Mold Co., Ltd +#define UHS_VID_SANTA_ELECTRONIC 0x117dU // Santa Electronic, Inc. +#define UHS_VID_JNC 0x117eU // JNC, Inc. +#define UHS_VID_VENTURE 0x1182U // Venture Corp., Ltd +#define UHS_VID_COMPAQ_COMPUTER_CORP_HEX_DIGITAL_DREAM_UNKNOWN 0x1183U // Compaq Computer Corp. [hex] (Digital Dream ?) +#define UHS_VID_KYOCERA_ELCO 0x1184U // Kyocera Elco Corp. +#define UHS_VID_BLOOMBERG_LP 0x1188U // Bloomberg L.P. +#define UHS_VID_ACER_COMMUNICATIONS_AND_MULTIMEDIA 0x1189U // Acer Communications & Multimedia +#define UHS_VID_YOU_YANG_TECHNOLOGY 0x118fU // You Yang Technology Co., Ltd +#define UHS_VID_TRIPACE 0x1190U // Tripace +#define UHS_VID_LOYALTY_FOUNDER_ENTERPRISE 0x1191U // Loyalty Founder Enterprise Co., Ltd +#define UHS_VID_YANKEE_ROBOTICS 0x1196U // Yankee Robotics, LLC +#define UHS_VID_TECHNOIMAGIA 0x1197U // Technoimagia Co., Ltd +#define UHS_VID_STARSHINE_TECHNOLOGY 0x1198U // StarShine Technology Corp. +#define UHS_VID_SIERRA_WIRELESS 0x1199U // Sierra Wireless, Inc. +#define UHS_VID_ZHAN_QI_TECHNOLOGY 0x119aU // ZHAN QI Technology Co., Ltd +#define UHS_VID_RUWIDO_AUSTRIA 0x119bU // ruwido austria GmbH +#define UHS_VID_CHIPCON_AS 0x11a0U // Chipcon AS +#define UHS_VID_TECHNOVAS 0x11a3U // Technovas Co., Ltd +#define UHS_VID_GLOBALMEDIA_GROUP 0x11aaU // GlobalMedia Group, LLC +#define UHS_VID_EXITO_ELECTRONICS 0x11abU // Exito Electronics Co., Ltd +#define UHS_VID_NIKE 0x11acU // Nike +#define UHS_VID_ATECH_FLASH_TECHNOLOGY 0x11b0U // ATECH FLASH TECHNOLOGY +#define UHS_VID_RANDD_INTERNATIONAL_NV 0x11beU // R&D International NV +#define UHS_VID_INMAX 0x11c5U // Inmax +#define UHS_VID_VERIFONE 0x11caU // VeriFone Inc +#define UHS_VID_TOPFIELD 0x11dbU // Topfield Co., Ltd. +#define UHS_VID_KI_TECHNOLOGY 0x11e6U // K.I. Technology Co. Ltd. +#define UHS_VID_SIEMENS_AG_1 0x11f5U // Siemens AG +#define UHS_VID_PROLIFIC 0x11f6U // Prolific +#define UHS_VID_ALCATEL_UNKNOWN 0x11f7U // Alcatel (?) +#define UHS_VID_TSC_AUTO_ID_TECHNOLOGY 0x1203U // TSC Auto ID Technology Co., Ltd +#define UHS_VID_INTERBIOMETRICS 0x1209U // InterBiometrics +#define UHS_VID_HUDSON_SOFT 0x120eU // Hudson Soft Co., Ltd +#define UHS_VID_MAGELLAN 0x120fU // Magellan +#define UHS_VID_DIGITECH 0x1210U // DigiTech +#define UHS_VID_JUNGSOFT 0x121eU // Jungsoft Co., Ltd +#define UHS_VID_UNKNOWN_MANUFACTURER_1 0x1221U // Unknown manufacturer +#define UHS_VID_SKYCABLE_ENTERPRISE 0x1223U // SKYCABLE ENTERPRISE. CO., LTD. +#define UHS_VID_DATAPAQ_LIMITED 0x1228U // Datapaq Limited +#define UHS_VID_CHIPIDEA_MICROELECTRONICA 0x1230U // Chipidea-Microelectronica, S.A. +#define UHS_VID_DENVER_ELECTRONICS 0x1233U // Denver Electronics +#define UHS_VID_BRAIN_ACTUATED_TECHNOLOGIES 0x1234U // Brain Actuated Technologies +#define UHS_VID_FOCUSRITE_NOVATION 0x1235U // Focusrite-Novation +#define UHS_VID_BELKIN 0x1241U // Belkin +#define UHS_VID_AIRVAST 0x124aU // AirVast +#define UHS_VID_NYKO_HONEY_BEE 0x124bU // Nyko (Honey Bee) +#define UHS_VID_MXI__MEMORY_EXPERTS_INTERNATIONAL 0x124cU // MXI - Memory Experts International, Inc. +#define UHS_VID_APOGEE 0x125cU // Apogee Inc. +#define UHS_VID_A_DATA_TECHNOLOGY 0x125fU // A-DATA Technology Co., Ltd. +#define UHS_VID_STANDARD_MICROSYSTEMS_3 0x1260U // Standard Microsystems Corp. +#define UHS_VID_COVIDIEN_ENERGY_BASED_DEVICES 0x1264U // Covidien Energy-based Devices +#define UHS_VID_PIRELLI_BROADBAND_SOLUTIONS 0x1266U // Pirelli Broadband Solutions +#define UHS_VID_LOGIC3_SPECTRAVIDEO_PLC 0x1267U // Logic3 / SpectraVideo plc +#define UHS_VID_ARISTOCRAT_TECHNOLOGIES 0x126cU // Aristocrat Technologies +#define UHS_VID_BEL_STEWART 0x126dU // Bel Stewart +#define UHS_VID_STROBE_DATA 0x126eU // Strobe Data, Inc. +#define UHS_VID_TWINMOS 0x126fU // TwinMOS +#define UHS_VID_ENSONIQ 0x1274U // Ensoniq +#define UHS_VID_XAXERO_MARINE_SOFTWARE_ENGINEERING 0x1275U // Xaxero Marine Software Engineering, Ltd. +#define UHS_VID_STARLIGHT_XPRESS 0x1278U // Starlight Xpress +#define UHS_VID_ZEBRIS_MEDICAL 0x1283U // zebris Medical GmbH +#define UHS_VID_MARVELL_SEMICONDUCTOR 0x1286U // Marvell Semiconductor, Inc. +#define UHS_VID_QUALCOMM_FLARION_TECHNOLOGIES_INC_LEADTEK_RESEARCH 0x1291U // Qualcomm Flarion Technologies, Inc. / Leadtek Research, Inc. +#define UHS_VID_INNOMEDIA_1 0x1292U // Innomedia +#define UHS_VID_BELKIN_COMPONENTS_HEX_ 0x1293U // Belkin Components [hex] +#define UHS_VID_RISO_KAGAKU 0x1294U // RISO KAGAKU CORP. +#define UHS_VID_CYBERTAN_TECHNOLOGY 0x129bU // CyberTAN Technology +#define UHS_VID_TRENDCHIP_TECHNOLOGIES 0x12a7U // Trendchip Technologies Corp. +#define UHS_VID_HONEY_BEE_ELECTRONIC_INTERNATIONAL 0x12abU // Honey Bee Electronic International Ltd. +#define UHS_VID_ZHEJIANG_XINYA_ELECTRONIC_TECHNOLOGY 0x12b8U // Zhejiang Xinya Electronic Technology Co., Ltd. +#define UHS_VID_E28 0x12b9U // E28 +#define UHS_VID_LICENSED_BY_SONY_COMPUTER_ENTERTAINMENT_AMERICA 0x12baU // Licensed by Sony Computer Entertainment America +#define UHS_VID_GEMBIRD 0x12bdU // Gembird +#define UHS_VID_AUTOCUE_GROUP 0x12c4U // Autocue Group Ltd +#define UHS_VID_DEXIN_1 0x12cfU // DEXIN +#define UHS_VID_HUAWEI_TECHNOLOGIES 0x12d1U // Huawei Technologies Co., Ltd. +#define UHS_VID_LINE_TECH_INDUSTRIAL 0x12d2U // LINE TECH INDUSTRIAL CO., LTD. +#define UHS_VID_EMS_DR_THOMAS_WUENSCHE 0x12d6U // EMS Dr. Thomas Wuensche +#define UHS_VID_BETTER_WIRE_FACTORY 0x12d7U // BETTER WIRE FACTORY CO., LTD. +#define UHS_VID_ARANEUS_INFORMATION_SYSTEMS_OY 0x12d8U // Araneus Information Systems Oy +#define UHS_VID_WALDORF_MUSIC 0x12e6U // Waldorf Music GmbH +#define UHS_VID_TAPWAVE 0x12efU // Tapwave, Inc. +#define UHS_VID_DYNAMIC_SYSTEM_ELECTRONICS 0x12f5U // Dynamic System Electronics Corp. +#define UHS_VID_MEMOREX_PRODUCTS 0x12f7U // Memorex Products, Inc. +#define UHS_VID_AIN_COMM_TECHNOLOGY 0x12fdU // AIN Comm. Technology Co., Ltd +#define UHS_VID_FASCINATING_ELECTRONICS 0x12ffU // Fascinating Electronics, Inc. +#define UHS_VID_TRANSCEND_INFORMATION 0x1307U // Transcend Information, Inc. +#define UHS_VID_SHUTTLE_1 0x1308U // Shuttle, Inc. +#define UHS_VID_ROPER 0x1310U // Roper +#define UHS_VID_ICS_ELECTRONICS 0x1312U // ICS Electronics +#define UHS_VID_THORLABS 0x1313U // ThorLabs +#define UHS_VID_NATURAL_POINT 0x131dU // Natural Point +#define UHS_VID_ENVARA 0x132aU // Envara Inc. +#define UHS_VID_KONICA_MINOLTA 0x132bU // Konica Minolta +#define UHS_VID_KEMPER_DIGITAL 0x133eU // Kemper Digital GmbH +#define UHS_VID_MOBILITY 0x1342U // Mobility +#define UHS_VID_CITIZEN_SYSTEMS 0x1343U // Citizen Systems +#define UHS_VID_SINO_LITE_TECHNOLOGY 0x1345U // Sino Lite Technology Corp. +#define UHS_VID_MORAVIAN_INSTRUMENTS 0x1347U // Moravian Instruments +#define UHS_VID_KATSURAGAWA_ELECTRIC 0x1348U // Katsuragawa Electric Co., Ltd. +#define UHS_VID_PANJIT_INTERNATIONAL 0x134cU // PanJit International Inc. +#define UHS_VID_DIGBYS_BITPILE_INC_DBA_D_BIT 0x134eU // Digby's Bitpile, Inc. DBA D Bit +#define UHS_VID_PANDE_MICROCOMPUTER_SYSTEMS 0x1357U // P&E Microcomputer Systems +#define UHS_VID_CONTROL_DEVELOPMENT 0x135fU // Control Development Inc. +#define UHS_VID_SEGGER 0x1366U // SEGGER +#define UHS_VID_STEC 0x136bU // STEC +#define UHS_VID_ANDOR_TECHNOLOGY 0x136eU // Andor Technology Ltd. +#define UHS_VID_SWISSBIT 0x1370U // Swissbit +#define UHS_VID_CNET_TECHNOLOGY 0x1371U // CNet Technology Inc. +#define UHS_VID_VIMTRON_ELECTRONICS 0x1376U // Vimtron Electronics Co., Ltd. +#define UHS_VID_SCAPS 0x137bU // SCAPS GmbH +#define UHS_VID_NETGEAR_2 0x1385U // Netgear, Inc +#define UHS_VID_VALIDITY_SENSORS 0x138aU // Validity Sensors, Inc. +#define UHS_VID_JUNGO 0x138eU // Jungo LTD +#define UHS_VID_TOMTOM_BV 0x1390U // TOMTOM B.V. +#define UHS_VID_IDEALTEK 0x1391U // IdealTEK, Inc. +#define UHS_VID_SENNHEISER_COMMUNICATIONS 0x1395U // Sennheiser Communications +#define UHS_VID_BEHRINGER_INTERNATIONAL 0x1397U // BEHRINGER International GmbH +#define UHS_VID_Q_TEC 0x1398U // Q-tec +#define UHS_VID_BALTECH 0x13adU // Baltech +#define UHS_VID_PERKINELMER_OPTOELECTRONICS 0x13b0U // PerkinElmer Optoelectronics +#define UHS_VID_LINKSYS_2 0x13b1U // Linksys +#define UHS_VID_ALESIS 0x13b2U // Alesis +#define UHS_VID_NIPPON_DICS 0x13b3U // Nippon Dics Co., Ltd. +#define UHS_VID_PCPLAY 0x13baU // PCPlay +#define UHS_VID_RICOH_PRINTING_SYSTEMS 0x13beU // Ricoh Printing Systems, Ltd. +#define UHS_VID_JYETAI_PRECISION_INDUSTRIAL 0x13caU // JyeTai Precision Industrial Co., Ltd. +#define UHS_VID_WISAIR 0x13cfU // Wisair Ltd. +#define UHS_VID_TECHSAN_ELECTRONICS 0x13d0U // Techsan Electronics Co., Ltd. +#define UHS_VID_A_MAX_TECHNOLOGY_MACAO_COMMERCIAL_OFFSHORE 0x13d1U // A-Max Technology Macao Commercial Offshore Co. Ltd. +#define UHS_VID_SHARK_MULTIMEDIA_1 0x13d2U // Shark Multimedia +#define UHS_VID_IMC_NETWORKS 0x13d3U // IMC Networks +#define UHS_VID_GUIDANCE_SOFTWARE 0x13d7U // Guidance Software, Inc. +#define UHS_VID_ALEREON 0x13dcU // ALEREON, INC. +#define UHS_VID_ITECH_DYNAMIC_LIMITED 0x13ddU // i.Tech Dynamic Limited +#define UHS_VID_KAIBO_WIRE_AND_CABLE_SHENZHEN 0x13e1U // Kaibo Wire & Cable (Shenzhen) Co., Ltd. +#define UHS_VID_RANE 0x13e5U // Rane +#define UHS_VID_TECHNOSCOPE 0x13e6U // TechnoScope Co., Ltd. +#define UHS_VID_HENGSTLER 0x13eaU // Hengstler +#define UHS_VID_ZYDACRON 0x13ecU // Zydacron +#define UHS_VID_MOSART 0x13eeU // MosArt +#define UHS_VID_INITIO_CORPORATION 0x13fdU // Initio Corporation +#define UHS_VID_KINGSTON_TECHNOLOGY_COMPANY_1 0x13feU // Kingston Technology Company Inc. +#define UHS_VID_AXXION_GROUP 0x1400U // Axxion Group Corp. +#define UHS_VID_BOWE_BELL_AND_HOWELL 0x1402U // Bowe Bell & Howell +#define UHS_VID_SITRONIX 0x1403U // Sitronix +#define UHS_VID_IDS_IMAGING_DEVELOPMENT_SYSTEMS 0x1409U // IDS Imaging Development Systems GmbH +#define UHS_VID_TELECHIPS 0x140eU // Telechips, Inc. +#define UHS_VID_NOVATEL_WIRELESS_1 0x1410U // Novatel Wireless +#define UHS_VID_NAM_TAI_EANDE_PRODUCTS_LTD_OR_OMNIVISION_TECHNOLOGIES 0x1415U // Nam Tai E&E Products Ltd. or OmniVision Technologies, Inc. +#define UHS_VID_ABILITY_ENTERPRISE 0x1419U // ABILITY ENTERPRISE CO., LTD. +#define UHS_VID_SENSOR_TECHNOLOGY 0x1421U // Sensor Technology +#define UHS_VID_VEGA_TECHNOLOGIES_INDUSTRIAL_AUSTRIA 0x1429U // Vega Technologies Industrial (Austria) Co. +#define UHS_VID_THALES_E_TRANSACTIONS 0x142aU // Thales E-Transactions +#define UHS_VID_ARBITER_SYSTEMS 0x142bU // Arbiter Systems, Inc. +#define UHS_VID_REDOCTANE 0x1430U // RedOctane +#define UHS_VID_PERTECH_RESOURCES 0x1431U // Pertech Resources, Inc. +#define UHS_VID_WISTRON_NEWEB 0x1435U // Wistron NeWeb +#define UHS_VID_DENALI_SOFTWARE 0x1436U // Denali Software, Inc. +#define UHS_VID_ALTEK_CORPORATION 0x143cU // Altek Corporation +#define UHS_VID_DIGILENT 0x1443U // Digilent +#define UHS_VID_XJGROUP 0x1446U // X.J.GROUP +#define UHS_VID_RADIO_SHACK 0x1453U // Radio Shack +#define UHS_VID_EXTENDING_WIRE_AND_CABLE 0x1456U // Extending Wire & Cable Co., Ltd. +#define UHS_VID_FIRST_INTERNATIONAL_COMPUTER_1 0x1457U // First International Computer, Inc. +#define UHS_VID_TRUST 0x145fU // Trust +#define UHS_VID_TATUNG 0x1460U // Tatung Co. +#define UHS_VID_STACCATO_COMMUNICATIONS 0x1461U // Staccato Communications +#define UHS_VID_MICRO_STAR_INTERNATIONAL_1 0x1462U // Micro Star International +#define UHS_VID_HUAWEI_3COM 0x1472U // Huawei-3Com +#define UHS_VID_FORMOSA_INDUSTRIAL_COMPUTING 0x147aU // Formosa Industrial Computing, Inc. +#define UHS_VID_UPEK 0x147eU // Upek +#define UHS_VID_HAMA_GMBH_AND_CO_KG 0x147fU // Hama GmbH & Co., KG +#define UHS_VID_VAILLANT 0x1482U // Vaillant +#define UHS_VID_ELSA_AG_HEX_ 0x1484U // Elsa AG [hex] +#define UHS_VID_SILICOM_1 0x1485U // Silicom +#define UHS_VID_DSP_GROUP 0x1487U // DSP Group, Ltd. +#define UHS_VID_EVATRONIX 0x148eU // EVATRONIX SA +#define UHS_VID_RALINK_TECHNOLOGY 0x148fU // Ralink Technology, Corp. +#define UHS_VID_FUTRONIC_TECHNOLOGY 0x1491U // Futronic Technology Co. Ltd. +#define UHS_VID_SUUNTO 0x1493U // Suunto +#define UHS_VID_PANSTRONG_COMPANY 0x1497U // Panstrong Company Ltd. +#define UHS_VID_MICROTEK_INTERNATIONAL_1 0x1498U // Microtek International Inc. +#define UHS_VID_IMAGINATION_TECHNOLOGIES 0x149aU // Imagination Technologies +#define UHS_VID_WIDEVIEW_TECHNOLOGY 0x14aaU // WideView Technology Inc. +#define UHS_VID_CTK_CORPORATION 0x14adU // CTK Corporation +#define UHS_VID_PRINTRONIX 0x14aeU // Printronix Inc. +#define UHS_VID_ATP_ELECTRONICS 0x14afU // ATP Electronics Inc. +#define UHS_VID_STARTECHCOM 0x14b0U // StarTech.com Ltd. +#define UHS_VID_RALINK_TECHNOLOGY_1 0x14b2U // Ralink Technology, Corp. +#define UHS_VID_ROCKWELL_AUTOMATION 0x14c0U // Rockwell Automation, Inc. +#define UHS_VID_GEMLIGHT_COMPUTER 0x14c2U // Gemlight Computer, Ltd +#define UHS_VID_ZYTRONIC 0x14c8U // Zytronic +#define UHS_VID_SUPER_TOP 0x14cdU // Super Top +#define UHS_VID_JAMER_INDUSTRIES 0x14d8U // JAMER INDUSTRIES CO., LTD. +#define UHS_VID_RARITAN_COMPUTER 0x14ddU // Raritan Computer, Inc. +#define UHS_VID_WINRADIO_COMMUNICATIONS 0x14e0U // WiNRADiO Communications +#define UHS_VID_DIALOGUE_TECHNOLOGY 0x14e1U // Dialogue Technology Corp. +#define UHS_VID_SAIN_INFORMATION_AND_COMMUNICATIONS 0x14e5U // SAIN Information & Communications Co., Ltd. +#define UHS_VID_PLANEX_COMMUNICATIONS_1 0x14eaU // Planex Communications +#define UHS_VID_SHURE 0x14edU // Shure Inc. +#define UHS_VID_TECHNISAT_DIGITAL 0x14f7U // TechniSat Digital GmbH +#define UHS_VID_ELLISYS_1 0x1500U // Ellisys +#define UHS_VID_PINE_TUM_ENTERPRISE 0x1501U // Pine-Tum Enterprise Co., Ltd. +#define UHS_VID_FIRST_INTERNATIONAL_COMPUTER_2 0x1509U // First International Computer, Inc. +#define UHS_VID_MEDMOBILE 0x1513U // medMobile +#define UHS_VID_ACTEL 0x1514U // Actel +#define UHS_VID_COMPUSA 0x1516U // CompUSA +#define UHS_VID_CHESHIRE_ENGINEERING 0x1518U // Cheshire Engineering Corp. +#define UHS_VID_COMNEON 0x1519U // Comneon +#define UHS_VID_BITWIRE 0x1520U // Bitwire Corp. +#define UHS_VID_ENE_TECHNOLOGY_1 0x1524U // ENE Technology Inc +#define UHS_VID_SILICON_PORTALS 0x1527U // Silicon Portals +#define UHS_VID_UBIQUAM 0x1529U // UBIQUAM Co., Ltd. +#define UHS_VID_THESYCON_SYSTEMSOFTWARE_AND_CONSULTING 0x152aU // Thesycon Systemsoftware & Consulting GmbH +#define UHS_VID_MIR_SRL 0x152bU // MIR Srl +#define UHS_VID_JMICRON_TECHNOLOGY_CORP_JMICRON_USA_TECHNOLOGY 0x152dU // JMicron Technology Corp. / JMicron USA Technology Corp. +#define UHS_VID_LG_HLDS 0x152eU // LG (HLDS) +#define UHS_VID_RAZER_USA 0x1532U // Razer USA, Ltd +#define UHS_VID_TERRATEC_ELECTRONIC_1 0x153bU // TerraTec Electronic GmbH +#define UHS_VID_U_BLOX_AG 0x1546U // U-Blox AG +#define UHS_VID_SG_INTEC_LTD_AND_CO_KG 0x1547U // SG Intec Ltd & Co KG +#define UHS_VID_CELECTRONIC 0x154aU // Celectronic GmbH +#define UHS_VID_PNY 0x154bU // PNY +#define UHS_VID_CONNECTCOUNTY_HOLDINGS_BERHAD 0x154dU // ConnectCounty Holdings Berhad +#define UHS_VID_DANDM_HOLDINGS_INC_DENONMARANTZ 0x154eU // D&M Holdings, Inc. (Denon/Marantz) +#define UHS_VID_SNBC 0x154fU // SNBC CO., Ltd +#define UHS_VID_PROLINK_MICROSYSTEMS 0x1554U // Prolink Microsystems Corp. +#define UHS_VID_OQO 0x1557U // OQO +#define UHS_VID_SUNF_PU_TECHNOLOGY 0x1568U // Sunf Pu Technology Co., Ltd +#define UHS_VID_QUANTUM_CORPORATION 0x156fU // Quantum Corporation +#define UHS_VID_ALLTOP_TECHNOLOGY 0x1570U // ALLTOP TECHNOLOGY CO., LTD. +#define UHS_VID_KETRON_SRL 0x157bU // Ketron SRL +#define UHS_VID_TRENDNET 0x157eU // TRENDnet +#define UHS_VID_FIBERLINE 0x1582U // Fiberline +#define UHS_VID_SMA_TECHNOLOGIE_AG 0x1587U // SMA Technologie AG +#define UHS_VID_OAKLEY 0x158dU // Oakley Inc. +#define UHS_VID_JDS_UNIPHASE_CORPORATION_JDSU 0x158eU // JDS Uniphase Corporation (JDSU) +#define UHS_VID_KUNSHAN_GUOJI_ELECTRONICS 0x1598U // Kunshan Guoji Electronics Co., Ltd. +#define UHS_VID_FREESCALE_SEMICONDUCTOR 0x15a2U // Freescale Semiconductor, Inc. +#define UHS_VID_AFATECH_TECHNOLOGIES 0x15a4U // Afatech Technologies, Inc. +#define UHS_VID_TEAMS_POWER_LIMITED 0x15a8U // Teams Power Limited +#define UHS_VID_GEMTEK 0x15a9U // Gemtek +#define UHS_VID_GEARWAY_ELECTRONICS_DONG_GUAN 0x15aaU // Gearway Electronics (Dong Guan) Co., Ltd. +#define UHS_VID_VMWARE_1 0x15adU // VMware Inc. +#define UHS_VID_OLIMEX 0x15baU // Olimex Ltd. +#define UHS_VID_XL_IMAGING 0x15c0U // XL Imaging +#define UHS_VID_SOUNDGRAPH 0x15c2U // SoundGraph Inc. +#define UHS_VID_ADVANCE_MULTIMEDIA_INTERNET_TECHNOLOGY_INC_AMIT 0x15c5U // Advance Multimedia Internet Technology Inc. (AMIT) +#define UHS_VID_LABORATOIRES_MXM 0x15c6U // Laboratoires MXM +#define UHS_VID_KTF_TECHNOLOGIES 0x15c8U // KTF Technologies +#define UHS_VID_D_BOX_TECHNOLOGIES 0x15c9U // D-Box Technologies +#define UHS_VID_TEXTECH_INTERNATIONAL 0x15caU // Textech International Ltd. +#define UHS_VID_COULOMB_ELECTRONICS 0x15d5U // Coulomb Electronics Ltd. +#define UHS_VID_TRUST_INTERNATIONAL_BV_1 0x15d9U // Trust International B.V. +#define UHS_VID_HYNIX_SEMICONDUCTOR 0x15dcU // Hynix Semiconductor Inc. +#define UHS_VID_SEONG_JI_INDUSTRIAL 0x15e0U // Seong Ji Industrial Co., Ltd. +#define UHS_VID_RSA 0x15e1U // RSA +#define UHS_VID_NUMARK 0x15e4U // Numark +#define UHS_VID_SOHOWARE 0x15e8U // SohoWare +#define UHS_VID_PACIFIC_DIGITAL 0x15e9U // Pacific Digital Corp. +#define UHS_VID_BELCARRA_TECHNOLOGIES 0x15ecU // Belcarra Technologies Corp. +#define UHS_VID_HANFTEK 0x15f4U // HanfTek +#define UHS_VID_TASCAM 0x1604U // Tascam +#define UHS_VID_UMAX_1 0x1606U // Umax +#define UHS_VID_INSIDE_OUT_NETWORKS_HEX_ 0x1608U // Inside Out Networks [hex] +#define UHS_VID_VIA_TECHNOLOGIES_1 0x160aU // VIA Technologies, Inc. +#define UHS_VID_INRO 0x160eU // INRO +#define UHS_VID_AMOI_ELECTRONICS 0x1614U // Amoi Electronics +#define UHS_VID_SONY_1 0x1617U // Sony Corp. +#define UHS_VID_L_AND_K_PRECISION_TECHNOLOGY 0x1619U // L & K Precision Technology Co., Ltd. +#define UHS_VID_WIONICS_RESEARCH 0x1621U // Wionics Research +#define UHS_VID_STONESTREET_ONE 0x1628U // Stonestreet One, Inc. +#define UHS_VID_AIRGO_NETWORKS 0x162aU // Airgo Networks Inc. +#define UHS_VID_WIQUEST_COMMUNICATIONS 0x162fU // WiQuest Communications, Inc. +#define UHS_VID_2WIRE_1 0x1630U // 2Wire, Inc. +#define UHS_VID_GOOD_WAY_TECHNOLOGY 0x1631U // Good Way Technology +#define UHS_VID_ENTREGA_HEX_ 0x1645U // Entrega [hex] +#define UHS_VID_SOFTEC_MICROSYSTEMS 0x1649U // SofTec Microsystems +#define UHS_VID_CHIPX 0x164aU // ChipX +#define UHS_VID_MATRIX_VISION 0x164cU // Matrix Vision GmbH +#define UHS_VID_STRUCK_INNOVATIVE_SYSTEME 0x1657U // Struck Innovative Systeme GmbH +#define UHS_VID_FRONTIER_DESIGN_GROUP 0x165bU // Frontier Design Group +#define UHS_VID_KONDO_KAGAKU 0x165cU // Kondo Kagaku +#define UHS_VID_CREATIX_POLYMEDIA 0x1660U // Creatix Polymedia GmbH +#define UHS_VID_GIGA_TMS 0x1667U // GIGA-TMS INC. +#define UHS_VID_ACTIONTEC_ELECTRONICS_INC_HEX_ 0x1668U // Actiontec Electronics, Inc. [hex] +#define UHS_VID_PIKRON_LTD_HEX_ 0x1669U // PiKRON Ltd. [hex] +#define UHS_VID_CLIPSAL 0x166aU // Clipsal +#define UHS_VID_CHINA_HUADA_INTEGRATED_CIRCUIT_DESIGN_GROUP_CO_LTD_CIDC_GROUP 0x1677U // China Huada Integrated Circuit Design (Group) Co., Ltd. (CIDC Group) +#define UHS_VID_TOTAL_PHASE 0x1679U // Total Phase +#define UHS_VID_GOLDEN_BRIDGE_ELECTECH_1 0x1680U // Golden Bridge Electech Inc. +#define UHS_VID_PREVO_TECHNOLOGIES 0x1681U // Prevo Technologies, Inc. +#define UHS_VID_MAXWISE_PRODUCTION_ENTERPRISE 0x1682U // Maxwise Production Enterprise Ltd. +#define UHS_VID_GODSPEED_COMPUTER 0x1684U // Godspeed Computer Corp. +#define UHS_VID_DELOCK 0x1685U // Delock +#define UHS_VID_ZOOM_CORPORATION 0x1686U // ZOOM Corporation +#define UHS_VID_KINGMAX_DIGITAL 0x1687U // Kingmax Digital Inc. +#define UHS_VID_SAAB 0x1688U // Saab AB +#define UHS_VID_RAZER_USA_1 0x1689U // Razer USA, Ltd +#define UHS_VID_ATHEROS_COMMUNICATIONS_1 0x168cU // Atheros Communications +#define UHS_VID_ASKEY_COMPUTER_CORP_HEX_ 0x1690U // Askey Computer Corp. [hex] +#define UHS_VID_HITACHI_VIDEO_AND_INFORMATION_SYSTEM 0x1696U // Hitachi Video and Information System, Inc. +#define UHS_VID_VTEC_TEST 0x1697U // VTec Test, Inc. +#define UHS_VID_SHENZHEN_ZHENGERYA_CABLE 0x16a5U // Shenzhen Zhengerya Cable Co., Ltd. +#define UHS_VID_UNIGRAF 0x16a6U // Unigraf +#define UHS_VID_GLOBAL_SUN_TECHNOLOGY_1 0x16abU // Global Sun Technology +#define UHS_VID_DONGGUAN_CHINGLUNG_WIRE_AND_CABLE 0x16acU // Dongguan ChingLung Wire & Cable Co., Ltd. +#define UHS_VID_ISTATION 0x16b4U // iStation +#define UHS_VID_PERSENTEC 0x16b5U // Persentec, Inc. +#define UHS_VID_VAN_OOIJEN_TECHNISCHE_INFORMATICA 0x16c0U // Van Ooijen Technische Informatica +#define UHS_VID_WIRELESS_CABLES 0x16caU // Wireless Cables, Inc. +#define UHS_VID_SILEX_TECHNOLOGY 0x16ccU // silex technology, Inc. +#define UHS_VID_MCS 0x16d0U // MCS +#define UHS_VID_SUPREMA 0x16d1U // Suprema Inc. +#define UHS_VID_FRONTLINE_TEST_EQUIPMENT 0x16d3U // Frontline Test Equipment, Inc. +#define UHS_VID_ANYDATA_CORPORATION 0x16d5U // AnyDATA Corporation +#define UHS_VID_JABLOCOM_SRO 0x16d6U // JABLOCOM s.r.o. +#define UHS_VID_CMOTECH 0x16d8U // CMOTECH Co., Ltd. +#define UHS_VID_WIENER_PLEIN_AND_BAUS 0x16dcU // Wiener, Plein & Baus +#define UHS_VID_KING_BILLION_ELECTRONICS 0x16dfU // King Billion Electronics Co., Ltd. +#define UHS_VID_GN_RESOUND_AS 0x16f0U // GN ReSound A/S +#define UHS_VID_FUTURELOGIC 0x16f5U // Futurelogic Inc. +#define UHS_VID_BLUEVIEW_TECHNOLOGIES 0x1706U // BlueView Technologies, Inc. +#define UHS_VID_ARTIMI 0x1707U // ARTIMI +#define UHS_VID_SWISSONIC 0x170bU // Swissonic +#define UHS_VID_AVNERA 0x170dU // Avnera +#define UHS_VID_LEICA_MICROSYSTEMS 0x1711U // Leica Microsystems +#define UHS_VID_MEYER_INSTRUMENTS_MIS 0x1724U // Meyer Instruments (MIS) +#define UHS_VID_VITESSE_SEMICONDUCTOR 0x1725U // Vitesse Semiconductor +#define UHS_VID_AXESSTEL 0x1726U // Axesstel, Inc. +#define UHS_VID_WALTOP_INTERNATIONAL 0x172fU // Waltop International Corp. +#define UHS_VID_CELLINK_TECHNOLOGY 0x1733U // Cellink Technology Co., Ltd +#define UHS_VID_CANON_IMAGING_SYSTEM_TECHNOLOGIES 0x1736U // CANON IMAGING SYSTEM TECHNOLOGIES INC. +#define UHS_VID_LINKSYS_3 0x1737U // Linksys +#define UHS_VID_QSENN 0x173dU // QSENN +#define UHS_VID_SENAO 0x1740U // Senao +#define UHS_VID_GENERAL_ATOMICS 0x1743U // General Atomics +#define UHS_VID_MQP_ELECTRONICS 0x1748U // MQP Electronics +#define UHS_VID_ASMEDIA_TECHNOLOGY 0x174cU // ASMedia Technology Inc. +#define UHS_VID_SYNTEK 0x174fU // Syntek +#define UHS_VID_GERTEC_TELECOMUNICACOES_LTDA 0x1753U // GERTEC Telecomunicacoes Ltda. +#define UHS_VID_ENENSYS_TECHNOLOGIES 0x1756U // ENENSYS Technologies +#define UHS_VID_LUCIDPORT_TECHNOLOGY 0x1759U // LucidPort Technology, Inc. +#define UHS_VID_ASUSTEK_COMPUTER_INC_WRONG_ID 0x1761U // ASUSTek Computer, Inc. (wrong ID) +#define UHS_VID_SYSTEM_LEVEL_SOLUTIONS 0x1772U // System Level Solutions, Inc. +#define UHS_VID_AROWANA 0x1776U // Arowana +#define UHS_VID_SWEEX 0x177fU // Sweex +#define UHS_VID_MULTIPLE_VENDORS 0x1781U // Multiple Vendors +#define UHS_VID_SPREADTRUM_COMMUNICATIONS 0x1782U // Spreadtrum Communications Inc. +#define UHS_VID_TOPSEED_TECHNOLOGY 0x1784U // TopSeed Technology Corp. +#define UHS_VID_ATI_AIB 0x1787U // ATI AIB +#define UHS_VID_SHENZHEN_LITKCONN_TECHNOLOGY 0x1788U // ShenZhen Litkconn Technology Co., Ltd. +#define UHS_VID_PRINTREX 0x1796U // Printrex, Inc. +#define UHS_VID_JALCO 0x1797U // JALCO CO., LTD. +#define UHS_VID_THALES_NORWAY_AS 0x1799U // Thales Norway A/S +#define UHS_VID_RICAVISION_INTERNATIONAL 0x179dU // Ricavision International, Inc. +#define UHS_VID_SAMSON_TECHNOLOGIES 0x17a0U // Samson Technologies Corp. +#define UHS_VID_CONCEPT2 0x17a4U // Concept2 +#define UHS_VID_ADVANCED_CONNECTION_TECHNOLOGY 0x17a5U // Advanced Connection Technology Inc. +#define UHS_VID_MICOMSOFT 0x17a7U // MICOMSOFT CO., LTD. +#define UHS_VID_KAMSTRUP_AS 0x17a8U // Kamstrup A/S +#define UHS_VID_GREY_INNOVATION 0x17b3U // Grey Innovation +#define UHS_VID_LUNATONE 0x17b5U // Lunatone +#define UHS_VID_SAURIS 0x17baU // SAURIS GmbH +#define UHS_VID_SINGIM_INTERNATIONAL 0x17c3U // Singim International Corp. +#define UHS_VID_NATIVE_INSTRUMENTS 0x17ccU // Native Instruments +#define UHS_VID_HIP_HING_CABLE_AND_PLUG_MFY 0x17cfU // Hip Hing Cable & Plug Mfy. Ltd. +#define UHS_VID_SANFORD_LP 0x17d0U // Sanford L.P. +#define UHS_VID_KOREA_TECHTRON 0x17d3U // Korea Techtron Co., Ltd. +#define UHS_VID_DISPLAYLINK 0x17e9U // DisplayLink +#define UHS_VID_CORNICE 0x17ebU // Cornice, Inc. +#define UHS_VID_LENOVO 0x17efU // Lenovo +#define UHS_VID_WAVESENSE 0x17f4U // WaveSense +#define UHS_VID_KK_ROCKY 0x17f5U // K.K. Rocky +#define UHS_VID_UNICOMP 0x17f6U // Unicomp, Inc +#define UHS_VID_ADVANTECH 0x1809U // Advantech +#define UHS_VID_TWINHAN 0x1822U // Twinhan +#define UHS_VID_GWO_JINN_INDUSTRIES 0x1831U // Gwo Jinn Industries Co., Ltd. +#define UHS_VID_HUIZHOU_SHENGHUA_INDUSTRIAL 0x1832U // Huizhou Shenghua Industrial Co., Ltd. +#define UHS_VID_VIVOPHONE 0x183dU // VIVOphone +#define UHS_VID_VAISALA 0x1843U // Vaisala +#define UHS_VID_ASROCK_INCORPORATION 0x1849U // ASRock Incorporation +#define UHS_VID_GYROCOM_CANDC 0x1852U // GYROCOM C&C Co., LTD +#define UHS_VID_MEMORY_DEVICES 0x1854U // Memory Devices Ltd. +#define UHS_VID_COMPRO 0x185bU // Compro +#define UHS_VID_TECH_TECHNOLOGY_INDUSTRIAL_COMPANY 0x1861U // Tech Technology Industrial Company +#define UHS_VID_TERIDIAN_SEMICONDUCTOR 0x1862U // Teridian Semiconductor Corp. +#define UHS_VID_NEXIO_1 0x1870U // Nexio Co., Ltd +#define UHS_VID_AVEO_TECHNOLOGY 0x1871U // Aveo Technology Corp. +#define UHS_VID_NAVILOCK 0x1873U // Navilock +#define UHS_VID_ALIENWARE_CORPORATION 0x187cU // Alienware Corporation +#define UHS_VID_SIANO_MOBILE_SILICON 0x187fU // Siano Mobile Silicon +#define UHS_VID_VAST_TECHNOLOGIES_1 0x1892U // Vast Technologies, Inc. +#define UHS_VID_TOPSEED 0x1894U // Topseed +#define UHS_VID_EVERTOP_WIRE_CABLE 0x1897U // Evertop Wire Cable Co. +#define UHS_VID_3SHAPE_AS 0x189fU // 3Shape A/S +#define UHS_VID_CSSN 0x18a4U // CSSN +#define UHS_VID_VERBATIM 0x18a5U // Verbatim, Ltd +#define UHS_VID_PETALYNX 0x18b1U // Petalynx +#define UHS_VID_E3C_TECHNOLOGIES 0x18b4U // e3C Technologies +#define UHS_VID_MIKKON_TECHNOLOGY_LIMITED 0x18b6U // Mikkon Technology Limited +#define UHS_VID_ZOTEK_ELECTRONIC 0x18b7U // Zotek Electronic Co., Ltd. +#define UHS_VID_AMIT_TECHNOLOGY 0x18c5U // AMIT Technology, Inc. +#define UHS_VID_ECAMM 0x18cdU // Ecamm +#define UHS_VID_GOOGLE 0x18d1U // Google Inc. +#define UHS_VID_STARLINE_INTERNATIONAL_GROUP_LIMITED 0x18d5U // Starline International Group Limited +#define UHS_VID_KABA 0x18d9U // Kaba +#define UHS_VID_LKC_TECHNOLOGIES 0x18dcU // LKC Technologies, Inc. +#define UHS_VID_PLANON_SYSTEM_SOLUTIONS 0x18ddU // Planon System Solutions Inc. +#define UHS_VID_FITIPOWER_INTEGRATED_TECHNOLOGY 0x18e3U // Fitipower Integrated Technology Inc +#define UHS_VID_QCOM 0x18e8U // Qcom +#define UHS_VID_MATROX_GRAPHICS 0x18eaU // Matrox Graphics, Inc. +#define UHS_VID_ARKMICRO_TECHNOLOGIES 0x18ecU // Arkmicro Technologies Inc. +#define UHS_VID_FINEARCH 0x18fdU // FineArch Inc. +#define UHS_VID_GEMBIRD_1 0x1908U // GEMBIRD +#define UHS_VID_MOTOROLA_GSG 0x190dU // Motorola GSG +#define UHS_VID_ALCO_DIGITAL_DEVICES_LIMITED 0x1914U // Alco Digital Devices Limited +#define UHS_VID_NORDIC_SEMICONDUCTOR_ASA 0x1915U // Nordic Semiconductor ASA +#define UHS_VID_FITLINXX 0x1923U // FitLinxx +#define UHS_VID_NEXTWINDOW 0x1926U // NextWindow +#define UHS_VID_AVAGO_TECHNOLOGIES_PTE 0x192fU // Avago Technologies, Pte. +#define UHS_VID_SHENZHEN_XIANHE_TECHNOLOGY 0x1930U // Shenzhen Xianhe Technology Co., Ltd. +#define UHS_VID_NINGBO_BROAD_TELECOMMUNICATION 0x1931U // Ningbo Broad Telecommunication Co., Ltd. +#define UHS_VID_FEATURE_INTEGRATION_TECHNOLOGY_INC_FINTEK 0x1934U // Feature Integration Technology Inc. (Fintek) +#define UHS_VID_DREAM_LINK 0x1941U // Dream Link +#define UHS_VID_SENSORAY 0x1943U // Sensoray Co., Inc. +#define UHS_VID_LAB126 0x1949U // Lab126, Inc. +#define UHS_VID_PRESONUS_AUDIO_ELECTRONICS 0x194fU // PreSonus Audio Electronics, Inc. +#define UHS_VID_HYPERSTONE_AG 0x1951U // Hyperstone AG +#define UHS_VID_IRONKEY 0x1953U // Ironkey Inc. +#define UHS_VID_RADIIENT_TECHNOLOGIES 0x1954U // Radiient Technologies +#define UHS_VID_ITRON_TECHNOLOGY_IONE 0x195dU // Itron Technology iONE +#define UHS_VID_UNIDEN_CORPORATION 0x1965U // Uniden Corporation +#define UHS_VID_CASIO_HITACHI_MOBILE_COMMUNICATIONS 0x1967U // CASIO HITACHI Mobile Communications Co., Ltd. +#define UHS_VID_WISPRO_TECHNOLOGY 0x196bU // Wispro Technology Inc. +#define UHS_VID_DANE_ELEC_CORP_USA 0x1970U // Dane-Elec Corp. USA +#define UHS_VID_DONGGUAN_GUNEETAL_WIRE_AND_CABLE 0x1975U // Dongguan Guneetal Wire & Cable Co., Ltd. +#define UHS_VID_CHIPSBRAND_MICROELECTRONICS_HK 0x1976U // Chipsbrand Microelectronics (HK) Co., Ltd. +#define UHS_VID_T_LOGIC 0x1977U // T-Logic +#define UHS_VID_LEUZE_ELECTRONIC 0x197dU // Leuze electronic +#define UHS_VID_NUCONN_TECHNOLOGY 0x1989U // Nuconn Technology Corp. +#define UHS_VID_BECEEM_COMMUNICATIONS 0x198fU // Beceem Communications Inc. +#define UHS_VID_ACRON_PRECISION_INDUSTRIAL 0x1990U // Acron Precision Industrial Co., Ltd. +#define UHS_VID_TRILLIUM_TECHNOLOGY_PTY 0x1995U // Trillium Technology Pty. Ltd. +#define UHS_VID_PIXELINK 0x1996U // PixeLINK +#define UHS_VID_MICROSTRAIN 0x199bU // MicroStrain, Inc. +#define UHS_VID_THE_IMAGING_SOURCE_EUROPE 0x199eU // The Imaging Source Europe GmbH +#define UHS_VID_BENICA_CORPORATION 0x199fU // Benica Corporation +#define UHS_VID_BIFORST_TECHNOLOGY 0x19a8U // Biforst Technology Inc. +#define UHS_VID_BODELIN 0x19abU // Bodelin +#define UHS_VID_S_LIFE 0x19afU // S Life +#define UHS_VID_BATRONIX 0x19b2U // Batronix +#define UHS_VID_CELESTRON 0x19b4U // Celestron +#define UHS_VID_B_AND_W_GROUP 0x19b5U // B & W Group +#define UHS_VID_INFOTECH_LOGISTIC 0x19b6U // Infotech Logistic, LLC +#define UHS_VID_DATA_ROBOTICS 0x19b9U // Data Robotics +#define UHS_VID_FUTUBA 0x19c2U // Futuba +#define UHS_VID_MINDTRIBE 0x19caU // Mindtribe +#define UHS_VID_PARROT 0x19cfU // Parrot SA +#define UHS_VID_ZTE_WCDMA_TECHNOLOGIES_MSM 0x19d2U // ZTE WCDMA Technologies MSM +#define UHS_VID_KFI_PRINTERS 0x19dbU // KFI Printers +#define UHS_VID_WEIDUAN_ELECTRONIC_ACCESSORY_SZ 0x19e1U // WeiDuan Electronic Accessory (S.Z.) Co., Ltd. +#define UHS_VID_INDUSTRIAL_TECHNOLOGY_RESEARCH_INSTITUTE 0x19e8U // Industrial Technology Research Institute +#define UHS_VID_PAK_HENG_TECHNOLOGY_SHENZHEN 0x19efU // Pak Heng Technology (Shenzhen) Co., Ltd. +#define UHS_VID_RODE_MICROPHONES 0x19f7U // RODE Microphones +#define UHS_VID_GAMPAQ_COLTD 0x19faU // Gampaq Co.Ltd +#define UHS_VID_DYNEX 0x19ffU // Dynex +#define UHS_VID_BELLWOOD_INTERNATIONAL 0x1a08U // Bellwood International, Inc. +#define UHS_VID_USB_IF_NON_WORKSHOP 0x1a0aU // USB-IF non-workshop +#define UHS_VID_KES 0x1a12U // KES Co., Ltd. +#define UHS_VID_VEHO 0x1a1dU // Veho +#define UHS_VID_AMPHENOL_EAST_ASIA 0x1a25U // Amphenol East Asia Ltd. +#define UHS_VID_SEAGATE_BRANDED_SOLUTIONS 0x1a2aU // Seagate Branded Solutions +#define UHS_VID_CHINA_RESOURCE_SEMICO 0x1a2cU // China Resource Semico Co., Ltd +#define UHS_VID_QUANTA_MICROSYSTEMS 0x1a32U // Quanta Microsystems, Inc. +#define UHS_VID_ACRUX 0x1a34U // ACRUX +#define UHS_VID_BIWIN_TECHNOLOGY 0x1a36U // Biwin Technology Ltd. +#define UHS_VID_TERMINUS_TECHNOLOGY 0x1a40U // Terminus Technology Inc. +#define UHS_VID_ACTION_ELECTRONICS 0x1a41U // Action Electronics Co., Ltd. +#define UHS_VID_VASCO_DATA_SECURITY_INTERNATIONAL 0x1a44U // VASCO Data Security International +#define UHS_VID_SILICON_IMAGE 0x1a4aU // Silicon Image +#define UHS_VID_SAFEBOOT_INTERNATIONAL_BV 0x1a4bU // SafeBoot International B.V. +#define UHS_VID_TANDBERG_DATA 0x1a5aU // Tandberg Data +#define UHS_VID_ABBOTT_DIABETES_CARE 0x1a61U // Abbott Diabetes Care +#define UHS_VID_SPANSION 0x1a6aU // Spansion Inc. +#define UHS_VID_SAMYOUNG_ELECTRONICS 0x1a6dU // SamYoung Electronics Co., Ltd +#define UHS_VID_GLOBAL_UNICHIP 0x1a6eU // Global Unichip Corp. +#define UHS_VID_SAGEM_ORGA 0x1a6fU // Sagem Orga GmbH +#define UHS_VID_PHYSIK_INSTRUMENTE 0x1a72U // Physik Instrumente +#define UHS_VID_BAYER_HEALTH_CARE 0x1a79U // Bayer Health Care LLC +#define UHS_VID_LUMBERG_CONNECT_GMBH_AND_CO_KG 0x1a7bU // Lumberg Connect GmbH & Co. KG +#define UHS_VID_EVOLUENT 0x1a7cU // Evoluent +#define UHS_VID_HOLTEK_SEMICONDUCTOR_1 0x1a81U // Holtek Semiconductor, Inc. +#define UHS_VID_QINHENG_ELECTRONICS 0x1a86U // QinHeng Electronics +#define UHS_VID_DYNALITH_SYSTEMS 0x1a89U // Dynalith Systems Co., Ltd. +#define UHS_VID_SGS_TAIWAN 0x1a8bU // SGS Taiwan Ltd. +#define UHS_VID_BANDRICH 0x1a8dU // BandRich, Inc. +#define UHS_VID_LEICA_CAMERA_AG 0x1a98U // Leica Camera AG +#define UHS_VID_DATA_DRIVE_THRU 0x1aa4U // Data Drive Thru, Inc. +#define UHS_VID_UBEACON_TECHNOLOGIES 0x1aa5U // UBeacon Technologies, Inc. +#define UHS_VID_EFORTUNE_TECHNOLOGY 0x1aa6U // eFortune Technology Corp. +#define UHS_VID_KEETOUCH 0x1aadU // KeeTouch +#define UHS_VID_RIGOL_TECHNOLOGIES 0x1ab1U // Rigol Technologies +#define UHS_VID_SALCOMP_PLC 0x1acbU // Salcomp Plc +#define UHS_VID_MIDIPLUS 0x1accU // Midiplus Co, Ltd. +#define UHS_VID_DESAY_WIRE 0x1ad1U // Desay Wire Co., Ltd. +#define UHS_VID_APS 0x1ad4U // APS +#define UHS_VID_SEL_C662_SERIAL_CABLE 0x1adbU // SEL C662 Serial Cable +#define UHS_VID_IC_DESIGN_REINHARD_GOTTINGER 0x1ae4U // ic-design Reinhard Gottinger GmbH +#define UHS_VID_X_TENSIONS 0x1ae7U // X-TENSIONS +#define UHS_VID_HIGH_TOP_PRECISION_ELECTRONIC 0x1aedU // High Top Precision Electronic Co., Ltd. +#define UHS_VID_CONNTECH_ELECTRONIC_SUZHOU_CORPORATION 0x1aefU // Conntech Electronic (Suzhou) Corporation +#define UHS_VID_CONNECT_ONE 0x1af1U // Connect One Ltd. +#define UHS_VID_A_EBERLE_GMBH_AND_CO_KG 0x1afeU // A. Eberle GmbH & Co. KG +#define UHS_VID_MEILHAUS_ELECTRONIC 0x1b04U // Meilhaus Electronic GmbH +#define UHS_VID_BLUTRONICS_SRL 0x1b0eU // BLUTRONICS S.r.l. +#define UHS_VID_CORSAIR 0x1b1cU // Corsair +#define UHS_VID_MSTAR_SEMICONDUCTOR 0x1b20U // MStar Semiconductor, Inc. +#define UHS_VID_WILINX 0x1b22U // WiLinx Corp. +#define UHS_VID_CELLEX_POWER_PRODUCTS 0x1b26U // Cellex Power Products, Inc. +#define UHS_VID_CURRENT_ELECTRONICS 0x1b27U // Current Electronics Inc. +#define UHS_VID_NAVISIS 0x1b28U // NAVIsis Inc. +#define UHS_VID_UGOBE_LIFE_FORMS 0x1b32U // Ugobe Life Forms, Inc. +#define UHS_VID_VIXS_SYSTEMS 0x1b36U // ViXS Systems, Inc. +#define UHS_VID_IPASSION_TECHNOLOGY 0x1b3bU // iPassion Technology Inc. +#define UHS_VID_GENERALPLUS_TECHNOLOGY 0x1b3fU // Generalplus Technology Inc. +#define UHS_VID_ENERGIZER_HOLDINGS 0x1b47U // Energizer Holdings, Inc. +#define UHS_VID_PLASTRON_PRECISION 0x1b48U // Plastron Precision Co., Ltd. +#define UHS_VID_ARH 0x1b52U // ARH Inc. +#define UHS_VID_KS_TERMINALS 0x1b59U // K.S. Terminals Inc. +#define UHS_VID_CHAO_ZHOU_KAI_YUAN_ELECTRIC 0x1b5aU // Chao Zhou Kai Yuan Electric Co., Ltd. +#define UHS_VID_THE_HONG_KONG_STANDARDS_AND_TESTING_CENTRE 0x1b65U // The Hong Kong Standards and Testing Centre Ltd. +#define UHS_VID_FUSHICAI 0x1b71U // Fushicai +#define UHS_VID_ATERGI_TECHNOLOGY 0x1b72U // ATERGI TECHNOLOGY CO., LTD. +#define UHS_VID_FRESCO_LOGIC 0x1b73U // Fresco Logic +#define UHS_VID_OVISLINK 0x1b75U // Ovislink Corp. +#define UHS_VID_LEGEND_SILICON 0x1b76U // Legend Silicon Corp. +#define UHS_VID_AFATECH 0x1b80U // Afatech +#define UHS_VID_DONGGUAN_GUANSHANG_ELECTRONICS 0x1b86U // Dongguan Guanshang Electronics Co., Ltd. +#define UHS_VID_SHENMING_ELECTRON_DONG_GUAN 0x1b88U // ShenMing Electron (Dong Guan) Co., Ltd. +#define UHS_VID_ALTIUM_LIMITED 0x1b8cU // Altium Limited +#define UHS_VID_E_MOVE_TECHNOLOGY 0x1b8dU // e-MOVE Technology Co., Ltd. +#define UHS_VID_AMLOGIC 0x1b8eU // Amlogic, Inc. +#define UHS_VID_MA_LABS 0x1b8fU // MA LABS, Inc. +#define UHS_VID_N_TRIG 0x1b96U // N-Trig +#define UHS_VID_YMAX_COMMUNICATIONS 0x1b98U // YMax Communications Corp. +#define UHS_VID_SHENZHEN_YUANCHUAN_ELECTRONIC 0x1b99U // Shenzhen Yuanchuan Electronic +#define UHS_VID_JINQ_CHERN_ENTERPRISE 0x1ba1U // JINQ CHERN ENTERPRISE CO., LTD. +#define UHS_VID_LITE_METALS_AND_PLASTIC_SHENZHEN 0x1ba2U // Lite Metals & Plastic (Shenzhen) Co., Ltd. +#define UHS_VID_EMBER_CORPORATION 0x1ba4U // Ember Corporation +#define UHS_VID_ABILIS_SYSTEMS 0x1ba6U // Abilis Systems +#define UHS_VID_CHINA_TELECOMMUNICATION_TECHNOLOGY_LABS 0x1ba8U // China Telecommunication Technology Labs +#define UHS_VID_HARMONIX_MUSIC 0x1badU // Harmonix Music +#define UHS_VID_VUZIX_CORPORATION 0x1baeU // Vuzix Corporation +#define UHS_VID_T_AND_A_MOBILE_PHONES 0x1bbbU // T & A Mobile Phones +#define UHS_VID_FORD_MOTOR 0x1bc4U // Ford Motor Co. +#define UHS_VID_AVIXE_TECHNOLOGY_CHINA 0x1bc5U // AVIXE Technology (China) Ltd. +#define UHS_VID_TELIT_WIRELESS_SOLUTIONS 0x1bc7U // Telit Wireless Solutions +#define UHS_VID_CONTAC_CABLE_INDUSTRIAL_LIMITED 0x1bceU // Contac Cable Industrial Limited +#define UHS_VID_SUNPLUS_INNOVATION_TECHNOLOGY 0x1bcfU // Sunplus Innovation Technology Inc. +#define UHS_VID_HANGZHOU_RIYUE_ELECTRONIC 0x1bd0U // Hangzhou Riyue Electronic Co., Ltd. +#define UHS_VID_BG_SYSTEMS 0x1bd5U // BG Systems, Inc. +#define UHS_VID_P_TWO_INDUSTRIES 0x1bdeU // P-TWO INDUSTRIES, INC. +#define UHS_VID_SHENZHEN_TONGYUAN_NETWORK_COMMUNICATION_CABLES 0x1befU // Shenzhen Tongyuan Network-Communication Cables Co., Ltd +#define UHS_VID_REALVISION 0x1bf0U // RealVision Inc. +#define UHS_VID_EXTRANET_SYSTEMS 0x1bf5U // Extranet Systems Inc. +#define UHS_VID_ORIENT_SEMICONDUCTOR_ELECTRONICS 0x1bf6U // Orient Semiconductor Electronics, Ltd. +#define UHS_VID_TOUCHPACK 0x1bfdU // TouchPack +#define UHS_VID_KRETON_CORPORATION 0x1c02U // Kreton Corporation +#define UHS_VID_QNAP_SYSTEM 0x1c04U // QNAP System Inc. +#define UHS_VID_IONICS_EMS 0x1c0cU // Ionics EMS, Inc. +#define UHS_VID_RELM_WIRELESS 0x1c0dU // Relm Wireless +#define UHS_VID_LANTERRA_INDUSTRIAL 0x1c10U // Lanterra Industrial Co., Ltd. +#define UHS_VID_ALECTRONIC_LIMITED 0x1c13U // ALECTRONIC LIMITED +#define UHS_VID_DATEL_ELECTRONICS 0x1c1aU // Datel Electronics Ltd. +#define UHS_VID_VOLKSWAGEN_OF_AMERICA 0x1c1bU // Volkswagen of America, Inc. +#define UHS_VID_GOLDVISH 0x1c1fU // Goldvish S.A. +#define UHS_VID_FUJI_ELECTRIC_DEVICE_TECHNOLOGY 0x1c20U // Fuji Electric Device Technology Co., Ltd. +#define UHS_VID_ADDMM 0x1c21U // ADDMM LLC +#define UHS_VID_ZHONGSHAN_CHIANG_YU_ELECTRIC 0x1c22U // ZHONGSHAN CHIANG YU ELECTRIC CO., LTD. +#define UHS_VID_SHANGHAI_HAIYING_ELECTRONICS 0x1c26U // Shanghai Haiying Electronics Co., Ltd. +#define UHS_VID_HUIYANG_D_AND_S_CABLE 0x1c27U // HuiYang D & S Cable Co., Ltd. +#define UHS_VID_ELSTER 0x1c29U // Elster GmbH +#define UHS_VID_LS_CABLE 0x1c31U // LS Cable Ltd. +#define UHS_VID_SPRINGCARD 0x1c34U // SpringCard +#define UHS_VID_AUTHORIZER_TECHNOLOGIES 0x1c37U // Authorizer Technologies, Inc. +#define UHS_VID_NONIN_MEDICAL 0x1c3dU // NONIN MEDICAL INC. +#define UHS_VID_WEP_PERIPHERALS 0x1c3eU // Wep Peripherals +#define UHS_VID_EZPROTOTYPES 0x1c40U // EZPrototypes +#define UHS_VID_CHERNG_WEEI_TECHNOLOGY 0x1c49U // Cherng Weei Technology Corp. +#define UHS_VID_SIGMA_MICRO 0x1c4fU // SiGma Micro +#define UHS_VID_PHILIPS_AND_LITE_ON_DIGITAL_SOLUTIONS_CORPORATION 0x1c6bU // Philips & Lite-ON Digital Solutions Corporation +#define UHS_VID_SKYDIGITAL 0x1c6cU // Skydigital Inc. +#define UHS_VID_AMT 0x1c73U // AMT +#define UHS_VID_KAETAT_INDUSTRIAL 0x1c77U // Kaetat Industrial Co., Ltd. +#define UHS_VID_DATASCOPE 0x1c78U // Datascope Corp. +#define UHS_VID_UNIGEN_CORPORATION 0x1c79U // Unigen Corporation +#define UHS_VID_LIGHTUNING_TECHNOLOGY 0x1c7aU // LighTuning Technology Inc. +#define UHS_VID_LUXSHARE_PRECISION_INDUSTRY_SHENZHEN 0x1c7bU // LUXSHARE PRECISION INDUSTRY (SHENZHEN) CO., LTD. +#define UHS_VID_SCHOMAECKER 0x1c83U // Schomaecker GmbH +#define UHS_VID_2N_TELEKOMUNIKACE_AS 0x1c87U // 2N TELEKOMUNIKACE a.s. +#define UHS_VID_SOMAGIC 0x1c88U // Somagic, Inc. +#define UHS_VID_HONGKONG_WEIDIDA_ELECTRON_LIMITED 0x1c89U // HONGKONG WEIDIDA ELECTRON LIMITED +#define UHS_VID_ASTRON_INTERNATIONAL 0x1c8eU // ASTRON INTERNATIONAL CORP. +#define UHS_VID_ALPINE_ELECTRONICS 0x1c98U // ALPINE ELECTRONICS, INC. +#define UHS_VID_OMEGA_TECHNOLOGY 0x1c9eU // OMEGA TECHNOLOGY +#define UHS_VID_ACCARIO 0x1ca0U // ACCARIO Inc. +#define UHS_VID_SYMWAVE 0x1ca1U // Symwave +#define UHS_VID_KINSTONE 0x1cacU // Kinstone +#define UHS_VID_ACES_ELECTRONIC 0x1cb3U // Aces Electronic Co., Ltd. +#define UHS_VID_OPEX_CORPORATION 0x1cb4U // OPEX CORPORATION +#define UHS_VID_IDEACOM_TECHNOLOGY 0x1cb6U // IdeaCom Technology Inc. +#define UHS_VID_LUMINARY_MICRO 0x1cbeU // Luminary Micro Inc. +#define UHS_VID_FORTAT_SKYMARK_INDUSTRIAL_COMPANY 0x1cbfU // FORTAT SKYMARK INDUSTRIAL COMPANY +#define UHS_VID_PLANTSENSE 0x1cc0U // PlantSense +#define UHS_VID_NEXTWAVE_BROADBAND 0x1ccaU // NextWave Broadband Inc. +#define UHS_VID_BODATONG_TECHNOLOGY_SHENZHEN 0x1ccdU // Bodatong Technology (Shenzhen) Co., Ltd. +#define UHS_VID_ADP_CORPORATION 0x1cd4U // adp corporation +#define UHS_VID_FIRECOMMS 0x1cd5U // Firecomms Ltd. +#define UHS_VID_ANTONIO_PRECISE_PRODUCTS_MANUFACTORY 0x1cd6U // Antonio Precise Products Manufactory Ltd. +#define UHS_VID_TELECOMMUNICATIONS_TECHNOLOGY_ASSOCIATION_TTA 0x1cdeU // Telecommunications Technology Association (TTA) +#define UHS_VID_WONTEN_TECHNOLOGY 0x1cdfU // WonTen Technology Co., Ltd. +#define UHS_VID_EDIMAX_TECHNOLOGY 0x1ce0U // EDIMAX TECHNOLOGY CO., LTD. +#define UHS_VID_AMPHENOL_KAE 0x1ce1U // Amphenol KAE +#define UHS_VID_DRESDEN_ELEKTRONIK 0x1cf1U // Dresden Elektronik +#define UHS_VID_ANDES_TECHNOLOGY_CORPORATION 0x1cfcU // ANDES TECHNOLOGY CORPORATION +#define UHS_VID_FLEXTRONICS_DIGITAL_DESIGN_JAPAN 0x1cfdU // Flextronics Digital Design Japan, LTD. +#define UHS_VID_ICON 0x1d03U // iCON +#define UHS_VID_SOLID_MOTION 0x1d07U // Solid-Motion +#define UHS_VID_NINGBO_HENTEK_DRAGON_ELECTRONICS 0x1d08U // NINGBO HENTEK DRAGON ELECTRONICS CO., LTD. +#define UHS_VID_TECHFAITH_WIRELESS_TECHNOLOGY_LIMITED 0x1d09U // TechFaith Wireless Technology Limited +#define UHS_VID_JOHNSON_CONTROLS_INC_THE_AUTOMOTIVE_BUSINESS_UNIT 0x1d0aU // Johnson Controls, Inc. The Automotive Business Unit +#define UHS_VID_HAN_HUA_CABLE_AND_WIRE_TECHNOLOGY_JX 0x1d0bU // HAN HUA CABLE & WIRE TECHNOLOGY (J.X.) CO., LTD. +#define UHS_VID_SONIX_TECHNOLOGY 0x1d0fU // Sonix Technology Co., Ltd. +#define UHS_VID_ALPHA_SAT_TECHNOLOGY_LIMITED 0x1d14U // ALPHA-SAT TECHNOLOGY LIMITED +#define UHS_VID_C_THRU_MUSIC 0x1d17U // C-Thru Music Ltd. +#define UHS_VID_DEXATEK_TECHNOLOGY 0x1d19U // Dexatek Technology Ltd. +#define UHS_VID_DIOSTECH 0x1d1fU // Diostech Co., Ltd. +#define UHS_VID_SAMTACK 0x1d20U // SAMTACK INC. +#define UHS_VID_ASUS 0x1d27U // ASUS +#define UHS_VID_DREAM_CHEEKY 0x1d34U // Dream Cheeky +#define UHS_VID_TOUCH 0x1d45U // Touch +#define UHS_VID_PEGATRON_CORPORATION 0x1d4dU // PEGATRON CORPORATION +#define UHS_VID_OPENMOKO 0x1d50U // OpenMoko, Inc. +#define UHS_VID_XENTA 0x1d57U // Xenta +#define UHS_VID_SMARTRONIX 0x1d5bU // Smartronix, Inc. +#define UHS_VID_LINUX_FOUNDATION 0x1d6bU // Linux Foundation +#define UHS_VID_CITIZEN 0x1d90U // Citizen +#define UHS_VID_ACTIONS_MICROELECTRONICS 0x1de1U // Actions Microelectronics Co. +#define UHS_VID_QUALCOMM_OPTION 0x1e0eU // Qualcomm / Option +#define UHS_VID_POINT_GREY_RESEARCH 0x1e10U // Point Grey Research, Inc. +#define UHS_VID_MIRION_TECHNOLOGIES_DOSIMETRY_SERVICES_DIVISION 0x1e17U // Mirion Technologies Dosimetry Services Division +#define UHS_VID_LUMENSION_SECURITY 0x1e1dU // Lumension Security +#define UHS_VID_INVIA 0x1e1fU // INVIA +#define UHS_VID_FESTO_AG_AND_CO_KG 0x1e29U // Festo AG & Co. KG +#define UHS_VID_CHIPSBANK_MICROELECTRONICS_1 0x1e3dU // Chipsbank Microelectronics Co., Ltd +#define UHS_VID_CLEVERSCOPE 0x1e41U // Cleverscope +#define UHS_VID_CUBETERNET 0x1e4eU // Cubeternet +#define UHS_VID_TYPEMATRIX 0x1e54U // TypeMatrix +#define UHS_VID_TREKSTOR_GMBH_AND_CO_KG 0x1e68U // TrekStor GmbH & Co. KG +#define UHS_VID_NZXT 0x1e71U // NZXT +#define UHS_VID_COBY_ELECTRONICS_CORPORATION 0x1e74U // Coby Electronics Corporation +#define UHS_VID_ROCCAT 0x1e7dU // ROCCAT +#define UHS_VID_NUCORE_TECHNOLOGY 0x1ebbU // NuCORE Technology, Inc. +#define UHS_VID_AIRTIES_WIRELESS_NETWORKS 0x1edaU // AirTies Wireless Networks +#define UHS_VID_BLACKMAGIC_DESIGN 0x1edbU // Blackmagic design +#define UHS_VID_ONDA_COMMUNICATION_SPA 0x1ee8U // ONDA COMMUNICATION S.p.a. +#define UHS_VID_EADS_DEUTSCHLAND 0x1ef6U // EADS Deutschland GmbH +#define UHS_VID_CAL_COMP 0x1f28U // Cal-Comp +#define UHS_VID_ONDA_UNVERIFIED 0x1f3aU // Onda (unverified) +#define UHS_VID_THE_NEAT_COMPANY 0x1f44U // The Neat Company +#define UHS_VID_H_TRONIC 0x1f48U // H-TRONIC GmbH +#define UHS_VID_G_TEK_ELECTRONICS_GROUP 0x1f4dU // G-Tek Electronics Group +#define UHS_VID_ALIPH 0x1f6fU // Aliph +#define UHS_VID_INNOSTOR_TECHNOLOGY_CORPORATION 0x1f75U // Innostor Technology Corporation +#define UHS_VID_TANDBERG 0x1f82U // TANDBERG +#define UHS_VID_ALERE 0x1f84U // Alere, Inc. +#define UHS_VID_STANTUM 0x1f87U // Stantum +#define UHS_VID_UBIQUITI_NETWORKS 0x1f9bU // Ubiquiti Networks, Inc. +#define UHS_VID_SAMSUNG_OPTO_ELECTRONCS 0x1fabU // Samsung Opto-Electroncs Co., Ltd. +#define UHS_VID_DELPHIN_TECHNOLOGY_AG 0x1fbdU // Delphin Technology AG +#define UHS_VID_NXP_SEMICONDUCTORS 0x1fc9U // NXP Semiconductors +#define UHS_VID_ILX_LIGHTWAVE_CORPORATION 0x1fdeU // ILX Lightwave Corporation +#define UHS_VID_VERTEX_WIRELESS 0x1fe7U // Vertex Wireless Co., Ltd. +#define UHS_VID_CVT_ELECTRONICSCOLTD 0x1ff7U // CVT Electronics.Co.,Ltd +#define UHS_VID_IDEOFY 0x1fffU // Ideofy Inc. +#define UHS_VID_D_LINK 0x2001U // D-Link Corp. +#define UHS_VID_DAP_TECHNOLOGIES 0x2002U // DAP Technologies +#define UHS_VID_DETECTOMAT 0x2003U // detectomat +#define UHS_VID_RELOOP 0x200cU // Reloop +#define UHS_VID_PCTV_SYSTEMS 0x2013U // PCTV Systems +#define UHS_VID_PLANEX_1 0x2019U // PLANEX +#define UHS_VID_ENCORE_ELECTRONICS 0x203dU // Encore Electronics Inc. +#define UHS_VID_HAUPPAUGE 0x2040U // Hauppauge +#define UHS_VID_TEXAS_INSTRUMENTS_2 0x2047U // Texas Instruments +#define UHS_VID_NANO_RIVER_TECHNOLOGY 0x2058U // Nano River Technology +#define UHS_VID_TAICANG_TANDW_ELECTRONICS 0x2077U // Taicang T&W Electronics Co. Ltd +#define UHS_VID_BARNES_AND_NOBLE 0x2080U // Barnes & Noble +#define UHS_VID_SIMPASS 0x2086U // SIMPASS +#define UHS_VID_CANDO 0x2087U // Cando +#define UHS_VID_CLAY_LOGIC 0x20a0U // Clay Logic +#define UHS_VID_XMOS 0x20b1U // XMOS Ltd +#define UHS_VID_HANVON 0x20b3U // Hanvon +#define UHS_VID_QI_HARDWARE 0x20b7U // Qi Hardware +#define UHS_VID_MINICIRCUITS 0x20ceU // Minicircuits +#define UHS_VID_SIMTEC_ELECTRONICS 0x20dfU // Simtec Electronics +#define UHS_VID_NET_NEW_ELECTRONIC_TECHNOLOGY 0x20f1U // NET New Electronic Technology GmbH +#define UHS_VID_TRENDNET_1 0x20f4U // TRENDnet +#define UHS_VID_XIMEA 0x20f7U // XIMEA +#define UHS_VID_RT_SYSTEMS 0x2100U // RT Systems +#define UHS_VID_ACTIONSTAR 0x2101U // ActionStar +#define UHS_VID_VIA_LABS 0x2109U // VIA Labs, Inc. +#define UHS_VID_SOFTKINETIC 0x2113U // Softkinetic +#define UHS_VID_ADVANCED_SILICON 0x2149U // Advanced Silicon S.A. +#define UHS_VID_CREATIVE_UNKNOWN 0x2162U // Creative (?) +#define UHS_VID_GW_INSTEK 0x2184U // GW Instek +#define UHS_VID_EMOTIV_SYSTEMS_PTY 0x21a1U // Emotiv Systems Pty. Ltd. +#define UHS_VID_AGECODAGIS_SARL 0x21d6U // Agecodagis SARL +#define UHS_VID_MACALLY_1 0x2222U // MacAlly +#define UHS_VID_SAMWOO_ENTERPRISE 0x2227U // SAMWOO Enterprise +#define UHS_VID_SILICON_MOTION_1 0x2232U // Silicon Motion +#define UHS_VID_RADIOSHACK_CORPORATION 0x2233U // RadioShack Corporation +#define UHS_VID_KOBO 0x2237U // Kobo Inc. +#define UHS_VID_MORPHO 0x225dU // Morpho +#define UHS_VID_8D_TECHNOLOGIES 0x228dU // 8D Technologies inc. +#define UHS_VID_PIE_DIGITAL 0x22a6U // Pie Digital, Inc. +#define UHS_VID_MOTOROLA_PCS 0x22b8U // Motorola PCS +#define UHS_VID_ETURBOTOUCH_TECHNOLOGY 0x22b9U // eTurboTouch Technology, Inc. +#define UHS_VID_TECHNOLOGY_INNOVATION_HOLDINGS 0x22baU // Technology Innovation Holdings, Ltd +#define UHS_VID_PINNACLE_SYSTEMS_1 0x2304U // Pinnacle Systems, Inc. +#define UHS_VID_SHINING_TECHNOLOGIES_INC_HEX_ 0x2318U // Shining Technologies, Inc. [hex] +#define UHS_VID_ARDUINO 0x2341U // Arduino SA +#define UHS_VID_PUMATRONIX_LTDA 0x2373U // Pumatronix Ltda +#define UHS_VID_DIGITALWAY_1 0x2375U // Digit@lway, Inc. +#define UHS_VID_SANHO_DIGITAL_ELECTRONICS 0x2406U // SANHO Digital Electronics Co., Ltd. +#define UHS_VID_AESSENT_TECHNOLOGY 0x2443U // Aessent Technology Ltd +#define UHS_VID_TRIPP_LITE_1 0x2478U // Tripp-Lite +#define UHS_VID_MAXXTER 0x248aU // Maxxter +#define UHS_VID_M2TECH_SRL 0x249cU // M2Tech s.r.l. +#define UHS_VID_PARATRONIC 0x24e1U // Paratronic +#define UHS_VID_TWINMOS_1 0x2632U // TwinMOS +#define UHS_VID_XSENS 0x2639U // Xsens +#define UHS_VID_ELECTRONICS_FOR_IMAGING_INC_HEX_ 0x2650U // Electronics For Imaging, Inc. [hex] +#define UHS_VID_SUNDTEK 0x2659U // Sundtek +#define UHS_VID_BASLER_AG 0x2676U // Basler AG +#define UHS_VID_CITIZEN_1 0x2730U // Citizen +#define UHS_VID_DIGITALWAY_2 0x2735U // DigitalWay +#define UHS_VID_NHJ 0x2770U // NHJ, Ltd +#define UHS_VID_THINGM 0x27b8U // ThingM +#define UHS_VID_ASUSTEK_COMPUTER_1 0x2821U // ASUSTek Computer Inc. +#define UHS_VID_TOPTRONIC_INDUSTRIAL 0x2899U // Toptronic Industrial Co., Ltd +#define UHS_VID_DRACALRAPHNET_TECHNOLOGIES 0x289bU // Dracal/Raphnet technologies +#define UHS_VID_JOLLA_OY 0x2931U // Jolla Oy +#define UHS_VID_DOG_HUNTER_AG 0x2a03U // dog hunter AG +#define UHS_VID_RTD_EMBEDDED_TECHNOLOGIES 0x2a37U // RTD Embedded Technologies, Inc. +#define UHS_VID_MEIZU 0x2a45U // Meizu Corp. +#define UHS_VID_PLANEX_COMMUNICATIONS_2 0x2c02U // Planex Communications +#define UHS_VID_DOLPHIN_PERIPHERALS 0x2c1aU // Dolphin Peripherals +#define UHS_VID_FUJITSU_1 0x2fb2U // Fujitsu, Ltd +#define UHS_VID_EAGLETRON_1 0x3125U // Eagletron +#define UHS_VID_NAVINI_NETWORKS 0x3136U // Navini Networks +#define UHS_VID_WHANAM_ELECTRONICS 0x3176U // Whanam Electronics Co., Ltd +#define UHS_VID_LINK_INSTRUMENTS 0x3195U // Link Instruments +#define UHS_VID_VIDZMEDIA_PTE 0x3275U // VidzMedia Pte Ltd +#define UHS_VID_INLINE 0x3333U // InLine +#define UHS_VID_AEI 0x3334U // AEI +#define UHS_VID_YAKUMO 0x3340U // Yakumo +#define UHS_VID_LEAGUER_MICROELECTRONICS_LME 0x3344U // Leaguer Microelectronics (LME) +#define UHS_VID_MICRO_STAR 0x3504U // Micro Star +#define UHS_VID_POWER_QUOTIENT_INTERNATIONAL_1 0x3538U // Power Quotient International Co., Ltd +#define UHS_VID_DIVA 0x3579U // DIVA +#define UHS_VID_SHARKOON 0x357dU // Sharkoon +#define UHS_VID_INVIBRO 0x3636U // InVibro +#define UHS_VID_WEM 0x3838U // WEM +#define UHS_VID_NATIONAL_INSTRUMENTS 0x3923U // National Instruments Corp. +#define UHS_VID_I_O_DATA 0x40bbU // I-O Data +#define UHS_VID_I_ROCKS 0x4101U // i-rocks +#define UHS_VID_IRIVER_1 0x4102U // iRiver, Ltd. +#define UHS_VID_DELL_COMPUTER_1 0x413cU // Dell Computer Corp. +#define UHS_VID_USBEST_TECHNOLOGY 0x4146U // USBest Technology +#define UHS_VID_TARGUS 0x4168U // Targus +#define UHS_VID_USB_DESIGN_BY_EXAMPLE 0x4242U // USB Design by Example +#define UHS_VID_GOPRO 0x4255U // GoPro +#define UHS_VID_BROADCOM_1 0x4317U // Broadcom Corp. +#define UHS_VID_WINCHIPHEAD 0x4348U // WinChipHead +#define UHS_VID_SHUTTLE_2 0x4572U // Shuttle, Inc. +#define UHS_VID_PANRAM 0x4586U // Panram +#define UHS_VID_EMS_PRODUCTION 0x4670U // EMS Production +#define UHS_VID_MIDITECH 0x4752U // Miditech +#define UHS_VID_GW_INSTEK_1 0x4757U // GW Instek +#define UHS_VID_ACEECA 0x4766U // Aceeca +#define UHS_VID_MEMOREX 0x4855U // Memorex +#define UHS_VID_SIMPLETECH 0x4971U // SimpleTech +#define UHS_VID_MUSICAL_FIDELITY 0x4d46U // Musical Fidelity +#define UHS_VID_GRANDTEC 0x5032U // Grandtec +#define UHS_VID_LINKSYS_UNKNOWN 0x5041U // Linksys (?) +#define UHS_VID_AVERATEC_UNKNOWN 0x50c2U // Averatec (?) +#define UHS_VID_SWEEX_1 0x5173U // Sweex +#define UHS_VID_I_TETRA 0x5219U // I-Tetra +#define UHS_VID_OWON 0x5345U // Owon +#define UHS_VID_SATOSHILABS 0x534cU // SatoshiLabs +#define UHS_VID_MEYER_INSTRUMENTS_MIS_1 0x5354U // Meyer Instruments (MIS) +#define UHS_VID_TRANSMETA 0x544dU // Transmeta Corp. +#define UHS_VID_UC_LOGIC_TECHNOLOGY 0x5543U // UC-Logic Technology Corp. +#define UHS_VID_EPIPHAN_SYSTEMS 0x5555U // Epiphan Systems Inc. +#define UHS_VID_ONSPEC_ELECTRONIC 0x55aaU // OnSpec Electronic, Inc. +#define UHS_VID_GOTVIEW 0x5654U // Gotview +#define UHS_VID_UNI_TREND_GROUP_LIMITED 0x5656U // Uni-Trend Group Limited +#define UHS_VID_IRTOUCHSYSTEMS 0x595aU // IRTOUCHSYSTEMS Co. Ltd. +#define UHS_VID_ACER_2 0x5986U // Acer, Inc +#define UHS_VID_NONOLITH_LABS 0x59e3U // Nonolith Labs +#define UHS_VID_ZINWELL 0x5a57U // Zinwell +#define UHS_VID_BEHOLDER_INTERNATIONAL 0x6000U // Beholder International Ltd. +#define UHS_VID_INGENIC_SEMICONDUCTOR 0x601aU // Ingenic Semiconductor Ltd. +#define UHS_VID_SITECOM 0x6189U // Sitecom +#define UHS_VID_LIGHTINGSOFT_AG 0x6244U // LightingSoft AG +#define UHS_VID_TWINHAN_TECHNOLOGY 0x6253U // TwinHan Technology Co., Ltd +#define UHS_VID_CORELOGIC 0x636cU // CoreLogic, Inc. +#define UHS_VID_UNKNOWN_SONY_UNKNOWN 0x6472U // Unknown (Sony?) +#define UHS_VID_ARKMICRO_TECHNOLOGIES_1 0x6547U // Arkmicro Technologies Inc. +#define UHS_VID_IRTOUCHSYSTEMS_1 0x6615U // IRTOUCHSYSTEMS Co. Ltd. +#define UHS_VID_PROTOTYPE_PRODUCT_VENDOR_ID 0x6666U // Prototype product Vendor ID +#define UHS_VID_WISEGROUP 0x6677U // WiseGroup, Ltd. +#define UHS_VID_3COM_1 0x6891U // 3Com +#define UHS_VID_OPERA1 0x695cU // Opera1 +#define UHS_VID_YEALINK_NETWORK_TECHNOLOGY 0x6993U // Yealink Network Technology Co., Ltd. +#define UHS_VID_SHANGHAI_JUJO_ELECTRONICS 0x6a75U // Shanghai Jujo Electronics Co., Ltd +#define UHS_VID_CME_CENTRAL_MUSIC 0x7104U // CME (Central Music Co.) +#define UHS_VID_STACKFOUNDRY 0x726cU // StackFoundry LLC +#define UHS_VID_TBS_TECHNOLOGIES_CHINA 0x734cU // TBS Technologies China +#define UHS_VID_BEIJING_STONE_TECHNOLOGY 0x7373U // Beijing STONE Technology Co. Ltd. +#define UHS_VID_EDIMAX_TECHNOLOGY_1 0x7392U // Edimax Technology Co., Ltd +#define UHS_VID_INTEL_1 0x8086U // Intel Corp. +#define UHS_VID_INTEL_2 0x8087U // Intel Corp. +#define UHS_VID_VIRTUALBOX 0x80eeU // VirtualBox +#define UHS_VID_KEIO 0x8282U // Keio +#define UHS_VID_EGO_SYSTEMS_1 0x8341U // EGO Systems, Inc. +#define UHS_VID_TRANSCEND_INFORMATION_1 0x8564U // Transcend Information, Inc. +#define UHS_VID_INTENSO_GMBG 0x8644U // Intenso GmbG +#define UHS_VID_CH_PRODUCTS_1 0x8e06U // CH Products, Inc. +#define UHS_VID_SITECOM_1 0x9016U // Sitecom +#define UHS_VID_TEVII_TECHNOLOGY 0x9022U // TeVii Technology Ltd. +#define UHS_VID_GEOLAB 0x9148U // GeoLab, Ltd +#define UHS_VID_MOSCHIP_SEMICONDUCTOR 0x9710U // MosChip Semiconductor +#define UHS_VID_BESTMEDIA_CD_RECORDABLE_GMBH_AND_CO_KG 0x9849U // Bestmedia CD Recordable GmbH & Co. KG +#define UHS_VID_ODEON 0x9999U // Odeon +#define UHS_VID_GRANDTEC_1 0x99faU // Grandtec +#define UHS_VID_J_WESTHUES 0x9ac4U // J. Westhues +#define UHS_VID_MARVELL_SEMICONDUCTOR_1 0x9e88U // Marvell Semiconductor, Inc. +#define UHS_VID_ANMO_ELECTRONICS_CORP_DINO_LITE_UNKNOWN 0xa128U // AnMo Electronics Corp. / Dino-Lite (?) +#define UHS_VID_ANMO_ELECTRONICS_CORPORATION 0xa168U // AnMo Electronics Corporation +#define UHS_VID_ASIX 0xa600U // Asix +#define UHS_VID_3COM_2 0xa727U // 3Com +#define UHS_VID_MXT 0xaaaaU // MXT +#define UHS_VID_UNKNOWN_3 0xabcdU // Unknown +#define UHS_VID_BLUE_MICROPHONES 0xb58eU // Blue Microphones +#define UHS_VID_CARD_DEVICE_EXPERT 0xc216U // Card Device Expert Co., LTD +#define UHS_VID_KEIL_SOFTWARE_1 0xc251U // Keil Software, Inc. +#define UHS_VID_CACE_TECHNOLOGIES 0xcaceU // CACE Technologies Inc. +#define UHS_VID_SMART_TECHNOLOGY_INDUSTRIAL 0xcd12U // SMART TECHNOLOGY INDUSTRIAL LTD. +#define UHS_VID_ULTIMARC 0xd208U // Ultimarc +#define UHS_VID_ULTIMARC_1 0xd209U // Ultimarc +#define UHS_VID_LOGILINK 0xd904U // LogiLink +#define UHS_VID_XORCOM 0xe4e4U // Xorcom Ltd. +#define UHS_VID_MAKINGTHINGS 0xeb03U // MakingThings +#define UHS_VID_EMPIA_TECHNOLOGY 0xeb1aU // eMPIA Technology, Inc. +#define UHS_VID_KWORLD 0xeb2aU // KWorld +#define UHS_VID_SMART_TECHNOLOGY_INDUSTRIAL_1 0xef18U // SMART TECHNOLOGY INDUSTRIAL LTD. +#define UHS_VID_HEWLETT_PACKARD_1 0xf003U // Hewlett Packard +#define UHS_VID_LEAP_MOTION 0xf182U // Leap Motion +#define UHS_VID_ATTEN_ELECTRONICS_SIGLENT_TECHNOLOGIES 0xf4ecU // Atten Electronics / Siglent Technologies +#define UHS_VID_SHENZHEN_SIGLENT 0xf4edU // Shenzhen Siglent Co., Ltd. +#define UHS_VID_HAMA_1 0xf766U // Hama +#define UHS_VID_CONRAD_ELECTRONIC_SE 0xfc08U // Conrad Electronic SE +#define UHS_VID_FNK_TECH 0xffeeU // FNK Tech + +#endif + + diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h new file mode 100644 index 000000000000..cad84fba1128 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h @@ -0,0 +1,336 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(_UHS_host_h_) || defined(USBCORE_H) +#error "Never include UHS_UsbCore.h directly; include UHS_Host.h instead" +#else +#define USBCORE_H + +#ifndef UHS_HOST_MAX_INTERFACE_DRIVERS +#define UHS_HOST_MAX_INTERFACE_DRIVERS 0x10U // Default maximum number of USB interface drivers +#endif + +#if !defined(SYSTEM_OR_SPECIAL_YIELD) +#define SYSTEM_OR_SPECIAL_YIELD(...) VOID0 +#endif + +#if !defined(SYSTEM_OR_SPECIAL_YIELD_FROM_ISR) +#define SYSTEM_OR_SPECIAL_YIELD_FROM_ISR(...) SYSTEM_OR_SPECIAL_YIELD +#endif + +// As we make extensions to a target interface add to UHS_HOST_MAX_INTERFACE_DRIVERS +// This offset gets calculated for supporting wide subclasses, such as HID, BT, etc. +#define UHS_HID_INDEX (UHS_HOST_MAX_INTERFACE_DRIVERS + 1) + +/* Common setup data constant combinations */ +//get descriptor request type +#define UHS_bmREQ_GET_DESCR (USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_STANDARD|USB_SETUP_RECIPIENT_DEVICE) + +//set request type for all but 'set feature' and 'set interface' +#define UHS_bmREQ_SET (USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_STANDARD|USB_SETUP_RECIPIENT_DEVICE) + +//get interface request type +#define UHS_bmREQ_CL_GET_INTF (USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE) + +// D7 data transfer direction (0 - host-to-device, 1 - device-to-host) +// D6-5 Type (0- standard, 1 - class, 2 - vendor, 3 - reserved) +// D4-0 Recipient (0 - device, 1 - interface, 2 - endpoint, 3 - other, 4..31 - reserved) + + +// TO-DO: Use the python script to generate these. +// TO-DO: Add _all_ subclasses here. +// USB Device Classes, Subclasses and Protocols +//////////////////////////////////////////////////////////////////////////////// +// Use Class Info in the Interface Descriptors +#define UHS_USB_CLASS_USE_CLASS_INFO 0x00U + +//////////////////////////////////////////////////////////////////////////////// +// Audio +#define UHS_USB_CLASS_AUDIO 0x01U +// Subclasses +#define UHS_USB_SUBCLASS_AUDIOCONTROL 0x01U +#define UHS_USB_SUBCLASS_AUDIOSTREAMING 0x02U +#define UHS_USB_SUBCLASS_MIDISTREAMING 0x03U + +//////////////////////////////////////////////////////////////////////////////// +// Communications and CDC Control +#define UHS_USB_CLASS_COM_AND_CDC_CTRL 0x02U + +//////////////////////////////////////////////////////////////////////////////// +// HID +#define UHS_USB_CLASS_HID 0x03U +// Subclasses +#define UHS_HID_BOOT_SUBCLASS 0x01U +// Protocols +#define UHS_HID_PROTOCOL_HIDBOOT_KEYBOARD 0x01U +#define UHS_HID_PROTOCOL_HIDBOOT_MOUSE 0x02U +//////////////////////////////////////////////////////////////////////////////// +// Physical +#define UHS_USB_CLASS_PHYSICAL 0x05U + +//////////////////////////////////////////////////////////////////////////////// +// Image +#define UHS_USB_CLASS_IMAGE 0x06U + +//////////////////////////////////////////////////////////////////////////////// +// Printer +#define UHS_USB_CLASS_PRINTER 0x07U + +//////////////////////////////////////////////////////////////////////////////// +// Mass Storage +#define UHS_USB_CLASS_MASS_STORAGE 0x08 +// Subclasses +#define UHS_BULK_SUBCLASS_SCSI_NOT_REPORTED 0x00U // De facto use +#define UHS_BULK_SUBCLASS_RBC 0x01U +#define UHS_BULK_SUBCLASS_ATAPI 0x02U // MMC-5 (ATAPI) +#define UHS_BULK_SUBCLASS_OBSOLETE1 0x03U // Was QIC-157 +#define UHS_BULK_SUBCLASS_UFI 0x04U // Specifies how to interface Floppy Disk Drives to USB +#define UHS_BULK_SUBCLASS_OBSOLETE2 0x05U // Was SFF-8070i +#define UHS_BULK_SUBCLASS_SCSI 0x06U // SCSI Transparent Command Set +#define UHS_BULK_SUBCLASS_LSDFS 0x07U // Specifies how host has to negotiate access before trying SCSI +#define UHS_BULK_SUBCLASS_IEEE1667 0x08U +// Protocols +#define UHS_STOR_PROTO_CBI 0x00U // CBI (with command completion interrupt) +#define UHS_STOR_PROTO_CBI_NO_INT 0x01U // CBI (without command completion interrupt) +#define UHS_STOR_PROTO_OBSOLETE 0x02U +#define UHS_STOR_PROTO_BBB 0x50U // Bulk Only Transport +#define UHS_STOR_PROTO_UAS 0x62U + +//////////////////////////////////////////////////////////////////////////////// +// Hub +#define UHS_USB_CLASS_HUB 0x09U + +//////////////////////////////////////////////////////////////////////////////// +// CDC-Data +#define UHS_USB_CLASS_CDC_DATA 0x0AU + +//////////////////////////////////////////////////////////////////////////////// +// Smart-Card +#define UHS_USB_CLASS_SMART_CARD 0x0BU + +//////////////////////////////////////////////////////////////////////////////// +// Content Security +#define UHS_USB_CLASS_CONTENT_SECURITY 0x0DU + +//////////////////////////////////////////////////////////////////////////////// +// Video +#define UHS_USB_CLASS_VIDEO 0x0EU + +//////////////////////////////////////////////////////////////////////////////// +// Personal Healthcare +#define UHS_USB_CLASS_PERSONAL_HEALTH 0x0FU + +//////////////////////////////////////////////////////////////////////////////// +// Diagnostic Device +#define UHS_USB_CLASS_DIAGNOSTIC_DEVICE 0xDCU + +//////////////////////////////////////////////////////////////////////////////// +// Wireless Controller +#define UHS_USB_CLASS_WIRELESS_CTRL 0xE0U + +//////////////////////////////////////////////////////////////////////////////// +// Miscellaneous +#define UHS_USB_CLASS_MISC 0xEFU + +//////////////////////////////////////////////////////////////////////////////// +// Application Specific +#define UHS_USB_CLASS_APP_SPECIFIC 0xFEU + +//////////////////////////////////////////////////////////////////////////////// +// Vendor Specific +#define UHS_USB_CLASS_VENDOR_SPECIFIC 0xFFU + +//////////////////////////////////////////////////////////////////////////////// + + +/* USB state machine states */ +#define UHS_USB_HOST_STATE_MASK 0xF0U + +// Configure states, MSN == 0 --------------------------V +#define UHS_USB_HOST_STATE_DETACHED 0x00U +#define UHS_USB_HOST_STATE_DEBOUNCE 0x01U +#define UHS_USB_HOST_STATE_DEBOUNCE_NOT_COMPLETE 0x02U +#define UHS_USB_HOST_STATE_RESET_NOT_COMPLETE 0x03U +#define UHS_USB_HOST_STATE_WAIT_SOF 0x04U +#define UHS_USB_HOST_STATE_WAIT_BUS_READY 0x05U +#define UHS_USB_HOST_STATE_RESET_DEVICE 0x0AU +#define UHS_USB_HOST_STATE_CONFIGURING 0x0CU // Looks like "CO"nfig (backwards) +#define UHS_USB_HOST_STATE_CONFIGURING_DONE 0x0DU // Looks like "DO"one (backwards) +#define UHS_USB_HOST_STATE_CHECK 0x0EU +#define UHS_USB_HOST_STATE_ILLEGAL 0x0FU // Foo + +// Run states, MSN != 0 --------------------------------V +#define UHS_USB_HOST_STATE_RUNNING 0x60U // Looks like "GO" +#define UHS_USB_HOST_STATE_IDLE 0x1DU // Looks like "ID"le +#define UHS_USB_HOST_STATE_ERROR 0xF0U // Looks like "FO"o +#define UHS_USB_HOST_STATE_INITIALIZE 0x10U // Looks like "I"nit + +// Host SE result codes. +// Common SE results are stored in the low nybble, all interface drivers understand these plus 0x1f. +// Extended SE results are 0x10-0x1e. SE code only understands these internal to the hardware. +// Values > 0x1F are driver or other internal error conditions. +// Return these result codes from your host controller driver to match the error condition +// ALL Non-zero values are errors. +// Values not listed in this table are not handled in the base class, or any host driver. + +#define UHS_HOST_ERROR_NONE 0x00U // No error +#define UHS_HOST_ERROR_BUSY 0x01U // transfer pending +#define UHS_HOST_ERROR_BADREQ 0x02U // Transfer Launch Request was bad +#define UHS_HOST_ERROR_DMA 0x03U // DMA was too short, or too long +#define UHS_HOST_ERROR_NAK 0x04U // Peripheral returned NAK +#define UHS_HOST_ERROR_STALL 0x05U // Peripheral returned STALL +#define UHS_HOST_ERROR_TOGERR 0x06U // Toggle error/ISO over-underrun +#define UHS_HOST_ERROR_WRONGPID 0x07U // Received wrong Packet ID +#define UHS_HOST_ERROR_BADBC 0x08U // Byte count is bad +#define UHS_HOST_ERROR_PIDERR 0x09U // Received Packet ID is corrupted +#define UHS_HOST_ERROR_BADRQ 0x0AU // Packet error. Increase max packet. +#define UHS_HOST_ERROR_CRC 0x0BU // USB CRC was incorrect +#define UHS_HOST_ERROR_KERR 0x0CU // K-state instead of response, usually indicates wrong speed +#define UHS_HOST_ERROR_JERR 0x0DU // J-state instead of response, usually indicates wrong speed +#define UHS_HOST_ERROR_TIMEOUT 0x0EU // Device did not respond in time +#define UHS_HOST_ERROR_BABBLE 0x0FU // Line noise/unexpected data +#define UHS_HOST_ERROR_MEM_LAT 0x10U // Error caused by memory latency. +#define UHS_HOST_ERROR_NYET 0x11U // OUT transfer accepted with NYET + +// Addressing error codes +#define ADDR_ERROR_INVALID_INDEX 0xA0U +#define ADDR_ERROR_INVALID_ADDRESS 0xA1U + +// Common Interface Driver error codes +#define UHS_HOST_ERROR_DEVICE_NOT_SUPPORTED 0xD1U // Driver doesn't support the device or interfaces +#define UHS_HOST_ERROR_DEVICE_INIT_INCOMPLETE 0xD2U // Init partially finished, but died. +#define UHS_HOST_ERROR_CANT_REGISTER_DEVICE_CLASS 0xD3U // There was no driver for the interface requested. +#define UHS_HOST_ERROR_ADDRESS_POOL_FULL 0xD4U // No addresses left in the address pool. +#define UHS_HOST_ERROR_HUB_ADDRESS_OVERFLOW 0xD5U // No hub addresses left. The maximum is 7. +#define UHS_HOST_ERROR_NO_ADDRESS_IN_POOL 0xD6U // Address was not allocated in the pool, thus not found. +#define UHS_HOST_ERROR_NULL_EPINFO 0xD7U // The supplied endpoint was NULL, indicates a bug or other problem. +#define UHS_HOST_ERROR_BAD_ARGUMENT 0xD8U // Indicates a range violation bug. +#define UHS_HOST_ERROR_DEVICE_DRIVER_BUSY 0xD9U // The interface driver is busy or out buffer is full, try again later. +#define UHS_HOST_ERROR_BAD_MAX_PACKET_SIZE 0xDAU // The maximum packet size was exceeded. Try again with smaller size. +#define UHS_HOST_ERROR_NO_ENDPOINT_IN_TABLE 0xDBU // The endpoint could not be found in the endpoint table. +#define UHS_HOST_ERROR_UNPLUGGED 0xDEU // Someone removed the USB device, or Vbus was turned off. +#define UHS_HOST_ERROR_NOMEM 0xDFU // Out Of Memory. + +// Control request stream errors +#define UHS_HOST_ERROR_FailGetDevDescr 0xE1U +#define UHS_HOST_ERROR_FailSetDevTblEntry 0xE2U +#define UHS_HOST_ERROR_FailGetConfDescr 0xE3U +#define UHS_HOST_ERROR_END_OF_STREAM 0xEFU + +// Host base class specific Error codes +#define UHS_HOST_ERROR_NOT_IMPLEMENTED 0xFEU +#define UHS_HOST_ERROR_TRANSFER_TIMEOUT 0xFFU + +// SEI interaction defaults +#define UHS_HOST_TRANSFER_MAX_MS 10000 // USB transfer timeout in ms, per section 9.2.6.1 of USB 2.0 spec +#define UHS_HOST_TRANSFER_RETRY_MAXIMUM 3 // 3 retry limit for a transfer +#define UHS_HOST_DEBOUNCE_DELAY_MS 500 // settle delay in milliseconds +#define UHS_HUB_RESET_DELAY_MS 20 // hub port reset delay, 10ms recomended, but can be up to 20ms + +// +// We only provide the minimum needed information for enumeration. +// Interface drivers should be able to set up what is needed with nothing more. +// A driver needs to know the following information: +// 1: address on the USB network, parent and port (aka UsbDeviceAddress) +// 2: endpoints +// 3: vid:pid, class, subclass, protocol +// + +struct ENDPOINT_INFO { + uint8_t bEndpointAddress; // Endpoint address. Bit 7 indicates direction (0=OUT, 1=IN). + uint8_t bmAttributes; // Endpoint transfer type. + uint16_t wMaxPacketSize; // Maximum packet size. + uint8_t bInterval; // Polling interval in frames. +} __attribute__((packed)); + +struct INTERFACE_INFO { + uint8_t bInterfaceNumber; + uint8_t bAlternateSetting; + uint8_t numep; + uint8_t klass; + uint8_t subklass; + uint8_t protocol; + ENDPOINT_INFO epInfo[16]; +} __attribute__((packed)); + +struct ENUMERATION_INFO { + uint16_t vid; + uint16_t pid; + uint16_t bcdDevice; + uint8_t klass; + uint8_t subklass; + uint8_t protocol; + uint8_t bMaxPacketSize0; + uint8_t currentconfig; + uint8_t parent; + uint8_t port; + uint8_t address; + INTERFACE_INFO interface; +} __attribute__((packed)); + +/* USB Setup Packet Structure */ +typedef struct { + // offset description + // 0 Bit-map of request type + union { + uint8_t bmRequestType; + + struct { + uint8_t recipient : 5; // Recipient of the request + uint8_t type : 2; // Type of request + uint8_t direction : 1; // Direction of data transfer + } __attribute__((packed)); + } ReqType_u; + + // 1 Request + uint8_t bRequest; + + // 2 Depends on bRequest + union { + uint16_t wValue; + + struct { + uint8_t wValueLo; + uint8_t wValueHi; + } __attribute__((packed)); + } wVal_u; + // 4 Depends on bRequest + uint16_t wIndex; + // 6 Depends on bRequest + uint16_t wLength; + // 8 bytes total +} __attribute__((packed)) SETUP_PKT, *PSETUP_PKT; + + +// little endian :-) 8 8 8 8 16 16 +#define mkSETUP_PKT8(bmReqType, bRequest, wValLo, wValHi, wInd, total) ((uint64_t)(((uint64_t)(bmReqType)))|(((uint64_t)(bRequest))<<8)|(((uint64_t)(wValLo))<<16)|(((uint64_t)(wValHi))<<24)|(((uint64_t)(wInd))<<32)|(((uint64_t)(total)<<48))) +#define mkSETUP_PKT16(bmReqType, bRequest, wVal, wInd, total) ((uint64_t)(((uint64_t)(bmReqType)))|(((uint64_t)(bRequest))<<8)|(((uint64_t)(wVal ))<<16) |(((uint64_t)(wInd))<<32)|(((uint64_t)(total)<<48))) + +// Big endian -- but we aren't able to use this :-/ +//#define mkSETUP_PKT8(bmReqType, bRequest, wValLo, wValHi, wInd, total) ((uint64_t)(((uint64_t)(bmReqType))<<56)|(((uint64_t)(bRequest))<<48)|(((uint64_t)(wValLo))<<40)|(((uint64_t)(wValHi))<<32)|(((uint64_t)(wInd))<<16)|((uint64_t)(total))) +//#define mkSETUP_PKT16(bmReqType, bRequest, wVal, wInd, total) ((uint64_t)(((uint64_t)(bmReqType))<<56)|(((uint64_t)(bRequest))<<48) |(((uint64_t)(wVal))<<32) |(((uint64_t)(wInd))<<16)|((uint64_t)(total))) + +#endif /* USBCORE_H */ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h new file mode 100644 index 000000000000..ce60e44ec5fb --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_address.h @@ -0,0 +1,248 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(_UHS_host_h_) || defined(__ADDRESS_H__) +#error "Never include UHS_address.h directly; include UHS_Usb.h instead" +#else +#define __ADDRESS_H__ + + + +/* NAK powers. To save space in endpoint data structure, amount of retries before giving up and returning 0x4 is stored in */ +/* bmNakPower as a power of 2. The actual nak_limit is then calculated as nak_limit = ( 2^bmNakPower - 1) */ +#define UHS_USB_NAK_MAX_POWER 14 // NAK binary order maximum value +#define UHS_USB_NAK_DEFAULT 13 // default 16K-1 NAKs before giving up +#define UHS_USB_NAK_NOWAIT 1 // Single NAK stops transfer +#define UHS_USB_NAK_NONAK 0 // Do not count NAKs, stop retrying after USB Timeout. Try not to use this. + +#define bmUSB_DEV_ADDR_PORT 0x07 +#define bmUSB_DEV_ADDR_PARENT 0x78 +#define bmUSB_DEV_ADDR_HUB 0x40 + +// TODO: embed parent? +struct UHS_EpInfo { + uint8_t epAddr; // Endpoint address + uint8_t bIface; + uint16_t maxPktSize; // Maximum packet size + + union { + uint8_t epAttribs; + + struct { + uint8_t bmSndToggle : 1; // Send toggle, when zero bmSNDTOG0, bmSNDTOG1 otherwise + uint8_t bmRcvToggle : 1; // Send toggle, when zero bmRCVTOG0, bmRCVTOG1 otherwise + uint8_t bmNeedPing : 1; // 1 == ping protocol needed for next out packet + uint8_t bmNakPower : 5; // Binary order for NAK_LIMIT value + } __attribute__((packed)); + }; +} __attribute__((packed)); + +// TODO: embed parent address and port into epinfo struct, +// and nuke this address stupidity. +// This is a compact scheme. Should also support full spec. +// This produces a 7 hub limit, 49 devices + 7 hubs, 56 total. +// +// 7 6 5 4 3 2 1 0 +// --------------------------------- +// | | H | P | P | P | A | A | A | +// --------------------------------- +// +// H - if 1 the address is a hub address +// P - parent hub number +// A - port number of parent +// + +struct UHS_DeviceAddress { + + union { + + struct { + uint8_t bmAddress : 3; // port number + uint8_t bmParent : 3; // parent hub address + uint8_t bmHub : 1; // hub flag + uint8_t bmReserved : 1; // reserved, must be zero + } __attribute__((packed)); + uint8_t devAddress; + }; +} __attribute__((packed)); + +struct UHS_Device { + volatile UHS_EpInfo *epinfo[UHS_HOST_MAX_INTERFACE_DRIVERS]; // endpoint info pointer + UHS_DeviceAddress address; + uint8_t epcount; // number of endpoints + uint8_t speed; // indicates device speed +} __attribute__((packed)); + +typedef void (*UsbDeviceHandleFunc)(UHS_Device *pdev); + +class AddressPool { + UHS_EpInfo dev0ep; //Endpoint data structure used during enumeration for uninitialized device + + // In order to avoid hub address duplication, this should use bits + uint8_t hubCounter; // hub counter + + UHS_Device thePool[UHS_HOST_MAX_INTERFACE_DRIVERS]; + + // Initializes address pool entry + + void UHS_NI InitEntry(uint8_t index) { + thePool[index].address.devAddress = 0; + thePool[index].epcount = 1; + thePool[index].speed = 0; + for(uint8_t i = 0; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) { + thePool[index].epinfo[i] = &dev0ep; + } + }; + + // Returns thePool index for a given address + + uint8_t UHS_NI FindAddressIndex(uint8_t address = 0) { + for(uint8_t i = 1; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) { + if(thePool[i].address.devAddress == address) + return i; + } + return 0; + }; + + // Returns thePool child index for a given parent + + uint8_t UHS_NI FindChildIndex(UHS_DeviceAddress addr, uint8_t start = 1) { + for(uint8_t i = (start < 1 || start >= UHS_HOST_MAX_INTERFACE_DRIVERS) ? 1 : start; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) { + if(thePool[i].address.bmParent == addr.bmAddress) + return i; + } + return 0; + }; + + // Frees address entry specified by index parameter + + void UHS_NI FreeAddressByIndex(uint8_t index) { + // Zero field is reserved and should not be affected + if(index == 0) + return; + + UHS_DeviceAddress uda = thePool[index].address; + // If a hub was switched off all port addresses should be freed + if(uda.bmHub == 1) { + for(uint8_t i = 1; (i = FindChildIndex(uda, i));) + FreeAddressByIndex(i); + + // FIXME: use BIT MASKS + // If the hub had the last allocated address, hubCounter should be decremented + if(hubCounter == uda.bmAddress) + hubCounter--; + } + InitEntry(index); + } + + void InitAllAddresses(void) { + for(uint8_t i = 1; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) InitEntry(i); + hubCounter = 0; + }; +public: + + AddressPool() { + hubCounter = 0; + // Zero address is reserved + InitEntry(0); + + thePool[0].epinfo[0] = &dev0ep; + dev0ep.epAddr = 0; +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + dev0ep.maxPktSize = 0x40; //starting at 0x40 and work down +#else + dev0ep.maxPktSize = 0x08; +#endif + dev0ep.epAttribs = 0; //set DATA0/1 toggles to 0 + dev0ep.bmNakPower = UHS_USB_NAK_MAX_POWER; + InitAllAddresses(); + }; + + // Returns a pointer to a specified address entry + + UHS_Device* UHS_NI GetUsbDevicePtr(uint8_t addr) { + if(!addr) + return thePool; + + uint8_t index = FindAddressIndex(addr); + + return (!index) ? NULL : &thePool[index]; + }; + + + // Allocates new address + + uint8_t UHS_NI AllocAddress(uint8_t parent, bool is_hub = false, uint8_t port = 1) { + /* if (parent != 0 && port == 0) + USB_HOST_SERIAL.println("PRT:0"); */ + UHS_DeviceAddress _parent; + _parent.devAddress = parent; + if(_parent.bmReserved || port > 7) + //if(parent > 127 || port > 7) + return 0; + + // FIXME: use BIT MASKS + if(is_hub && hubCounter == 7) + return 0; + + // finds first empty address entry starting from one + uint8_t index = FindAddressIndex(0); + + if(!index) // if empty entry is not found + return 0; + + UHS_DeviceAddress addr; + addr.devAddress = port; + addr.bmParent = _parent.bmAddress; + + // FIXME: use BIT MASKS + if(is_hub) { + hubCounter++; + addr.bmHub = 1; + addr.bmAddress = hubCounter; + } + thePool[index].address = addr; +#if DEBUG_PRINTF_EXTRA_HUGE +#if defined(UHS_DEBUG_USB_ADDRESS) + printf("Address: %x (%x.%x.%x)\r\n", addr.devAddress, addr.bmHub, addr.bmParent, addr.bmAddress); +#endif +#endif + return thePool[index].address.devAddress; + }; + + void UHS_NI FreeAddress(uint8_t addr) { + // if the root hub is disconnected all the addresses should be initialized + if(addr == 0x41) { + InitAllAddresses(); + return; + } + uint8_t index = FindAddressIndex(addr); + FreeAddressByIndex(index); + }; + +}; + +#endif // __ADDRESS_H__ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_hexdump.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_hexdump.h new file mode 100644 index 000000000000..1e12908a8923 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_hexdump.h @@ -0,0 +1,70 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ +#if !defined(_usb_h_) || defined(__HEXDUMP_H__) +#error "Never include UHS_hexdump.h directly; include UHS_Usb.h instead" +#else +#define __HEXDUMP_H__ + +extern int UsbDEBUGlvl; + +template +class HexDumper : public BASE_CLASS { + uint8_t byteCount; + OFFSET_TYPE byteTotal; + +public: + + HexDumper() : byteCount(0), byteTotal(0) { + }; + + void Initialize(void) { + byteCount = 0; + byteTotal = 0; + }; + + virtual void Parse(const LEN_TYPE len, const uint8_t *pbuf, const OFFSET_TYPE &offset); +}; + +template +void HexDumper::Parse(const LEN_TYPE len, const uint8_t *pbuf, const OFFSET_TYPE &offset) { + if(UsbDEBUGlvl >= 0x80) { // Fully bypass this block of code if we do not debug. + for(LEN_TYPE j = 0; j < len; j++, byteCount++, byteTotal++) { + if(!byteCount) { + PrintHex (byteTotal, 0x80); + E_Notify(PSTR(": "), 0x80); + } + PrintHex (pbuf[j], 0x80); + E_Notify(PSTR(" "), 0x80); + + if(byteCount == 15) { + E_Notify(PSTR("\r\n"), 0x80); + byteCount = 0xFF; + } + } + } +} + +#endif // __HEXDUMP_H__ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host.h new file mode 100644 index 000000000000..36ca2bfc4d3c --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host.h @@ -0,0 +1,111 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ +/* USB functions */ +#ifndef _UHS_host_h_ +#define _UHS_host_h_ + +// WARNING: Do not change the order of includes, or stuff will break! +#include +#include +#include +#include + +#if DISABLED(USE_UHS3_USB) +#include +#include +#include +#include +#endif +#include "UHS_macros.h" + +// None of these should ever be directly included by a driver, or a user's sketch. +#include "../dyn_SWI/dyn_SWI.h" +#include "UHS_USB_IDs.h" +#include "UHS_settings.h" +#include "UHS_usb_ch9.h" +#include "UHS_UsbCore.h" +#include "UHS_address.h" +#include "UHS_usbhost.h" +#include "UHS_printhex.h" +#include "UHS_message.h" + +// Load system components as required +#if defined(LOAD_USB_HOST_SYSTEM) && !defined(USB_HOST_SYSTEM_LOADED) +#include "UHS_util_INLINE.h" +#include "UHS_host_INLINE.h" +#include "UHS_printf_HELPER.h" + +#if defined(LOAD_USB_HOST_SHIELD) +#include "USB_HOST_SHIELD/USB_HOST_SHIELD.h" +#endif + +#if defined(LOAD_UHS_KINETIS_FS_HOST) && !defined(UHS_KINETIS_FS_HOST_LOADED) +#include "UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h" +#endif + +#if defined(LOAD_UHS_KINETIS_EHCI) && !defined(UHS_KINETIS_EHCI_LOADED) +#include "UHS_KINETIS_EHCI/UHS_KINETIS_EHCI.h" +#endif + +// Load USB drivers and multiplexers + +#if defined(LOAD_UHS_HUB) +#include "UHS_HUB/UHS_HUB.h" +#endif // HUB loaded + +#if defined(LOAD_UHS_BULK_STORAGE) +#include "UHS_BULK_STORAGE/UHS_BULK_STORAGE.h" +#endif + +#if defined(LOAD_GENERIC_STORAGE) +#include "../UHS_FS/UHS_FS.h" +#endif +// Add BT and optionally HID if directed to do so +#if defined(LOAD_UHS_BT) +#include "UHS_BT/UHS_BT.h" +#endif // BT and optionally HID loaded + +// Add HID +#if defined(LOAD_UHS_HID) +#include "UHS_HID/UHS_HID.h" +#endif // HID loaded + +// Add CDC multiplexers (currently only ACM) +#if defined(LOAD_UHS_CDC_ACM) || defined(LOAD_UHS_CDC_ACM_FTDI) || defined(LOAD_UHS_CDC_ACM_PROLIFIC) || defined(LOAD_UHS_CDC_ACM_XR21B1411) +#include "UHS_CDC/UHS_CDC.h" +#endif // CDC loaded + +#if defined(LOAD_UHS_ADK) +#include "UHS_ADK/UHS_ADK.h" +#endif + +#if defined(LOAD_UHS_MIDI) +#include "UHS_MIDI/UHS_MIDI.h" +#endif + +#endif // System code loaded + +#endif // _UHS_host_h_ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h new file mode 100644 index 000000000000..908391a157f1 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h @@ -0,0 +1,1224 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if defined(LOAD_USB_HOST_SYSTEM) && !defined(USB_HOST_SYSTEM_LOADED) +#define USB_HOST_SYSTEM_LOADED + +#ifndef DEBUG_PRINTF_EXTRA_HUGE_UHS_HOST +#define DEBUG_PRINTF_EXTRA_HUGE_UHS_HOST 0 +#endif + +#if DEBUG_PRINTF_EXTRA_HUGE +#if DEBUG_PRINTF_EXTRA_HUGE_UHS_HOST +#define HOST_DEBUG(...) printf(__VA_ARGS__) +#else +#define HOST_DEBUG(...) VOID0 +#endif +#else +#define HOST_DEBUG(...) VOID0 +#endif + +UHS_EpInfo* UHS_USB_HOST_BASE::getEpInfoEntry(uint8_t addr, uint8_t ep) { + UHS_Device *p = addrPool.GetUsbDevicePtr(addr); + + if(!p || !p->epinfo) + return NULL; + + + UHS_EpInfo *pep; + for(uint8_t j = 0; j < UHS_HOST_MAX_INTERFACE_DRIVERS; j++) { + pep = (UHS_EpInfo *)(p->epinfo[j]); + + for(uint8_t i = 0; i < p->epcount; i++) { + if((pep)->epAddr == ep) { + HOST_DEBUG("ep entry for interface %d ep %d max packet size = %d\r\n", pep->bIface, ep, pep->maxPktSize); + return pep; + } + + pep++; + } + } + return NULL; +} + +/** + * Sets a device table entry for a device. + * Each device is different and has different number of endpoints. + * This function plugs endpoint record structure, defined in application, to devtable + * + * @param addr device address + * @param epcount how many endpoints + * @param eprecord pointer to the endpoint structure + * @return Zero for success, or error code + */ +uint8_t UHS_USB_HOST_BASE::setEpInfoEntry(uint8_t addr, uint8_t iface, uint8_t epcount, volatile UHS_EpInfo* eprecord) { + if(!eprecord) + return UHS_HOST_ERROR_BAD_ARGUMENT; + + UHS_Device *p = addrPool.GetUsbDevicePtr(addr); + + if(!p) + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + + p->address.devAddress = addr; + p->epinfo[iface] = eprecord; + p->epcount = epcount; + return 0; +} + +/** + * sets all enpoint addresses to zero. + * Sets all max packet sizes to defaults + * Clears all endpoint attributes + * Sets bmNakPower to USB_NAK_DEFAULT + * Sets binterface to zero. + * Sets bNumEP to zero. + * Sets bAddress to zero. + * Clears qNextPollTime and sets bPollEnable to false. + * + * @param maxep How many endpoints to initialize + * @param device pointer to the device driver instance (this) + * + */ + +void UHS_USB_HOST_BASE::DeviceDefaults(uint8_t maxep, UHS_USBInterface *interface) { + + for(uint8_t i = 0; i < maxep; i++) { + interface->epInfo[i].epAddr = 0; + interface->epInfo[i].maxPktSize = (i) ? 0 : 8; + interface->epInfo[i].epAttribs = 0; + interface->epInfo[i].bmNakPower = UHS_USB_NAK_DEFAULT; + } + interface->pUsb->GetAddressPool()->FreeAddress(interface->bAddress); + interface->bIface = 0; + interface->bNumEP = 1; + interface->bAddress = 0; + interface->qNextPollTime = 0; + interface->bPollEnable = false; +} + +/** + * Perform a bus reset to the port of the connected device + * + * @param parent index to Parent + * @param port what port on the parent + * @param address address of the device + * @return Zero for success, or error code + */ + +uint8_t UHS_USB_HOST_BASE::doSoftReset(uint8_t parent, uint8_t port, uint8_t address) { + uint8_t rcode = 0; + + if(parent == 0) { + // Send a bus reset on the root interface. + doHostReset(); + } else { + // reset parent port + devConfig[parent]->ResetHubPort(port); + } + + // + // Many devices require a delay before setting the address here... + // We loop upon fails for up to 2 seconds instead. + // Most devices will be happy without a retry. + // + uint8_t retries = 0; + if(address) { + do { + rcode = setAddr(0, address); + if(!rcode) break; + retries++; + sof_delay(10); + } while(retries < 200); + HOST_DEBUG("%i retries.\r\n", retries); + } else { +#if DEBUG_PRINTF_EXTRA_HUGE + printf("\r\ndoSoftReset called with address == 0.\r\n"); +#endif + } + return rcode; +} + +/* + * Pseudo code so you may understand the code flow. + * + * reset; (happens at the lower level) + * GetDevDescr(); + * reset; + * If there are no configuration descriptors { + * // + * // Note: I know of no device that does this. + * // I suppose there could be one though. + * // + * try to enumerate. + * } else { + * last success count = 0 + * best config = 0 + * for each configuration descriptor { + * for each interface descriptor { + * get the endpoint descriptors for this interface. + * Check to see if a driver can handle this interface. + * If it can, add 1 to the success count. + * } + * if success count > last success count { + * best config = current config + * last success count = success count + * } + * } + * set the device config to the best config + * for each best config interface descriptor { + * initialize driver that can handle this interface config + * } + * } + * + * NOTES: + * 1: We do not need to save toggle states anymore and have not + * needed to for some time, because the lower level driver + * actually corrects wrong toggles on-the-fly for us. + * + * 2: We always do a second reset, since this stupid bug is + * actually part of the specification documents that I + * have found all over the net. Even Linux does it, and + * many devices actually EXPECT this behavior. Some devices + * will not enumerate without it. For devices that do not + * need it, the additional reset is harmless. Here is an + * example of one of these documents, see page Five: + * http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_113_Simplified%20Description%20of%20USB%20Device%20Enumeration.pdf + * + * + */ + +/** + * Enumerates interfaces on devices + * + * @param parent index to Parent + * @param port what port on the parent + * @param speed the speed of the device + * @return Zero for success, or error code + */ +uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t speed) { + //uint8_t bAddress = 0; + HOST_DEBUG("\r\n\r\n\r\nConfiguring: parent = %i, port = %i, speed = %i\r\n", parent, port, speed); + uint8_t rcode = 0; + uint8_t retries = 0; + uint8_t numinf = 0; + uint8_t configs; + UHS_Device *p = NULL; + //EpInfo epInfo; // cap at 16, this should be fairly reasonable. + ENUMERATION_INFO ei; + uint8_t bestconf = 0; + uint8_t bestsuccess = 0; + + uint8_t devConfigIndex; + +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + const uint8_t biggest = 0x40; + // wrap in {} to throw away the 64 byte buffer when we are done with it + { + uint8_t buf[biggest]; + USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast(buf); +#else + const uint8_t biggest = 18; + uint8_t buf[biggest]; + USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast(buf); + USB_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast(buf); +#endif + + //for(devConfigIndex = 0; devConfigIndex < UHS_HOST_MAX_INTERFACE_DRIVERS; devConfigIndex++) { + // if((devConfig[devConfigIndex]->bAddress) && (!devConfig[devConfigIndex]->bPollEnable)) { + // devConfig[devConfigIndex]->bAddress = 0; + // } + //} + // Serial.print("HOST USB Host @ 0x"); + // Serial.println((uint32_t)this, HEX); + // Serial.print("HOST USB Host Address Pool @ 0x"); + // Serial.println((uint32_t)GetAddressPool(), HEX); + + sof_delay(200); + p = addrPool.GetUsbDevicePtr(0); + if(!p) { + HOST_DEBUG("Configuring error: USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL\r\n"); + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + } + + p->speed = speed; +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + + p->epinfo[0][0].maxPktSize = 0x40; // Windows bug is expected. + // poison data + // udd->bMaxPacketSize0 = 0U; +#else + p->epinfo[0][0].maxPktSize = 0x08; // USB Spec, start small, work your way up. +#endif +again: + memset((void *)buf, 0, biggest); + HOST_DEBUG("\r\n\r\nConfiguring PktSize 0x%2.2x, rcode: 0x%2.2x, retries %i,\r\n", p->epinfo[0][0].maxPktSize, rcode, retries); + rcode = getDevDescr(0, biggest, (uint8_t*)buf); +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + if(rcode || udd->bMaxPacketSize0 < 8) +#else + if(rcode) +#endif + { + if(rcode == UHS_HOST_ERROR_JERR && retries < 4) { + // + // Some devices return JERR when plugged in. + // Attempts to reinitialize the device usually works. + // + // I have a hub that will refuse to work and acts like + // this unless external power is supplied. + // So this may not always work, and you may be fooled. + // + sof_delay(100); + retries++; + goto again; +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + } else if(((rcode == UHS_HOST_ERROR_DMA || rcode == UHS_HOST_ERROR_MEM_LAT) && retries < 4) || (udd->bMaxPacketSize0 < 8 && !rcode)) { + + if(p->epinfo[0][0].maxPktSize > 8 && rcode == UHS_HOST_ERROR_DMA) p->epinfo[0][0].maxPktSize = p->epinfo[0][0].maxPktSize >> 1; +#else + } else if((rcode == UHS_HOST_ERROR_DMA || rcode == UHS_HOST_ERROR_MEM_LAT) && retries < 4) { + if(p->epinfo[0][0].maxPktSize < 32) p->epinfo[0][0].maxPktSize = p->epinfo[0][0].maxPktSize << 1; +#endif + HOST_DEBUG("Configuring error: 0x%2.2x UHS_HOST_ERROR_DMA. Retry with maxPktSize: %i\r\n", rcode, p->epinfo[0][0].maxPktSize); + doSoftReset(parent, port, 0); + retries++; + sof_delay(200); + goto again; + } + HOST_DEBUG("Configuring error: 0x%2.2x Can't get USB_DEVICE_DESCRIPTOR\r\n", rcode); + return rcode; + } + + +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + ei.address = addrPool.AllocAddress(parent, false, port); + + if(!ei.address) { + return UHS_HOST_ERROR_ADDRESS_POOL_FULL; + } + + p = addrPool.GetUsbDevicePtr(ei.address); + // set to 1 if you suspect address table corruption. +#if 0 + if(!p) { + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + } +#endif + + p->speed = speed; + + rcode = doSoftReset(parent, port, ei.address); + + if(rcode) { + addrPool.FreeAddress(ei.address); + HOST_DEBUG("Configuring error: %2.2x Can't set USB INTERFACE ADDRESS\r\n", rcode); + return rcode; + } + + { // the { } wrapper saves on stack. + HOST_DEBUG("DevDescr 2nd poll, bMaxPacketSize0:%u\r\n", udd->bMaxPacketSize0); + UHS_EpInfo dev1ep; + dev1ep.maxPktSize = udd->bMaxPacketSize0; + dev1ep.epAddr = 0; + dev1ep.epAttribs = 0; + dev1ep.bmNakPower = UHS_USB_NAK_MAX_POWER; + p->address.devAddress = ei.address; + p->epcount = 1; + p->epinfo[0] = &dev1ep; + + sof_delay(10); + memset((void *)buf, 0, biggest); + rcode = getDevDescr(ei.address, 18, (uint8_t*)buf); + if(rcode) HOST_DEBUG("getDevDescr err: 0x%x \r\n", rcode); + + addrPool.FreeAddress(ei.address); + if(rcode && rcode != UHS_HOST_ERROR_DMA) { + return rcode; + } + sof_delay(10); + } +#endif + + ei.vid = udd->idVendor; + ei.pid = udd->idProduct; + ei.bcdDevice = udd->bcdDevice; + ei.klass = udd->bDeviceClass; + ei.subklass = udd->bDeviceSubClass; + ei.protocol = udd->bDeviceProtocol; + ei.bMaxPacketSize0 = udd->bMaxPacketSize0; + ei.currentconfig = 0; + ei.parent = parent; + ei.port = port; + configs = udd->bNumConfigurations; +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + } // unwrapped, old large buf now invalid and discarded. + + uint8_t buf[18]; + USB_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast(buf); +#endif + + ei.address = addrPool.AllocAddress(parent, IsHub(ei.klass), port); + + if(!ei.address) { + return UHS_HOST_ERROR_ADDRESS_POOL_FULL; + } + + p = addrPool.GetUsbDevicePtr(ei.address); + // set to 1 if you suspect address table corruption. +#if 0 + if(!p) { + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + } +#endif + + p->speed = speed; + + rcode = doSoftReset(parent, port, ei.address); + + if(rcode) { + addrPool.FreeAddress(ei.address); + HOST_DEBUG("Configuring error: %2.2x Can't set USB INTERFACE ADDRESS\r\n", rcode); + return rcode; + } + + if(configs < 1) { + HOST_DEBUG("No interfaces?!\r\n"); + addrPool.FreeAddress(ei.address); + // rcode = TestInterface(&ei); + // Not implemented (yet) + rcode = UHS_HOST_ERROR_DEVICE_NOT_SUPPORTED; + } else { + HOST_DEBUG("configs: %i\r\n", configs); + for(uint8_t conf = 0; (!rcode) && (conf < configs); conf++) { + // read the config descriptor into a buffer. + rcode = getConfDescr(ei.address, sizeof (USB_CONFIGURATION_DESCRIPTOR), conf, buf); + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR\r\n", rcode); + rcode = UHS_HOST_ERROR_FailGetConfDescr; + continue; + } + ei.currentconfig = conf; + numinf = ucd->bNumInterfaces; // Does _not_ include alternates! + HOST_DEBUG("CONFIGURATION: %i, bNumInterfaces %i, wTotalLength %i\r\n", conf, numinf, ucd->wTotalLength); + uint8_t success = 0; + uint16_t inf = 0; + uint8_t data[ei.bMaxPacketSize0]; + UHS_EpInfo *pep; + pep = ctrlReqOpen(ei.address, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, ei.currentconfig, USB_DESCRIPTOR_CONFIGURATION, 0x0000U, ucd->wTotalLength), data); + if(!pep) { + rcode = UHS_HOST_ERROR_NULL_EPINFO; + continue; + } + uint16_t left; + uint16_t read; + uint8_t offset; + rcode = initDescrStream(&ei, ucd, pep, data, &left, &read, &offset); + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode); + break; + } + for(; (numinf) && (!rcode); inf++) { + // iterate for each interface on this config + rcode = getNextInterface(&ei, pep, data, &left, &read, &offset); + if(rcode == UHS_HOST_ERROR_END_OF_STREAM) { + HOST_DEBUG("USB_INTERFACE END OF STREAM\r\n"); + ctrlReqClose(pep, UHS_bmREQ_GET_DESCR, left, ei.bMaxPacketSize0, data); + rcode = 0; + break; + } + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't close USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode); + continue; + } + rcode = TestInterface(&ei); + if(!rcode) success++; + rcode = 0; + } + if(!inf) { + rcode = TestInterface(&ei); + if(!rcode) success++; + rcode = 0; + } + if(success > bestsuccess) { + bestconf = conf; + bestsuccess = success; + } + } + if(!bestsuccess) rcode = UHS_HOST_ERROR_DEVICE_NOT_SUPPORTED; + } + if(!rcode) { + rcode = getConfDescr(ei.address, sizeof (USB_CONFIGURATION_DESCRIPTOR), bestconf, buf); + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR\r\n", rcode); + rcode = UHS_HOST_ERROR_FailGetConfDescr; + } + } + if(!rcode) { + bestconf++; + ei.currentconfig = bestconf; + numinf = ucd->bNumInterfaces; // Does _not_ include alternates! + HOST_DEBUG("CONFIGURATION: %i, bNumInterfaces %i, wTotalLength %i\r\n", bestconf, numinf, ucd->wTotalLength); + if(!rcode) { + HOST_DEBUG("Best configuration is %i, enumerating interfaces.\r\n", bestconf); + uint16_t inf = 0; + uint8_t data[ei.bMaxPacketSize0]; + UHS_EpInfo *pep; + pep = ctrlReqOpen(ei.address, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, ei.currentconfig - 1, USB_DESCRIPTOR_CONFIGURATION, 0x0000U, ucd->wTotalLength), data); + if(!pep) { + rcode = UHS_HOST_ERROR_NULL_EPINFO; + + } else { + uint16_t left; + uint16_t read; + uint8_t offset; + rcode = initDescrStream(&ei, ucd, pep, data, &left, &read, &offset); + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode); + } else { + for(; (numinf) && (!rcode); inf++) { + // iterate for each interface on this config + rcode = getNextInterface(&ei, pep, data, &left, &read, &offset); + if(rcode == UHS_HOST_ERROR_END_OF_STREAM) { + ctrlReqClose(pep, UHS_bmREQ_GET_DESCR, left, ei.bMaxPacketSize0, data); + rcode = 0; + break; + } + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't close USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode); + continue; + } + + if(enumerateInterface(&ei) == UHS_HOST_MAX_INTERFACE_DRIVERS) { + HOST_DEBUG("No interface driver for this interface."); + } else { + HOST_DEBUG("Interface Configured\r\n"); + } + } + } + } + } else { + HOST_DEBUG("Configuring error: %2.2x Can't set USB_INTERFACE_CONFIG stream.\r\n", rcode); + } + } + + if(!rcode) { + rcode = setConf(ei.address, bestconf); + if(rcode) { + HOST_DEBUG("Configuring error: %2.2x Can't set Configuration.\r\n", rcode); + addrPool.FreeAddress(ei.address); + } else { + for(devConfigIndex = 0; devConfigIndex < UHS_HOST_MAX_INTERFACE_DRIVERS; devConfigIndex++) { + HOST_DEBUG("Driver %i ", devConfigIndex); + if(!devConfig[devConfigIndex]) { + HOST_DEBUG("no driver at this index.\r\n"); + continue; // no driver + } + HOST_DEBUG("@ %2.2x ", devConfig[devConfigIndex]->bAddress); + if(devConfig[devConfigIndex]->bAddress) { + if(!devConfig[devConfigIndex]->bPollEnable) { + HOST_DEBUG("Initialize\r\n"); + rcode = devConfig[devConfigIndex]->Finalize(); + rcode = devConfig[devConfigIndex]->Start(); + if(!rcode) { + HOST_DEBUG("Total endpoints = (%i)%i\r\n", p->epcount, devConfig[devConfigIndex]->bNumEP); + } else { + break; + } + } else { + HOST_DEBUG("Already initialized.\r\n"); + continue; // consumed + } + } else { + HOST_DEBUG("Skipped\r\n"); + } + } +#if 0 // defined(UHS_HID_LOADED) + // Now do HID +#endif + } + } else { + addrPool.FreeAddress(ei.address); + } + return rcode; +} + +/** + * Removes a device from the tables + * + * @param addr address of the device + * @return nothing + */ +void UHS_USB_HOST_BASE::ReleaseDevice(uint8_t addr) { + if(addr) { +#if 0 // defined(UHS_HID_LOADED) + // Release any HID children + UHS_HID_Release(this, addr); +#endif + for(uint8_t i = 0; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) { + if(!devConfig[i]) continue; + if(devConfig[i]->bAddress == addr) { + devConfig[i]->Release(); + break; + } + } + } +} + +/** + * Gets the device descriptor, or part of it from endpoint Zero. + * + * @param addr Address of the device + * @param nbytes how many bytes to return + * @param dataptr pointer to the data to return + * @return status of the request, zero is success. + */ +uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* dataptr) { + return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes), nbytes, dataptr)); +} + +/** + * Gets the config descriptor, or part of it from endpoint Zero. + * + * @param addr Address of the device + * @param nbytes how many bytes to return + * @param conf index to descriptor to return + * @param dataptr ointer to the data to return + * @return status of the request, zero is success. + */ +uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) { + return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes), nbytes, dataptr)); +} + +/** + * Get the string descriptor from a device + * + * @param addr Address of the device + * @param ns + * @param index + * @param langid language ID + * @param dataptr pointer to the data to return + * @return status of the request, zero is success. + */ +uint8_t UHS_USB_HOST_BASE::getStrDescr(uint8_t addr, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) { + return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns), ns, dataptr)); +} + +// +//set address +// + +/** + * Set the address of a device to a new address via endpoint Zero. + * + * @param oldaddr current address + * @param newaddr new address + * @return status of the request, zero is success. + */ +uint8_t UHS_USB_HOST_BASE::setAddr(uint8_t oldaddr, uint8_t newaddr) { + uint8_t rcode = ctrlReq(oldaddr, mkSETUP_PKT8(UHS_bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000), 0x0000, NULL); + sof_delay(300); // Older spec says you should wait at least 200ms + return rcode; +} + +// +//set configuration +// + +/** + * Set the configuration for the device to use via endpoint Zero. + * + * @param addr Address of the device + * @param conf_value configuration index value + * @return status of the request, zero is success. + */ +uint8_t UHS_USB_HOST_BASE::setConf(uint8_t addr, uint8_t conf_value) { + return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000), 0x0000, NULL)); +} + +/* rcode 0 if no errors. rcode 01-0f is relayed from HRSL */ + +/** + * Writes data to an interface pipe + * + * @param addr Address of the device + * @param ep Endpoint of the pipe + * @param nbytes number of bytes to transfer + * @param data pointer to buffer to hold transfer + * @return zero for success or error code + */ +uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) { + UHS_EpInfo *pep = NULL; + uint16_t nak_limit = 0; + HOST_DEBUG("outTransfer: addr: 0x%2.2x ep: 0x%2.2x nbytes: 0x%4.4x data: 0x%p\r\n", addr, ep, nbytes, data); + + uint8_t rcode = SetAddress(addr, ep, &pep, nak_limit); + HOST_DEBUG("outTransfer: SetAddress 0x%2.2x\r\n", rcode); + if(!rcode) + rcode = OutTransfer(pep, nak_limit, nbytes, data); + return rcode; +}; + +/** + * Reads data from an interface pipe + * + * @param addr Address of the device + * @param ep Endpoint of the pipe + * @param nbytesptr number of bytes to transfer + * @param data pointer to buffer to hold transfer + * @return zero for success or error code + */ +uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data) { + UHS_EpInfo *pep = NULL; + uint16_t nak_limit = 0; + + uint8_t rcode = SetAddress(addr, ep, &pep, nak_limit); + + // if(rcode) { + // USBTRACE3("(USB::InTransfer) SetAddress Failed ", rcode, 0x81); + // USBTRACE3("(USB::InTransfer) addr requested ", addr, 0x81); + // USBTRACE3("(USB::InTransfer) ep requested ", ep, 0x81); + // return rcode; + // } + if(!rcode) + rcode = InTransfer(pep, nak_limit, nbytesptr, data); + return rcode; + +} + +/** + * Initialize the descriptor stream, works much like opening a file. + * + * @param ei + * @param ucd + * @param pep + * @param data + * @param left + * @param read + * @param offset + * @return zero for success or error code + */ +uint8_t UHS_USB_HOST_BASE::initDescrStream(ENUMERATION_INFO *ei, USB_CONFIGURATION_DESCRIPTOR *ucd, UHS_EpInfo *pep, uint8_t *data, uint16_t *left, uint16_t *read, uint8_t *offset) { + if(!ei || !ucd) return UHS_HOST_ERROR_BAD_ARGUMENT; + if(!pep) return UHS_HOST_ERROR_NULL_EPINFO; + *left = ucd->wTotalLength; + *read = 0; + *offset = 1; + uint8_t rcode; + pep->maxPktSize = ei->bMaxPacketSize0; + rcode = getone(pep, left, read, data, offset); + return rcode; +} + +uint8_t UHS_USB_HOST_BASE::getNextInterface(ENUMERATION_INFO *ei, UHS_EpInfo *pep, uint8_t data[], uint16_t *left, uint16_t *read, uint8_t *offset) { + uint16_t remain; + uint8_t ty; + uint8_t rcode = UHS_HOST_ERROR_END_OF_STREAM; + uint8_t *ptr; + uint8_t epc = 0; + ei->interface.numep = 0; + ei->interface.klass = 0; + ei->interface.subklass = 0; + ei->interface.protocol = 0; + while(*left + *read) { + remain = data[*offset]; // bLength + while(remain < 2) { + rcode = getone(pep, left, read, data, offset); + if(rcode) + return rcode; + remain = data[*offset]; + } + rcode = getone(pep, left, read, data, offset); + if(rcode) + return rcode; + ty = data[*offset]; // bDescriptorType + HOST_DEBUG("bLength: %i ", remain); + HOST_DEBUG("bDescriptorType: %2.2x\r\n", ty); + remain--; + if(ty == USB_DESCRIPTOR_INTERFACE) { + HOST_DEBUG("INTERFACE DESCRIPTOR FOUND\r\n"); + ptr = (uint8_t *)(&(ei->interface.bInterfaceNumber)); + for(int i = 0; i < 6; i++) { + rcode = getone(pep, left, read, data, offset); + if(rcode) + return rcode; + *ptr = data[*offset]; + ptr++; + } + rcode = getone(pep, left, read, data, offset); + if(rcode) + return rcode; + // Now at iInterface + // Get endpoints. + HOST_DEBUG("Getting %i endpoints\r\n", ei->interface.numep); + while(epc < ei->interface.numep) { + rcode = getone(pep, left, read, data, offset); + if(rcode) { + HOST_DEBUG("ENDPOINT DESCRIPTOR DIED WAY EARLY\r\n"); + return rcode; + } + remain = data[*offset]; // bLength + while(remain < 2) { + rcode = getone(pep, left, read, data, offset); + if(rcode) + return rcode; + remain = data[*offset]; + } + rcode = getone(pep, left, read, data, offset); + if(rcode) { + HOST_DEBUG("ENDPOINT DESCRIPTOR DIED EARLY\r\n"); + return rcode; + } + ty = data[*offset]; // bDescriptorType + HOST_DEBUG("bLength: %i ", remain); + HOST_DEBUG("bDescriptorType: %2.2x\r\n", ty); + remain -= 2; + if(ty == USB_DESCRIPTOR_ENDPOINT) { + HOST_DEBUG("ENDPOINT DESCRIPTOR: %i\r\n", epc); + ptr = (uint8_t *)(&(ei->interface.epInfo[epc].bEndpointAddress)); + for(unsigned int i = 0; i< sizeof (ENDPOINT_INFO); i++) { + rcode = getone(pep, left, read, data, offset); + if(rcode) { + HOST_DEBUG("ENDPOINT DESCRIPTOR DIED LATE\r\n"); + return rcode; + } + *ptr = data[*offset]; + ptr++; + remain--; + } + epc++; + HOST_DEBUG("ENDPOINT DESCRIPTOR OK\r\n"); + } + rcode = eat(pep, left, read, data, offset, &remain); + if(rcode) { + HOST_DEBUG("ENDPOINT DESCRIPTOR DIED EATING\r\n"); + return rcode; + } + remain = 0; + } + remain = 1; + // queue ahead, but do not report if error. + rcode = eat(pep, left, read, data, offset, &remain); + if(!ei->interface.numep && rcode) { + return rcode; + } + HOST_DEBUG("ENDPOINT DESCRIPTORS FILLED\r\n"); + return 0; + } else { + rcode = eat(pep, left, read, data, offset, &remain); + if(rcode) + return rcode; + } + rcode = UHS_HOST_ERROR_END_OF_STREAM; + } + return rcode; +} + +uint8_t UHS_USB_HOST_BASE::seekInterface(ENUMERATION_INFO *ei, uint16_t inf, USB_CONFIGURATION_DESCRIPTOR *ucd) { + if(!ei || !ucd) return UHS_HOST_ERROR_BAD_ARGUMENT; + uint8_t data[ei->bMaxPacketSize0]; + UHS_EpInfo *pep; + pep = ctrlReqOpen(ei->address, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, ei->currentconfig, + USB_DESCRIPTOR_CONFIGURATION, 0x0000U, ucd->wTotalLength), data); + if(!pep) return UHS_HOST_ERROR_NULL_EPINFO; + uint16_t left = ucd->wTotalLength; + uint8_t cinf = 0; + uint8_t ty; + uint8_t epc = 0; + uint16_t remain = ucd->bLength; + uint16_t read = 0; + uint8_t offset = remain; + uint8_t *ptr; + uint8_t rcode; + ei->interface.numep = 0; + ei->interface.klass = 0; + ei->interface.subklass = 0; + ei->interface.protocol = 0; + pep->maxPktSize = ei->bMaxPacketSize0; + + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + HOST_DEBUG("\r\nGetting interface: %i\r\n", inf); + inf++; + while(cinf != inf && (left + read)) { + //HOST_DEBUG("getInterface: cinf: %i inf: %i left: %i read: %i offset: %i remain %i\r\n", cinf, inf, left, read, offset, remain); + // Go past current descriptor + HOST_DEBUG("Skip: %i\r\n", remain); + rcode = eat(pep, &left, &read, data, &offset, &remain); + if(rcode) + return rcode; + remain = data[offset]; // bLength + while(remain < 2) { + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + remain = data[offset]; + } + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + ty = data[offset]; // bDescriptorType + HOST_DEBUG("bLength: %i ", remain); + HOST_DEBUG("bDescriptorType: %2.2x\r\n", ty); + remain--; + if(ty == USB_DESCRIPTOR_INTERFACE) { + HOST_DEBUG("INTERFACE DESCRIPTOR: %i\r\n", cinf); + cinf++; + if(cinf == inf) { + // Get the interface descriptor information. + ptr = (uint8_t *)(&(ei->interface.bInterfaceNumber)); + for(int i = 0; i < 6; i++) { + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + *ptr = data[offset]; + ptr++; + } + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + // Now at iInterface + remain = 0; + // Get endpoints. + HOST_DEBUG("Getting %i endpoints\r\n", ei->interface.numep); + while(epc < ei->interface.numep) { + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + remain = data[offset]; // bLength + while(remain < 2) { + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + remain = data[offset]; + } + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + ty = data[offset]; // bDescriptorType + HOST_DEBUG("bLength: %i ", remain); + HOST_DEBUG("bDescriptorType: %2.2x\r\n", ty); + remain--; + if(ty == USB_DESCRIPTOR_ENDPOINT) { + HOST_DEBUG("ENDPOINT DESCRIPTOR: %i\r\n", epc); + ptr = (uint8_t *)(&(ei->interface.epInfo[epc].bEndpointAddress)); + for(unsigned int i = 0; i< sizeof (ENDPOINT_INFO); i++) { + rcode = getone(pep, &left, &read, data, &offset); + if(rcode) + return rcode; + *ptr = data[offset]; + ptr++; + } + epc++; + remain = 0; + } else { + rcode = eat(pep, &left, &read, data, &offset, &remain); + if(rcode) + return rcode; + remain = 0; + } + } + } + } + } + + return ctrlReqClose(pep, UHS_bmREQ_GET_DESCR, left, ei->bMaxPacketSize0, data); +} + +uint8_t UHS_USB_HOST_BASE::getone(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset) { + uint8_t rcode = 0; + *offset += 1; + if(*offset < *read) { + return 0; + } else if(*left > 0) { + // uint16_t num = *left; + uint16_t num = pep->maxPktSize; + if(num > *left) num = *left; + *offset = 0; + rcode = ctrlReqRead(pep, left, read, num, dataptr); + if(rcode == 0) { + if(*read == 0) { + rcode = UHS_HOST_ERROR_END_OF_STREAM; + } else if(*read < num) *left = 0; + } + } else { + rcode = UHS_HOST_ERROR_END_OF_STREAM; + } + return rcode; +} + +uint8_t UHS_USB_HOST_BASE::eat(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset, uint16_t *yum) { + uint8_t rcode = 0; + HOST_DEBUG("eating %i\r\n", *yum); + while(*yum) { + *yum -= 1; + rcode = getone(pep, left, read, dataptr, offset); + if(rcode) break; + } + return rcode; +} + +uint8_t UHS_USB_HOST_BASE::ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t* dataptr) { + //bool direction = bmReqType & 0x80; //request direction, IN or OUT + uint8_t rcode = 0; + + // Serial.println(""); + UHS_EpInfo *pep = ctrlReqOpen(addr, Request, dataptr); + if(!pep) { + HOST_DEBUG("ctrlReq1: ERROR_NULL_EPINFO addr: %d\r\n", addr); + return UHS_HOST_ERROR_NULL_EPINFO; + } + uint8_t rt = (uint8_t)(Request & 0xFFU); + + // Serial.println("Opened"); + uint16_t left = (uint16_t)(Request >> 48) /*total*/; + if(dataptr != NULL) { + //data stage + if((rt & 0x80) == 0x80) { + //IN transfer + while(left) { + // Bytes read into buffer + uint16_t read = nbytes; + HOST_DEBUG("ctrlReq2: left: %i, read:%i, nbytes %i\r\n", left, read, nbytes); + rcode = ctrlReqRead(pep, &left, &read, nbytes, dataptr); + +#if UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE + HOST_DEBUG("RESULT: 0x%2.2x 0x%2.2x 0x%2.2x 0x%8.8lx%8.8lx\r\n", rcode, addr, read, (uint32_t)((Request>>32)&0xfffffffflu), (uint32_t)(Request&0xfffffffflu)); + // Should only be used for GET_DESCRIPTOR USB_DESCRIPTOR_DEVICE + constexpr uint32_t req_match = ((uint32_t)USB_DESCRIPTOR_DEVICE << 24) | + ((uint32_t)USB_REQUEST_GET_DESCRIPTOR << 8); + const uint32_t req_found = Request & 0xFF00FF00ul; + if(!addr && read && (req_found == req_match)) { + HOST_DEBUG("ctrlReq3: acceptBuffer sz %i nbytes %i left %i\n\r", read, nbytes, left); + left = 0; + rcode = UHS_HOST_ERROR_NONE; + break; + } +#endif + if(rcode) { + return rcode; + } + } + } else { + // OUT transfer + rcode = OutTransfer(pep, 0, nbytes, dataptr); + } + if(rcode) { + //return error + return ( rcode); + } + } + + // Serial.println("Close Phase"); + // Serial.flush(); + // Status stage + rcode = ctrlReqClose(pep, rt, left, nbytes, dataptr); + // Serial.println("Closed"); + return rcode; +} + +uint8_t UHS_USB_HOST_BASE::EPClearHalt(uint8_t addr, uint8_t ep) { + return ctrlReq(addr, mkSETUP_PKT8(USB_SETUP_HOST_TO_DEVICE | USB_SETUP_TYPE_STANDARD | USB_SETUP_RECIPIENT_ENDPOINT, USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT, 0, ep, 0), 0, NULL); +} + +uint8_t UHS_USB_HOST_BASE::TestInterface(ENUMERATION_INFO *ei) { + + uint8_t devConfigIndex; + uint8_t rcode = 0; + HOST_DEBUG("TestInterface VID:%4.4x PID:%4.4x Class:%2.2x Subclass:%2.2x Protocol %2.2x\r\n", ei->vid, ei->pid, ei->klass, ei->subklass, ei->protocol); + HOST_DEBUG("Interface data: Class:%2.2x Subclass:%2.2x Protocol %2.2x, number of endpoints %i\r\n", ei->interface.klass, ei->interface.subklass, ei->interface.subklass, ei->interface.numep); + HOST_DEBUG("Parent: %2.2x, bAddress: %2.2x\r\n", ei->parent, ei->address); + for(devConfigIndex = 0; devConfigIndex < UHS_HOST_MAX_INTERFACE_DRIVERS; devConfigIndex++) { + if(!devConfig[devConfigIndex]) { + HOST_DEBUG("No driver at index %i\r\n", devConfigIndex); + continue; // no driver + } + if(devConfig[devConfigIndex]->bAddress) { + HOST_DEBUG("Driver %i is already consumed @ %2.2x\r\n", devConfigIndex, devConfig[devConfigIndex]->bAddress); + continue; // consumed + } + + if(devConfig[devConfigIndex]->OKtoEnumerate(ei)) { + HOST_DEBUG("Driver %i supports this interface\r\n", devConfigIndex); + break; + } + } + if(devConfigIndex == UHS_HOST_MAX_INTERFACE_DRIVERS) { + rcode = UHS_HOST_ERROR_DEVICE_NOT_SUPPORTED; +#if 0 // defined(UHS_HID_LOADED) + // Check HID here, if it is, then lie + if(ei->klass == UHS_USB_CLASS_HID) { + devConfigIndex = UHS_HID_INDEX; // for debugging, otherwise this has no use. + rcode = 0; + } +#endif + } + if(!rcode) HOST_DEBUG("Driver %i can be used for this interface\r\n", devConfigIndex); + else HOST_DEBUG("No driver for this interface.\r\n"); + return rcode; +}; + +uint8_t UHS_USB_HOST_BASE::enumerateInterface(ENUMERATION_INFO *ei) { + uint8_t devConfigIndex; + + HOST_DEBUG("AttemptConfig: parent = %i, port = %i\r\n", ei->parent, ei->port); + +#if 0 // defined(UHS_HID_LOADED) + // Check HID here, if it is, then lie + if(ei->klass == UHS_USB_CLASS_HID || ei->interface.klass == UHS_USB_CLASS_HID) { + UHS_HID_SetUSBInterface(this, ENUMERATION_INFO * ei); + devConfigIndex = UHS_HID_INDEX; + } else +#endif + for(devConfigIndex = 0; devConfigIndex < UHS_HOST_MAX_INTERFACE_DRIVERS; devConfigIndex++) { + if(!devConfig[devConfigIndex]) { + HOST_DEBUG("No driver at index %i\r\n", devConfigIndex); + continue; // no driver + } + if(devConfig[devConfigIndex]->bAddress) { + HOST_DEBUG("Driver %i is already consumed @ %2.2x\r\n", devConfigIndex, devConfig[devConfigIndex]->bAddress); + continue; // consumed + } + + if(devConfig[devConfigIndex]->OKtoEnumerate(ei)) { + HOST_DEBUG("Driver %i supports this interface\r\n", devConfigIndex); + if(!devConfig[devConfigIndex]->SetInterface(ei)) break; + else devConfigIndex = UHS_HOST_MAX_INTERFACE_DRIVERS; + } + } + return devConfigIndex; +}; + + +//////////////////////////////////////////////////////////////////////////////// +// Vendor Specific Interface Class +//////////////////////////////////////////////////////////////////////////////// + +#if 0 +/** + * Might go away, depends on if it is useful, or not. + * + * @param ei Enumeration information + * @return true if this interface driver can handle this interface description + */ +bool UHS_NI UHS_VSI::OKtoEnumerate(ENUMERATION_INFO *ei) { + return ( + (ei->subklass == UHS_USB_CLASS_VENDOR_SPECIFIC) || + (ei->interface.subklass == UHS_USB_CLASS_VENDOR_SPECIFIC) + ); +} + +/** + * Copy the entire ENUMERATION_INFO structure + * @param ei Enumeration information + * @return 0 + */ +uint8_t UHS_NI UHS_VSI::SetInterface(ENUMERATION_INFO *ei) { + bNumEP = 1; + bAddress = ei->address; + + eInfo.address = ei->address; + eInfo.bMaxPacketSize0 = ei->bMaxPacketSize0; + eInfo.currentconfig = ei->currentconfig; + eInfo.interface.bAlternateSetting = ei->interface.bAlternateSetting; + eInfo.interface.bInterfaceNumber = ei->interface.bInterfaceNumber; + eInfo.interface.numep = ei->interface.numep; + eInfo.interface.protocol = ei->interface.protocol; + eInfo.interface.subklass = ei->interface.subklass; + eInfo.klass = ei->klass; + eInfo.parent = ei->parent; + eInfo.pid = ei->pid; + eInfo.port = ei->port; + eInfo.protocol = ei->protocol; + eInfo.subklass = ei->subklass; + eInfo.vid = ei->vid; + for(uint8_t i = 0; i < eInfo.interface.numep; i++) { + eInfo.interface.epInfo[i].bEndpointAddress = ei->interface.epInfo[i].bEndpointAddress; + eInfo.interface.epInfo[i].bInterval = ei->interface.epInfo[i].bInterval; + eInfo.interface.epInfo[i].bmAttributes = ei->interface.epInfo[i].bmAttributes; + eInfo.interface.epInfo[i].wMaxPacketSize = ei->interface.epInfo[i].wMaxPacketSize; + } + return 0; +} +#endif + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + + +#if 0 + +/* TO-DO: Move this silliness to a NONE driver. + * When we have a generic NONE driver we can: + * o Extract ALL device information to help users with a new device. + * o Use an unknown device from a sketch, kind of like usblib does. + * This will aid in making more drivers in a faster way. + */ +uint8_t UHS_USB_HOST_BASE::DefaultAddressing(uint8_t parent, uint8_t port, uint8_t speed) { + uint8_t rcode; + UHS_Device *p0 = NULL, *p = NULL; + + // Get pointer to pseudo device with address 0 assigned + p0 = addrPool.GetUsbDevicePtr(0); + + if(!p0) + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + + if(!p0->epinfo) + return UHS_HOST_ERROR_NULL_EPINFO; + + p0->speed = speed; + + // Allocate new address according to device class + uint8_t bAddress = addrPool.AllocAddress(parent, false, port); + + if(!bAddress) + return UHS_HOST_ERROR_ADDRESS_POOL_FULL; + + p = addrPool.GetUsbDevicePtr(bAddress); + + if(!p) + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + + p->speed = speed; + + // Assign new address to the device + rcode = setAddr(0, bAddress); + + if(rcode) { + addrPool.FreeAddress(bAddress); + bAddress = 0; + return rcode; + } + return 0; +} +#endif + +#else +#error "Never include UHS_host_INLINE.h, include UHS_host.h instead" +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h new file mode 100644 index 000000000000..afa20f30d4e3 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h @@ -0,0 +1,393 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(MACROS_H) +#define MACROS_H +#include "macro_logic.h" +/* + * Universal Arduino(tm) "IDE" fixups. + */ + + +// Just in case... +#ifndef SERIAL_PORT_MONITOR +#define SERIAL_PORT_MONITOR Serial +#endif + +#ifndef INT16_MIN +#define INT16_MIN -32768 +#endif +// require 10607+ +#if defined(ARDUINO) && ARDUINO >=10607 +// nop :-) +#else +#error "Arduino version too old, and must be at least 1.6.7" +#endif + +// Nuke screwed up macro junk from the IDE. +#ifdef __cplusplus +#if defined(true) +#undef true +#endif +#if defined(false) +#undef false +#endif +#endif + + +#if !defined(UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE) + +#if !defined(UHS_BIG_FLASH) + +#if defined(FLASHEND) && defined(FLASHSTART) +#if (FLASHEND - FLASHSTART) > 0x0FFFFU +#define UHS_BIG_FLASH 1 +#else +#define UHS_BIG_FLASH 0 +#endif + +#elif defined(__PIC32_FLASH_SIZE) +#if __PIC32_FLASH_SIZE > 511 +#define UHS_BIG_FLASH 1 +#else +#define UHS_BIG_FLASH 0 +#endif + +#elif defined(FLASHEND) && !defined(FLASHSTART) +// Assumes flash starts at 0x00000, is this a safe assumption? +// 192K + should be OK +#if FLASHEND > 0x02FFFFU +#define UHS_BIG_FLASH 1 +#else +#define UHS_BIG_FLASH 0 +#endif + +#elif defined(IFLASH_SIZE) +#if IFLASH_SIZE > 0x0FFFFU +#define UHS_BIG_FLASH 1 +#else +#define UHS_BIG_FLASH 0 +#endif + +#elif defined(ESP8266) +#define UHS_BIG_FLASH 1 +#define SYSTEM_OR_SPECIAL_YIELD(...) yield() + +#elif defined(__arm__) && defined(CORE_TEENSY) +#define UHS_BIG_FLASH 1 + +#elif defined(ARDUINO_spresense_ast) +#define UHS_BIG_FLASH 1 +#else +// safe default +#warning Small flash? +#define UHS_BIG_FLASH 0 +#endif +#endif + +#if UHS_BIG_FLASH +#define UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE 1 +#else +#define UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE 0 +#endif +#endif + +#if defined(__arm__) && defined(CORE_TEENSY) +#define UHS_PIN_WRITE(p, v) digitalWriteFast(p, v) +#define UHS_PIN_READ(p) digitalReadFast(p) +#endif +// TODO: Fast inline code for AVR and SAM based microcontrollers +// This can be done pretty easily. +// For now, this will just work out-of-the-box. +#if !defined(UHS_PIN_WRITE) +#define UHS_PIN_WRITE(p, v) digitalWrite(p, v) +#endif +#if !defined(UHS_PIN_READ) +#define UHS_PIN_READ(p) digitalRead(p) +#endif + +#if defined( __PIC32MX__ ) && !defined(interrupts) // compiling with Microchip XC32 compiler +#define interrupts() __builtin_enable_interrupts() +#edfine noInterrupts() __builtin_disable_interrupts() +#endif + +#if !defined(ARDUINO_SAMD_ZERO) +#if defined(ARDUINO_AVR_ADK) +#define UHS_GET_DPI(x) (x == 54 ? 6 : digitalPinToInterrupt(x)) +#else +#define UHS_GET_DPI(x) digitalPinToInterrupt(x) +#endif +#else +#define UHS_GET_DPI(x) (x) +#endif + +#ifndef __AVR__ +#ifndef __PGMSPACE_H_ +// This define should prevent reading the system pgmspace.h if included elsewhere +// This is not normally needed. +#define __PGMSPACE_H_ 1 +#endif + +#ifndef PROGMEM +#define PROGMEM +#endif +#ifndef PGM_P +#define PGM_P const char * +#endif +#ifndef PSTR +#define PSTR(str) (str) +#endif +#ifndef F +#define F(str) (str) +#endif +#ifndef _SFR_BYTE +#define _SFR_BYTE(n) (n) +#endif +#ifndef memchr_P +#define memchr_P(str, c, len) memchr((str), (c), (len)) +#endif +#ifndef memcmp_P +#define memcmp_P(a, b, n) memcmp((a), (b), (n)) +#endif +#ifndef memcpy_P +#define memcpy_P(dest, src, num) memcpy((dest), (src), (num)) +#endif +#ifndef memmem_P +#define memmem_P(a, alen, b, blen) memmem((a), (alen), (b), (blen)) +#endif +#ifndef memrchr_P +#define memrchr_P(str, val, len) memrchr((str), (val), (len)) +#endif +#ifndef strcat_P +#define strcat_P(dest, src) strcat((dest), (src)) +#endif +#ifndef strchr_P +#define strchr_P(str, c) strchr((str), (c)) +#endif +#ifndef strchrnul_P +#define strchrnul_P(str, c) strchrnul((str), (c)) +#endif +#ifndef strcmp_P +#define strcmp_P(a, b) strcmp((a), (b)) +#endif +#ifndef strcpy_P +#define strcpy_P(dest, src) strcpy((dest), (src)) +#endif +#ifndef strcasecmp_P +#define strcasecmp_P(a, b) strcasecmp((a), (b)) +#endif +#ifndef strcasestr_P +#define strcasestr_P(a, b) strcasestr((a), (b)) +#endif +#ifndef strlcat_P +#define strlcat_P(dest, src, len) strlcat((dest), (src), (len)) +#endif +#ifndef strlcpy_P +#define strlcpy_P(dest, src, len) strlcpy((dest), (src), (len)) +#endif +#ifndef strlen_P +#define strlen_P(s) strlen((const char *)(s)) +#endif +#ifndef strnlen_P +#define strnlen_P(str, len) strnlen((str), (len)) +#endif +#ifndef strncmp_P +#define strncmp_P(a, b, n) strncmp((a), (b), (n)) +#endif +#ifndef strncasecmp_P +#define strncasecmp_P(a, b, n) strncasecmp((a), (b), (n)) +#endif +#ifndef strncat_P +#define strncat_P(a, b, n) strncat((a), (b), (n)) +#endif +#ifndef strncpy_P +#define strncpy_P(a, b, n) strncmp((a), (b), (n)) +#endif +#ifndef strpbrk_P +#define strpbrk_P(str, chrs) strpbrk((str), (chrs)) +#endif +#ifndef strrchr_P +#define strrchr_P(str, c) strrchr((str), (c)) +#endif +#ifndef strsep_P +#define strsep_P(strp, delim) strsep((strp), (delim)) +#endif +#ifndef strspn_P +#define strspn_P(str, chrs) strspn((str), (chrs)) +#endif +#ifndef strstr_P +#define strstr_P(a, b) strstr((a), (b)) +#endif +#ifndef sprintf_P +#define sprintf_P(s, ...) sprintf((s), __VA_ARGS__) +#endif +#ifndef vfprintf_P +#define vfprintf_P(s, ...) vfprintf((s), __VA_ARGS__) +#endif +#ifndef printf_P +#define printf_P(...) printf(__VA_ARGS__) +#endif +#ifndef snprintf_P +#define snprintf_P(s, n, ...) ((s), (n), __VA_ARGS__) +#endif +#ifndef vsprintf_P +#define vsprintf_P(s, ...) ((s),__VA_ARGS__) +#endif +#ifndef vsnprintf_P +#define vsnprintf_P(s, n, ...) ((s), (n),__VA_ARGS__) +#endif +#ifndef fprintf_P +#define fprintf_P(s, ...) ((s), __VA_ARGS__) +#endif + +#ifndef pgm_read_byte +#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) +#endif +#ifndef pgm_read_word +#define pgm_read_word(addr) (*(const unsigned short *)(addr)) +#endif +#ifndef pgm_read_dword +#define pgm_read_dword(addr) (*(const unsigned long *)(addr)) +#endif +#ifndef pgm_read_float +#define pgm_read_float(addr) (*(const float *)(addr)) +#endif + +#ifndef pgm_read_byte_near +#define pgm_read_byte_near(addr) pgm_read_byte(addr) +#endif +#ifndef pgm_read_word_near +#define pgm_read_word_near(addr) pgm_read_word(addr) +#endif +#ifndef pgm_read_dword_near +#define pgm_read_dword_near(addr) pgm_read_dword(addr) +#endif +#ifndef pgm_read_float_near +#define pgm_read_float_near(addr) pgm_read_float(addr) +#endif +#ifndef pgm_read_byte_far +#define pgm_read_byte_far(addr) pgm_read_byte(addr) +#endif +#ifndef pgm_read_word_far +#define pgm_read_word_far(addr) pgm_read_word(addr) +#endif +#ifndef pgm_read_dword_far +#define pgm_read_dword_far(addr) pgm_read_dword(addr) +#endif +#ifndef pgm_read_float_far +#define pgm_read_float_far(addr) pgm_read_float(addr) +#endif + +#ifndef pgm_read_pointer +#define pgm_read_pointer +#endif + +#endif + + +//////////////////////////////////////////////////////////////////////////////// +// HANDY MACROS +//////////////////////////////////////////////////////////////////////////////// + +// Atmoically set/clear single bits using bitbands. +// Believe it or not, this boils down to a constant, +// and is less code than using |= &= operators. +// Bonus, it makes code easier to read too. +// Bitbanding is a wonderful thing. +#define BITNR(i) (i&0x1?0:i&0x2?1:i&0x4?2:i&0x8?3:i&0x10?4:i&0x20?5:i&0x40?6:i&0x80?7:i&0x100?8:i&0x200?9:i&0x400?10:i&0x800?11:i&0x1000?12:i&0x2000?13:i&0x4000?14:i&0x8000?15:i&0x10000?16:i&0x20000?17:i&0x40000?18:i&0x80000?19:i&0x100000?20:i&0x200000?21:i&0x400000?22:i&0x800000?23:i&0x1000000?24:i&0x2000000?25:i&0x4000000?26:i&0x8000000?27:i&0x10000000?28:i&0x20000000?29:i&0x40000000?30:i&0x80000000?31:32) +#define UHS_KIO_BITBAND_ADDR(r, i) (((uint32_t)&(r) - 0x40000000) * 32 + (i) * 4 + 0x42000000) +#define UHS_KIO_SETBIT_ATOMIC(r, m) (*(uint32_t *)UHS_KIO_BITBAND_ADDR((r), BITNR((m)))) = 1 +#define UHS_KIO_CLRBIT_ATOMIC(r, m) (*(uint32_t *)UHS_KIO_BITBAND_ADDR((r), BITNR((m)))) = 0 + + +#define VALUE_BETWEEN(v,l,h) (((v)>(l)) && ((v)<(h))) +#define VALUE_WITHIN(v,l,h) (((v)>=(l)) && ((v)<=(h))) +#define output_pgm_message(wa,fp,mp,el) wa = &mp, fp((char *)pgm_read_pointer(wa), el) +#define output_if_between(v,l,h,wa,fp,mp,el) if(VALUE_BETWEEN(v,l,h)) output_pgm_message(wa,fp,mp[v-(l+1)],el); + +#define UHS_SWAP_VALUES(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b))) +#ifndef __BYTE_GRABBING_DEFINED__ +#define __BYTE_GRABBING_DEFINED__ 1 +#ifdef BROKEN_OPTIMIZER_LITTLE_ENDIAN +// Note: Use this if your compiler generates horrible assembler! +#define UHS_UINT8_BYTE0(__usi__) (((uint8_t *)&(__usi__))[0]) +#define UHS_UINT8_BYTE1(__usi__) (((uint8_t *)&(__usi__))[1]) +#define UHS_UINT8_BYTE2(__usi__) (((uint8_t *)&(__usi__))[2]) +#define UHS_UINT8_BYTE3(__usi__) (((uint8_t *)&(__usi__))[3]) +#define UHS_UINT8_BYTE4(__usi__) (((uint8_t *)&(__usi__))[4]) +#define UHS_UINT8_BYTE5(__usi__) (((uint8_t *)&(__usi__))[5]) +#define UHS_UINT8_BYTE6(__usi__) (((uint8_t *)&(__usi__))[6]) +#define UHS_UINT8_BYTE7(__usi__) (((uint8_t *)&(__usi__))[7]) +#else +// Note: The cast alone to uint8_t is actually enough. +// GCC throws out the "& 0xff", and the size is no different. +// Some compilers need it. +#define UHS_UINT8_BYTE0(__usi__) ((uint8_t)((__usi__) & 0xff )) +#define UHS_UINT8_BYTE1(__usi__) ((uint8_t)(((__usi__) >> 8) & 0xff)) +#define UHS_UINT8_BYTE2(__usi__) ((uint8_t)(((__usi__) >> 16) & 0xff)) +#define UHS_UINT8_BYTE3(__usi__) ((uint8_t)(((__usi__) >> 24) & 0xff)) +#define UHS_UINT8_BYTE4(__usi__) ((uint8_t)(((__usi__) >> 32) & 0xff)) +#define UHS_UINT8_BYTE5(__usi__) ((uint8_t)(((__usi__) >> 40) & 0xff)) +#define UHS_UINT8_BYTE6(__usi__) ((uint8_t)(((__usi__) >> 48) & 0xff)) +#define UHS_UINT8_BYTE7(__usi__) ((uint8_t)(((__usi__) >> 56) & 0xff)) +#endif +#define UHS_UINT16_SET_BYTE1(__usi__) ((uint16_t)(__usi__) << 8) +#define UHS_UINT32_SET_BYTE1(__usi__) ((uint32_t)(__usi__) << 8) +#define UHS_UINT64_SET_BYTE1(__usi__) ((uint64_t)(__usi__) << 8) +#define UHS_UINT32_SET_BYTE2(__usi__) ((uint32_t)(__usi__) << 16) +#define UHS_UINT64_SET_BYTE2(__usi__) ((uint64_t)(__usi__) << 16) +#define UHS_UINT32_SET_BYTE3(__usi__) ((uint32_t)(__usi__) << 24) +#define UHS_UINT64_SET_BYTE3(__usi__) ((uint64_t)(__usi__) << 24) +#define UHS_UINT64_SET_BYTE4(__usi__) ((uint64_t)(__usi__) << 32) +#define UHS_UINT64_SET_BYTE5(__usi__) ((uint64_t)(__usi__) << 40) +#define UHS_UINT64_SET_BYTE6(__usi__) ((uint64_t)(__usi__) << 48) +#define UHS_UINT64_SET_BYTE7(__usi__) ((uint64_t)(__usi__) << 56) + +// These are the smallest and fastest ways I have found so far in pure C/C++. +#define UHS_BYTES_TO_UINT16(__usc1__,__usc0__) ((uint16_t)((uint16_t)(__usc0__) | (uint16_t)UHS_UINT16_SET_BYTE1(__usc1__))) +#define UHS_BYTES_TO_UINT32(__usc3__,__usc2__,__usc1__,__usc0__) ((uint32_t)((uint32_t)(__usc0__) | UHS_UINT32_SET_BYTE1(__usc1__) | UHS_UINT32_SET_BYTE2(__usc2__) | UHS_UINT32_SET_BYTE3(__usc3__))) +#define UHS_BYTES_TO_UINT64(__usc7__,__usc6__,__usc5__,__usc4__,__usc3__,__usc2__,__usc1__,__usc0__) ((uint64_t)((uint64_t)__usc0__ | UHS_UINT64_SET_BYTE1(__usc1__) | UHS_UINT64_SET_BYTE2(__usc2__) | UHS_UINT64_SET_BYTE3(__usc3__) | UHS_UINT64_SET_BYTE4(__usc4__) | UHS_UINT64_SET_BYTE5(__usc5__) | UHS_UINT64_SET_BYTE6(__usc6__) | UHS_UINT64_SET_BYTE7(__usc7__))) +#endif +/* + * Debug macros. + * Useful when porting from UHS2. + * Do not use these for any new code. + * Change to better debugging after port is completed. + * Strings are stored in progmem (flash) instead of RAM. + */ +#define USBTRACE1(s,l) (Notify(PSTR(s), l)) +#define USBTRACE(s) (USBTRACE1((s), 0x80)); USB_HOST_SERIAL.flush() +#define USBTRACE3(s,r,l) (Notify(PSTR(s), l), D_PrintHex((r), l), Notify(PSTR("\r\n"), l)) +#define USBTRACE3X(s,r,l) (Notify(PSTR(s), l), D_PrintHex((r), l)) +#define USBTRACE2(s,r) (USBTRACE3((s),(r),0x80)); USB_HOST_SERIAL.flush() +#define USBTRACE2X(s,r) (USBTRACE3X((s),(r),0x80)); USB_HOST_SERIAL.flush() + +#define VOID0 ((void)0) +#if !defined(NOTUSED) +#define NOTUSED(...) __VA_ARGS__ __attribute__((unused)) +#endif +#endif /* MACROS_H */ + diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_message.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_message.h new file mode 100644 index 000000000000..93a3de2e0f45 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_message.h @@ -0,0 +1,91 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ +#if !defined(_UHS_host_h_) || defined(__MESSAGE_H__) +#error "Never include UHS_message.h directly; include UHS_Usb.h instead" +#else +#define __MESSAGE_H__ + +extern int UsbDEBUGlvl; + +void E_Notify(char const * msg, int lvl); +void E_Notify(uint8_t b, int lvl); +void E_NotifyStr(char const * msg, int lvl); +void E_Notifyc(char c, int lvl); + +#ifdef DEBUG_USB_HOST +#define Notify E_Notify +#define NotifyStr E_NotifyStr +#define Notifyc E_Notifyc +void NotifyFailGetDevDescr(uint8_t reason); +void NotifyFailSetDevTblEntry(uint8_t reason); +void NotifyFailGetConfDescr(uint8_t reason); +void NotifyFailSetConfDescr(uint8_t reason); +void NotifyFailGetDevDescr(void); +void NotifyFailSetDevTblEntry(void); +void NotifyFailGetConfDescr(void); +void NotifyFailSetConfDescr(void); +void NotifyFailUnknownDevice(uint16_t VID, uint16_t PID); +void NotifyFail(uint8_t rcode); +#else +#define Notify(...) VOID0 +#define NotifyStr(...) VOID0 +#define Notifyc(...) VOID0 +#define NotifyFailGetDevDescr(...) VOID0 +#define NotifyFailSetDevTblEntry(...) VOID0 +#define NotifyFailGetConfDescr(...) VOID0 +#define NotifyFailGetDevDescr(...) VOID0 +#define NotifyFailSetDevTblEntry(...) VOID0 +#define NotifyFailGetConfDescr(...) VOID0 +#define NotifyFailSetConfDescr(...) VOID0 +#define NotifyFailUnknownDevice(...) VOID0 +#define NotifyFail(...) VOID0 +#endif + +#ifdef DEBUG_USB_HOST +template void ErrorMessage(uint8_t level, char const * msg, ERROR_TYPE rcode = 0) { + Notify(msg, level); + Notify(PSTR(": "), level); + D_PrintHex (rcode, level); + Notify(PSTR("\r\n"), level); +#else +template void ErrorMessage(NOTUSED(uint8_t level), NOTUSED(char const * msg), ERROR_TYPE rcode = 0) { + (void)rcode; +#endif +} + +#ifdef DEBUG_USB_HOST +template void ErrorMessage(char const * msg, ERROR_TYPE rcode = 0) { + Notify(msg, 0x80); + Notify(PSTR(": "), 0x80); + D_PrintHex (rcode, 0x80); + Notify(PSTR("\r\n"), 0x80); +#else +template void ErrorMessage(NOTUSED(char const * msg), ERROR_TYPE rcode = 0) { + (void)rcode; +#endif +} + +#endif // __MESSAGE_H__ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h new file mode 100644 index 000000000000..c5f87739c814 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printf_HELPER.h @@ -0,0 +1,201 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#ifndef UHS_PRINTF_HELPER_H +#define UHS_PRINTF_HELPER_H + +#if defined(LOAD_UHS_PRINTF_HELPER) +#include +#ifdef true +#undef true +#endif +#ifdef false +#undef false +#endif + +#if !defined(STDIO_IS_OK_TO_USE_AS_IS) +#if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAM_DUE) || defined(ARDUINO_spresense_ast) +// STDIO patching not required. +#define STDIO_IS_OK_TO_USE_AS_IS +#endif +#endif + +#if !defined(STDIO_IS_OK_TO_USE_AS_IS) +// We need to patch STDIO so it can be used. + +#ifndef SERIAL_PORT_MONITOR +// Some don't define this. +#define SERIAL_PORT_MONITOR Serial +#endif + +#ifndef SERIAL_PORT_HARDWARE +// Some don't define this. +#define SERIAL_PORT_HARDWARE SERIAL_PORT_MONITOR +#endif + +#ifndef USB_HOST_SERIAL +#if defined(SERIAL_PORT_USBVIRTUAL) && defined(LOAD_UHS_KINETIS_FS_HOST) +#define USB_HOST_SERIAL SERIAL_PORT_HARDWARE +#else +#define USB_HOST_SERIAL SERIAL_PORT_MONITOR +#endif +#endif + +#if !defined(NOTUSED) +#define NOTUSED(...) __VA_ARGS__ __attribute__((unused)) +#endif + +#ifndef __AVR__ +#ifndef printf_P +#define printf_P(...) printf(__VA_ARGS__) +#endif +#endif + +#if defined(ARDUINO_ARCH_PIC32) +/* + * For printf() output with pic32 Arduino + */ +extern "C" { + + void _mon_putc(char s) { + USB_HOST_SERIAL.write(s); + } + + int _mon_getc() { + while(!USB_HOST_SERIAL.available()); + return USB_HOST_SERIAL.read(); + } +} + +#elif defined(__AVR__) +extern "C" { + + static FILE tty_stdio; + static FILE tty_stderr; + + static int NOTUSED(tty_stderr_putc(char c, NOTUSED(FILE *t))); + static int NOTUSED(tty_stderr_flush(NOTUSED(FILE *t))); + static int NOTUSED(tty_std_putc(char c, NOTUSED(FILE *t))); + static int NOTUSED(tty_std_getc(NOTUSED(FILE *t))); + static int NOTUSED(tty_std_flush(NOTUSED(FILE *t))); + + static int tty_stderr_putc(char c, NOTUSED(FILE *t)) { + USB_HOST_SERIAL.write(c); + return 0; + } + + static int tty_stderr_flush(NOTUSED(FILE *t)) { + USB_HOST_SERIAL.flush(); + return 0; + } + + static int tty_std_putc(char c, NOTUSED(FILE *t)) { + USB_HOST_SERIAL.write(c); + return 0; + } + + static int tty_std_getc(NOTUSED(FILE *t)) { + while(!USB_HOST_SERIAL.available()); + return USB_HOST_SERIAL.read(); + } + + static int tty_std_flush(NOTUSED(FILE *t)) { + USB_HOST_SERIAL.flush(); + return 0; + } +} +#elif defined(CORE_TEENSY) +extern "C" { + + int _write(int fd, const char *ptr, int len) { + int j; + for(j = 0; j < len; j++) { + if(fd == 1) + USB_HOST_SERIAL.write(*ptr++); + else if(fd == 2) + USB_HOST_SERIAL.write(*ptr++); + } + return len; + } + + int _read(int fd, char *ptr, int len) { + if(len > 0 && fd == 0) { + while(!USB_HOST_SERIAL.available()); + *ptr = USB_HOST_SERIAL.read(); + return 1; + } + return 0; + } + +#include + + int _fstat(int fd, struct stat *st) { + memset(st, 0, sizeof (*st)); + st->st_mode = S_IFCHR; + st->st_blksize = 1024; + return 0; + } + + int _isatty(int fd) { + return (fd < 3) ? 1 : 0; + } +} +#else +#error no STDIO +#endif // defined(ARDUINO_ARCH_PIC32) + + + +#if defined(__AVR__) +// The only wierdo in the bunch... +void UHS_AVR_printf_HELPER_init(void) { + // Set up stdio/stderr + tty_stdio.put = tty_std_putc; + tty_stdio.get = tty_std_getc; + tty_stdio.flags = _FDEV_SETUP_RW; + tty_stdio.udata = 0; + + tty_stderr.put = tty_stderr_putc; + tty_stderr.get = NULL; + tty_stderr.flags = _FDEV_SETUP_WRITE; + tty_stderr.udata = 0; + + stdout = &tty_stdio; + stdin = &tty_stdio; + stderr = &tty_stderr; + +} +#define UHS_printf_HELPER_init() UHS_AVR_printf_HELPER_init() +#endif + +#endif /* STDIO_IS_OK_TO_USE_AS_IS */ +#endif /* load.... */ + +#if !defined(UHS_printf_HELPER_init) +#define UHS_printf_HELPER_init() (void(0)) +#endif +#endif /* UHS_PRINTF_HELPER_H */ + diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h new file mode 100644 index 000000000000..09e336510771 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h @@ -0,0 +1,96 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(_UHS_host_h_) || defined(__PRINTHEX_H__) +#error "Never include UHS_printhex.h directly; include UHS_Usb.h instead" +#else +#define __PRINTHEX_H__ + +void E_Notifyc(char c, int lvl); + +template +void PrintHex(T val, int lvl) { + int num_nibbles = sizeof (T) * 2; + + do { + char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f); + if(v > 57) v += 7; + E_Notifyc(v, lvl); + } while(--num_nibbles); +} + +template +void PrintBin(T val, int lvl) { + for(T mask = (((T)1) << ((sizeof (T) << 3) - 1)); mask; mask >>= 1) + if(val & mask) + E_Notifyc('1', lvl); + else + E_Notifyc('0', lvl); +} + +template +void SerialPrintHex(T val) { + int num_nibbles = sizeof (T) * 2; + + do { + char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f); + if(v > 57) v += 7; + USB_HOST_SERIAL.print(v); + } while(--num_nibbles); +} + +template +void PrintHex2(Print *prn, T val) { + T mask = (((T)1) << (((sizeof (T) << 1) - 1) << 2)); + + while(mask > 1) { + if(val < mask) + prn->print("0"); + + mask >>= 4; + } + prn->print((T)val, HEX); +} + +#ifdef DEBUG_USB_HOST +template void D_PrintHex(T val, int lvl) { + PrintHex (val, lvl); +#else +template void D_PrintHex(NOTUSED(T val), NOTUSED(int lvl)) { +#endif +} + +#ifdef DEBUG_USB_HOST +template void D_PrintBin(T val, int lvl) { + PrintBin (val, lvl); +#else +template void D_PrintBin(NOTUSED(T val), NOTUSED(int lvl)) { +#endif +} + + + +#endif // __PRINTHEX_H__ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h new file mode 100644 index 000000000000..a401c2851647 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_settings.h @@ -0,0 +1,141 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#ifndef UHS_SETTINGS_H +#define UHS_SETTINGS_H + +// TO-DO: Move specific settings to modules which use them. + +//////////////////////////////////////////////////////////////////////////////// +// Define any of these options at the top of your sketch to override +// the defaults contained herewith. Do NOT do modifications here. +// Individual Components have their own settings. +// +// Macro | Settings and notes | Default +// -----------------------------+-----------------------+----------------------- +// | Any class that does | +// USB_HOST_SERIAL | text streaming | SERIAL_PORT_MONITOR +// | e.g. Serial2 | +// -----------------------------+-----------------------+----------------------- +// ENABLE_UHS_DEBUGGING | 0 = off, 1 = on | 0 +// -----------------------------+-----------------------+----------------------- +// | 0 = off, 1 = on | +// | Caution! Can make | +// DEBUG_PRINTF_EXTRA_HUGE | program too large! | 0 +// | Other modules depend | +// | on this setting. | +// -----------------------------+-----------------------+----------------------- +// USE_UHS_BLACK_WIDDOW | 0 = no, 1 = yes | 0 +// -----------------------------+-----------------------+----------------------- +// ENABLE_WII_IR_CAMERA | 0 = no, 1 = yes | 0 +// -----------------------------^-----------------------^----------------------- +// +//////////////////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////////////// +// DEBUGGING +//////////////////////////////////////////////////////////////////////////////// + +#ifndef USB_HOST_SERIAL +#if defined(SERIAL_PORT_USBVIRTUAL) && defined(LOAD_UHS_KINETIS_FS_HOST) +#define USB_HOST_SERIAL SERIAL_PORT_HARDWARE +#else +#define USB_HOST_SERIAL SERIAL_PORT_MONITOR +#endif +#endif + +#ifndef ENABLE_UHS_DEBUGGING +#define ENABLE_UHS_DEBUGGING 0 +#endif + +#ifndef DEBUG_PRINTF_EXTRA_HUGE +#define DEBUG_PRINTF_EXTRA_HUGE 0 +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Manual board activation +//////////////////////////////////////////////////////////////////////////////// + +/* Set this to 1 if you are using a Black Widdow */ +#ifndef USE_UHS_BLACK_WIDDOW +#define USE_UHS_BLACK_WIDDOW 0 +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Wii IR camera +//////////////////////////////////////////////////////////////////////////////// + +/* Set this to 1 to activate code for the Wii IR camera */ +#ifndef ENABLE_WII_IR_CAMERA +#define ENABLE_WII_IR_CAMERA 0 +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Set to 1 to use the faster spi4teensy3 driver. (not used yet)) +//////////////////////////////////////////////////////////////////////////////// +#ifndef USE_SPI4TEENSY3 +#define USE_SPI4TEENSY3 0 +#endif + +//////////////////////////////////////////////////////////////////////////////// +// AUTOMATIC Settings +//////////////////////////////////////////////////////////////////////////////// + +// No user serviceable parts below this line. +// DO NOT change anything below here unless you are a developer! + +#if defined(__GNUC__) && defined(__AVR__) +#ifndef GCC_VERSION +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif +#if GCC_VERSION < 40602 // Test for GCC < 4.6.2 +#ifdef PROGMEM +#undef PROGMEM +#define PROGMEM __attribute__((section(".progmem.data"))) // Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4 +#ifdef PSTR +#undef PSTR +#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source +#endif +#endif +#endif +#endif + +#if !defined(DEBUG_USB_HOST) && ENABLE_UHS_DEBUGGING +#define DEBUG_USB_HOST +#endif + +#if !defined(WIICAMERA) && ENABLE_WII_IR_CAMERA +#define WIICAMERA +#endif + +#define UHS_SLEEP_MS(v) pUsb->sof_delay(v) + +#ifndef UHS_NI +#define UHS_NI __attribute__((noinline)) +#endif + +#endif /* SETTINGS_H */ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h new file mode 100644 index 000000000000..34b8ad72e7ef --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h @@ -0,0 +1,222 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(_UHS_host_h_) || defined(_UHS_ch9_h_) +#error "Never include UHS_usb_ch9.h directly; include UHS_Usb.h instead" +#else + +/* USB chapter 9 structures */ +#define _UHS_ch9_h_ + +/* Misc.USB constants */ +#define DEV_DESCR_LEN 18 //device descriptor length +#define CONF_DESCR_LEN 9 //configuration descriptor length +#define INTR_DESCR_LEN 9 //interface descriptor length +#define EP_DESCR_LEN 7 //endpoint descriptor length + +/* Standard Device Requests */ +#define USB_REQUEST_GET_STATUS 0 // Standard Device Request - GET STATUS +#define USB_REQUEST_CLEAR_FEATURE 1 // Standard Device Request - CLEAR FEATURE +#define USB_REQUEST_SET_FEATURE 3 // Standard Device Request - SET FEATURE +#define USB_REQUEST_SET_ADDRESS 5 // Standard Device Request - SET ADDRESS +#define USB_REQUEST_GET_DESCRIPTOR 6 // Standard Device Request - GET DESCRIPTOR +#define USB_REQUEST_SET_DESCRIPTOR 7 // Standard Device Request - SET DESCRIPTOR +#define USB_REQUEST_GET_CONFIGURATION 8 // Standard Device Request - GET CONFIGURATION +#define USB_REQUEST_SET_CONFIGURATION 9 // Standard Device Request - SET CONFIGURATION +#define USB_REQUEST_GET_INTERFACE 10 // Standard Device Request - GET INTERFACE +#define USB_REQUEST_SET_INTERFACE 11 // Standard Device Request - SET INTERFACE +#define USB_REQUEST_SYNCH_FRAME 12 // Standard Device Request - SYNCH FRAME + +/* Wireless USB Device Requests */ +#define USB_REQ_SET_ENCRYPTION 0x0D +#define USB_REQ_GET_ENCRYPTION 0x0E +#define USB_REQ_RPIPE_ABORT 0x0E +#define USB_REQ_SET_HANDSHAKE 0x0F +#define USB_REQ_RPIPE_RESET 0x0F +#define USB_REQ_GET_HANDSHAKE 0x10 +#define USB_REQ_SET_CONNECTION 0x11 +#define USB_REQ_SET_SECURITY_DATA 0x12 +#define USB_REQ_GET_SECURITY_DATA 0x13 +#define USB_REQ_SET_WUSB_DATA 0x14 +#define USB_REQ_LOOPBACK_DATA_WRITE 0x15 +#define USB_REQ_LOOPBACK_DATA_READ 0x16 +#define USB_REQ_SET_INTERFACE_DS 0x17 + +/* USB feature flags */ +#define USB_DEVICE_SELF_POWERED 0 /* (read only) */ +#define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ +#define USB_DEVICE_TEST_MODE 2 /* (wired high speed only) */ +#define USB_DEVICE_BATTERY 2 /* (wireless) */ +#define USB_DEVICE_B_HNP_ENABLE 3 /* (otg) dev may initiate HNP */ +#define USB_DEVICE_WUSB_DEVICE 3 /* (wireless)*/ +#define USB_DEVICE_A_HNP_SUPPORT 4 /* (otg) RH port supports HNP */ +#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */ +#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ + +#define USB_FEATURE_ENDPOINT_HALT 0 // CLEAR/SET FEATURE - Endpoint Halt +#define USB_FEATURE_DEVICE_REMOTE_WAKEUP 1 // CLEAR/SET FEATURE - Device remote wake-up +#define USB_FEATURE_TEST_MODE 2 // CLEAR/SET FEATURE - Test mode +/* OTG SET FEATURE Constants */ +#define OTG_FEATURE_B_HNP_ENABLE 3 // SET FEATURE OTG - Enable B device to perform HNP +#define OTG_FEATURE_A_HNP_SUPPORT 4 // SET FEATURE OTG - A device supports HNP +#define OTG_FEATURE_A_ALT_HNP_SUPPORT 5 // SET FEATURE OTG - Another port on the A device supports HNP + +/* Setup Data Constants */ +#define USB_SETUP_HOST_TO_DEVICE 0x00 // Device Request bmRequestType transfer direction - host to device transfer +#define USB_SETUP_DEVICE_TO_HOST 0x80 // Device Request bmRequestType transfer direction - device to host transfer +#define USB_SETUP_TYPE_STANDARD 0x00 // Device Request bmRequestType type - standard +#define USB_SETUP_TYPE_CLASS 0x20 // Device Request bmRequestType type - class +#define USB_SETUP_TYPE_VENDOR 0x40 // Device Request bmRequestType type - vendor +#define USB_SETUP_RECIPIENT_DEVICE 0x00 // Device Request bmRequestType recipient - device +#define USB_SETUP_RECIPIENT_INTERFACE 0x01 // Device Request bmRequestType recipient - interface +#define USB_SETUP_RECIPIENT_ENDPOINT 0x02 // Device Request bmRequestType recipient - endpoint +#define USB_SETUP_RECIPIENT_OTHER 0x03 // Device Request bmRequestType recipient - other +#define USB_SETUP_RECIPIENT_PORT 0x04 // Wireless USB 1.0 +#define USB_SETUP_RECIPIENT_RPIPE 0x05 // Wireless USB 1.0 + + +/* USB descriptors */ +#define USB_DESCRIPTOR_DEVICE 0x01 // bDescriptorType for a Device Descriptor. +#define USB_DESCRIPTOR_CONFIGURATION 0x02 // bDescriptorType for a Configuration Descriptor. +#define USB_DESCRIPTOR_STRING 0x03 // bDescriptorType for a String Descriptor. +#define USB_DESCRIPTOR_INTERFACE 0x04 // bDescriptorType for an Interface Descriptor. +#define USB_DESCRIPTOR_ENDPOINT 0x05 // bDescriptorType for an Endpoint Descriptor. +#define USB_DESCRIPTOR_DEVICE_QUALIFIER 0x06 // bDescriptorType for a Device Qualifier. +#define USB_DESCRIPTOR_OTHER_SPEED 0x07 // bDescriptorType for a Other Speed Configuration. +#define USB_DESCRIPTOR_INTERFACE_POWER 0x08 // bDescriptorType for Interface Power. +#define USB_DESCRIPTOR_OTG 0x09 // bDescriptorType for an OTG Descriptor. +#define USB_DESCRIPTOR_DEBUG 0x0a +#define USB_DESCRIPTOR_INTERFACE_ASSOCIATION 0x0b +#define USB_DESCRIPTOR_SECURITY 0x0c +#define USB_DESCRIPTOR_KEY 0x0d +#define USB_DESCRIPTOR_ENCRYPTION_TYPE 0x0e +#define USB_DESCRIPTOR_BOS 0x0f +#define USB_DESCRIPTOR_DEVICE_CAPABILITY 0x10 +#define USB_DESCRIPTOR_WIRELESS_ENDPOINT_COMP 0x11 +#define USB_DESCRIPTOR_WIRE_ADAPTER 0x21 +#define USB_DESCRIPTOR_RPIPE 0x22 +#define USB_DESCRIPTOR_CS_RADIO_CONTROL 0x23 +#define USB_DESCRIPTOR_SS_ENDPOINT_COMP 0x30 + +#define USB_HID_DESCRIPTOR 0x21 + + +// Conventional codes for class-specific descriptors. "Common Class" Spec (3.11) +#define USB_DESCRIPTOR_CS_DEVICE 0x21 +#define USB_DESCRIPTOR_CS_CONFIG 0x22 +#define USB_DESCRIPTOR_CS_STRING 0x23 +#define USB_DESCRIPTOR_CS_INTERFACE 0x24 +#define USB_DESCRIPTOR_CS_ENDPOINT 0x25 + + + +/* USB Endpoint Transfer Types */ +#define USB_TRANSFER_TYPE_CONTROL 0x00 // Endpoint is a control endpoint. +#define USB_TRANSFER_TYPE_ISOCHRONOUS 0x01 // Endpoint is an isochronous endpoint. +#define USB_TRANSFER_TYPE_BULK 0x02 // Endpoint is a bulk endpoint. +#define USB_TRANSFER_TYPE_INTERRUPT 0x03 // Endpoint is an interrupt endpoint. +#define bmUSB_TRANSFER_TYPE 0x03 // bit mask to separate transfer type from ISO attributes +#define USB_TRANSFER_DIRECTION_IN 0x80 // Indicate direction is IN + +/* Standard Feature Selectors for CLEAR_FEATURE Requests */ +#define USB_FEATURE_ENDPOINT_STALL 0 // Endpoint recipient +#define USB_FEATURE_DEVICE_REMOTE_WAKEUP 1 // Device recipient +#define USB_FEATURE_TEST_MODE 2 // Device recipient + +/* descriptor data structures */ + +/* Device descriptor structure */ +typedef struct { + uint8_t bLength; // Length of this descriptor. + uint8_t bDescriptorType; // DEVICE descriptor type (USB_DESCRIPTOR_DEVICE). + uint16_t bcdUSB; // USB Spec Release Number (BCD). + uint8_t bDeviceClass; // Class code (assigned by the USB-IF). 0xFF-Vendor specific. + uint8_t bDeviceSubClass; // Subclass code (assigned by the USB-IF). + uint8_t bDeviceProtocol; // Protocol code (assigned by the USB-IF). 0xFF-Vendor specific. + uint8_t bMaxPacketSize0; // Maximum packet size for endpoint 0. + uint16_t idVendor; // Vendor ID (assigned by the USB-IF). + uint16_t idProduct; // Product ID (assigned by the manufacturer). + uint16_t bcdDevice; // Device release number (BCD). + uint8_t iManufacturer; // Index of String Descriptor describing the manufacturer. + uint8_t iProduct; // Index of String Descriptor describing the product. + uint8_t iSerialNumber; // Index of String Descriptor with the device's serial number. + uint8_t bNumConfigurations; // Number of possible configurations. +} __attribute__((packed)) USB_DEVICE_DESCRIPTOR; + +/* Configuration descriptor structure */ +typedef struct { + uint8_t bLength; // Length of this descriptor. + uint8_t bDescriptorType; // CONFIGURATION descriptor type (USB_DESCRIPTOR_CONFIGURATION). + uint16_t wTotalLength; // Total length of all descriptors for this configuration. + uint8_t bNumInterfaces; // Number of interfaces in this configuration. + uint8_t bConfigurationValue; // Value of this configuration (1 based). + uint8_t iConfiguration; // Index of String Descriptor describing the configuration. + uint8_t bmAttributes; // Configuration characteristics. + uint8_t bMaxPower; // Maximum power consumed by this configuration. +} __attribute__((packed)) USB_CONFIGURATION_DESCRIPTOR; + +/* Interface descriptor structure */ +typedef struct { + uint8_t bLength; // Length of this descriptor. + uint8_t bDescriptorType; // INTERFACE descriptor type (USB_DESCRIPTOR_INTERFACE). + uint8_t bInterfaceNumber; // Number of this interface (0 based). + uint8_t bAlternateSetting; // Value of this alternate interface setting. + uint8_t bNumEndpoints; // Number of endpoints in this interface. + uint8_t bInterfaceClass; // Class code (assigned by the USB-IF). 0xFF-Vendor specific. + uint8_t bInterfaceSubClass; // Subclass code (assigned by the USB-IF). + uint8_t bInterfaceProtocol; // Protocol code (assigned by the USB-IF). 0xFF-Vendor specific. + uint8_t iInterface; // Index of String Descriptor describing the interface. +} __attribute__((packed)) USB_INTERFACE_DESCRIPTOR; + +/* Endpoint descriptor structure */ +typedef struct { + uint8_t bLength; // Length of this descriptor. + uint8_t bDescriptorType; // ENDPOINT descriptor type (USB_DESCRIPTOR_ENDPOINT). + uint8_t bEndpointAddress; // Endpoint address. Bit 7 indicates direction (0=OUT, 1=IN). + uint8_t bmAttributes; // Endpoint transfer type. + uint16_t wMaxPacketSize; // Maximum packet size. + uint8_t bInterval; // Polling interval in frames. +} __attribute__((packed)) USB_ENDPOINT_DESCRIPTOR; + +/* HID descriptor */ +/* +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint16_t bcdHID; // HID class specification release + uint8_t bCountryCode; + uint8_t bNumDescriptors; // Number of additional class specific descriptors + uint8_t bDescrType; // Type of class descriptor + uint16_t wDescriptorLength; // Total size of the Report descriptor +} __attribute__((packed)) USB_HID_DESCRIPTOR; +*/ + +typedef struct { + uint8_t bDescrType; // Type of class descriptor + uint16_t wDescriptorLength; // Total size of the Report descriptor +} __attribute__((packed)) HID_CLASS_DESCRIPTOR_LEN_AND_TYPE; + +#endif // _ch9_h_ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h new file mode 100644 index 000000000000..6db65c00a0ec --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h @@ -0,0 +1,452 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if !defined(_UHS_host_h_) +#error "Never include UHS_usbhost.h directly; include UHS_host.h instead" +#else +#if !defined(_USBHOST_H_) +#define _USBHOST_H_ + +// Very early prototypes +#if defined(UHS_LOAD_BT) +void UHS_BT_SetUSBInterface(UHS_USB_HOST_BASE *host, ENUMERATION_INFO *ei); +void UHS_BT_ScanUninitialized(UHS_USB_HOST_BASE *host); +void UHS_BT_Poll(UHS_USB_HOST_BASE *host); +#endif +#if defined(UHS_LOAD_HID) +void UHS_HID_SetUSBInterface(UHS_USB_HOST_BASE *host, ENUMERATION_INFO *ei); +void UHS_HID_ScanUninitialized(UHS_USB_HOST_BASE *host); +void UHS_HID_Poll(UHS_USB_HOST_BASE *host); +#endif + +//#if defined(LOAD_UHS_CDC_ACM) || defined(LOAD_UHS_CDC_ACM_FTDI) || defined(LOAD_UHS_CDC_ACM_PROLIFIC) || defined(LOAD_UHS_CDC_ACM_XR21B1411) +//void UHS_CDC_ACM_SetUSBInterface(UHS_USB_HOST_BASE *host, ENUMERATION_INFO *ei); +//void UHS_CDC_ACM_ScanUninitialized(UHS_USB_HOST_BASE *host); +//void UHS_CDC_ACM_Poll(UHS_USB_HOST_BASE *host); +//#endif + +class UHS_USBInterface; // forward class declaration + +// enumerator to turn the VBUS on/off + +typedef enum { + vbus_on = 0, + vbus_off = 1 +} VBUS_t; + +// All host SEI use this base class + +class UHS_USB_HOST_BASE { +public: + AddressPool addrPool; + UHS_USBInterface* devConfig[UHS_HOST_MAX_INTERFACE_DRIVERS]; + volatile uint8_t usb_error; + volatile uint8_t usb_task_state; + volatile uint8_t usb_task_polling_disabled; + volatile uint8_t usb_host_speed; + volatile uint8_t hub_present; + + UHS_USB_HOST_BASE(void) { + for(uint16_t i = 0; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) { + devConfig[i] = NULL; + } + usb_task_polling_disabled = 0; + usb_task_state = UHS_USB_HOST_STATE_INITIALIZE; //set up state machine + usb_host_speed = 0; + usb_error = 0; + }; + + ///////////////////////////////////////////// + // + // Virtual methods that interface to the SIE + // Overriding each is mandatory. + // + ///////////////////////////////////////////// + + /** + * Delay for x milliseconds + * Override if your controller provides an SOF IRQ, which may involve + * some sort of reentrant ISR or workaround with interrupts enabled. + * + * @param x how many milliseconds to delay + * @return true if delay completed without a state change, false if delay aborted + */ + virtual bool UHS_NI sof_delay(uint16_t x) { + if(!(usb_task_state & UHS_USB_HOST_STATE_MASK)) return false; + uint8_t current_state = usb_task_state; + while(current_state == usb_task_state && x--) { + delay(1); + } + return (current_state == usb_task_state); + }; + + virtual UHS_EpInfo * UHS_NI ctrlReqOpen(NOTUSED(uint8_t addr), NOTUSED(uint64_t Request), NOTUSED(uint8_t* dataptr)) { + return NULL; + }; + + virtual void UHS_NI vbusPower(NOTUSED(VBUS_t state)) { + }; + + virtual void UHS_NI Task(void) { + }; + + virtual uint8_t UHS_NI SetAddress(NOTUSED(uint8_t addr), NOTUSED(uint8_t ep), NOTUSED(UHS_EpInfo **ppep), NOTUSED(uint16_t &nak_limit)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t UHS_NI OutTransfer(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint16_t nak_limit), NOTUSED(uint16_t nbytes), NOTUSED(uint8_t *data)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t UHS_NI InTransfer(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint16_t nak_limit), NOTUSED(uint16_t *nbytesptr), NOTUSED(uint8_t *data)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t UHS_NI ctrlReqClose(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint8_t bmReqType), NOTUSED(uint16_t left), NOTUSED(uint16_t nbytes), NOTUSED(uint8_t *dataptr)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t UHS_NI ctrlReqRead(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint16_t *left), NOTUSED(uint16_t *read), NOTUSED(uint16_t nbytes), NOTUSED(uint8_t *dataptr)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t UHS_NI dispatchPkt(NOTUSED(uint8_t token), NOTUSED(uint8_t ep), NOTUSED(uint16_t nak_limit)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t UHS_NI init(void) { + return 0; + }; + + virtual void UHS_NI doHostReset(void) { + }; + + virtual int16_t UHS_NI Init(NOTUSED(int16_t mseconds)) { + return -1; + }; + + virtual int16_t UHS_NI Init(void) { + return Init(INT16_MIN); + }; + + virtual uint8_t hwlPowerUp(void) { + /* This is for machine specific support to enable/power up the USB HW to operate*/ + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual uint8_t hwPowerDown(void) { + /* This is for machine specific support to disable/powerdown the USB Hw */ + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + virtual bool IsHub(uint8_t klass) { + return (klass == UHS_USB_CLASS_HUB); + }; + + virtual void UHS_NI suspend_host(void) { + // Used on MCU that lack control of IRQ priority (AVR). + // Suspends ISRs, for critical code. IRQ will be serviced after it is resumed. + // NOTE: you must track the state yourself! + }; + + virtual void UHS_NI resume_host(void) { + // Used on MCU that lack control of IRQ priority (AVR). + // Resumes ISRs. + // NOTE: you must track the state yourself! + }; + + ///////////////////////////////////////////// + // + // Built-ins, No need to override + // + ///////////////////////////////////////////// + // these two probably will go away, and won't be used, TBD + inline void Poll_Others(void) { +#if defined(UHS_LOAD_BT) + UHS_BT_Poll(this); +#endif +#if defined(UHS_LOAD_HID) + UHS_HID_Poll(this); +#endif + } + + inline void DisablePoll(void) { + noInterrupts(); + usb_task_polling_disabled++; + DDSB(); + interrupts(); + } + + inline void EnablePoll(void) { + noInterrupts(); + usb_task_polling_disabled--; + DDSB(); + interrupts(); + } + + uint8_t UHS_NI seekInterface(ENUMERATION_INFO *ei, uint16_t inf, USB_CONFIGURATION_DESCRIPTOR *ucd); + + uint8_t UHS_NI setEpInfoEntry(uint8_t addr, uint8_t iface, uint8_t epcount, volatile UHS_EpInfo* eprecord_ptr); + + uint8_t UHS_NI EPClearHalt(uint8_t addr, uint8_t ep); + + uint8_t UHS_NI ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t* dataptr); + + uint8_t UHS_NI getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* dataptr); + + uint8_t UHS_NI getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t* dataptr); + + uint8_t UHS_NI setAddr(uint8_t oldaddr, uint8_t newaddr); + + uint8_t UHS_NI setConf(uint8_t addr, uint8_t conf_value); + + uint8_t UHS_NI getStrDescr(uint8_t addr, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t* dataptr); + + void UHS_NI ReleaseDevice(uint8_t addr); + + uint8_t UHS_NI Configuring(uint8_t parent, uint8_t port, uint8_t speed); + + void UHS_NI DeviceDefaults(uint8_t maxep, UHS_USBInterface *device); + + UHS_EpInfo* UHS_NI getEpInfoEntry(uint8_t addr, uint8_t ep); + + inline uint8_t getUsbTaskState(void) { + return ( usb_task_state); + }; + + inline AddressPool* GetAddressPool(void) { + return &addrPool; + }; + + int UHS_NI RegisterDeviceClass(UHS_USBInterface *pdev) { + for(uint8_t i = 0; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) { + if(!devConfig[i]) { + devConfig[i] = pdev; + return i; + } + } + //return UHS_HOST_ERROR_CANT_REGISTER_DEVICE_CLASS; + return -1; + }; +#if 0 + + inline void ForEachUsbDevice(UsbDeviceHandleFunc pfunc) { + addrPool.ForEachUsbDevice(pfunc); + }; +#endif + + uint8_t TestInterface(ENUMERATION_INFO *ei); + uint8_t enumerateInterface(ENUMERATION_INFO *ei); + uint8_t getNextInterface(ENUMERATION_INFO *ei, UHS_EpInfo *pep, uint8_t data[], uint16_t *left, uint16_t *read, uint8_t *offset); + uint8_t initDescrStream(ENUMERATION_INFO *ei, USB_CONFIGURATION_DESCRIPTOR *ucd, UHS_EpInfo *pep, uint8_t *data, uint16_t *left, uint16_t *read, uint8_t *offset); + uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data); + uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data); + uint8_t doSoftReset(uint8_t parent, uint8_t port, uint8_t address); + uint8_t getone(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset); + uint8_t eat(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset, uint16_t *yum); + +}; + +// All device interface drivers use this subclass + +class UHS_USBInterface { +public: + + UHS_USB_HOST_BASE *pUsb; // Parent USB host + volatile uint8_t bNumEP; // total number of EP in this interface + volatile UHS_EpInfo epInfo[16]; // This is a stub, override in the driver. + + volatile uint8_t bAddress; // address of the device + volatile uint8_t bConfNum; // configuration number + volatile uint8_t bIface; // interface value + volatile bool bPollEnable; // poll enable flag, operating status + volatile uint32_t qNextPollTime; // next poll time + + /** + * Resets interface driver to unused state. You should override this in + * your driver if it requires extra class variable cleanup. + */ + virtual void DriverDefaults(void) { + printf("Default driver defaults.\r\n"); + pUsb->DeviceDefaults(bNumEP, this); + }; + + /** + * Checks if this interface is supported. + * Executed called when new devices are connected. + * + * @param ei + * @return true if the interface is supported + */ + virtual bool OKtoEnumerate(NOTUSED(ENUMERATION_INFO *ei)) { + return false; + }; + + /** + * Configures any needed endpoint information for an interface. + * You must provide this in your driver. + * Executed when new devices are connected and OKtoEnumerate() + * returned true. + * + * @param ei + * @return zero on success + */ + virtual uint8_t SetInterface(NOTUSED(ENUMERATION_INFO *ei)) { + return UHS_HOST_ERROR_NOT_IMPLEMENTED; + }; + + /** + * Interface specific additional setup and enumeration that + * can't occur when the descriptor stream is open. + * Also used for collection of unclaimed interfaces, to link to the master. + * + * @return zero on success + */ + virtual uint8_t Finalize(void) { + return 0; + }; + + /** + * Executed after interface is finalized but, before polling has started. + * + * @return 0 on success + */ + virtual uint8_t OnStart(void) { + return 0; + }; + + /** + * Start interface polling + * @return + */ + virtual uint8_t Start(void) { + uint8_t rcode = OnStart(); + if(!rcode) bPollEnable = true; + return rcode; + }; + + /** + * Executed before anything else in Release(). + * + */ + virtual void OnRelease(void) { + return; + }; + + /** + * Release resources when device is disconnected. + * Normally this does not need to be overridden. + */ + virtual void Release(void) { + OnRelease(); + DriverDefaults(); + return; + }; + + /** + * Executed After driver polls. + * Can be used when there is an important change detected during polling + * and you want to handle it elsewhere. + * Examples: + * Media status change for bulk, e.g. ready, not-ready, media changed, door opened. + * Button state/joystick position/etc changes on a HID device. + * Flow control status change on a communication device, e.g. CTS on serial + */ + virtual void OnPoll(void) { + return; + }; + + /** + * Poll interface driver. You should override this in your driver if you + * require polling faster or slower than every 100 milliseconds, or your + * driver requires special housekeeping. + */ + virtual void Poll() { + OnPoll(); + qNextPollTime = millis() + 100; + }; + + virtual bool UHS_NI Polling(void) { + return bPollEnable; + } + + /** + * This is only for a hub. + * @param port + */ + virtual void ResetHubPort(NOTUSED(uint8_t port)) { + return; + }; + +#if 0 + /** + * + * @return true if this interface is Vendor Specific. + */ + virtual bool IsVSI() { + return false; + } +#endif +}; + +#if 0 +/** + * + * Vendor Specific interface class. + * This is used by a partner interface. + * It can also be used to force-enumerate an interface that + * can use this interface directly. + * You can also add an instance of this class within the interface constructor + * if you expect the interface. + * + * If this is not needed, it may be removed. Nothing I have written needs this. + * Let me know if it is not required, then IsVSI method can also be shit-canned. + * -- AJK + */ + +class UHS_VSI : public UHS_USBInterface { +public: + volatile UHS_EpInfo epInfo[1]; + volatile ENUMERATION_INFO eInfo; + UHS_VSI(UHS_USB_HOST_BASE *p); + bool OKtoEnumerate(ENUMERATION_INFO *ei); + uint8_t SetInterface(ENUMERATION_INFO *ei); + virtual void DriverDefaults(void); + virtual void Release(void); + + uint8_t GetAddress(void) { + return bAddress; + }; + + virtual bool IsVSI() { + return true; + } + +}; +#endif + +#endif //_USBHOST_H_ +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_util_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_util_INLINE.h new file mode 100644 index 000000000000..04cfb61430f4 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_util_INLINE.h @@ -0,0 +1,129 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +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 2 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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if defined(LOAD_USB_HOST_SYSTEM) && !defined(USB_HOST_SYSTEM_UTIL_LOADED) +#define USB_HOST_SYSTEM_UTIL_LOADED + +// 0x80 is the default (i.e. trace) to turn off set this global to something lower. +// this allows for 126 other debugging levels. +// TO-DO: Allow assignment to a different serial port by software +int UsbDEBUGlvl = 0x80; + +void E_Notifyc(char c, int lvl) { + if(UsbDEBUGlvl < lvl) return; +#if defined(ARDUINO) && ARDUINO >=100 + USB_HOST_SERIAL.print(c); +#else + USB_HOST_SERIAL.print(c, BYTE); +#endif + //USB_HOST_SERIAL.flush(); +} + +void E_Notify(char const * msg, int lvl) { + if(UsbDEBUGlvl < lvl) return; + if(!msg) return; + char c; + + while((c = pgm_read_byte(msg++))) E_Notifyc(c, lvl); +} + +void E_NotifyStr(char const * msg, int lvl) { + if(UsbDEBUGlvl < lvl) return; + if(!msg) return; + char c; + + while((c = *msg++)) E_Notifyc(c, lvl); +} + +void E_Notify(uint8_t b, int lvl) { + if(UsbDEBUGlvl < lvl) return; +#if defined(ARDUINO) && ARDUINO >=100 + USB_HOST_SERIAL.print(b); +#else + USB_HOST_SERIAL.print(b, DEC); +#endif +} + +void E_Notify(double d, int lvl) { + if(UsbDEBUGlvl < lvl) return; + USB_HOST_SERIAL.print(d); +} + +#ifdef DEBUG_USB_HOST + +void NotifyFailGetDevDescr(void) { + Notify(PSTR("\r\ngetDevDescr "), 0x80); +} + +void NotifyFailSetDevTblEntry(void) { + Notify(PSTR("\r\nsetDevTblEn "), 0x80); +} + +void NotifyFailGetConfDescr(void) { + Notify(PSTR("\r\ngetConf "), 0x80); +} + +void NotifyFailSetConfDescr(void) { + Notify(PSTR("\r\nsetConf "), 0x80); +} + +void NotifyFailGetDevDescr(uint8_t reason) { + NotifyFailGetDevDescr(); + NotifyFail(reason); +} + +void NotifyFailSetDevTblEntry(uint8_t reason) { + NotifyFailSetDevTblEntry(); + NotifyFail(reason); + +} + +void NotifyFailGetConfDescr(uint8_t reason) { + NotifyFailGetConfDescr(); + NotifyFail(reason); +} + +void NotifyFailSetConfDescr(uint8_t reason) { + NotifyFailSetConfDescr(); + NotifyFail(reason); +} + +void NotifyFailUnknownDevice(uint16_t VID, uint16_t PID) { + Notify(PSTR("\r\nUnknown Device Connected - VID: "), 0x80); + D_PrintHex (VID, 0x80); + Notify(PSTR(" PID: "), 0x80); + D_PrintHex (PID, 0x80); +} + +void NotifyFail(uint8_t rcode) { + D_PrintHex (rcode, 0x80); + Notify(PSTR("\r\n"), 0x80); +} +#endif + +#else +#error "Never include UHS_util_INLINE.h, include UHS_host.h instead" +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h new file mode 100644 index 000000000000..f42a806d7038 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h @@ -0,0 +1,226 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ +#if !defined(USB_HOST_SHIELD_H) || defined(_max3421e_h_) +#error "Never include UHS_max3421e.h directly; include USB_HOST_SHIELD.h instead" +#else + +#define _max3421e_h_ + +/* MAX3421E register/bit names and bitmasks */ + +#define SE0 0 +#define SE1 1 +#define FSHOST 2 +#define LSHOST 3 + +/* MAX3421E command byte format: rrrrr0wa where 'r' is register number */ + +// +// MAX3421E Registers in HOST mode. +// +#define rRCVFIFO 0x08 // Receive FIFO Register +#define rSNDFIFO 0x10 // Send FIFO Register +#define rSUDFIFO 0x20 // Set Up Data FIFO Register +#define rRCVBC 0x30 // Receive FIFO Byte Count Register +#define rSNDBC 0x38 // Send FIFO Byte Count Register + +// USB Interrupt Request Status (USBIRQ) +#define rUSBIRQ 0x68 // USB Interrupt Request Register +#define bmVBUSIRQ 0x40 // Vbus Present Interrupt Request +#define bmNOVBUSIRQ 0x20 // Vbus Absent Interrupt Request +#define bmOSCOKIRQ 0x01 // Oscillator OK Interrupt Request + +// USB Interrupt Request Control (USBIEN) +#define rUSBIEN 0x70 // USB Interrupt Request Enable Register +#define bmVBUSIE bmVBUSIRQ // Vbus Present Interrupt Request Enable +#define bmNOVBUSIE bmNOVBUSIRQ // Vbus Absent Interrupt Request Enable +#define bmOSCOKIE bmOSCOKIRQ // Oscillator OK Interrupt Request Enable + +// (USBCTL) +#define rUSBCTL 0x78 //15<<3 +#define bmCHIPRES 0x20 //b5 +#define bmPWRDOWN 0x10 //b4 + +// (CPUCTL) +#define rCPUCTL 0x80 //16<<3 +#define bmPUSLEWID1 0x80 //b7 +#define bmPULSEWID0 0x40 //b6 +#define bmIE 0x01 //b0 + +// bmPUSLEWID1 bmPULSEWID0 Pulse width +// 0 0 10.6uS +// 0 1 5.3uS +// 1 0 2.6uS +// 1 1 1.3uS +#define PUSLEWIDTH10_6 (0) +#define PUSLEWIDTH5_3 (bmPULSEWID0) +#define PUSLEWIDTH2_6 (bmPUSLEWID1) +#define PUSLEWIDTH1_3 (bmPULSEWID0 | bmPUSLEWID1) + +// (PINCTL) +#define rPINCTL 0x88 //17<<3 +#define bmFDUPSPI 0x10 //b4 +#define bmINTLEVEL 0x08 //b3 +#define bmPOSINT 0x04 //b2 +#define bmGPXB 0x02 //b1 +#define bmGPXA 0x01 //b0 + +// GPX pin selections +#define GPX_OPERATE 0x00 // +#define GPX_VBDET 0x01 // +#define GPX_BUSACT 0x02 // +#define GPX_SOF 0x03 // + +#define rREVISION 0x90 //18<<3 + +// (IOPINS1) +#define rIOPINS1 0xa0 //20<<3 +#define bmGPOUT0 0x01 // +#define bmGPOUT1 0x02 // +#define bmGPOUT2 0x04 // +#define bmGPOUT3 0x08 // +#define bmGPIN0 0x10 // +#define bmGPIN1 0x20 // +#define bmGPIN2 0x40 // +#define bmGPIN3 0x80 // + +// (IOPINS2) +#define rIOPINS2 0xa8 //21<<3 +#define bmGPOUT4 0x01 // +#define bmGPOUT5 0x02 // +#define bmGPOUT6 0x04 // +#define bmGPOUT7 0x08 // +#define bmGPIN4 0x10 // +#define bmGPIN5 0x20 // +#define bmGPIN6 0x40 // +#define bmGPIN7 0x80 // + +// (GPINIRQ) +#define rGPINIRQ 0xb0 //22<<3 +#define bmGPINIRQ0 0x01 // +#define bmGPINIRQ1 0x02 // +#define bmGPINIRQ2 0x04 // +#define bmGPINIRQ3 0x08 // +#define bmGPINIRQ4 0x10 // +#define bmGPINIRQ5 0x20 // +#define bmGPINIRQ6 0x40 // +#define bmGPINIRQ7 0x80 // + +// (GPINIEN) +#define rGPINIEN 0xb8 //23<<3 +#define bmGPINIEN0 0x01 // +#define bmGPINIEN1 0x02 // +#define bmGPINIEN2 0x04 // +#define bmGPINIEN3 0x08 // +#define bmGPINIEN4 0x10 // +#define bmGPINIEN5 0x20 // +#define bmGPINIEN6 0x40 // +#define bmGPINIEN7 0x80 // + +// (GPINPOL) +#define rGPINPOL 0xc0 //24<<3 +#define bmGPINPOL0 0x01 // +#define bmGPINPOL1 0x02 // +#define bmGPINPOL2 0x04 // +#define bmGPINPOL3 0x08 // +#define bmGPINPOL4 0x10 // +#define bmGPINPOL5 0x20 // +#define bmGPINPOL6 0x40 // +#define bmGPINPOL7 0x80 // + +// +// If any data transfer errors occur, the HXFRDNIRQ asserts, while the RCVDAVIRQ does not. +// +// The CPU clears the SNDBAVIRQ by writing the SNDBC register. +// The CPU should never directly clear the SNDBAVIRQ bit. + +// Host Interrupt Request Status (HIRQ) +#define rHIRQ 0xc8 // Host Interrupt Request Register +#define bmBUSEVENTIRQ 0x01 // BUS Reset Done or BUS Resume Interrupt Request +#define bmRWUIRQ 0x02 // Remote Wakeup Interrupt Request +#define bmRCVDAVIRQ 0x04 // Receive FIFO Data Available Interrupt Request +#define bmSNDBAVIRQ 0x08 // Send Buffer Available Interrupt Request +#define bmSUSDNIRQ 0x10 // Suspend operation Done Interrupt Request +#define bmCONDETIRQ 0x20 // Peripheral Connect/Disconnect Interrupt Request +#define bmFRAMEIRQ 0x40 // Frame Generator Interrupt Request +#define bmHXFRDNIRQ 0x80 // Host Transfer Done Interrupt Request + +// IRQs that are OK for the CPU to clear +#define ICLRALLBITS (bmBUSEVENTIRQ | bmRWUIRQ | bmRCVDAVIRQ | bmSUSDNIRQ | bmCONDETIRQ | bmFRAMEIRQ | bmHXFRDNIRQ) + +// Host Interrupt Request Control (HIEN) +#define rHIEN 0xd0 // +#define bmBUSEVENTIE bmBUSEVENTIRQ // BUS Reset Done or BUS Resume Interrupt Request Enable +#define bmRWUIE bmRWUIRQ // Remote Wakeup Interrupt Request Enable +#define bmRCVDAVIE bmRCVDAVIRQ // Receive FIFO Data Available Interrupt Request Enable +#define bmSNDBAVIE bmSNDBAVIRQ // Send Buffer Available Interrupt Request Enable +#define bmSUSDNIE bmSUSDNIRQ // Suspend operation Done Interrupt Request Enable +#define bmCONDETIE bmCONDETIRQ // Peripheral Connect/Disconnect Interrupt Request Enable +#define bmFRAMEIE bmFRAMEIRQ // Frame Generator Interrupt Request Enable +#define bmHXFRDNIE bmHXFRDNIRQ // Host Transfer Done Interrupt Request Enable + +// (MODE)) +#define rMODE 0xd8 //27<<3 +#define bmHOST 0x01 // +#define bmLOWSPEED 0x02 // +#define bmHUBPRE 0x04 // +#define bmSOFKAENAB 0x08 // +#define bmSEPIRQ 0x10 // +#define bmDELAYISO 0x20 // +#define bmDMPULLDN 0x40 // +#define bmDPPULLDN 0x80 // + +#define rPERADDR 0xe0 //28<<3 + +// (HCTL) +#define rHCTL 0xe8 //29<<3 +#define bmBUSRST 0x01 // +#define bmFRMRST 0x02 // +#define bmSAMPLEBUS 0x04 // +#define bmSIGRSM 0x08 // +#define bmRCVTOG0 0x10 // +#define bmRCVTOG1 0x20 // +#define bmSNDTOG0 0x40 // +#define bmSNDTOG1 0x80 // + +// Host transfer (HXFR) +#define rHXFR 0xf0 //30<<3 +/* Host transfer token values for writing the HXFR register (R30) */ +/* OR this bit field with the endpoint number in bits 3:0 */ +#define MAX3421E_tokSETUP 0x10 // HS=0, ISO=0, OUTNIN=0, SETUP=1 +#define MAX3421E_tokIN 0x00 // HS=0, ISO=0, OUTNIN=0, SETUP=0 +#define MAX3421E_tokOUT 0x20 // HS=0, ISO=0, OUTNIN=1, SETUP=0 +#define MAX3421E_tokINHS 0x80 // HS=1, ISO=0, OUTNIN=0, SETUP=0 +#define MAX3421E_tokOUTHS 0xA0 // HS=1, ISO=0, OUTNIN=1, SETUP=0 +#define MAX3421E_tokISOIN 0x40 // HS=0, ISO=1, OUTNIN=0, SETUP=0 +#define MAX3421E_tokISOOUT 0x60 // HS=0, ISO=1, OUTNIN=1, SETUP=0 + +// (HRSL) +#define rHRSL 0xf8 //31<<3 +#define bmRCVTOGRD 0x10 // +#define bmSNDTOGRD 0x20 // +#define bmKSTATUS 0x40 // +#define bmJSTATUS 0x80 // +#define bmSE0 0x00 //SE0 - disconnect state +#define bmSE1 0xc0 //SE1 - illegal state + +#define MODE_FS_HOST (bmDPPULLDN|bmDMPULLDN|bmHOST|bmSOFKAENAB) +#define MODE_LS_HOST (bmDPPULLDN|bmDMPULLDN|bmHOST|bmLOWSPEED|bmSOFKAENAB) + +#endif //_max3421e_h_ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h new file mode 100644 index 000000000000..ab80f6541735 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h @@ -0,0 +1,519 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#ifndef USB_HOST_SHIELD_H +#define USB_HOST_SHIELD_H + +// uncomment to get 'printf' console debugging. NOT FOR UNO! +//#define DEBUG_PRINTF_EXTRA_HUGE_USB_HOST_SHIELD + +#ifdef LOAD_USB_HOST_SHIELD +#include "UHS_max3421e.h" +#include + + +#if !defined(SPI_HAS_TRANSACTION) +#error "Your SPI library installation is too old." +#else +#if !defined(SPI_ATOMIC_VERSION) +#warning "Your SPI library installation lacks 'SPI_ATOMIC_VERSION'. Please complain to the maintainer." +#elif SPI_ATOMIC_VERSION < 1 +#error "Your SPI library installation is too old." +#endif + +#endif +#if DEBUG_PRINTF_EXTRA_HUGE +#ifdef DEBUG_PRINTF_EXTRA_HUGE_USB_HOST_SHIELD +#define MAX_HOST_DEBUG(...) printf_P(__VA_ARGS__) +#else +#define MAX_HOST_DEBUG(...) VOID0 +#endif +#else +#define MAX_HOST_DEBUG(...) VOID0 +#endif + +#if !defined(USB_HOST_SHIELD_USE_ISR) +#if defined(USE_MULTIPLE_APP_API) +#define USB_HOST_SHIELD_USE_ISR 0 +#else +#define USB_HOST_SHIELD_USE_ISR 1 +#endif +#else +#define USB_HOST_SHIELD_USE_ISR 1 +#endif + + + +#if !USB_HOST_SHIELD_USE_ISR +#error NOISR Polled mode _NOT SUPPORTED YET_ + +// +// Polled defaults +// +#if defined(BOARD_BLACK_WIDDOW) +#define UHS_MAX3421E_SS_ 6 +#define UHS_MAX3421E_INT_ 3 +#elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +#if EXT_RAM +// Teensy++ 2.0 with XMEM2 +#define UHS_MAX3421E_SS_ 20 +#define UHS_MAX3421E_INT_ 7 +#else +#define UHS_MAX3421E_SS_ 9 +#define UHS_MAX3421E_INT_ 8 +#endif +#define UHS_MAX3421E_SPD +#elif defined(ARDUINO_AVR_ADK) +#define UHS_MAX3421E_SS_ 53 +#define UHS_MAX3421E_INT_ 54 +#elif defined(ARDUINO_AVR_BALANDUINO) +#define UHS_MAX3421E_SS_ 20 +#define UHS_MAX3421E_INT_ 19 +#else +#define UHS_MAX3421E_SS_ 10 +#define UHS_MAX3421E_INT_ 9 +#endif + +#else +#if defined(ARDUINO_ARCH_PIC32) +// PIC32 only allows edge interrupts, isn't that lovely? We'll emulate it... +#if CHANGE < 2 +#error core too old. +#endif + +#define IRQ_IS_EDGE 0 +#ifndef digitalPinToInterrupt +// great, this isn't implemented. +#warning digitalPinToInterrupt is not defined, complain here https://github.com/chipKIT32/chipKIT-core/issues/114 +#if defined(_BOARD_UNO_) || defined(_BOARD_UC32_) +#define digitalPinToInterrupt(p) ((p) == 2 ? 1 : ((p) == 7 ? 2 : ((p) == 8 ? 3 : ((p) == 35 ? 4 : ((p) == 38 ? 0 : NOT_AN_INTERRUPT))))) +#warning digitalPinToInterrupt is now defined until this is taken care of. +#else +#error digitalPinToInterrupt not defined for your board, complain here https://github.com/chipKIT32/chipKIT-core/issues/114 +#endif +#endif +#else +#define IRQ_IS_EDGE 0 +#endif + +// More stupidity from our friends @ Sony... +#if defined(ARDUINO_spresense_ast) +#if !defined(NOT_AN_INTERRUPT) +#define NOT_AN_INTERRUPT -1 +#endif +#endif + +// SAMD uses an enum for this instead of a define. Isn't that just dandy? +#if !defined(NOT_AN_INTERRUPT) && !defined(ARDUINO_ARCH_SAMD) +#warning NOT_AN_INTERRUPT not defined, possible problems ahead. +#warning If NOT_AN_INTERRUPT is an enum or something else, complain to UHS30 developers on github. +#warning Otherwise complain to your board core developer/maintainer. +#define NOT_AN_INTERRUPT -1 +#endif + +// +// Interrupt defaults. Int0 or Int1 +// +#ifdef BOARD_BLACK_WIDDOW +#error "HELP! Please send us an email, I don't know the values for Int0 and Int1 on the Black Widow board!" +#elif defined(ARDUINO_AVR_ADK) +#define UHS_MAX3421E_SS_ 53 +#define UHS_MAX3421E_INT_ 54 +#elif defined(ARDUINO_spresense_ast) +#define UHS_MAX3421E_SS_ 21 +#define UHS_MAX3421E_INT_ 20 +#define SPIclass SPI5 +//#define UHS_MAX3421E_SPD 100000 +#elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) + +// TO-DO! + +#if EXT_RAM +// Teensy++ 2.0 with XMEM2 +#define UHS_MAX3421E_SS_ 20 +#define UHS_MAX3421E_INT_ 7 +#else +#define UHS_MAX3421E_SS_ 9 +#define UHS_MAX3421E_INT_ 8 +#endif + +#elif defined(ARDUINO_AVR_BALANDUINO) +#error "ISR mode is currently not supported on the Balanduino. Please set USB_HOST_SHIELD_USE_ISR to 0." +#else +#define UHS_MAX3421E_SS_ 10 +#ifdef __AVR__ +#if defined(__AVR_ATmega32U4__) +#define INT_FOR_PIN2 1 +#define INT_FOR_PIN3 0 +#else +// Everybody else??? +#define INT_FOR_PIN2 0 +#define INT_FOR_PIN3 1 +#endif +#define UHS_MAX3421E_INT_ 3 +#else +// Non-avr +#if defined(ARDUINO_ARCH_PIC32) +// UNO32 External Interrupts: +// Pin 38 (INT0), Pin 2 (INT1), Pin 7 (INT2), Pin 8 (INT3), Pin 35 (INT4) +#define UHS_MAX3421E_INT_ 7 +#else +#define UHS_MAX3421E_INT_ 9 +#endif +#endif +#endif +#endif + + + +#if defined(NO_AUTO_SPEED) +// Ugly details section... +// MAX3421E characteristics +// SPI Serial - Clock Input. An external SPI master supplies SCLK with frequencies up to 26MHz. The +// logic level is referenced to the voltage on VL. Data is clocked into the SPI slave inter face on the +// rising edge of SCLK. Data is clocked out of the SPI slave interface on the falling edge of SCLK. +// Serial Clock (SCLK) Period 38.4ns minimum. 17ns minimum pulse width. VL >2.5V +// SCLK Fall to MISO Propagation Delay 14.2ns +// SCLK Fall to MOSI Propagation Delay 14.2ns +// SCLK Fall to MOSI Drive 3.5ns +// Theoretical deadline for reply 17.7ns +// 26MHz 38.4615ns period <-- MAX3421E theoretical maximum + +#if !defined(UHS_MAX3421E_SPD) +#if defined(ARDUINO_SAMD_ZERO) +// Zero violates spec early, needs a long setup time, or doesn't like high latency. +#define UHS_MAX3421E_SPD 10000000 +#elif defined(ARDUINO_ARCH_PIC32) +// PIC MX 5/6/7 characteristics +// 25MHZ 40ns period <-- PIC MX 5/6/7 theoretical maximum +// pulse width minimum Tsclk/2ns +// Trise/fall 10ns maximum. 5ns is typical but not guaranteed. +// Tsetup minimum for MISO 10ns. +// We are in violation by 7.7ns @ 25MHz due to latency alone. +// Even reading at end of data cycle, we only have a 2.3ns window. +// This is too narrow to to compensate for capacitance, trace lengths, and noise. + +// 17.7ns + 10ns = 27.7ns +// 18MHz fits and has enough slack time to compensate for capacitance, trace lengths, and noise. +// For high speeds the SMP bit is recommended too, which samples at the end instead of the middle. +// 20Mhz seems to work. + +#define UHS_MAX3421E_SPD 20000000 +#else +#define UHS_MAX3421E_SPD 25000000 +#endif +#endif +#else +// We start at 25MHz, and back down until hardware can take it. +// Of course, SPI library can adjust this for us too. +// Why not 26MHz? Because I have not found any MCU board that +// can actually go that fast without problems. +// Could be a shield limitation too. +#if !defined(UHS_MAX3421E_SPD) +#define UHS_MAX3421E_SPD 25000000 +#endif +#endif + +#ifndef UHS_MAX3421E_INT +#define UHS_MAX3421E_INT UHS_MAX3421E_INT_ +#endif + +#ifndef UHS_MAX3421E_SS +#define UHS_MAX3421E_SS UHS_MAX3421E_SS_ +#endif + +// NOTE: On the max3421e the irq enable and irq bits are in the same position. + +// IRQs used if CPU polls +#define ENIBITSPOLLED (bmCONDETIE | bmBUSEVENTIE | bmFRAMEIE) +// IRQs used if CPU is interrupted +#define ENIBITSISR (bmCONDETIE | bmBUSEVENTIE | bmFRAMEIE /* | bmRCVDAVIRQ | bmSNDBAVIRQ | bmHXFRDNIRQ */ ) + +#if !USB_HOST_SHIELD_USE_ISR +#define IRQ_CHECK_MASK (ENIBITSPOLLED & ICLRALLBITS) +#define IRQ_IS_EDGE 0 +#else +#define IRQ_CHECK_MASK (ENIBITSISR & ICLRALLBITS) +#endif + +#if IRQ_IS_EDGE +// Note: UNO32 Interrupts can only be RISING, or FALLING. +// This poses an interesting problem, since we want to use a LOW level. +// The MAX3421E provides for pulse width control for an IRQ. +// We do need to watch the timing on this, as a second IRQ could cause +// a missed IRQ, since we read the level of the line to check if the IRQ +// is actually for this chip. The only other alternative is to add a capacitor +// and an NPN transistor, and use two lines. We can try this first, though. +// Worse case, we can ignore reading the pin for verification on UNO32. +// Too bad there is no minimum low width setting. +// +// Single Clear First Second Clear first Clear last +// IRQ Single IRQ IRQ Second active pending IRQ +// | | | | | | +// V V V V V V +// _____ _________ _ _ _______ +// |______| |______| |______| |______________| +// +#define IRQ_SENSE FALLING +#if defined(ARDUINO_ARCH_PIC32) +//#define bmPULSEWIDTH PUSLEWIDTH10_6 +#define bmPULSEWIDTH 0 +#define bmIRQ_SENSE 0 +#else +#define bmPULSEWIDTH PUSLEWIDTH1_3 +#define bmIRQ_SENSE 0 +#endif +#else +#if !defined(IRQ_SENSE) +#define IRQ_SENSE LOW +#endif +#if !defined(bmPULSEWIDTH) +#define bmPULSEWIDTH 0 +#endif +#if !defined(bmIRQ_SENSE) +#define bmIRQ_SENSE bmINTLEVEL +#endif +#endif + +class MAX3421E_HOST : +public UHS_USB_HOST_BASE +#if defined(SWI_IRQ_NUM) +, public dyn_SWI +#endif +{ + // TO-DO: move these into the parent class. + volatile uint8_t vbusState; + volatile uint16_t sof_countdown; + + // TO-DO: pack into a struct/union and use one byte + volatile bool busevent; + volatile bool sofevent; + volatile bool counted; + volatile bool condet; + volatile bool doingreset; + + #ifdef USB_HOST_MANUAL_POLL + volatile bool frame_irq_enabled = false; + + bool enable_frame_irq(bool enable) { + const bool prev_state = frame_irq_enabled; + if(prev_state != enable) { + if(enable) + regWr(rHIEN, regRd(rHIEN) | bmFRAMEIE); + else + regWr(rHIEN, regRd(rHIEN) & ~bmFRAMEIE); + frame_irq_enabled = enable; + } + return prev_state; + } + #endif + +public: + SPISettings MAX3421E_SPI_Settings; + uint8_t ss_pin; + uint8_t irq_pin; + // Will use the defaults UHS_MAX3421E_SS, UHS_MAX3421E_INT and speed + + UHS_NI MAX3421E_HOST(void) { + sof_countdown = 0; + busevent = false; + doingreset = false; + sofevent = false; + condet = false; + ss_pin = UHS_MAX3421E_SS; + irq_pin = UHS_MAX3421E_INT; + MAX3421E_SPI_Settings = SPISettings(UHS_MAX3421E_SPD, MSBFIRST, SPI_MODE0); + hub_present = 0; + }; + + // Will use user supplied pins, and UHS_MAX3421E_SPD + + UHS_NI MAX3421E_HOST(uint8_t pss, uint8_t pirq) { + sof_countdown = 0; + busevent = false; + doingreset = false; + sofevent = false; + condet = false; + ss_pin = pss; + irq_pin = pirq; + MAX3421E_SPI_Settings = SPISettings(UHS_MAX3421E_SPD, MSBFIRST, SPI_MODE0); + hub_present = 0; + }; + + // Will use user supplied pins, and speed + + UHS_NI MAX3421E_HOST(uint8_t pss, uint8_t pirq, uint32_t pspd) { + sof_countdown = 0; + doingreset = false; + busevent = false; + sofevent = false; + condet = false; + ss_pin = pss; + irq_pin = pirq; + MAX3421E_SPI_Settings = SPISettings(pspd, MSBFIRST, SPI_MODE0); + hub_present = 0; + }; + + virtual bool UHS_NI sof_delay(uint16_t x) { +#ifdef USB_HOST_MANUAL_POLL + const bool saved_irq_state = enable_frame_irq(true); +#endif + sof_countdown = x; + while((sof_countdown != 0) && !condet) { + SYSTEM_OR_SPECIAL_YIELD(); +#if !USB_HOST_SHIELD_USE_ISR + Task(); +#endif + } +#ifdef USB_HOST_MANUAL_POLL + enable_frame_irq(saved_irq_state); +#endif + // Serial.println("...Wake"); + return (!condet); + }; + + virtual UHS_EpInfo *ctrlReqOpen(uint8_t addr, uint64_t Request, uint8_t* dataptr); + + virtual void UHS_NI vbusPower(VBUS_t state) { + regWr(rPINCTL, (bmFDUPSPI | bmIRQ_SENSE) | (uint8_t)(state)); + }; + + void UHS_NI Task(void); + + virtual uint8_t SetAddress(uint8_t addr, uint8_t ep, UHS_EpInfo **ppep, uint16_t &nak_limit); + virtual uint8_t OutTransfer(UHS_EpInfo *pep, uint16_t nak_limit, uint16_t nbytes, uint8_t *data); + virtual uint8_t InTransfer(UHS_EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t *data); + virtual uint8_t ctrlReqClose(UHS_EpInfo *pep, uint8_t bmReqType, uint16_t left, uint16_t nbytes, uint8_t *dataptr); + virtual uint8_t ctrlReqRead(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint16_t nbytes, uint8_t *dataptr); + virtual uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit); + + void UHS_NI ReleaseChildren(void) { + for(uint8_t i = 0; i < UHS_HOST_MAX_INTERFACE_DRIVERS; i++) + if(devConfig[i]) + devConfig[i]->Release(); + hub_present = 0; + }; + + virtual bool IsHub(uint8_t klass) { + if(klass == UHS_USB_CLASS_HUB) { + hub_present = bmHUBPRE; + return true; + } + return false; + }; + + virtual void VBUS_changed(void); + + virtual void UHS_NI doHostReset(void) { +#if USB_HOST_SHIELD_USE_ISR + // Enable interrupts + noInterrupts(); +#endif + doingreset = true; + busevent = true; + regWr(rHIRQ, bmBUSEVENTIRQ); // see data sheet. + regWr(rHCTL, bmBUSRST); //issue bus reset +#if USB_HOST_SHIELD_USE_ISR + DDSB(); + // Enable interrupts + interrupts(); +#endif + while(busevent) { + DDSB(); + SYSTEM_OR_SPECIAL_YIELD(); + } +#endif +#if USB_HOST_SHIELD_USE_ISR + // Enable interrupts + noInterrupts(); +#endif + #ifdef USB_HOST_MANUAL_POLL + enable_frame_irq(true); + #endif + sofevent = true; +#if USB_HOST_SHIELD_USE_ISR + DDSB(); + // Enable interrupts + interrupts(); +#endif + // Wait for SOF + while(sofevent) { + } +#if USB_HOST_SHIELD_USE_ISR + // Enable interrupts + noInterrupts(); +#endif + doingreset = false; +#if USB_HOST_SHIELD_USE_ISR + DDSB(); + // Enable interrupts + interrupts(); + }; + + + int16_t UHS_NI Init(int16_t mseconds); + + int16_t UHS_NI Init(void) { + return Init(INT16_MIN); + }; + + void ISRTask(void); + void ISRbottom(void); + void busprobe(void); + uint16_t reset(void); + + // MAX3421e specific + void regWr(uint8_t reg, uint8_t data); + void gpioWr(uint8_t data); + uint8_t regRd(uint8_t reg); + uint8_t gpioRd(void); + uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p); + uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p); + + // ARM/NVIC specific, used to emulate reentrant ISR. +#if defined(SWI_IRQ_NUM) + + void dyn_SWISR(void) { + ISRbottom(); + }; +#endif + + virtual void UHS_NI suspend_host(void) { + // Used on MCU that lack control of IRQ priority (AVR). + // Suspends ISRs, for critical code. IRQ will be serviced after it is resumed. + // NOTE: you must track the state yourself! +#if defined(__AVR__) + noInterrupts(); + detachInterrupt(UHS_GET_DPI(irq_pin)); + interrupts(); +#endif + }; + + virtual void UHS_NI resume_host(void); +}; +#if !defined(SPIclass) +#define SPIclass SPI +#endif +#if !defined(USB_HOST_SHIELD_LOADED) +#include "USB_HOST_SHIELD_INLINE.h" +#endif +#else +#error "define LOAD_USB_HOST_SHIELD in your sketch, never include USB_HOST_SHIELD.h in a driver." +#endif +#endif /* USB_HOST_SHIELD_H */ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h new file mode 100644 index 000000000000..78669305d989 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h @@ -0,0 +1,1003 @@ +/* Copyright (C) 2015-2016 Andrew J. Kroll + and +Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as publishe7d by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com + */ + +#if defined(USB_HOST_SHIELD_H) && !defined(USB_HOST_SHIELD_LOADED) +#define USB_HOST_SHIELD_LOADED +#include + +#if !defined(digitalPinToInterrupt) +#error digitalPinToInterrupt not defined, complain to your board maintainer. +#endif + + +#if USB_HOST_SHIELD_USE_ISR + +// allow two slots. this makes the maximum allowed shield count TWO +// for AVRs this is limited to pins 2 and 3 ONLY +// for all other boards, one odd and one even pin number is allowed. +static MAX3421E_HOST *ISReven; +static MAX3421E_HOST *ISRodd; + +static void UHS_NI call_ISReven(void) { + ISReven->ISRTask(); +} + +static void UHS_NI call_ISRodd(void) { + UHS_PIN_WRITE(LED_BUILTIN, HIGH); + ISRodd->ISRTask(); +} +#endif + + +void UHS_NI MAX3421E_HOST::resume_host(void) { + // Used on MCU that lack control of IRQ priority (AVR). + // Resumes ISRs. + // NOTE: you must track the state yourself! +#if defined(__AVR__) + noInterrupts(); + if(irq_pin & 1) { + ISRodd = this; + attachInterrupt(UHS_GET_DPI(irq_pin), call_ISRodd, IRQ_SENSE); + } else { + ISReven = this; + attachInterrupt(UHS_GET_DPI(irq_pin), call_ISReven, IRQ_SENSE); + } + interrupts(); +#endif + +} +/* write single byte into MAX3421e register */ +void UHS_NI MAX3421E_HOST::regWr(uint8_t reg, uint8_t data) { + SPIclass.beginTransaction(MAX3421E_SPI_Settings); + MARLIN_UHS_WRITE_SS(LOW); + SPIclass.transfer(reg | 0x02); + SPIclass.transfer(data); + MARLIN_UHS_WRITE_SS(HIGH); + SPIclass.endTransaction(); +} + + +/* multiple-byte write */ + +/* returns a pointer to memory position after last written */ +uint8_t* UHS_NI MAX3421E_HOST::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p) { + SPIclass.beginTransaction(MAX3421E_SPI_Settings); + MARLIN_UHS_WRITE_SS(LOW); + SPIclass.transfer(reg | 0x02); + //printf("%2.2x :", reg); + + while(nbytes) { + SPIclass.transfer(*data_p); + //printf("%2.2x ", *data_p); + nbytes--; + data_p++; // advance data pointer + } + MARLIN_UHS_WRITE_SS(HIGH); + SPIclass.endTransaction(); + //printf("\r\n"); + return (data_p); +} +/* GPIO write */ +/*GPIO byte is split between 2 registers, so two writes are needed to write one byte */ + +/* GPOUT bits are in the low nibble. 0-3 in IOPINS1, 4-7 in IOPINS2 */ +void UHS_NI MAX3421E_HOST::gpioWr(uint8_t data) { + regWr(rIOPINS1, data); + data >>= 4; + regWr(rIOPINS2, data); + return; +} + +/* single host register read */ +uint8_t UHS_NI MAX3421E_HOST::regRd(uint8_t reg) { + SPIclass.beginTransaction(MAX3421E_SPI_Settings); + MARLIN_UHS_WRITE_SS(LOW); + SPIclass.transfer(reg); + uint8_t rv = SPIclass.transfer(0); + MARLIN_UHS_WRITE_SS(HIGH); + SPIclass.endTransaction(); + return (rv); +} +/* multiple-byte register read */ + +/* returns a pointer to a memory position after last read */ +uint8_t* UHS_NI MAX3421E_HOST::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p) { + SPIclass.beginTransaction(MAX3421E_SPI_Settings); + MARLIN_UHS_WRITE_SS(LOW); + SPIclass.transfer(reg); + while(nbytes) { + *data_p++ = SPIclass.transfer(0); + nbytes--; + } + MARLIN_UHS_WRITE_SS(HIGH); + SPIclass.endTransaction(); + return ( data_p); +} + +/* GPIO read. See gpioWr for explanation */ + +/* GPIN pins are in high nibbles of IOPINS1, IOPINS2 */ +uint8_t UHS_NI MAX3421E_HOST::gpioRd(void) { + uint8_t gpin = 0; + gpin = regRd(rIOPINS2); //pins 4-7 + gpin &= 0xf0; //clean lower nibble + gpin |= (regRd(rIOPINS1) >> 4); //shift low bits and OR with upper from previous operation. + return ( gpin); +} + +/* reset MAX3421E. Returns number of microseconds it took for PLL to stabilize after reset + or zero if PLL haven't stabilized in 65535 cycles */ +uint16_t UHS_NI MAX3421E_HOST::reset(void) { + uint16_t i = 0; + + // Initiate chip reset + regWr(rUSBCTL, bmCHIPRES); + regWr(rUSBCTL, 0x00); + + int32_t now; + uint32_t expires = micros() + 65535; + + // Enable full-duplex SPI so we can read rUSBIRQ + regWr(rPINCTL, bmFDUPSPI); + while((int32_t)(micros() - expires) < 0L) { + if((regRd(rUSBIRQ) & bmOSCOKIRQ)) { + break; + } + } + now = (int32_t)(micros() - expires); + if(now < 0L) { + i = 65535 + now; // Note this subtracts, as now is negative + } + return (i); +} + +void UHS_NI MAX3421E_HOST::VBUS_changed(void) { + /* modify USB task state because Vbus changed or unknown */ + uint8_t speed = 1; + //printf("\r\n\r\n\r\n\r\nSTATE %2.2x -> ", usb_task_state); + switch(vbusState) { + case LSHOST: // Low speed + + speed = 0; + // Intentional fall-through + case FSHOST: // Full speed + // Start device initialization if we are not initializing + // Resets to the device cause an IRQ + // usb_task_state == UHS_USB_HOST_STATE_RESET_NOT_COMPLETE; + //if((usb_task_state & UHS_USB_HOST_STATE_MASK) != UHS_USB_HOST_STATE_DETACHED) { + ReleaseChildren(); + if(!doingreset) { + if(usb_task_state == UHS_USB_HOST_STATE_RESET_NOT_COMPLETE) { + usb_task_state = UHS_USB_HOST_STATE_WAIT_BUS_READY; + } else if(usb_task_state != UHS_USB_HOST_STATE_WAIT_BUS_READY) { + usb_task_state = UHS_USB_HOST_STATE_DEBOUNCE; + } + } + sof_countdown = 0; + break; + case SE1: //illegal state + sof_countdown = 0; + doingreset = false; + ReleaseChildren(); + usb_task_state = UHS_USB_HOST_STATE_ILLEGAL; + break; + case SE0: //disconnected + default: + sof_countdown = 0; + doingreset = false; + ReleaseChildren(); + usb_task_state = UHS_USB_HOST_STATE_IDLE; + break; + } + usb_host_speed = speed; + //printf("0x%2.2x\r\n\r\n\r\n\r\n", usb_task_state); + return; +}; + +/** + * Probe bus to determine device presence and speed, + * then switch host to detected speed. + */ +void UHS_NI MAX3421E_HOST::busprobe(void) { + uint8_t bus_sample; + uint8_t tmpdata; + bus_sample = regRd(rHRSL); //Get J,K status + bus_sample &= (bmJSTATUS | bmKSTATUS); //zero the rest of the byte + switch(bus_sample) { //start full-speed or low-speed host + case(bmJSTATUS): + // Serial.println("J"); + if((regRd(rMODE) & bmLOWSPEED) == 0) { + regWr(rMODE, MODE_FS_HOST); // start full-speed host + vbusState = FSHOST; + } else { + regWr(rMODE, MODE_LS_HOST); // start low-speed host + vbusState = LSHOST; + } + #ifdef USB_HOST_MANUAL_POLL + enable_frame_irq(true); + #endif + tmpdata = regRd(rMODE) | bmSOFKAENAB; // start SOF generation + regWr(rHIRQ, bmFRAMEIRQ); // see data sheet. + regWr(rMODE, tmpdata); + break; + case(bmKSTATUS): + // Serial.println("K"); + if((regRd(rMODE) & bmLOWSPEED) == 0) { + regWr(rMODE, MODE_LS_HOST); // start low-speed host + vbusState = LSHOST; + } else { + regWr(rMODE, MODE_FS_HOST); // start full-speed host + vbusState = FSHOST; + } + #ifdef USB_HOST_MANUAL_POLL + enable_frame_irq(true); + #endif + tmpdata = regRd(rMODE) | bmSOFKAENAB; // start SOF generation + regWr(rHIRQ, bmFRAMEIRQ); // see data sheet. + regWr(rMODE, tmpdata); + break; + case(bmSE1): //illegal state + // Serial.println("I"); + regWr(rMODE, bmDPPULLDN | bmDMPULLDN | bmHOST); + vbusState = SE1; + // sofevent = false; + break; + case(bmSE0): //disconnected state + // Serial.println("D"); + regWr(rMODE, bmDPPULLDN | bmDMPULLDN | bmHOST); + vbusState = SE0; + // sofevent = false; + break; + }//end switch( bus_sample ) +} + +/** + * Initialize USB hardware, turn on VBUS + * + * @param mseconds Delay energizing VBUS after mseconds, A value of INT16_MIN means no delay. + * @return 0 on success, -1 on error + */ +int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) { + usb_task_state = UHS_USB_HOST_STATE_INITIALIZE; //set up state machine + // Serial.print("MAX3421E 'this' USB Host @ 0x"); + // Serial.println((uint32_t)this, HEX); + // Serial.print("MAX3421E 'this' USB Host Address Pool @ 0x"); + // Serial.println((uint32_t)GetAddressPool(), HEX); + Init_dyn_SWI(); + UHS_printf_HELPER_init(); + noInterrupts(); +#ifdef ARDUINO_AVR_ADK + // For Mega ADK, which has a Max3421e on-board, + // set MAX_RESET to output mode, and then set it to HIGH + // PORTJ bit 2 + if(irq_pin == 54) { + DDRJ |= 0x04; // output + PORTJ |= 0x04; // HIGH + } +#endif + SPIclass.begin(); +#ifdef ARDUINO_AVR_ADK + if(irq_pin == 54) { + DDRE &= ~0x20; // input + PORTE |= 0x20; // pullup + } else +#endif + pinMode(irq_pin, INPUT_PULLUP); + //UHS_PIN_WRITE(irq_pin, HIGH); + pinMode(ss_pin, OUTPUT); + MARLIN_UHS_WRITE_SS(HIGH); + +#ifdef USB_HOST_SHIELD_TIMING_PIN + pinMode(USB_HOST_SHIELD_TIMING_PIN, OUTPUT); + // My counter/timer can't work on an inverted gate signal + // so we gate using a high pulse -- AJK + UHS_PIN_WRITE(USB_HOST_SHIELD_TIMING_PIN, LOW); +#endif + interrupts(); + +#if USB_HOST_SHIELD_USE_ISR + int intr = digitalPinToInterrupt(irq_pin); + if(intr == NOT_AN_INTERRUPT) { +#if defined(ARDUINO_AVR_ADK) + if(irq_pin == 54) + intr = 6; + else +#endif + return (-2); + } + SPIclass.usingInterrupt(intr); +#else + SPIclass.usingInterrupt(255); +#endif +#if !defined(NO_AUTO_SPEED) + // test to get to reset acceptance. + uint32_t spd = UHS_MAX3421E_SPD; +again: + MAX3421E_SPI_Settings = SPISettings(spd, MSBFIRST, SPI_MODE0); + if(reset() == 0) { + MAX_HOST_DEBUG(PSTR("Fail SPI speed %lu\r\n"), spd); + if(spd > 1999999) { + spd -= 1000000; + goto again; + } + return (-1); + } else { + // reset passes, does 64k? + uint8_t sample_wr = 0; + uint8_t sample_rd = 0; + uint8_t gpinpol_copy = regRd(rGPINPOL); + for(uint16_t j = 0; j < 65535; j++) { + regWr(rGPINPOL, sample_wr); + sample_rd = regRd(rGPINPOL); + if(sample_rd != sample_wr) { + MAX_HOST_DEBUG(PSTR("Fail SPI speed %lu\r\n"), spd); + if(spd > 1999999) { + spd -= 1000000; + goto again; + } + return (-1); + } + sample_wr++; + } + regWr(rGPINPOL, gpinpol_copy); + } + + MAX_HOST_DEBUG(PSTR("Pass SPI speed %lu\r\n"), spd); +#endif + + if(reset() == 0) { //OSCOKIRQ hasn't asserted in time + MAX_HOST_DEBUG(PSTR("OSCOKIRQ hasn't asserted in time")); + return ( -1); + } + + /* MAX3421E - full-duplex SPI, interrupt kind, vbus off */ + regWr(rPINCTL, (bmFDUPSPI | bmIRQ_SENSE | GPX_VBDET)); + + // Delay a minimum of 1 second to ensure any capacitors are drained. + // 1 second is required to make sure we do not smoke a Microdrive! + if(mseconds != INT16_MIN) { + if(mseconds < 1000) mseconds = 1000; + delay(mseconds); // We can't depend on SOF timer here. + } + + regWr(rMODE, bmDPPULLDN | bmDMPULLDN | bmHOST); // set pull-downs, Host + + // Enable interrupts on the MAX3421e + regWr(rHIEN, IRQ_CHECK_MASK); + // Enable interrupt pin on the MAX3421e, set pulse width for edge + regWr(rCPUCTL, (bmIE | bmPULSEWIDTH)); + + /* check if device is connected */ + regWr(rHCTL, bmSAMPLEBUS); // sample USB bus + while(!(regRd(rHCTL) & bmSAMPLEBUS)); //wait for sample operation to finish + + busprobe(); //check if anything is connected + VBUS_changed(); + + // GPX pin on. This is done here so that a change is detected if we have a switch connected. + /* MAX3421E - full-duplex SPI, interrupt kind, vbus on */ + regWr(rPINCTL, (bmFDUPSPI | bmIRQ_SENSE)); + regWr(rHIRQ, bmBUSEVENTIRQ); // see data sheet. + regWr(rHCTL, bmBUSRST); // issue bus reset to force generate yet another possible IRQ + + +#if USB_HOST_SHIELD_USE_ISR + // Attach ISR to service IRQ from MAX3421e + noInterrupts(); + if(irq_pin & 1) { + ISRodd = this; + attachInterrupt(UHS_GET_DPI(irq_pin), call_ISRodd, IRQ_SENSE); + } else { + ISReven = this; + attachInterrupt(UHS_GET_DPI(irq_pin), call_ISReven, IRQ_SENSE); + } + interrupts(); +#endif + //printf("\r\nrPINCTL 0x%2.2X\r\n", rPINCTL); + //printf("rCPUCTL 0x%2.2X\r\n", rCPUCTL); + //printf("rHIEN 0x%2.2X\r\n", rHIEN); + //printf("irq_pin %i\r\n", irq_pin); + return 0; +} + +/** + * Setup UHS_EpInfo structure + * + * @param addr USB device address + * @param ep Endpoint + * @param ppep pointer to the pointer to a valid UHS_EpInfo structure + * @param nak_limit how many NAKs before aborting + * @return 0 on success + */ +uint8_t UHS_NI MAX3421E_HOST::SetAddress(uint8_t addr, uint8_t ep, UHS_EpInfo **ppep, uint16_t &nak_limit) { + UHS_Device *p = addrPool.GetUsbDevicePtr(addr); + + if(!p) + return UHS_HOST_ERROR_NO_ADDRESS_IN_POOL; + + if(!p->epinfo) + return UHS_HOST_ERROR_NULL_EPINFO; + + *ppep = getEpInfoEntry(addr, ep); + + if(!*ppep) + return UHS_HOST_ERROR_NO_ENDPOINT_IN_TABLE; + + nak_limit = (0x0001UL << (((*ppep)->bmNakPower > UHS_USB_NAK_MAX_POWER) ? UHS_USB_NAK_MAX_POWER : (*ppep)->bmNakPower)); + nak_limit--; + /* + USBTRACE2("\r\nAddress: ", addr); + USBTRACE2(" EP: ", ep); + USBTRACE2(" NAK Power: ",(*ppep)->bmNakPower); + USBTRACE2(" NAK Limit: ", nak_limit); + USBTRACE("\r\n"); + */ + regWr(rPERADDR, addr); //set peripheral address + + uint8_t mode = regRd(rMODE); + + //Serial.print("\r\nMode: "); + //Serial.println( mode, HEX); + //Serial.print("\r\nLS: "); + //Serial.println(p->speed, HEX); + + // Set bmLOWSPEED and bmHUBPRE in case of low-speed device, reset them otherwise + regWr(rMODE, (p->speed) ? mode & ~(bmHUBPRE | bmLOWSPEED) : mode | bmLOWSPEED | hub_present); + + return 0; +} + +/** + * Receive a packet + * + * @param pep pointer to a valid UHS_EpInfo structure + * @param nak_limit how many NAKs before aborting + * @param nbytesptr pointer to maximum number of bytes of data to receive + * @param data pointer to data buffer + * @return 0 on success + */ +uint8_t UHS_NI MAX3421E_HOST::InTransfer(UHS_EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t* data) { + uint8_t rcode = 0; + uint8_t pktsize; + + uint16_t nbytes = *nbytesptr; + MAX_HOST_DEBUG(PSTR("Requesting %i bytes "), nbytes); + uint8_t maxpktsize = pep->maxPktSize; + + *nbytesptr = 0; + regWr(rHCTL, (pep->bmRcvToggle) ? bmRCVTOG1 : bmRCVTOG0); //set toggle value + + // use a 'break' to exit this loop + while(1) { + rcode = dispatchPkt(MAX3421E_tokIN, pep->epAddr, nak_limit); //IN packet to EP-'endpoint'. Function takes care of NAKS. +#if 0 + // This issue should be resolved now. + if(rcode == UHS_HOST_ERROR_TOGERR) { + //MAX_HOST_DEBUG(PSTR("toggle wrong\r\n")); + // yes, we flip it wrong here so that next time it is actually correct! + pep->bmRcvToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 0 : 1; + regWr(rHCTL, (pep->bmRcvToggle) ? bmRCVTOG1 : bmRCVTOG0); //set toggle value + continue; + } +#endif + if(rcode) { + //MAX_HOST_DEBUG(PSTR(">>>>>>>> Problem! dispatchPkt %2.2x\r\n"), rcode); + break; //should be 0, indicating ACK. Else return error code. + } + /* check for RCVDAVIRQ and generate error if not present */ + /* the only case when absence of RCVDAVIRQ makes sense is when toggle error occurred. Need to add handling for that */ + if((regRd(rHIRQ) & bmRCVDAVIRQ) == 0) { + //MAX_HOST_DEBUG(PSTR(">>>>>>>> Problem! NO RCVDAVIRQ!\r\n")); + rcode = 0xf0; //receive error + break; + } + pktsize = regRd(rRCVBC); //number of received bytes + MAX_HOST_DEBUG(PSTR("Got %i bytes \r\n"), pktsize); + + if(pktsize > nbytes) { //certain devices send more than asked + //MAX_HOST_DEBUG(PSTR(">>>>>>>> Warning: wanted %i bytes but got %i.\r\n"), nbytes, pktsize); + pktsize = nbytes; + } + + int16_t mem_left = (int16_t)nbytes - *((int16_t*)nbytesptr); + + if(mem_left < 0) + mem_left = 0; + + data = bytesRd(rRCVFIFO, ((pktsize > mem_left) ? mem_left : pktsize), data); + + regWr(rHIRQ, bmRCVDAVIRQ); // Clear the IRQ & free the buffer + *nbytesptr += pktsize; // add this packet's byte count to total transfer length + + /* The transfer is complete under two conditions: */ + /* 1. The device sent a short packet (L.T. maxPacketSize) */ + /* 2. 'nbytes' have been transferred. */ + if((pktsize < maxpktsize) || (*nbytesptr >= nbytes)) // have we transferred 'nbytes' bytes? + { + // Save toggle value + pep->bmRcvToggle = ((regRd(rHRSL) & bmRCVTOGRD)) ? 1 : 0; + //MAX_HOST_DEBUG(PSTR("\r\n")); + rcode = 0; + break; + } // if + } //while( 1 ) + return ( rcode); +} + +/** + * Transmit a packet + * + * @param pep pointer to a valid UHS_EpInfo structure + * @param nak_limit how many NAKs before aborting + * @param nbytes number of bytes of data to send + * @param data pointer to data buffer + * @return 0 on success + */ +uint8_t UHS_NI MAX3421E_HOST::OutTransfer(UHS_EpInfo *pep, uint16_t nak_limit, uint16_t nbytes, uint8_t *data) { + uint8_t rcode = UHS_HOST_ERROR_NONE; + uint8_t retry_count; + uint8_t *data_p = data; //local copy of the data pointer + uint16_t bytes_tosend; + uint16_t nak_count; + uint16_t bytes_left = nbytes; + + uint8_t maxpktsize = pep->maxPktSize; + + if(maxpktsize < 1 || maxpktsize > 64) + return UHS_HOST_ERROR_BAD_MAX_PACKET_SIZE; + + unsigned long timeout = millis() + UHS_HOST_TRANSFER_MAX_MS; + + regWr(rHCTL, (pep->bmSndToggle) ? bmSNDTOG1 : bmSNDTOG0); //set toggle value + + while(bytes_left) { + SYSTEM_OR_SPECIAL_YIELD(); + retry_count = 0; + nak_count = 0; + bytes_tosend = (bytes_left >= maxpktsize) ? maxpktsize : bytes_left; + bytesWr(rSNDFIFO, bytes_tosend, data_p); //filling output FIFO + regWr(rSNDBC, bytes_tosend); //set number of bytes + regWr(rHXFR, (MAX3421E_tokOUT | pep->epAddr)); //dispatch packet + while(!(regRd(rHIRQ) & bmHXFRDNIRQ)); //wait for the completion IRQ + regWr(rHIRQ, bmHXFRDNIRQ); //clear IRQ + rcode = (regRd(rHRSL) & 0x0f); + + while(rcode && ((long)(millis() - timeout) < 0L)) { + switch(rcode) { + case UHS_HOST_ERROR_NAK: + nak_count++; + if(nak_limit && (nak_count == nak_limit)) + goto breakout; + break; + case UHS_HOST_ERROR_TIMEOUT: + retry_count++; + if(retry_count == UHS_HOST_TRANSFER_RETRY_MAXIMUM) + goto breakout; + break; + case UHS_HOST_ERROR_TOGERR: + // yes, we flip it wrong here so that next time it is actually correct! + pep->bmSndToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 0 : 1; + regWr(rHCTL, (pep->bmSndToggle) ? bmSNDTOG1 : bmSNDTOG0); //set toggle value + break; + default: + goto breakout; + }//switch( rcode + + /* process NAK according to Host out NAK bug */ + regWr(rSNDBC, 0); + regWr(rSNDFIFO, *data_p); + regWr(rSNDBC, bytes_tosend); + regWr(rHXFR, (MAX3421E_tokOUT | pep->epAddr)); //dispatch packet + while(!(regRd(rHIRQ) & bmHXFRDNIRQ)); //wait for the completion IRQ + regWr(rHIRQ, bmHXFRDNIRQ); //clear IRQ + rcode = (regRd(rHRSL) & 0x0f); + SYSTEM_OR_SPECIAL_YIELD(); + }//while( rcode && .... + bytes_left -= bytes_tosend; + data_p += bytes_tosend; + }//while( bytes_left... +breakout: + + pep->bmSndToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 1 : 0; //bmSNDTOG1 : bmSNDTOG0; //update toggle + return ( rcode); //should be 0 in all cases +} + +/** + * Send the actual packet. + * + * @param token + * @param ep Endpoint + * @param nak_limit how many NAKs before aborting, 0 == exit after timeout + * @return 0 on success, 0xFF indicates NAK timeout. @see + */ +/* Assumes peripheral address is set and relevant buffer is loaded/empty */ +/* If NAK, tries to re-send up to nak_limit times */ +/* If nak_limit == 0, do not count NAKs, exit after timeout */ +/* If bus timeout, re-sends up to USB_RETRY_LIMIT times */ + +/* return codes 0x00-0x0f are HRSLT( 0x00 being success ), 0xff means timeout */ +uint8_t UHS_NI MAX3421E_HOST::dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit) { + unsigned long timeout = millis() + UHS_HOST_TRANSFER_MAX_MS; + uint8_t tmpdata; + uint8_t rcode = UHS_HOST_ERROR_NONE; + uint8_t retry_count = 0; + uint16_t nak_count = 0; + + for(;;) { + regWr(rHXFR, (token | ep)); //launch the transfer + while((long)(millis() - timeout) < 0L) //wait for transfer completion + { + SYSTEM_OR_SPECIAL_YIELD(); + tmpdata = regRd(rHIRQ); + + if(tmpdata & bmHXFRDNIRQ) { + regWr(rHIRQ, bmHXFRDNIRQ); //clear the interrupt + //rcode = 0x00; + break; + }//if( tmpdata & bmHXFRDNIRQ + + }//while ( millis() < timeout + + rcode = (regRd(rHRSL) & 0x0f); //analyze transfer result + + switch(rcode) { + case UHS_HOST_ERROR_NAK: + nak_count++; + if(nak_limit && (nak_count == nak_limit)) + return (rcode); + delayMicroseconds(200); + break; + case UHS_HOST_ERROR_TIMEOUT: + retry_count++; + if(retry_count == UHS_HOST_TRANSFER_RETRY_MAXIMUM) + return (rcode); + break; + default: + return (rcode); + }//switch( rcode + } +} + +// +// NULL is error, we don't need to know the reason. +// + +UHS_EpInfo * UHS_NI MAX3421E_HOST::ctrlReqOpen(uint8_t addr, uint64_t Request, uint8_t *dataptr) { + uint8_t rcode; + UHS_EpInfo *pep = NULL; + uint16_t nak_limit = 0; + rcode = SetAddress(addr, 0, &pep, nak_limit); + + if(!rcode) { + + bytesWr(rSUDFIFO, 8, (uint8_t*)(&Request)); //transfer to setup packet FIFO + + rcode = dispatchPkt(MAX3421E_tokSETUP, 0, nak_limit); //dispatch packet + if(!rcode) { + if(dataptr != NULL) { + if(((Request)/* bmReqType*/ & 0x80) == 0x80) { + pep->bmRcvToggle = 1; //bmRCVTOG1; + } else { + pep->bmSndToggle = 1; //bmSNDTOG1; + } + } + } else { + pep = NULL; + } + } + return pep; +} + +uint8_t UHS_NI MAX3421E_HOST::ctrlReqRead(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint16_t nbytes, uint8_t *dataptr) { + *read = 0; + uint16_t nak_limit = 0; + MAX_HOST_DEBUG(PSTR("ctrlReqRead left: %i\r\n"), *left); + if(*left) { +again: + *read = nbytes; + uint8_t rcode = InTransfer(pep, nak_limit, read, dataptr); + if(rcode == UHS_HOST_ERROR_TOGERR) { + // yes, we flip it wrong here so that next time it is actually correct! + pep->bmRcvToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 0 : 1; + goto again; + } + + if(rcode) { + MAX_HOST_DEBUG(PSTR("ctrlReqRead ERROR: %2.2x, left: %i, read %i\r\n"), rcode, *left, *read); + return rcode; + } + *left -= *read; + MAX_HOST_DEBUG(PSTR("ctrlReqRead left: %i, read %i\r\n"), *left, *read); + } + return 0; +} + +uint8_t UHS_NI MAX3421E_HOST::ctrlReqClose(UHS_EpInfo *pep, uint8_t bmReqType, uint16_t left, uint16_t nbytes, uint8_t *dataptr) { + uint8_t rcode = 0; + + //MAX_HOST_DEBUG(PSTR("Closing")); + if(((bmReqType & 0x80) == 0x80) && pep && left && dataptr) { + MAX_HOST_DEBUG(PSTR("ctrlReqRead Sinking %i\r\n"), left); + // If reading, sink the rest of the data. + while(left) { + uint16_t read = nbytes; + rcode = InTransfer(pep, 0, &read, dataptr); + if(rcode == UHS_HOST_ERROR_TOGERR) { + // yes, we flip it wrong here so that next time it is actually correct! + pep->bmRcvToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 0 : 1; + continue; + } + if(rcode) break; + left -= read; + if(read < nbytes) break; + } + } + if(!rcode) { + // Serial.println("Dispatching"); + rcode = dispatchPkt(((bmReqType & 0x80) == 0x80) ? MAX3421E_tokOUTHS : MAX3421E_tokINHS, 0, 0); //GET if direction + // } else { + // Serial.println("Bypassed Dispatch"); + } + return rcode; +} + +/** + * Bottom half of the ISR task + */ +void UHS_NI MAX3421E_HOST::ISRbottom(void) { + uint8_t x; + // Serial.print("Enter "); + // Serial.print((uint32_t)this,HEX); + // Serial.print(" "); + // Serial.println(usb_task_state, HEX); + + DDSB(); + if(condet) { + VBUS_changed(); +#if USB_HOST_SHIELD_USE_ISR + noInterrupts(); +#endif + condet = false; +#if USB_HOST_SHIELD_USE_ISR + interrupts(); +#endif + } + switch(usb_task_state) { + case UHS_USB_HOST_STATE_INITIALIZE: + // should never happen... + MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_INITIALIZE\r\n")); + busprobe(); + VBUS_changed(); + break; + case UHS_USB_HOST_STATE_DEBOUNCE: + MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_DEBOUNCE\r\n")); + // This seems to not be needed. The host controller has debounce built in. + sof_countdown = UHS_HOST_DEBOUNCE_DELAY_MS; + usb_task_state = UHS_USB_HOST_STATE_DEBOUNCE_NOT_COMPLETE; + break; + case UHS_USB_HOST_STATE_DEBOUNCE_NOT_COMPLETE: + MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_DEBOUNCE_NOT_COMPLETE\r\n")); + if(!sof_countdown) usb_task_state = UHS_USB_HOST_STATE_RESET_DEVICE; + break; + case UHS_USB_HOST_STATE_RESET_DEVICE: + MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_RESET_DEVICE\r\n")); + busevent = true; + usb_task_state = UHS_USB_HOST_STATE_RESET_NOT_COMPLETE; + regWr(rHIRQ, bmBUSEVENTIRQ); // see data sheet. + regWr(rHCTL, bmBUSRST); // issue bus reset + break; + case UHS_USB_HOST_STATE_RESET_NOT_COMPLETE: + MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_RESET_NOT_COMPLETE\r\n")); + if(!busevent) usb_task_state = UHS_USB_HOST_STATE_WAIT_BUS_READY; + break; + case UHS_USB_HOST_STATE_WAIT_BUS_READY: + MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_WAIT_BUS_READY\r\n")); + usb_task_state = UHS_USB_HOST_STATE_CONFIGURING; + break; // don't fall through + + case UHS_USB_HOST_STATE_CONFIGURING: + usb_task_state = UHS_USB_HOST_STATE_CHECK; + x = Configuring(0, 1, usb_host_speed); + usb_error = x; + if(usb_task_state == UHS_USB_HOST_STATE_CHECK) { + if(x) { + MAX_HOST_DEBUG(PSTR("Error 0x%2.2x"), x); + if(x == UHS_HOST_ERROR_JERR) { + usb_task_state = UHS_USB_HOST_STATE_IDLE; + } else if(x != UHS_HOST_ERROR_DEVICE_INIT_INCOMPLETE) { + usb_error = x; + usb_task_state = UHS_USB_HOST_STATE_ERROR; + } + } else + usb_task_state = UHS_USB_HOST_STATE_CONFIGURING_DONE; + } + break; + + case UHS_USB_HOST_STATE_CHECK: + // Serial.println((uint32_t)__builtin_return_address(0), HEX); + break; + case UHS_USB_HOST_STATE_CONFIGURING_DONE: + usb_task_state = UHS_USB_HOST_STATE_RUNNING; + break; + #ifdef USB_HOST_MANUAL_POLL + case UHS_USB_HOST_STATE_RUNNING: + case UHS_USB_HOST_STATE_ERROR: + case UHS_USB_HOST_STATE_IDLE: + case UHS_USB_HOST_STATE_ILLEGAL: + enable_frame_irq(false); + break; + #else + case UHS_USB_HOST_STATE_RUNNING: + Poll_Others(); + for(x = 0; (usb_task_state == UHS_USB_HOST_STATE_RUNNING) && (x < UHS_HOST_MAX_INTERFACE_DRIVERS); x++) { + if(devConfig[x]) { + if(devConfig[x]->bPollEnable) devConfig[x]->Poll(); + } + } + // fall thru + #endif + default: + // Do nothing + break; + } // switch( usb_task_state ) + DDSB(); +#if USB_HOST_SHIELD_USE_ISR + if(condet) { + VBUS_changed(); + noInterrupts(); + condet = false; + interrupts(); + } +#endif +#ifdef USB_HOST_SHIELD_TIMING_PIN + // My counter/timer can't work on an inverted gate signal + // so we gate using a high pulse -- AJK + UHS_PIN_WRITE(USB_HOST_SHIELD_TIMING_PIN, LOW); +#endif + //usb_task_polling_disabled--; + EnablePoll(); + DDSB(); +} + + +/* USB main task. Services the MAX3421e */ +#if !USB_HOST_SHIELD_USE_ISR + +void UHS_NI MAX3421E_HOST::ISRTask(void) { +} +void UHS_NI MAX3421E_HOST::Task(void) +#else + +void UHS_NI MAX3421E_HOST::Task(void) { +#ifdef USB_HOST_MANUAL_POLL + if(usb_task_state == UHS_USB_HOST_STATE_RUNNING) { + noInterrupts(); + for(uint8_t x = 0; x < UHS_HOST_MAX_INTERFACE_DRIVERS; x++) + if(devConfig[x] && devConfig[x]->bPollEnable) + devConfig[x]->Poll(); + interrupts(); + } +#endif +} + +void UHS_NI MAX3421E_HOST::ISRTask(void) +#endif +{ + DDSB(); + +#if !defined(SWI_IRQ_NUM) + suspend_host(); +#if USB_HOST_SHIELD_USE_ISR + // Enable interrupts + interrupts(); +#endif +#endif + + counted = false; + if(!MARLIN_UHS_READ_IRQ()) { + uint8_t HIRQALL = regRd(rHIRQ); //determine interrupt source + uint8_t HIRQ = HIRQALL & IRQ_CHECK_MASK; + uint8_t HIRQ_sendback = 0x00; + + if((HIRQ & bmCONDETIRQ) || (HIRQ & bmBUSEVENTIRQ)) { + MAX_HOST_DEBUG + (PSTR("\r\nBEFORE CDIRQ %s BEIRQ %s resetting %s state 0x%2.2x\r\n"), + (HIRQ & bmCONDETIRQ) ? "T" : "F", + (HIRQ & bmBUSEVENTIRQ) ? "T" : "F", + doingreset ? "T" : "F", + usb_task_state + ); + } + // ALWAYS happens BEFORE or WITH CONDETIRQ + if(HIRQ & bmBUSEVENTIRQ) { + HIRQ_sendback |= bmBUSEVENTIRQ; + if(!doingreset) condet = true; + busprobe(); + busevent = false; + } + + if(HIRQ & bmCONDETIRQ) { + HIRQ_sendback |= bmCONDETIRQ; + if(!doingreset) condet = true; + busprobe(); + } + +#if 1 + if((HIRQ & bmCONDETIRQ) || (HIRQ & bmBUSEVENTIRQ)) { + MAX_HOST_DEBUG + (PSTR("\r\nAFTER CDIRQ %s BEIRQ %s resetting %s state 0x%2.2x\r\n"), + (HIRQ & bmCONDETIRQ) ? "T" : "F", + (HIRQ & bmBUSEVENTIRQ) ? "T" : "F", + doingreset ? "T" : "F", + usb_task_state + ); + } +#endif + + if(HIRQ & bmFRAMEIRQ) { + HIRQ_sendback |= bmFRAMEIRQ; + if(sof_countdown) { + sof_countdown--; + counted = true; + } + sofevent = false; + } + + //MAX_HOST_DEBUG(PSTR("\r\n%s%s%s\r\n"), + // sof_countdown ? "T" : "F", + // counted ? "T" : "F", + // usb_task_polling_disabled? "T" : "F"); + DDSB(); + regWr(rHIRQ, HIRQ_sendback); +#if !defined(SWI_IRQ_NUM) + resume_host(); +#if USB_HOST_SHIELD_USE_ISR + // Disable interrupts + noInterrupts(); +#endif +#endif + if(!sof_countdown && !counted && !usb_task_polling_disabled) { + DisablePoll(); + //usb_task_polling_disabled++; +#ifdef USB_HOST_SHIELD_TIMING_PIN + // My counter/timer can't work on an inverted gate signal + // so we gate using a high pulse -- AJK + UHS_PIN_WRITE(USB_HOST_SHIELD_TIMING_PIN, HIGH); +#endif + +#if defined(SWI_IRQ_NUM) + // MAX_HOST_DEBUG(PSTR("--------------- Doing SWI ----------------")); + exec_SWI(this); +#else +#if USB_HOST_SHIELD_USE_ISR + // Enable interrupts + interrupts(); +#endif /* USB_HOST_SHIELD_USE_ISR */ + ISRbottom(); +#endif /* SWI_IRQ_NUM */ + } + } +} + +#if 0 +DDSB(); +#endif +#else +#error "Never include USB_HOST_SHIELD_INLINE.h, include UHS_host.h instead" +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h new file mode 100644 index 000000000000..9b2b5a374688 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h @@ -0,0 +1,153 @@ +/* + * File: macro_logic.h + * Author: root + * + * Created on December 22, 2018, 4:49 AM + * + * To test: + * gcc -DAJK_TEST_MACRO_LOGIC -E macro_logic.h + * + */ + +#ifndef MACRO_LOGIC_H +#define MACRO_LOGIC_H + +#define AJK_CAT(a, ...) AJK_PRIMITIVE_CAT(a, __VA_ARGS__) +#define AJK_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ + +#define AJK_COMPL(b) AJK_PRIMITIVE_CAT(AJK_COMPL_, b) +#define AJK_COMPL_0 1 +#define AJK_COMPL_1 0 + +#define AJK_BITAND(x) AJK_PRIMITIVE_CAT(AJK_BITAND_, x) +#define AJK_BITAND_0(y) 0 +#define AJK_BITAND_1(y) y + +#define AJK_INC(x) AJK_PRIMITIVE_CAT(AJK_INC_, x) +#define AJK_INC_0 1 +#define AJK_INC_1 2 +#define AJK_INC_2 3 +#define AJK_INC_3 4 +#define AJK_INC_4 5 +#define AJK_INC_5 6 +#define AJK_INC_6 7 +#define AJK_INC_7 8 +#define AJK_INC_8 9 +#define AJK_INC_9 10 +#define AJK_INC_10 10 + +#define AJK_DEC(x) AJK_PRIMITIVE_CAT(AJK_DEC_, x) +#define AJK_DEC_0 0 +#define AJK_DEC_1 0 +#define AJK_DEC_2 1 +#define AJK_DEC_3 2 +#define AJK_DEC_4 3 +#define AJK_DEC_5 4 +#define AJK_DEC_6 5 +#define AJK_DEC_7 6 +#define AJK_DEC_8 7 +#define AJK_DEC_9 8 +#define AJK_DEC_10 9 + +#define AJK_CHECK_N(x, n, ...) n +#define AJK_CHECK(...) AJK_CHECK_N(__VA_ARGS__, 0,) +#define AJK_PROBE(x) x, 1, + +#define AJK_IS_PAREN(x) AJK_CHECK(AJK_IS_PAREN_PROBE x) +#define AJK_IS_PAREN_PROBE(...) AJK_PROBE(~) + +#define AJK_NOT(x) AJK_CHECK(AJK_PRIMITIVE_CAT(AJK_NOT_, x)) +#define AJK_NOT_0 AJK_PROBE(~) + +#define AJK_COMPL(b) AJK_PRIMITIVE_CAT(AJK_COMPL_, b) +#define AJK_COMPL_0 1 +#define AJK_COMPL_1 0 + +#define AJK_BOOL(x) AJK_COMPL(AJK_NOT(x)) + +#define AJK_IIF(c) AJK_PRIMITIVE_CAT(AJK_IIF_, c) +#define AJK_IIF_0(t, ...) __VA_ARGS__ +#define AJK_IIF_1(t, ...) t + +#define AJK_IF(c) AJK_IIF(AJK_BOOL(c)) + +#define AJK_EAT(...) +#define AJK_EXPAND(...) __VA_ARGS__ +#define AJK_WHEN(c) AJK_IF(c)(AJK_EXPAND, AJK_EAT) + +#define AJK_EMPTY() +#define AJK_DEFER(id) id AJK_EMPTY() +#define AJK_OBSTRUCT(id) id AJK_DEFER(AJK_EMPTY)() + +#define AJK_EVAL(...) AJK_EVAL1(AJK_EVAL1(AJK_EVAL1(__VA_ARGS__))) +#define AJK_EVAL1(...) AJK_EVAL2(AJK_EVAL2(AJK_EVAL2(__VA_ARGS__))) +#define AJK_EVAL2(...) AJK_EVAL3(AJK_EVAL3(AJK_EVAL3(__VA_ARGS__))) +#define AJK_EVAL3(...) AJK_EVAL4(AJK_EVAL4(AJK_EVAL4(__VA_ARGS__))) +#define AJK_EVAL4(...) AJK_EVAL5(AJK_EVAL5(AJK_EVAL5(__VA_ARGS__))) +#define AJK_EVAL5(...) __VA_ARGS__ + +#define AJK_REPEAT(AJK_count, AJK_macro, ...) \ + AJK_WHEN(AJK_count) \ + ( \ + AJK_OBSTRUCT(AJK_REPEAT_INDIRECT) () \ + ( \ + AJK_DEC(AJK_count), AJK_macro, __VA_ARGS__ \ + ) \ + AJK_OBSTRUCT(AJK_macro) \ + ( \ + AJK_DEC(AJK_count), __VA_ARGS__ \ + ) \ + ) +#define AJK_REPEAT_INDIRECT() AJK_REPEAT + +#define AJK_WHILE(AJK_pred, AJK_op, ...) \ + IF(AJK_pred(__VA_ARGS__)) \ + ( \ + AJK_OBSTRUCT(AJK_WHILE_INDIRECT) () \ + ( \ + AJK_pred, AJK_op, AJK_op(__VA_ARGS__) \ + ), \ + __VA_ARGS__ \ + ) +#define AJK_WHILE_INDIRECT() AJK_WHILE + +#define AJK_PRIMITIVE_COMPARE(x, y) AJK_IS_PAREN \ +( \ + AJK_COMPARE_ ## x ( AJK_COMPARE_ ## y) (()) \ +) + +#define AJK_IS_COMPARABLE(x) AJK_IS_PAREN( AJK_CAT(AJK_COMPARE_, x) (()) ) + +#define AJK_NOT_EQUAL(x, y) \ +AJK_IIF(AJK_BITAND(AJK_IS_COMPARABLE(x))(AJK_IS_COMPARABLE(y)) ) \ +( \ + AJK_PRIMITIVE_COMPARE, \ + 1 AJK_EAT \ +)(x, y) + +#define AJK_EQUAL(x, y) AJK_COMPL(AJK_NOT_EQUAL(x, y)) + + +#define AJK_COMMA() , + +#define AJK_COMMA_IF(n) AJK_IF(n)(AJK_COMMA, AJK_EAT)() + + +#define AJK_COMMA_VAR(AJK_count, AJK_v) AJK_COMMA_IF(AJK_count) AJK_v ## AJK_count + +#define AJK_MAKE_LIST(AJK_v, AJK_count) AJK_EVAL(AJK_REPEAT(AJK_count, AJK_COMMA_VAR, AJK_v)) + +#define AJK_FUN(AJK_count, AJK_v, AJK_args, AJK_body) AJK_v ## AJK_count (AJK_args) { AJK_body(AJK_count) } +#define AJK_MAKE_FUNS(AJK_v, AJK_args, AJK_count, AJK_body) AJK_EVAL(AJK_REPEAT(AJK_count, AJK_FUN, AJK_v, AJK_args, AJK_body)) +#if defined(AJK_TEST_MACRO_LOGIC) + +#define BODY(AJKindex) some(C, statement); contaning(a, test[AJKindex]); +#define ZERO_TIMES_TEST 0 +#define THREE_TIMES_TEST 3 +blank > AJK_MAKE_LIST(VARIABLE_, ZERO_TIMES_TEST) < because zero repeats +Make 3 comma separated indexed variables : AJK_MAKE_LIST(VARIABLE_, THREE_TIMES_TEST) +Make 3 bogus function bodies +AJK_MAKE_FUNS(unsigned Cfunc,(arg1, arg2),3,BODY) +#endif + +#endif /* MACRO_LOGIC_H */ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h new file mode 100644 index 000000000000..5516fbf126e1 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/SWI_INLINE.h @@ -0,0 +1,246 @@ +/* + * File: SWI_INLINE.h + * Author: xxxajk@gmail.com + * + * Created on December 5, 2014, 9:40 AM + * + * This is the actual library. + * There are no 'c' or 'cpp' files. + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifdef DYN_SWI_H +#ifndef SWI_INLINE_H +#define SWI_INLINE_H + +#ifndef SWI_MAXIMUM_ALLOWED +#define SWI_MAXIMUM_ALLOWED 4 +#endif + + + +#if defined(__arm__) || defined(ARDUINO_ARCH_PIC32) +static char dyn_SWI_initied = 0; +static dyn_SWI* dyn_SWI_LIST[SWI_MAXIMUM_ALLOWED]; +static dyn_SWI* dyn_SWI_EXEC[SWI_MAXIMUM_ALLOWED]; +#if defined(__arm__) +#if defined(__USE_CMSIS_VECTORS__) +extern "C" { + void (*_VectorsRam[VECTORTABLE_SIZE])(void)__attribute__((aligned(VECTORTABLE_ALIGNMENT))); +} +#else + +__attribute__((always_inline)) static inline void __DSB(void) { + __asm__ volatile ("dsb"); +} +#endif // defined(__USE_CMSIS_VECTORS__) +#else // defined(__arm__) +__attribute__((always_inline)) static inline void __DSB(void) { + __asm__ volatile ("sync" : : : "memory"); +} +#endif // defined(__arm__) + +/** + * Execute queued class ISR routines. + */ +#if defined(ARDUINO_ARCH_PIC32) +static p32_regset *ifs = ((p32_regset *) & IFS0) + (SWI_IRQ_NUM / 32); //interrupt flag register set +static p32_regset *iec = ((p32_regset *) & IEC0) + (SWI_IRQ_NUM / 32); //interrupt enable control reg set +static uint32_t swibit = 1 << (SWI_IRQ_NUM % 32); + +void +#if defined(__PIC32MZXX__) + __attribute__((nomips16,at_vector(SWI_VECTOR),interrupt(SWI_IPL))) +#else + __attribute__((interrupt(),nomips16)) +#endif + softISR(void) { +#else +#if defined(ARDUINO_spresense_ast) +unsigned int softISR(void) { +#else +void softISR(void) { +#endif +#endif + + // + // TO-DO: Perhaps limit to 8, and inline this? + // + + + // Make a working copy, while clearing the queue. + noInterrupts(); +#if defined(ARDUINO_ARCH_PIC32) + //ifs->clr = swibit; +#endif + for(int i = 0; i < SWI_MAXIMUM_ALLOWED; i++) { + dyn_SWI_EXEC[i] = dyn_SWI_LIST[i]; + dyn_SWI_LIST[i] = NULL; + } + __DSB(); + interrupts(); + + // Execute each class SWI + for(int i = 0; i < SWI_MAXIMUM_ALLOWED; i++) { + if(dyn_SWI_EXEC[i]) { +#if defined(__DYN_SWI_DEBUG_LED__) + digitalWrite(__DYN_SWI_DEBUG_LED__, HIGH); +#endif + dyn_SWI_EXEC[i]->dyn_SWISR(); +#if defined(__DYN_SWI_DEBUG_LED__) + digitalWrite(__DYN_SWI_DEBUG_LED__, LOW); +#endif + } + } +#if defined(ARDUINO_ARCH_PIC32) + noInterrupts(); + if(!dyn_SWI_EXEC[0]) ifs->clr = swibit; + interrupts(); +#endif +#if defined(ARDUINO_spresense_ast) + return 0; +#endif +} + +#define DDSB() __DSB() +#endif + + +#if defined(__arm__) +#ifndef interruptsStatus +#define interruptsStatus() __interruptsStatus() +static inline unsigned char __interruptsStatus(void) __attribute__((always_inline, unused)); + +static inline unsigned char __interruptsStatus(void) { + unsigned int primask; + asm volatile ("mrs %0, primask" : "=r" (primask)); + if(primask) return 0; + return 1; +} +#endif + +/** + * Initialize the Dynamic (class) Software Interrupt + */ +static void Init_dyn_SWI(void) { + if(!dyn_SWI_initied) { +#if defined(__USE_CMSIS_VECTORS__) + uint32_t *X_Vectors = (uint32_t*)SCB->VTOR; + for(int i = 0; i < VECTORTABLE_SIZE; i++) { + _VectorsRam[i] = reinterpret_cast(X_Vectors[i]); /* copy vector table to RAM */ + } + /* relocate vector table */ + noInterrupts(); + SCB->VTOR = reinterpret_cast(&_VectorsRam); + DDSB(); + interrupts(); +#endif +#if !defined(ARDUINO_spresense_ast) + for(int i = 0; i < SWI_MAXIMUM_ALLOWED; i++) dyn_SWI_LIST[i] = NULL; + noInterrupts(); + _VectorsRam[SWI_IRQ_NUM + 16] = reinterpret_cast(softISR); + DDSB(); + interrupts(); + NVIC_SET_PRIORITY(SWI_IRQ_NUM, 255); + NVIC_ENABLE_IRQ(SWI_IRQ_NUM); +#endif +#if defined(__DYN_SWI_DEBUG_LED__) + pinMode(__DYN_SWI_DEBUG_LED__, OUTPUT); + digitalWrite(__DYN_SWI_DEBUG_LED__, LOW); +#endif + dyn_SWI_initied = 1; + } +} + +/** + * + * @param klass class that extends dyn_SWI + * @return 0 on queue full, else returns queue position (ones based) + */ +int exec_SWI(const dyn_SWI* klass) { + int rc = 0; + + uint8_t irestore = interruptsStatus(); + // Allow use from inside a critical section... + // ... and prevent races if also used inside an ISR + noInterrupts(); + for(int i = 0; i < SWI_MAXIMUM_ALLOWED; i++) { + if(!dyn_SWI_LIST[i]) { + rc = 1 + i; // Success! + dyn_SWI_LIST[i] = (dyn_SWI*)klass; +#if !defined(ARDUINO_spresense_ast) + if(!NVIC_GET_PENDING(SWI_IRQ_NUM)) NVIC_SET_PENDING(SWI_IRQ_NUM); +#else + // Launch 1-shot timer as an emulated SWI + // Hopefully the value of Zero is legal. + // 1 microsecond latency would suck! + attachTimerInterrupt(softISR, 100); +#endif + DDSB(); + break; + } + } + // Restore interrupts, if they were on. + if(irestore) interrupts(); + return rc; +} +#elif defined(ARDUINO_ARCH_PIC32) + +/** + * Initialize the Dynamic (class) Software Interrupt + */ +static void Init_dyn_SWI(void) { + if(!dyn_SWI_initied) { + uint32_t sreg = disableInterrupts(); + + setIntVector(SWI_VECTOR, softISR); + setIntPriority(SWI_VECTOR, 1, 1); // Lowest priority, ever. + ifs->clr = swibit; + iec->clr = swibit; + iec->set = swibit; + restoreInterrupts(sreg); +#if defined(__DYN_SWI_DEBUG_LED__) + pinMode(__DYN_SWI_DEBUG_LED__, OUTPUT); + UHS_PIN_WRITE(__DYN_SWI_DEBUG_LED__, LOW); +#endif + } +} + +/** + * + * @param klass class that extends dyn_SWI + * @return 0 on queue full, else returns queue position (ones based) + */ +int exec_SWI(const dyn_SWI* klass) { + int rc = 0; + uint32_t sreg = disableInterrupts(); + for(int i = 0; i < SWI_MAXIMUM_ALLOWED; i++) { + if(!dyn_SWI_LIST[i]) { + rc = 1 + i; // Success! + dyn_SWI_LIST[i] = (dyn_SWI*)klass; + if(!(ifs->reg & swibit)) ifs->set = swibit; + ; + break; + } + } + restoreInterrupts(sreg); + return rc; +} + +#endif /* defined(__arm__) */ +#endif /* SWI_INLINE_H */ +#else +#error "Never include SWI_INLINE.h directly, include dyn_SWI.h instead" +#endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h new file mode 100644 index 000000000000..93118a6d7554 --- /dev/null +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/dyn_SWI/dyn_SWI.h @@ -0,0 +1,172 @@ +/* + * File: dyn_SWI.h + * Author: xxxajk@gmail.com + * + * Created on December 5, 2014, 9:12 AM + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DYN_SWI_H +#define DYN_SWI_H + + +#if defined(__arm__) || defined(ARDUINO_ARCH_PIC32) +#if defined(ARDUINO_ARCH_PIC32) +#include +#endif +#ifdef __cplusplus + +#if defined(true) +#undef true +#endif + +#if defined(false) +#undef false +#endif + +#endif + +#if defined(ARDUINO_spresense_ast) +#define SWI_IRQ_NUM 666 // because this board is totally evil. +#elif defined(ARDUINO_ARCH_PIC32) +#ifndef SWI_IRQ_NUM +#if defined(_DSPI0_IPL_ISR) +#define SWI_IPL _DSPI0_IPL_ISR +#define SWI_VECTOR _DSPI0_ERR_IRQ +#define SWI_IRQ_NUM _DSPI0_ERR_IRQ +#elif defined(_PMP_ERROR_IRQ) +#define SWI_IRQ_NUM _PMP_ERROR_IRQ +#define SWI_VECTOR _PMP_VECTOR +#else +#error SWI_IRQ_NUM and SWI_VECTOR need a definition +#endif +#ifdef __cplusplus +extern "C" +{ + void +#if defined(__PIC32MZXX__) + __attribute__((nomips16,at_vector(SWI_VECTOR),interrupt(SWI_IPL))) +#else + __attribute__((interrupt(),nomips16)) +#endif + softISR(void); +} +#endif +#endif +#elif !defined(NVIC_NUM_INTERRUPTS) +// Assume CMSIS +#define __USE_CMSIS_VECTORS__ +#if defined(NUMBER_OF_INT_VECTORS) +#define NVIC_NUM_INTERRUPTS (NUMBER_OF_INT_VECTORS-16) +#else +#define NVIC_NUM_INTERRUPTS ((int)PERIPH_COUNT_IRQn) +#endif +#define VECTORTABLE_SIZE (NVIC_NUM_INTERRUPTS+16) +#define VECTORTABLE_ALIGNMENT (0x100ul) +#define NVIC_GET_ACTIVE(n) NVIC_GetActive((IRQn_Type)n) +#define NVIC_GET_PENDING(n) NVIC_GetPendingIRQ((IRQn_Type)n) +#define NVIC_SET_PENDING(n) NVIC_SetPendingIRQ((IRQn_Type)n) +#define NVIC_ENABLE_IRQ(n) NVIC_EnableIRQ((IRQn_Type)n) +#define NVIC_SET_PRIORITY(n ,p) NVIC_SetPriority((IRQn_Type)n, (uint32_t) p) +//extern "C" { +// extern uint32_t _VectorsRam[VECTORTABLE_SIZE] __attribute__((aligned(VECTORTABLE_ALIGNMENT))); +//} + +#ifndef SWI_IRQ_NUM +#if defined(__SAM3X8E__) && defined(_VARIANT_ARDUINO_DUE_X_) +// DUE +// Choices available: +// HSMCI_IRQn Multimedia Card Interface (HSMCI) +// EMAC_IRQn Ethernet MAC (EMAC) +// EMAC is not broken out on the official DUE, but is on clones. +// SPI0_IRQn Serial Peripheral Interface (SPI0) +// SPI0_IRQn seems to be the best choice, as long as nobody uses an ISR based master +#define SWI_IRQ_NUM SPI0_IRQn +#elif defined(ARDUINO_SAMD_ZERO) +// Just use sercom4's unused IRQ vector. +#define SWI_IRQ_NUM I2S_IRQn +//#define SWI_IRQ_NUM SERCOM4_IRQn +#endif +#endif + +#ifndef SWI_IRQ_NUM +#error SWI_IRQ_NUM not defined (CMSIS) +#endif + +#elif defined(CORE_TEENSY) + +#ifndef NVIC_GET_ACTIVE +#define NVIC_GET_ACTIVE(n) (*((volatile uint32_t *)0xE000E300 + ((n) >> 5)) & (1 << ((n) & 31))) +#endif +#ifndef NVIC_GET_PENDING +#define NVIC_GET_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) & (1 << ((n) & 31))) +#ifndef SWI_IRQ_NUM +#if defined(__MK20DX256__) +#define SWI_IRQ_NUM 17 +#elif defined(__MK20DX128__) +#define SWI_IRQ_NUM 5 +#elif defined(__MKL26Z64__) +#define SWI_IRQ_NUM 4 +#elif defined(__MK66FX1M0__) +#define SWI_IRQ_NUM 30 +#elif defined(__MK64FX512__) +#define SWI_IRQ_NUM 30 +#elif defined(__IMXRT1052__) || defined(__IMXRT1062__) +#define SWI_IRQ_NUM 71 +#else +#error Do not know how to relocate IRQ vectors for this pjrc product +#endif +#endif +#endif +#else // Not CMSIS or PJRC CORE_TEENSY or PIC32 or SPRESENSE +#error Do not know how to relocate IRQ vectors or perform SWI +#endif // SWI_IRQ_NUM + + +#ifndef SWI_IRQ_NUM +#error SWI_IRQ_NUM not defined +#else +/** + * Use this class to extend your class, in order to provide + * a C++ context callable SWI. + */ +class dyn_SWI { +public: + + /** + * Override this method with your code. + */ + virtual void dyn_SWISR(void) { + }; +}; + +extern int exec_SWI(const dyn_SWI* klass); + +#include "SWI_INLINE.h" + +// IMPORTANT! Define this so that you do NOT end up with a NULL stub! +#define SWI_NO_STUB +#endif /* SWI_IRQ_NUM */ +#endif /* __arm__ */ + +// if no SWI for CPU (e.g. AVR) make a void stub. +#ifndef SWI_NO_STUB +#define Init_dyn_SWI() (void(0)) +#if !defined(DDSB) +#define DDSB() (void(0)) +#endif +#endif +#endif /* DYN_SWI_H */ diff --git a/Marlin/src/sd/usb_flashdrive/usb-2.0-host-library-changes.patch b/Marlin/src/sd/usb_flashdrive/usb-2.0-host-library-changes.patch deleted file mode 100644 index c057aaba04d7..000000000000 --- a/Marlin/src/sd/usb_flashdrive/usb-2.0-host-library-changes.patch +++ /dev/null @@ -1,187 +0,0 @@ -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/masstorage.cpp lib/masstorage.cpp ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/masstorage.cpp 2018-09-21 10:19:36.107502252 -0600 -+++ lib/masstorage.cpp 2018-09-21 09:46:19.620175519 -0600 -@@ -24,6 +24,8 @@ - - #include "masstorage.h" - -+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) -+ - const uint8_t BulkOnly::epDataInIndex = 1; - const uint8_t BulkOnly::epDataOutIndex = 2; - const uint8_t BulkOnly::epInterruptInIndex = 3; -@@ -796,6 +798,9 @@ - buf[i] = 0x00; - } - WriteOk[lun] = true; -+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(SKIP_WRITE_PROTECT) -+ return 0; -+ #endif - uint8_t rc = ModeSense6(lun, 0, 0x3f, 0, 192, buf); - if(!rc) { - WriteOk[lun] = ((buf[2] & 0x80) == 0); -@@ -1271,3 +1276,5 @@ - return MASS_ERR_NOT_IMPLEMENTED; - #endif - } -+ -+#endif // USB_FLASH_DRIVE_SUPPORT -\ No newline at end of file -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/message.cpp lib/message.cpp ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/message.cpp 2018-09-21 10:20:15.995647957 -0600 -+++ lib/message.cpp 2018-09-19 07:43:46.520339375 -0600 -@@ -23,6 +23,9 @@ - */ - - #include "Usb.h" -+ -+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) -+ - // 0x80 is the default (i.e. trace) to turn off set this global to something lower. - // this allows for 126 other debugging levels. - // TO-DO: Allow assignment to a different serial port by software -@@ -120,4 +123,6 @@ - D_PrintHex (rcode, 0x80); - Notify(PSTR("\r\n"), 0x80); - } --#endif -+#endif // DEBUG_USB_HOST -+ -+#endif // USB_FLASH_DRIVE_SUPPORT -\ No newline at end of file -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/parsetools.cpp lib/parsetools.cpp ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/parsetools.cpp 2018-09-21 10:21:16.215867769 -0600 -+++ lib/parsetools.cpp 2018-09-19 07:43:46.520339375 -0600 -@@ -23,6 +23,8 @@ - */ - #include "Usb.h" - -+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) -+ - bool MultiByteValueParser::Parse(uint8_t **pp, uint16_t *pcntdn) { - if(!pBuf) { - Notify(PSTR("Buffer pointer is NULL!\r\n"), 0x80); -@@ -72,3 +74,5 @@ - } - return true; - } -+ -+#endif // USB_FLASH_DRIVE_SUPPORT -\ No newline at end of file -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/settings.h lib/settings.h ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/settings.h 2018-09-21 10:22:21.792106872 -0600 -+++ lib/settings.h 2018-09-21 10:01:53.383594081 -0600 -@@ -25,7 +25,21 @@ - #ifndef USB_HOST_SHIELD_SETTINGS_H - #define USB_HOST_SHIELD_SETTINGS_H - #include "macros.h" -- -+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) -+ //////////////////////////////////////////////////////////////////////////////// -+ /* Added by Bill Greiman to speed up mass storage initialization with USB -+ * flash drives and simple USB hard drives. -+ * Disable this by defining DELAY(x) to be delay(x). -+ */ -+ #define delay(x) if((x) < 200) safe_delay(x) -+ /* Almost all USB flash drives and simple USB hard drives fail the write -+ * protect test and add 20 - 30 seconds to USB init. Set SKIP_WRITE_PROTECT -+ * to nonzero to skip the test and assume the drive is writable. -+ */ -+ #define SKIP_WRITE_PROTECT 1 -+ /* Since Marlin only cares about USB flash drives, we only need one LUN. */ -+ #define MASS_MAX_SUPPORTED_LUN 1 -+#endif - //////////////////////////////////////////////////////////////////////////////// - // SPI Configuration - //////////////////////////////////////////////////////////////////////////////// -@@ -45,6 +59,10 @@ - * multiple serial ports are available. - * For example Serial3. - */ -+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) -+ #define USB_HOST_SERIAL MYSERIAL0 -+#endif -+ - #ifndef USB_HOST_SERIAL - #define USB_HOST_SERIAL Serial - #endif -@@ -99,7 +117,7 @@ - // No user serviceable parts below this line. - // DO NOT change anything below here unless you are a developer! - --#include "version_helper.h" -+//#include "version_helper.h" - - #if defined(__GNUC__) && defined(__AVR__) - #ifndef GCC_VERSION -@@ -149,7 +167,6 @@ - #else - #define USING_SPI4TEENSY3 0 - #endif -- - #if ((defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)) || defined(__ARDUINO_X86__) || ARDUINO >= 10600) && !USING_SPI4TEENSY3 - #include // Use the Arduino SPI library for the Arduino Due, Intel Galileo 1 & 2, Intel Edison or if the SPI library with transaction is available - #endif -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/UsbCore.h lib/UsbCore.h ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/UsbCore.h 2018-09-21 10:23:09.348280107 -0600 -+++ lib/UsbCore.h 2018-09-19 07:43:46.520339375 -0600 -@@ -32,7 +32,10 @@ - //#define USB_METHODS_INLINE - - /* shield pins. First parameter - SS pin, second parameter - INT pin */ --#ifdef BOARD_BLACK_WIDDOW -+ -+#if defined(__MARLIN_H__) -+typedef MAX3421e MAX3421E; // Marlin redefines this class in "../usb_host.h" -+#elif defined(BOARD_BLACK_WIDDOW) - typedef MAX3421e MAX3421E; // Black Widow - #elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) - #if EXT_RAM -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/Usb.cpp lib/Usb.cpp ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/Usb.cpp 2018-09-21 10:23:20.732321559 -0600 -+++ lib/Usb.cpp 2018-09-19 07:43:46.520339375 -0600 -@@ -25,6 +25,8 @@ - - #include "Usb.h" - -+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) -+ - static uint8_t usb_error = 0; - static uint8_t usb_task_state; - -@@ -825,3 +827,4 @@ - } - - #endif // defined(USB_METHODS_INLINE) -+#endif // USB_FLASH_DRIVE_SUPPORT -diff -Naur /home/aleph/Downloads/USB_Host_Shield_2.0-master/Usb.h lib/Usb.h ---- /home/aleph/Downloads/USB_Host_Shield_2.0-master/Usb.h 2018-09-21 10:23:33.756368972 -0600 -+++ lib/Usb.h 2018-09-19 07:43:46.520339375 -0600 -@@ -25,6 +25,8 @@ - #ifndef _usb_h_ - #define _usb_h_ - -+#include "../../../Marlin.h" -+ - // WARNING: Do not change the order of includes, or stuff will break! - #include - #include -@@ -34,13 +36,15 @@ - #include "settings.h" - #include "printhex.h" - #include "message.h" -+ - #include "hexdump.h" --#include "sink_parser.h" -+//#include "sink_parser.h" - #include "max3421e.h" - #include "address.h" --#include "avrpins.h" -+//#include "avrpins.h" - #include "usb_ch9.h" --#include "usbhost.h" -+//#include "usbhost.h" -+#include "../usb_host.h" - #include "UsbCore.h" - #include "parsetools.h" - #include "confdescparser.h" diff --git a/buildroot/share/PlatformIO/boards/BigTree_Btt002.json b/buildroot/share/PlatformIO/boards/BigTree_Btt002.json new file mode 100644 index 000000000000..95de3a6bcb9a --- /dev/null +++ b/buildroot/share/PlatformIO/boards/BigTree_Btt002.json @@ -0,0 +1,65 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F407xx", + "f_cpu": "168000000L", + "hwids": [ + [ + "0x1EAF", + "0x0003" + ], + [ + "0x0483", + "0x3748" + ] + ], + "ldscript": "stm32f407xg.ld", + "mcu": "stm32f407vet6", + "variant": "BIGTREE_GENERIC_STM32F407_5X" + }, + "debug": { + "jlink_device": "STM32F407VE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F40x.svd", + "tools": { + "stlink": { + "server": { + "arguments": [ + "-f", + "scripts/interface/stlink.cfg", + "-c", + "transport select hla_swd", + "-f", + "scripts/target/stm32f4x.cfg", + "-c", + "reset_config none" + ], + "executable": "bin/openocd", + "package": "tool-openocd" + } + } + } + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32F407VE (64k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 65536, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink" + ], + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "http://www.st.com/en/microcontrollers/stm32f407zg.html", + "vendor": "Generic" +} diff --git a/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py b/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py index 055f95cc705e..e2716a76be15 100644 --- a/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py +++ b/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py @@ -7,7 +7,7 @@ env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/alfawise_Ux0.ld") -# Encrypt ${PROGNAME}.bin and save it as 'project.bin' +# Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D) def encrypt(source, target, env): import os @@ -23,4 +23,5 @@ def encrypt(source, target, env): finally: firmware.close() marlin_alfa.close() -env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); + +env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); diff --git a/buildroot/share/PlatformIO/scripts/common-cxxflags.py b/buildroot/share/PlatformIO/scripts/common-cxxflags.py new file mode 100644 index 000000000000..3e75434ee78c --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/common-cxxflags.py @@ -0,0 +1,12 @@ +# +# common-cxxflags.py +# Convenience script to apply customizations to CPP flags +# +Import("env") +env.Append(CXXFLAGS=[ + "-Wno-register" + #"-Wno-incompatible-pointer-types", + #"-Wno-unused-const-variable", + #"-Wno-maybe-uninitialized", + #"-Wno-sign-compare" +]) diff --git a/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py b/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py index 3f45185ac85e..845e582f77c1 100644 --- a/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py +++ b/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py @@ -1,8 +1,7 @@ from os.path import join +from os.path import expandvars Import("env", "projenv") -platform = env.PioPlatform() - # Relocate firmware from 0x08000000 to 0x08002000 #env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) #env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) @@ -10,14 +9,11 @@ # Custom HEX from ELF env.AddPostAction( - "$BUILD_DIR/${PROGNAME}.elf", + join("$BUILD_DIR","${PROGNAME}.elf"), env.VerboseAction(" ".join([ - "$OBJCOPY", - "-O", - "ihex", - '"$BUILD_DIR/${PROGNAME}.elf"', - '"$BUILD_DIR/${PROGNAME}.hex"' - ]), "Building $TARGET")) + "$OBJCOPY", "-O ihex", "$TARGET", # TARGET=.pio/build/fysetc_STM32F1/firmware.elf + "\"" + join("$BUILD_DIR","${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path + ]), "Building $TARGET")) # please keep $SOURCE variable, it will be replaced with a path to firmware @@ -28,12 +24,16 @@ #) # In-line command with arguments +UPLOAD_TOOL="stm32flash" +platform = env.PioPlatform() +if platform.get_package_dir("tool-stm32duino") != None: + UPLOAD_TOOL=expandvars("\"" + join(platform.get_package_dir("tool-stm32duino"),"stm32flash","stm32flash") + "\"") + env.Replace( - UPLOADER=platform.get_package_dir("tool-stm32duino") + '/stm32flash/stm32flash', - UPLOADCMD='"${UPLOADER}" -v -i rts,-dtr,dtr,-rts -R -b 115200 -g 0x8000000 -w "${BUILD_DIR}/${PROGNAME}.hex" ${UPLOAD_PORT}' + UPLOADER=UPLOAD_TOOL, + UPLOADCMD=expandvars(UPLOAD_TOOL + " -v -i rts,-dtr,dtr $UPLOAD_PORT -R -w \"" + join("$BUILD_DIR","${PROGNAME}.hex")+"\"") ) - # Python callback #def on_upload(source, target, env): # print source, target diff --git a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py index 25c1d96929ed..89e7b3bc1cde 100644 --- a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py @@ -39,5 +39,5 @@ def addboot(source,target,env): os.rename(target[0].path, firmware_without_bootloader_dir) #os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') -env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', addboot); +env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py index fec6c0ea9b2a..742f4cd17379 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); +env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py index 4d28d3ff0c70..c11bbb37f674 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); +env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py index 5247eaf171aa..2b3ba6f90d45 100755 --- a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); +env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py index feb9b2e4e3b1..eb8bca9b5234 100755 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); +env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.cpp b/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.cpp index d21f5d7dd7be..167fea510fc6 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.cpp +++ b/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.cpp @@ -44,98 +44,100 @@ const PinName digitalPin[] = { PC_15, //D2 - OSC32_OUT PH_0, //D3 - OSC_IN PH_1, //D4 - OSC_OUT - PC_0, //D5 - 1: 2:ADC123_IN10 - PC_1, //D6 - 1: 2:ADC123_IN11 - PC_2, //D7 - 1:SPI2_MISO 2:ADC123_IN12 - PC_3, //D8 - 1:SPI2_MOSI 2:ADC123_IN13 - PA_0, //D9 - 1:UART4_TX / TIM5_CH1 2:ADC123_IN0 - PA_1, //D10 - 1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 - PA_2, //D11 - 1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 - PA_3, //D12 - 1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 - PA_4, //D13 - NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 - PA_5, //D14 - NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 - PA_6, //D15 - 1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 - PA_7, //D16 - 1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 - PC_4, //D17 - 1: 2:ADC12_IN14 - PC_5, //D18 - 1: 2:ADC12_IN15 - PB_0, //D19 - 1:TIM3_CH3 2:ADC12_IN8 - PB_1, //D20 - 1:TIM3_CH4 2:ADC12_IN9 - PB_2, //D21 - BOOT1 - PB_10, //D22 - 1:SPI2_SCK / I2C2_SCL / USART3_TX / TIM2_CH3 - PB_11, //D23 - 1:I2C2_SDA / USART3_RX / TIM2_CH4 - PB_12, //D24 - 1:SPI2_NSS / OTG_HS_ID - PB_13, //D25 - 1:SPI2_SCK 2:OTG_HS_VBUS - PB_14, //D26 - 1:SPI2_MISO / TIM12_CH1 / OTG_HS_DM - PB_15, //D27 - SPI2_MOSI / TIM12_CH2 / OTG_HS_DP - PC_6, //D28 - 1:TIM8_CH1 / SDIO_D6 / USART6_TX / TIM3_CH1 - PC_7, //D29 - 1:TIM8_CH2 / SDIO_D7 / USART6_RX / TIM3_CH2 - PC_8, //D30 - 1:TIM8_CH3 / SDIO_D0 / TIM3_CH3 - PC_9, //D31 - 1:TIM8_CH4 / SDIO_D1 / TIM3_CH4 - PA_8, //D32 - 1:TIM1_CH1 / I2C3_SCL / OTG_FS_SOF - PA_9, //D33 - 1:USART1_TX / TIM1_CH2 2:OTG_FS_VBUS - PA_10, //34 - 1:USART1_RX / TIM1_CH3 / OTG_FS_ID - PA_11, //D35 - 1:TIM1_CH4 / OTG_FS_DM - PA_12, //D36 - 1:OTG_FS_DP - PA_13, //D37 - 0:JTMS-SWDIO - PA_14, //D38 - 0:JTCK-SWCLK - PA_15, //D39 - 0:JTDI 1:SPI3_NSS / SPI1_NSS - PC_10, //D40 - 1:UART4_TX / SPI3_SCK / SDIO_D2 / USART3_TX - PC_11, //D41 - 1:UART4_RX / SPI3_MISO / SDIO_D3 / USART3_RX - PC_12, //D42 - 1:UART5_TX / SPI3_MOSI / SDIO_CK - PD_2, //D43 - 1:UART5_RX / SDIO_CMD - PB_3, //D44 - 0:JTDO 1:SPI3_SCK / TIM2_CH2 / SPI1_SCK - PB_4, //D45 - 0:NJTRST 1:SPI3_MISO / TIM3_CH1 / SPI1_MISO - PB_5, //D45 - 1:TIM3_CH2 / SPI1_MOSI / SPI3_MOSI - PB_6, //D47 - 1:I2C1_SCL / TIM4_CH1 / USART1_TX - PB_7, //D48 - 1:I2C1_SDA / TIM4_CH2 / USART1_RX - PB_8, //D49 - 1:I2C1_SCL / TIM4_CH3 / SDIO_D4 / TIM10_CH1 - PB_9, //D50 - 1:I2C1_SDA / TIM4_CH4 / SDIO_D5 / TIM11_CH1 / SPI2_NSS + PB_2, //D5 - BOOT1 + PB_10, //D6 - 1:SPI2_SCK / I2C2_SCL / USART3_TX / TIM2_CH3 + PB_11, //D7 - 1:I2C2_SDA / USART3_RX / TIM2_CH4 + PB_12, //D8 - 1:SPI2_NSS / OTG_HS_ID + PB_13, //D9 - 1:SPI2_SCK 2:OTG_HS_VBUS + PB_14, //D10 - 1:SPI2_MISO / TIM12_CH1 / OTG_HS_DM + PB_15, //D11 - SPI2_MOSI / TIM12_CH2 / OTG_HS_DP + PC_6, //D12 - 1:TIM8_CH1 / SDIO_D6 / USART6_TX / TIM3_CH1 + PC_7, //D13 - 1:TIM8_CH2 / SDIO_D7 / USART6_RX / TIM3_CH2 + PC_8, //D14 - 1:TIM8_CH3 / SDIO_D0 / TIM3_CH3 + PC_9, //D15 - 1:TIM8_CH4 / SDIO_D1 / TIM3_CH4 + PA_8, //D16 - 1:TIM1_CH1 / I2C3_SCL / OTG_FS_SOF + PA_9, //D17 - 1:USART1_TX / TIM1_CH2 2:OTG_FS_VBUS + PA_10, //D18 - 1:USART1_RX / TIM1_CH3 / OTG_FS_ID + PA_11, //D19 - 1:TIM1_CH4 / OTG_FS_DM + PA_12, //D20 - 1:OTG_FS_DP + PA_13, //D21 - 0:JTMS-SWDIO + PA_14, //D22 - 0:JTCK-SWCLK + PA_15, //D23 - 0:JTDI 1:SPI3_NSS / SPI1_NSS + PC_10, //D24 - 1:UART4_TX / SPI3_SCK / SDIO_D2 / USART3_TX + PC_11, //D25 - 1:UART4_RX / SPI3_MISO / SDIO_D3 / USART3_RX + PC_12, //D26 - 1:UART5_TX / SPI3_MOSI / SDIO_CK + PD_2, //D27 - 1:UART5_RX / SDIO_CMD + PB_3, //D28 - 0:JTDO 1:SPI3_SCK / TIM2_CH2 / SPI1_SCK + PB_4, //D29 - 0:NJTRST 1:SPI3_MISO / TIM3_CH1 / SPI1_MISO + PB_5, //D30 - 1:TIM3_CH2 / SPI1_MOSI / SPI3_MOSI + PB_6, //D31 - 1:I2C1_SCL / TIM4_CH1 / USART1_TX + PB_7, //D32 - 1:I2C1_SDA / TIM4_CH2 / USART1_RX + PB_8, //D33 - 1:I2C1_SCL / TIM4_CH3 / SDIO_D4 / TIM10_CH1 + PB_9, //D34 - 1:I2C1_SDA / TIM4_CH4 / SDIO_D5 / TIM11_CH1 / SPI2_NSS + PA_0, //D35/A0 - 1:UART4_TX / TIM5_CH1 2:ADC123_IN0 + PA_1, //D36/A1 - 1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 + PA_2, //D37/A2 - 1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 + PA_3, //D38/A3 - 1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 + PA_4, //D39/A4 - NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 + PA_5, //D40/A5 - NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 + PA_6, //D41/A6 - 1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 + PA_7, //D42/A7 - 1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 + PB_0, //D43/A8 - 1:TIM3_CH3 2:ADC12_IN8 + PB_1, //D44/A9 - 1:TIM3_CH4 2:ADC12_IN9 + PC_0, //D45/A10 - 1: 2:ADC123_IN10 + PC_1, //D46/A11 - 1: 2:ADC123_IN11 + PC_2, //D47/A12 - 1:SPI2_MISO 2:ADC123_IN12 + PC_3, //D48/A13 - 1:SPI2_MOSI 2:ADC123_IN13 + PC_4, //D49/A14 - 1: 2:ADC12_IN14 + PC_5, //D50/A15 - 1: 2:ADC12_IN15 + #if STM32F4X_PIN_NUM >= 144 + PF_3, //D51/A16 - 1:FSMC_A3 2:ADC3_IN9 + PF_4, //D52/A17 - 1:FSMC_A4 2:ADC3_IN14 + PF_5, //D53/A18 - 1:FSMC_A5 2:ADC3_IN15 + PF_6, //D54/A19 - 1:TIM10_CH1 2:ADC3_IN4 + PF_7, //D55/A20 - 1:TIM11_CH1 2:ADC3_IN5 + PF_8, //D56/A21 - 1:TIM13_CH1 2:ADC3_IN6 + PF_9, //D57/A22 - 1;TIM14_CH1 2:ADC3_IN7 + PF_10, //D58/A23 - 2:ADC3_IN8 + #endif #endif #if STM32F4X_PIN_NUM >= 100 //100 pins mcu, 82 gpio - PE_2, //D51 - 1:FSMC_A23 - PE_3, //D52 - 1:FSMC_A19 - PE_4, //D53 - 1:FSMC_A20 - PE_5, //D54 - 1:FSMC_A21 - PE_6, //D55 - 1:FSMC_A22 - PE_7, //D56 - 1:FSMC_D4 - PE_8, //D57 - 1:FSMC_D5 - PE_9, //D58 - 1:FSMC_D6 / TIM1_CH1 - PE_10, //D59 - 1:FSMC_D7 - PE_11, //D60 - 1:FSMC_D8 / TIM1_CH2 - PE_12, //D61 - 1:FSMC_D9 - PE_13, //D62 - 1:FSMC_D10 / TIM1_CH3 - PE_14, //D63 - 1:FSMC_D11 / TIM1_CH4 - PE_15, //D64 - 1:FSMC_D12 - PD_8, //D65 - 1:FSMC_D13 / USART3_TX - PD_9, //D66 - 1:FSMC_D14 / USART3_RX - PD_10, //D67 - 1:FSMC_D15 - PD_11, //D68 - 1:FSMC_A16 - PD_12, //D69 - 1:FSMC_A17 / TIM4_CH1 - PD_13, //D70 - 1:FSMC_A18 / TIM4_CH2 - PD_14, //D71 - 1:FSMC_D0 / TIM4_CH3 - PD_15, //D72 - 1:FSMC_D1 / TIM4_CH4 - PD_0, //D73 - 1:FSMC_D2 - PD_1, //D74 - 1:FSMC_D3 - PD_3, //D75 - 1:FSMC_CLK - PD_4, //D76 - 1:FSMC_NOE - PD_5, //D77 - 1:USART2_TX - PD_6, //D78 - 1:USART2_RX - PD_7, //D79 - PE_0, //D80 - PE_1, //D81 + PE_2, //D59 - 1:FSMC_A23 + PE_3, //D60 - 1:FSMC_A19 + PE_4, //D61 - 1:FSMC_A20 + PE_5, //D62 - 1:FSMC_A21 + PE_6, //D63 - 1:FSMC_A22 + PE_7, //D64 - 1:FSMC_D4 + PE_8, //D65 - 1:FSMC_D5 + PE_9, //D66 - 1:FSMC_D6 / TIM1_CH1 + PE_10, //D67 - 1:FSMC_D7 + PE_11, //D68 - 1:FSMC_D8 / TIM1_CH2 + PE_12, //D69 - 1:FSMC_D9 + PE_13, //D70 - 1:FSMC_D10 / TIM1_CH3 + PE_14, //D71 - 1:FSMC_D11 / TIM1_CH4 + PE_15, //D72 - 1:FSMC_D12 + PD_8, //D73 - 1:FSMC_D13 / USART3_TX + PD_9, //D74 - 1:FSMC_D14 / USART3_RX + PD_10, //D75 - 1:FSMC_D15 + PD_11, //D76 - 1:FSMC_A16 + PD_12, //D77 - 1:FSMC_A17 / TIM4_CH1 + PD_13, //D78 - 1:FSMC_A18 / TIM4_CH2 + PD_14, //D79 - 1:FSMC_D0 / TIM4_CH3 + PD_15, //D80 - 1:FSMC_D1 / TIM4_CH4 + PD_0, //D81 - 1:FSMC_D2 + PD_1, //D82 - 1:FSMC_D3 + PD_3, //D83 - 1:FSMC_CLK + PD_4, //D84 - 1:FSMC_NOE + PD_5, //D85 - 1:USART2_TX + PD_6, //D86 - 1:USART2_RX + PD_7, //D87 + PE_0, //D88 + PE_1, //D89 #endif #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio - PF_0, //D82 - 1:FSMC_A0 / I2C2_SDA - PF_1, //D83 - 1:FSMC_A1 / I2C2_SCL - PF_2, //D84 - 1:FSMC_A2 - PF_3, //D85 - 1:FSMC_A3 2:ADC3_IN9 - PF_4, //D86 - 1:FSMC_A4 2:ADC3_IN14 - PF_5, //D87 - 1:FSMC_A5 2:ADC3_IN15 - PF_6, //D88 - 1:TIM10_CH1 2:ADC3_IN4 - PF_7, //D89 - 1:TIM11_CH1 2:ADC3_IN5 - PF_8, //D90 - 1:TIM13_CH1 2:ADC3_IN6 - PF_9, //D91 - 1;TIM14_CH1 2:ADC3_IN7 - PF_10, //D92 - 2:ADC3_IN8 + PF_0, //D90 - 1:FSMC_A0 / I2C2_SDA + PF_1, //D91 - 1:FSMC_A1 / I2C2_SCL + PF_2, //D92 - 1:FSMC_A2 PF_11, //D93 PF_12, //D94 - 1:FSMC_A6 PF_13, //D95 - 1:FSMC_A7 @@ -186,34 +188,6 @@ const PinName digitalPin[] = { PI_6, //D138 - 1:TIM8_CH2 PI_7, //D139 - 1:TIM8_CH3 #endif -#if STM32F4X_PIN_NUM >= 64 //64 pins mcu, 51 gpio, 16 ADC - PA_0, //D140/A0 = D9 - 1:UART4_TX / TIM5_CH1 2:ADC123_IN0 - PA_1, //D141/A1 = D10 - 1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 - PA_2, //D142/A2 = D11 - 1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 - PA_3, //D143/A3 = D12 - 1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 - PA_4, //D144/A4 = D13 - NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 - PA_5, //D145/A5 = D14 - NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 - PA_6, //D146/A6 = D15 - 1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 - PA_7, //D147/A7 = D16 - 1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 - PB_0, //D148/A8 = D19 - 1:TIM3_CH3 2:ADC12_IN8 - PB_1, //D149/A9 = D20 - 1:TIM3_CH4 2:ADC12_IN9 - PC_0, //D150/A10 = D5 - 1: 2:ADC123_IN10 - PC_1, //D151/A11 = D6 - 1: 2:ADC123_IN11 - PC_2, //D152/A12 = D7 - 1:SPI2_MISO 2:ADC123_IN12 - PC_3, //D153/A13 = D8 - 1:SPI2_MOSI 2:ADC123_IN13 - PC_4, //D154/A14 = D17 - 1: 2:ADC12_IN14 - PC_5, //D155/A15 = D18 - 1: 2:ADC12_IN15 -#endif -#if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio, 24 ADC - PF_3, //D156/A16 = D85 - 1:FSMC_A3 2:ADC3_IN9 - PF_4, //D157/A17 = D86 - 1:FSMC_A4 2:ADC3_IN14 - PF_5, //D158/A18 = D87 - 1:FSMC_A5 2:ADC3_IN15 - PF_6, //D159/A19 = D88 - 1:TIM10_CH1 2:ADC3_IN4 - PF_7, //D160/A20 = D89 - 1:TIM11_CH1 2:ADC3_IN5 - PF_8, //D161/A21 = D90 - 1:TIM13_CH1 2:ADC3_IN6 - PF_9, //D162/A22 = D91 - 1;TIM14_CH1 2:ADC3_IN7 - PF_10, //D163/A23 = D92 - 2:ADC3_IN8 -#endif }; #ifdef __cplusplus diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.h b/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.h index ae95d7d1a3a4..4cc9ae2b85fe 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.h +++ b/buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.h @@ -47,15 +47,15 @@ extern const PinName digitalPin[]; #define STM32F4X_PIN_NUM 64 //64 pins mcu, 51 gpio #define STM32F4X_GPIO_NUM 51 #define STM32F4X_ADC_NUM 16 -#elif defined STM32F407_5VX +#elif defined(STM32F407_5VX) #define STM32F4X_PIN_NUM 100 //100 pins mcu, 82 gpio #define STM32F4X_GPIO_NUM 82 #define STM32F4X_ADC_NUM 16 -#elif defined STM32F407_5ZX +#elif defined(STM32F407_5ZX) #define STM32F4X_PIN_NUM 144 //144 pins mcu, 114 gpio #define STM32F4X_GPIO_NUM 114 #define STM32F4X_ADC_NUM 24 -#elif defined STM32F407IX +#elif defined(STM32F407IX) #define STM32F4X_PIN_NUM 176 //176 pins mcu, 140 gpio #define STM32F4X_GPIO_NUM 140 #define STM32F4X_ADC_NUM 24 @@ -65,159 +65,161 @@ extern const PinName digitalPin[]; #if STM32F4X_PIN_NUM >= 64 //64 pins mcu, 51 gpio #define PC13 0 - #define PC14 1 //OSC32_IN - #define PC15 2 //OSC32_OUT - #define PH0 3 //OSC_IN - #define PH1 4 //OSC_OUT - #define PC0 5 //1: 2:ADC123_IN10 - #define PC1 6 //1: 2:ADC123_IN11 - #define PC2 7 //1:SPI2_MISO 2:ADC123_IN12 - #define PC3 8 //1:SPI2_MOSI 2:ADC123_IN13 - #define PA0 9 //1:UART4_TX / TIM5_CH1 2:ADC123_IN0 - #define PA1 10 //1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 - #define PA2 11 //1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 - #define PA3 12 //1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 - #define PA4 13 //NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 - #define PA5 14 //NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 - #define PA6 15 //1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 - #define PA7 16 //1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 - #define PC4 17 //1: 2:ADC12_IN14 - #define PC5 18 //1: 2:ADC12_IN15 - #define PB0 19 //1:TIM3_CH3 2:ADC12_IN8 - #define PB1 20 //1:TIM3_CH4 2:ADC12_IN9 - #define PB2 21 //BOOT1 - #define PB10 22 //1:SPI2_SCK / I2C2_SCL / USART3_TX / TIM2_CH3 - #define PB11 23 //1:I2C2_SDA / USART3_RX / TIM2_CH4 - #define PB12 24 //1:SPI2_NSS / OTG_HS_ID - #define PB13 25 //1:SPI2_SCK 2:OTG_HS_VBUS - #define PB14 26 //1:SPI2_MISO / TIM12_CH1 / OTG_HS_DM - #define PB15 27 //SPI2_MOSI / TIM12_CH2 / OTG_HS_DP - #define PC6 28 //1:TIM8_CH1 / SDIO_D6 / USART6_TX / TIM3_CH1 - #define PC7 29 //1:TIM8_CH2 / SDIO_D7 / USART6_RX / TIM3_CH2 - #define PC8 30 //1:TIM8_CH3 / SDIO_D0 / TIM3_CH3 - #define PC9 31 //1:TIM8_CH4 / SDIO_D1 / TIM3_CH4 - #define PA8 32 //1:TIM1_CH1 / I2C3_SCL / OTG_FS_SOF - #define PA9 33 //1:USART1_TX / TIM1_CH2 2:OTG_FS_VBUS - #define PA10 34 //1:USART1_RX / TIM1_CH3 / OTG_FS_ID - #define PA11 35 //1:TIM1_CH4 / OTG_FS_DM - #define PA12 36 //1:OTG_FS_DP - #define PA13 37 //0:JTMS-SWDIO - #define PA14 38 //0:JTCK-SWCLK - #define PA15 39 //0:JTDI 1:SPI3_NSS / SPI1_NSS - #define PC10 40 //1:UART4_TX / SPI3_SCK / SDIO_D2 / USART3_TX - #define PC11 41 //1:UART4_RX / SPI3_MISO / SDIO_D3 / USART3_RX - #define PC12 42 //1:UART5_TX / SPI3_MOSI / SDIO_CK - #define PD2 43 //1:UART5_RX / SDIO_CMD - #define PB3 44 //0:JTDO 1:SPI3_SCK / TIM2_CH2 / SPI1_SCK - #define PB4 45 //0:NJTRST 1:SPI3_MISO / TIM3_CH1 / SPI1_MISO - #define PB5 45 //1:TIM3_CH2 / SPI1_MOSI / SPI3_MOSI - #define PB6 47 //1:I2C1_SCL / TIM4_CH1 / USART1_TX - #define PB7 48 //1:I2C1_SDA / TIM4_CH2 / USART1_RX - #define PB8 49 //1:I2C1_SCL / TIM4_CH3 / SDIO_D4 / TIM10_CH1 - #define PB9 50 //1:I2C1_SDA / TIM4_CH4 / SDIO_D5 / TIM11_CH1 / SPI2_NSS + #define PC14 1 //OSC32_IN + #define PC15 2 //OSC32_OUT + #define PH0 3 //OSC_IN + #define PH1 4 //OSC_OUT + #define PB2 5 //BOOT1 + #define PB10 6 //1:SPI2_SCK / I2C2_SCL / USART3_TX / TIM2_CH3 + #define PB11 7 //1:I2C2_SDA / USART3_RX / TIM2_CH4 + #define PB12 8 //1:SPI2_NSS / OTG_HS_ID + #define PB13 9 //1:SPI2_SCK 2:OTG_HS_VBUS + #define PB14 10 //1:SPI2_MISO / TIM12_CH1 / OTG_HS_DM + #define PB15 11 //SPI2_MOSI / TIM12_CH2 / OTG_HS_DP + #define PC6 12 //1:TIM8_CH1 / SDIO_D6 / USART6_TX / TIM3_CH1 + #define PC7 13 //1:TIM8_CH2 / SDIO_D7 / USART6_RX / TIM3_CH2 + #define PC8 14 //1:TIM8_CH3 / SDIO_D0 / TIM3_CH3 + #define PC9 15 //1:TIM8_CH4 / SDIO_D1 / TIM3_CH4 + #define PA8 16 //1:TIM1_CH1 / I2C3_SCL / OTG_FS_SOF + #define PA9 17 //1:USART1_TX / TIM1_CH2 2:OTG_FS_VBUS + #define PA10 18 //1:USART1_RX / TIM1_CH3 / OTG_FS_ID + #define PA11 19 //1:TIM1_CH4 / OTG_FS_DM + #define PA12 20 //1:OTG_FS_DP + #define PA13 21 //0:JTMS-SWDIO + #define PA14 22 //0:JTCK-SWCLK + #define PA15 23 //0:JTDI 1:SPI3_NSS / SPI1_NSS + #define PC10 24 //1:UART4_TX / SPI3_SCK / SDIO_D2 / USART3_TX + #define PC11 25 //1:UART4_RX / SPI3_MISO / SDIO_D3 / USART3_RX + #define PC12 26 //1:UART5_TX / SPI3_MOSI / SDIO_CK + #define PD2 27 //1:UART5_RX / SDIO_CMD + #define PB3 28 //0:JTDO 1:SPI3_SCK / TIM2_CH2 / SPI1_SCK + #define PB4 29 //0:NJTRST 1:SPI3_MISO / TIM3_CH1 / SPI1_MISO + #define PB5 30 //1:TIM3_CH2 / SPI1_MOSI / SPI3_MOSI + #define PB6 31 //1:I2C1_SCL / TIM4_CH1 / USART1_TX + #define PB7 32 //1:I2C1_SDA / TIM4_CH2 / USART1_RX + #define PB8 33 //1:I2C1_SCL / TIM4_CH3 / SDIO_D4 / TIM10_CH1 + #define PB9 34 //1:I2C1_SDA / TIM4_CH4 / SDIO_D5 / TIM11_CH1 / SPI2_NSS + #define PA0 35 //1:UART4_TX / TIM5_CH1 2:ADC123_IN0 + #define PA1 36 //1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 + #define PA2 37 //1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 + #define PA3 38 //1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 + #define PA4 39 //NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 + #define PA5 40 //NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 + #define PA6 41 //1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 + #define PA7 42 //1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 + #define PB0 43 //1:TIM3_CH3 2:ADC12_IN8 + #define PB1 44 //1:TIM3_CH4 2:ADC12_IN9 + #define PC0 45 //1: 2:ADC123_IN10 + #define PC1 46 //1: 2:ADC123_IN11 + #define PC2 47 //1:SPI2_MISO 2:ADC123_IN12 + #define PC3 48 //1:SPI2_MOSI 2:ADC123_IN13 + #define PC4 49 //1: 2:ADC12_IN14 + #define PC5 50 //1: 2:ADC12_IN15 + #if STM32F4X_PIN_NUM >= 144 + #define PF3 51 //1:FSMC_A3 2:ADC3_IN9 + #define PF4 52 //1:FSMC_A4 2:ADC3_IN14 + #define PF5 53 //1:FSMC_A5 2:ADC3_IN15 + #define PF6 54 //1:TIM10_CH1 2:ADC3_IN4 + #define PF7 55 //1:TIM11_CH1 2:ADC3_IN5 + #define PF8 56 //1:TIM13_CH1 2:ADC3_IN6 + #define PF9 57 //1;TIM14_CH1 2:ADC3_IN7 + #define PF10 58 //2:ADC3_IN8 + #endif #endif #if STM32F4X_PIN_NUM >= 100 //100 pins mcu, 82 gpio - #define PE2 51 //1:FSMC_A23 - #define PE3 52 //1:FSMC_A19 - #define PE4 53 //1:FSMC_A20 - #define PE5 54 //1:FSMC_A21 - #define PE6 55 //1:FSMC_A22 - #define PE7 56 //1:FSMC_D4 - #define PE8 57 //1:FSMC_D5 - #define PE9 58 //1:FSMC_D6 / TIM1_CH1 - #define PE10 59 //1:FSMC_D7 - #define PE11 60 //1:FSMC_D8 / TIM1_CH2 - #define PE12 61 //1:FSMC_D9 - #define PE13 62 //1:FSMC_D10 / TIM1_CH3 - #define PE14 63 //1:FSMC_D11 / TIM1_CH4 - #define PE15 64 //1:FSMC_D12 - #define PD8 65 //1:FSMC_D13 / USART3_TX - #define PD9 66 //1:FSMC_D14 / USART3_RX - #define PD10 67 //1:FSMC_D15 - #define PD11 68 //1:FSMC_A16 - #define PD12 69 //1:FSMC_A17 / TIM4_CH1 - #define PD13 70 //1:FSMC_A18 / TIM4_CH2 - #define PD14 71 //1:FSMC_D0 / TIM4_CH3 - #define PD15 72 //1:FSMC_D1 / TIM4_CH4 - #define PD0 73 //1:FSMC_D2 - #define PD1 74 //1:FSMC_D3 - #define PD3 75 //1:FSMC_CLK - #define PD4 76 //1:FSMC_NOE - #define PD5 77 //1:USART2_TX - #define PD6 78 //1:USART2_RX - #define PD7 79 - #define PE0 80 - #define PE1 81 + #define PE2 (35+STM32F4X_ADC_NUM) //1:FSMC_A23 + #define PE3 (36+STM32F4X_ADC_NUM) //1:FSMC_A19 + #define PE4 (37+STM32F4X_ADC_NUM) //1:FSMC_A20 + #define PE5 (38+STM32F4X_ADC_NUM) //1:FSMC_A21 + #define PE6 (39+STM32F4X_ADC_NUM) //1:FSMC_A22 + #define PE7 (40+STM32F4X_ADC_NUM) //1:FSMC_D4 + #define PE8 (41+STM32F4X_ADC_NUM) //1:FSMC_D5 + #define PE9 (42+STM32F4X_ADC_NUM) //1:FSMC_D6 / TIM1_CH1 + #define PE10 (43+STM32F4X_ADC_NUM) //1:FSMC_D7 + #define PE11 (44+STM32F4X_ADC_NUM) //1:FSMC_D8 / TIM1_CH2 + #define PE12 (45+STM32F4X_ADC_NUM) //1:FSMC_D9 + #define PE13 (46+STM32F4X_ADC_NUM) //1:FSMC_D10 / TIM1_CH3 + #define PE14 (47+STM32F4X_ADC_NUM) //1:FSMC_D11 / TIM1_CH4 + #define PE15 (48+STM32F4X_ADC_NUM) //1:FSMC_D12 + #define PD8 (49+STM32F4X_ADC_NUM) //1:FSMC_D13 / USART3_TX + #define PD9 (50+STM32F4X_ADC_NUM) //1:FSMC_D14 / USART3_RX + #define PD10 (51+STM32F4X_ADC_NUM) //1:FSMC_D15 + #define PD11 (52+STM32F4X_ADC_NUM) //1:FSMC_A16 + #define PD12 (53+STM32F4X_ADC_NUM) //1:FSMC_A17 / TIM4_CH1 + #define PD13 (54+STM32F4X_ADC_NUM) //1:FSMC_A18 / TIM4_CH2 + #define PD14 (55+STM32F4X_ADC_NUM) //1:FSMC_D0 / TIM4_CH3 + #define PD15 (56+STM32F4X_ADC_NUM) //1:FSMC_D1 / TIM4_CH4 + #define PD0 (57+STM32F4X_ADC_NUM) //1:FSMC_D2 + #define PD1 (58+STM32F4X_ADC_NUM) //1:FSMC_D3 + #define PD3 (59+STM32F4X_ADC_NUM) //1:FSMC_CLK + #define PD4 (60+STM32F4X_ADC_NUM) //1:FSMC_NOE + #define PD5 (61+STM32F4X_ADC_NUM) //1:USART2_TX + #define PD6 (62+STM32F4X_ADC_NUM) //1:USART2_RX + #define PD7 (63+STM32F4X_ADC_NUM) + #define PE0 (64+STM32F4X_ADC_NUM) + #define PE1 (65+STM32F4X_ADC_NUM) #endif #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio - #define PF0 82 //1:FSMC_A0 / I2C2_SDA - #define PF1 83 //1:FSMC_A1 / I2C2_SCL - #define PF2 84 //1:FSMC_A2 - #define PF3 85 //1:FSMC_A3 2:ADC3_IN9 - #define PF4 86 //1:FSMC_A4 2:ADC3_IN14 - #define PF5 87 //1:FSMC_A5 2:ADC3_IN15 - #define PF6 88 //1:TIM10_CH1 2:ADC3_IN4 - #define PF7 89 //1:TIM11_CH1 2:ADC3_IN5 - #define PF8 90 //1:TIM13_CH1 2:ADC3_IN6 - #define PF9 91 //1;TIM14_CH1 2:ADC3_IN7 - #define PF10 92 //2:ADC3_IN8 - #define PF11 93 - #define PF12 94 //1:FSMC_A6 - #define PF13 95 //1:FSMC_A7 - #define PF14 96 //1:FSMC_A8 - #define PF15 97 //1:FSMC_A9 - #define PG0 98 //1:FSMC_A10 - #define PG1 99 //1:FSMC_A11 - #define PG2 100 //1:FSMC_A12 - #define PG3 101 //1:FSMC_A13 - #define PG4 102 //1:FSMC_A14 - #define PG5 103 //1:FSMC_A15 - #define PG6 104 - #define PG7 105 - #define PG8 106 - #define PG9 107 //1:USART6_RX - #define PG10 108 //1:FSMC_NE3 - #define PG11 109 - #define PG12 110 //1:FSMC_NE4 - #define PG13 111 //1:FSMC_A24 - #define PG14 112 //1:FSMC_A25 / USART6_TX - #define PG15 113 + #define PF0 (66+STM32F4X_ADC_NUM) //1:FSMC_A0 / I2C2_SDA + #define PF1 (67+STM32F4X_ADC_NUM) //1:FSMC_A1 / I2C2_SCL + #define PF2 (68+STM32F4X_ADC_NUM) //1:FSMC_A2 + #define PF11 (69+STM32F4X_ADC_NUM) + #define PF12 (70+STM32F4X_ADC_NUM) //1:FSMC_A6 + #define PF13 (71+STM32F4X_ADC_NUM) //1:FSMC_A7 + #define PF14 (72+STM32F4X_ADC_NUM) //1:FSMC_A8 + #define PF15 (73+STM32F4X_ADC_NUM) //1:FSMC_A9 + #define PG0 (74+STM32F4X_ADC_NUM) //1:FSMC_A10 + #define PG1 (75+STM32F4X_ADC_NUM) //1:FSMC_A11 + #define PG2 (76+STM32F4X_ADC_NUM) //1:FSMC_A12 + #define PG3 (77+STM32F4X_ADC_NUM) //1:FSMC_A13 + #define PG4 (78+STM32F4X_ADC_NUM) //1:FSMC_A14 + #define PG5 (79+STM32F4X_ADC_NUM) //1:FSMC_A15 + #define PG6 (80+STM32F4X_ADC_NUM) + #define PG7 (81+STM32F4X_ADC_NUM) + #define PG8 (82+STM32F4X_ADC_NUM) + #define PG9 (83+STM32F4X_ADC_NUM) //1:USART6_RX + #define PG10 (84+STM32F4X_ADC_NUM) //1:FSMC_NE3 + #define PG11 (85+STM32F4X_ADC_NUM) + #define PG12 (86+STM32F4X_ADC_NUM) //1:FSMC_NE4 + #define PG13 (87+STM32F4X_ADC_NUM) //1:FSMC_A24 + #define PG14 (88+STM32F4X_ADC_NUM) //1:FSMC_A25 / USART6_TX + #define PG15 (89+STM32F4X_ADC_NUM) #endif #if STM32F4X_PIN_NUM >= 176 //176 pins mcu, 140 gpio - #define PI8 114 - #define PI9 115 - #define PI10 116 - #define PI11 117 - #define PH2 118 - #define PH3 119 - #define PH4 120 //1:I2C2_SCL - #define PH5 121 //1:I2C2_SDA - #define PH6 122 //1:TIM12_CH1 - #define PH7 123 //1:I2C3_SCL - #define PH8 124 //1:I2C3_SDA - #define PH9 125 //1:TIM12_CH2 - #define PH10 126 //1:TIM5_CH1 - #define PH11 127 //1:TIM5_CH2 - #define PH12 128 //1:TIM5_CH3 - #define PH13 129 - #define PH14 130 - #define PH15 131 - #define PI0 132 //1:TIM5_CH4 / SPI2_NSS - #define PI1 133 //1:SPI2_SCK - #define PI2 134 //1:TIM8_CH4 /SPI2_MISO - #define PI3 135 //1:SPI2_MOS - #define PI4 136 - #define PI5 137 //1:TIM8_CH1 - #define PI6 138 //1:TIM8_CH2 - #define PI7 139 //1:TIM8_CH3 + #define PI8 (90+STM32F4X_ADC_NUM) + #define PI9 (91+STM32F4X_ADC_NUM) + #define PI10 (92+STM32F4X_ADC_NUM) + #define PI11 (93+STM32F4X_ADC_NUM) + #define PH2 (94+STM32F4X_ADC_NUM) + #define PH3 (95+STM32F4X_ADC_NUM) + #define PH4 (96+STM32F4X_ADC_NUM) //1:I2C2_SCL + #define PH5 (97+STM32F4X_ADC_NUM) //1:I2C2_SDA + #define PH6 (98+STM32F4X_ADC_NUM) //1:TIM12_CH1 + #define PH7 (99+STM32F4X_ADC_NUM) //1:I2C3_SCL + #define PH8 (100+STM32F4X_ADC_NUM) //1:I2C3_SDA + #define PH9 (101+STM32F4X_ADC_NUM) //1:TIM12_CH2 + #define PH10 (102+STM32F4X_ADC_NUM) //1:TIM5_CH1 + #define PH11 (103+STM32F4X_ADC_NUM) //1:TIM5_CH2 + #define PH12 (104+STM32F4X_ADC_NUM) //1:TIM5_CH3 + #define PH13 (105+STM32F4X_ADC_NUM) + #define PH14 (106+STM32F4X_ADC_NUM) + #define PH15 (107+STM32F4X_ADC_NUM) + #define PI0 (108+STM32F4X_ADC_NUM) //1:TIM5_CH4 / SPI2_NSS + #define PI1 (109+STM32F4X_ADC_NUM) //1:SPI2_SCK + #define PI2 (110+STM32F4X_ADC_NUM) //1:TIM8_CH4 /SPI2_MISO + #define PI3 (111+STM32F4X_ADC_NUM) //1:SPI2_MOS + #define PI4 (112+STM32F4X_ADC_NUM) + #define PI5 (113+STM32F4X_ADC_NUM) //1:TIM8_CH1 + #define PI6 (114+STM32F4X_ADC_NUM) //1:TIM8_CH2 + #define PI7 (115+STM32F4X_ADC_NUM) //1:TIM8_CH3 #endif // This must be a literal -#define NUM_DIGITAL_PINS (STM32F4X_GPIO_NUM + STM32F4X_ADC_NUM) +#define NUM_DIGITAL_PINS (STM32F4X_GPIO_NUM) // This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS #define NUM_ANALOG_INPUTS (STM32F4X_ADC_NUM) -#define NUM_ANALOG_FIRST (STM32F4X_GPIO_NUM) +#define NUM_ANALOG_FIRST 35 // Below ADC, DAC and PWM definitions already done in the core // Could be redefined here if needed diff --git a/buildroot/share/fonts/genallfont.sh b/buildroot/share/fonts/genallfont.sh index b88c9040ddea..5c01303a3892 100755 --- a/buildroot/share/fonts/genallfont.sh +++ b/buildroot/share/fonts/genallfont.sh @@ -62,7 +62,7 @@ OLDWD=`pwd` # # By default loop through all languages # -LANGS_DEFAULT="an bg ca cz da de el el-gr en es eu fi fr gl hr it jp-kana ko_KR nl pl pt pt-br ru sk tr uk zh_CN zh_TW test" +LANGS_DEFAULT="an bg ca cz da de el el-gr en es eu fi fr gl hr it jp-kana ko_KR nl pl pt pt-br ru sk tr uk vi zh_CN zh_TW test" # # Generate data for language list MARLIN_LANGS or all if not provided @@ -105,9 +105,6 @@ if [ 1 = 1 ]; then * Marlin 3D Printer Firmware * Copyright (c) 2019 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 diff --git a/buildroot/share/fonts/get-bdf2u8g.sh b/buildroot/share/fonts/get-bdf2u8g.sh index e7dca2bef456..5851bf93e3a4 100755 --- a/buildroot/share/fonts/get-bdf2u8g.sh +++ b/buildroot/share/fonts/get-bdf2u8g.sh @@ -12,6 +12,10 @@ HERE=$(pwd) +for CMD in curl unzip patch make; do + which $CMD >/dev/null || { echo "'$CMD' is required for this script." ; exit 1 ; } +done + [[ $HERE =~ 'buildroot/share/fonts'$ ]] || { echo "Change to buildroot/share/fonts to run $(basename $0)" ; exit 1; } # Download u8glib diff --git a/buildroot/share/fonts/marlin-6x12-3.bdf b/buildroot/share/fonts/marlin-6x12-3.bdf index 30f2a4fcdfb7..b55e1a9a903f 100644 --- a/buildroot/share/fonts/marlin-6x12-3.bdf +++ b/buildroot/share/fonts/marlin-6x12-3.bdf @@ -1,9 +1,10 @@ STARTFONT 2.1 -FONT -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1 +FONT -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-90-100-100-C-111-ISO10646-1 SIZE 12 75 75 -FONTBOUNDINGBOX 6 12 0 -2 +FONTBOUNDINGBOX 12 13 0 -2 +COMMENT "Generated by fontforge, http://fontforge.sourceforge.net" COMMENT "Marlin 6x12 Fixed, for menu display" -COMMENT "This font is base on the X Windows' 6x12 '-Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1', added Marlin symbols at position 1-9, added jp-kana data, the other missing char data were from wqy-bitmapsong-bdf-1.0.0-RC1; some chars were tweak for display on LCD screen, such as ',;c69' etc." +COMMENT "This font is based on the X Windows' 6x12 '-Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1'. Marlin symbols added at position 1-9. Added jp-kana data. Other missing char data from wqy-bitmapsong-bdf-1.0.0-RC1. Some chars tweaked for LCD display, such as ',;c69' etc." STARTPROPERTIES 23 FONTNAME_REGISTRY "" FOUNDRY "Marlin" @@ -13,9 +14,9 @@ SLANT "R" SETWIDTH_NAME "SemiCondensed" ADD_STYLE_NAME "" PIXEL_SIZE 12 -POINT_SIZE 120 -RESOLUTION_X 75 -RESOLUTION_Y 75 +POINT_SIZE 90 +RESOLUTION_X 100 +RESOLUTION_Y 100 SPACING "C" AVERAGE_WIDTH 60 CHARSET_REGISTRY "ISO10646" @@ -29,8 +30,7 @@ DEFAULT_CHAR 0 FONT_DESCENT 2 FONT_ASCENT 10 ENDPROPERTIES -CHARS 33727 - +CHARS 33809 STARTCHAR uni0001 ENCODING 1 SWIDTH 545 0 @@ -19348,7 +19348,6 @@ BITMAP 48 90 ENDCHAR - STARTCHAR U_1100 ENCODING 4352 SWIDTH 1000 0 @@ -19681,7 +19680,6 @@ BITMAP 5220 89C0 ENDCHAR - STARTCHAR uni1680 ENCODING 5760 SWIDTH 480 0 @@ -22359,6 +22357,1402 @@ BITMAP 40 80 ENDCHAR +STARTCHAR uni1EA0 +ENCODING 7840 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 -2 +BITMAP +20 +50 +88 +88 +F8 +88 +88 +00 +20 +ENDCHAR +STARTCHAR uni1EA1 +ENCODING 7841 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 7 0 -2 +BITMAP +70 +08 +78 +88 +78 +00 +20 +ENDCHAR +STARTCHAR uni1EA2 +ENCODING 7842 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +18 +08 +10 +20 +50 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EA3 +ENCODING 7843 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 0 +BITMAP +30 +10 +20 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EA4 +ENCODING 7844 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +04 +28 +50 +20 +50 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EA5 +ENCODING 7845 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +04 +08 +30 +48 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EA6 +ENCODING 7846 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +08 +24 +50 +20 +50 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EA7 +ENCODING 7847 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +10 +08 +30 +48 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EA8 +ENCODING 7848 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +0C +04 +28 +50 +20 +50 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EA9 +ENCODING 7849 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +0C +04 +08 +30 +48 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EAA +ENCODING 7850 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +28 +50 +20 +50 +00 +70 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EAB +ENCODING 7851 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +28 +50 +00 +30 +48 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EAC +ENCODING 7852 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 -1 +BITMAP +20 +50 +00 +70 +88 +88 +F8 +88 +88 +20 +ENDCHAR +STARTCHAR uni1EAD +ENCODING 7853 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 -2 +BITMAP +30 +48 +00 +70 +08 +78 +88 +78 +00 +20 +ENDCHAR +STARTCHAR uni1EAE +ENCODING 7854 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +10 +20 +88 +70 +00 +70 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EAF +ENCODING 7855 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +08 +10 +48 +30 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EB0 +ENCODING 7856 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +40 +20 +88 +70 +00 +70 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EB1 +ENCODING 7857 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +40 +20 +48 +30 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EB2 +ENCODING 7858 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +30 +10 +A8 +70 +00 +70 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EB3 +ENCODING 7859 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +18 +08 +10 +48 +30 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EB4 +ENCODING 7860 +SWIDTH 500 0 +DWIDTH 6 0 +BBX 5 11 0 0 +BITMAP +28 +50 +88 +70 +00 +70 +88 +88 +F8 +88 +88 +ENDCHAR +STARTCHAR uni1EB5 +ENCODING 7861 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +14 +28 +00 +48 +30 +00 +70 +08 +78 +88 +78 +ENDCHAR +STARTCHAR uni1EB6 +ENCODING 7862 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 -1 +BITMAP +88 +70 +00 +70 +88 +88 +F8 +88 +88 +20 +ENDCHAR +STARTCHAR uni1EB7 +ENCODING 7863 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 -2 +BITMAP +48 +30 +00 +70 +08 +78 +88 +78 +00 +20 +ENDCHAR +STARTCHAR uni1EB8 +ENCODING 7864 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 -2 +BITMAP +F8 +80 +80 +F0 +80 +80 +F8 +00 +20 +ENDCHAR +STARTCHAR uni1EB9 +ENCODING 7865 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 7 0 -2 +BITMAP +70 +88 +F0 +80 +78 +00 +20 +ENDCHAR +STARTCHAR uni1EBA +ENCODING 7866 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +30 +10 +20 +00 +F8 +80 +80 +F0 +80 +80 +F8 +ENDCHAR +STARTCHAR uni1EBB +ENCODING 7867 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 0 +BITMAP +30 +10 +20 +00 +70 +88 +F0 +80 +78 +ENDCHAR +STARTCHAR uni1EBC +ENCODING 7868 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +28 +50 +00 +F8 +80 +80 +F0 +80 +80 +F8 +ENDCHAR +STARTCHAR uni1EBD +ENCODING 7869 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 8 0 0 +BITMAP +28 +50 +00 +70 +88 +F0 +80 +78 +ENDCHAR +STARTCHAR uni1EBE +ENCODING 7870 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 7 11 0 0 +BITMAP +02 +24 +50 +00 +F8 +80 +80 +F0 +80 +80 +F8 +ENDCHAR +STARTCHAR uni1EBF +ENCODING 7871 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +04 +08 +20 +50 +00 +70 +88 +F0 +80 +78 +ENDCHAR +STARTCHAR uni1EC0 +ENCODING 7872 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +08 +24 +50 +00 +F8 +80 +80 +F0 +80 +80 +F8 +ENDCHAR +STARTCHAR uni1EC1 +ENCODING 7873 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +10 +08 +20 +50 +00 +70 +88 +F0 +80 +78 +ENDCHAR +STARTCHAR uni1EC2 +ENCODING 7874 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +0C +24 +58 +00 +F8 +80 +80 +F0 +80 +80 +F8 +ENDCHAR +STARTCHAR uni1EC3 +ENCODING 7875 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +18 +08 +10 +60 +90 +00 +60 +90 +F0 +80 +70 +ENDCHAR +STARTCHAR uni1EC4 +ENCODING 7876 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 7 11 0 0 +BITMAP +0A +14 +20 +50 +00 +F8 +80 +F0 +80 +80 +F8 +ENDCHAR +STARTCHAR uni1EC5 +ENCODING 7877 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +28 +50 +00 +20 +50 +00 +70 +88 +F0 +80 +78 +ENDCHAR +STARTCHAR uni1EC6 +ENCODING 7878 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 12 0 -2 +BITMAP +20 +50 +00 +F8 +80 +80 +F0 +80 +80 +F8 +00 +20 +ENDCHAR +STARTCHAR uni1EC7 +ENCODING 7879 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 -2 +BITMAP +20 +50 +00 +70 +88 +F0 +80 +78 +00 +20 +ENDCHAR +STARTCHAR uni1EC8 +ENCODING 7880 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +30 +10 +20 +00 +F8 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR uni1EC9 +ENCODING 7881 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 3 9 2 0 +BITMAP +60 +20 +40 +00 +C0 +40 +40 +40 +E0 +ENDCHAR +STARTCHAR uni1ECA +ENCODING 7882 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 -2 +BITMAP +F8 +20 +20 +20 +20 +20 +F8 +00 +20 +ENDCHAR +STARTCHAR uni1ECB +ENCODING 7883 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 3 9 2 -2 +BITMAP +40 +00 +C0 +40 +40 +40 +E0 +00 +40 +ENDCHAR +STARTCHAR uni1ECC +ENCODING 7884 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 -2 +BITMAP +70 +88 +88 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1ECD +ENCODING 7885 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 7 0 -2 +BITMAP +70 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1ECE +ENCODING 7886 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +30 +10 +20 +00 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ECF +ENCODING 7887 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 0 +BITMAP +30 +10 +20 +00 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED0 +ENCODING 7888 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 7 10 0 0 +BITMAP +22 +54 +00 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED1 +ENCODING 7889 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +04 +08 +20 +50 +00 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED2 +ENCODING 7890 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +08 +24 +50 +00 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED3 +ENCODING 7891 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +10 +08 +20 +50 +00 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED4 +ENCODING 7892 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +0C +24 +58 +00 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED5 +ENCODING 7893 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +18 +08 +30 +50 +00 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED6 +ENCODING 7894 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +28 +50 +20 +50 +00 +70 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED7 +ENCODING 7895 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +28 +50 +00 +20 +50 +00 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1ED8 +ENCODING 7896 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 12 0 -2 +BITMAP +20 +50 +00 +70 +88 +88 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1ED9 +ENCODING 7897 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 -2 +BITMAP +20 +50 +00 +70 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1EDA +ENCODING 7898 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +20 +40 +10 +08 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EDB +ENCODING 7899 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 0 +BITMAP +20 +40 +10 +08 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EDC +ENCODING 7900 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +80 +50 +08 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EDD +ENCODING 7901 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 0 +BITMAP +80 +40 +10 +08 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EDE +ENCODING 7902 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +60 +20 +50 +08 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EDF +ENCODING 7903 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +60 +20 +40 +10 +08 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EE0 +ENCODING 7904 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 0 +BITMAP +50 +A0 +10 +08 +70 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EE1 +ENCODING 7905 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 0 +BITMAP +50 +A0 +10 +08 +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EE2 +ENCODING 7906 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 11 0 -2 +BITMAP +10 +08 +70 +88 +88 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1EE3 +ENCODING 7907 +SWIDTH 0 0 +DWIDTH 0 0 +BBX 5 9 0 -2 +BITMAP +10 +08 +70 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1EE4 +ENCODING 7908 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 9 0 -2 +BITMAP +88 +88 +88 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1EE5 +ENCODING 7909 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 7 0 -2 +BITMAP +88 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1EE6 +ENCODING 7910 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +30 +10 +20 +88 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EE7 +ENCODING 7911 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 5 10 0 0 +BITMAP +30 +10 +20 +00 +00 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EE8 +ENCODING 7912 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +10 +2C +04 +88 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EE9 +ENCODING 7913 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 9 0 0 +BITMAP +10 +20 +0C +04 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EEA +ENCODING 7914 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +40 +2C +04 +88 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EEB +ENCODING 7915 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 9 0 0 +BITMAP +40 +20 +0C +04 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EEC +ENCODING 7916 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +30 +10 +2C +04 +88 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EED +ENCODING 7917 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 10 0 0 +BITMAP +30 +10 +20 +0C +04 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EEE +ENCODING 7918 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 0 +BITMAP +28 +50 +0C +04 +88 +88 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EEF +ENCODING 7919 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 9 0 0 +BITMAP +28 +50 +0C +04 +88 +88 +88 +88 +70 +ENDCHAR +STARTCHAR uni1EF0 +ENCODING 7920 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 11 0 -2 +BITMAP +0C +04 +88 +88 +88 +88 +88 +88 +70 +00 +20 +ENDCHAR +STARTCHAR uni1EF1 +ENCODING 7921 +SWIDTH 583 0 +DWIDTH 7 0 +BBX 6 9 0 -2 +BITMAP +0C +04 +88 +88 +88 +88 +70 +00 +20 +ENDCHAR STARTCHAR Ygrave ENCODING 7922 SWIDTH 480 0 @@ -64462,8 +65856,6 @@ B8 D4 D4 ENDCHAR - - STARTCHAR U_2E80 ENCODING 11904 SWIDTH 1000 0 @@ -71710,8 +73102,6 @@ BITMAP A0 40 ENDCHAR - - STARTCHAR u30A0 ENCODING 12448 SWIDTH 545 0 @@ -72936,8 +74326,6 @@ F8 08 08 ENDCHAR - - STARTCHAR U_3105 ENCODING 12549 SWIDTH 1000 0 @@ -584361,8 +585749,6 @@ FFE0 2140 C620 ENDCHAR - - STARTCHAR ff ENCODING 64256 SWIDTH 480 0 @@ -584497,8 +585883,6 @@ BITMAP 08 F0 ENDCHAR - - STARTCHAR U_FE30 ENCODING 65072 SWIDTH 0 0 @@ -586727,7 +588111,6 @@ E380 0800 1C00 ENDCHAR - STARTCHAR uniFFFD ENCODING 65533 SWIDTH 480 0 diff --git a/buildroot/share/git/mfinfo b/buildroot/share/git/mfinfo index 3249473b8947..aa4e96b803eb 100755 --- a/buildroot/share/git/mfinfo +++ b/buildroot/share/git/mfinfo @@ -32,7 +32,7 @@ while [[ $# -gt 0 ]]; do opt="$1" ; shift ; val="$1" IFS='=' read -a PARTS <<<"$opt" - [[ "${PARTS[1]}" != "" ]] && { HAS_EQUALS=1 ; opt="${PARTS[0]}" ; val="${PARTS[1]}" ; } + [[ "${PARTS[1]}" != "" ]] && { EQUALS=1 ; opt="${PARTS[0]}" ; val="${PARTS[1]}" ; } GOODVAL=1 if [[ "$val" =~ ^-{1,2}.* || ! "$opt" =~ ^-{1,2}.* ]]; then @@ -41,7 +41,7 @@ while [[ $# -gt 0 ]]; do fi case "$opt" in - -*|--*) MORE="$MORE$opt " ; [[ $HAS_EQUALS ]] && MORE="$MORE=$val" ;; + -*|--*) MORE="$MORE$opt " ; [[ $EQUALS == 1 ]] && MORE="$MORE=$val" ;; 1|2) INDEX=$opt ;; *) BRANCH="$opt" ;; esac @@ -55,6 +55,6 @@ esac [[ $BRANCH =~ ^[0-9]$ ]] && USAGE=1 -[[ $USAGE ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; } echo "$ORG $FORK $REPO $TARG $BRANCH $CURR $MORE" diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp index efc76fb3e938..7f950da59d16 100755 --- a/buildroot/share/git/mfqp +++ b/buildroot/share/git/mfqp @@ -24,7 +24,7 @@ done [[ ${INFO[4]} =~ [0-9] ]] && USAGE=1 -[[ $USAGE ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; } git add . git commit -m "patch" diff --git a/buildroot/share/git/mfrb b/buildroot/share/git/mfrb index a3b4ce267c02..e09dd87cdaab 100755 --- a/buildroot/share/git/mfrb +++ b/buildroot/share/git/mfrb @@ -21,7 +21,7 @@ while [ $IND -lt ${#INFO[@]} ]; do let IND+=1 done -[[ $USAGE ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; } # If the branch isn't currently the PR target if [[ $TARG != $CURR ]]; then diff --git a/buildroot/share/git/mftest b/buildroot/share/git/mftest index bb08c1976e40..c2b57086ff10 100755 --- a/buildroot/share/git/mftest +++ b/buildroot/share/git/mftest @@ -19,6 +19,7 @@ TESTENV=${1:-'-'} # Allow shorthand for test name case $TESTENV in + tree) platformio run --project-dir . -e include_tree ; exit 1 ;; due) TESTENV='DUE' ;; esp) TESTENV='esp32' ;; lin*) TESTENV='linux_native' ;; @@ -26,6 +27,9 @@ case $TESTENV in lpc9) TESTENV='LPC1769' ;; mega) TESTENV='megaatmega2560' ;; stm) TESTENV='STM32F1' ;; + f1) TESTENV='STM32F1' ;; + f4) TESTENV='STM32F4' ;; + f7) TESTENV='STM32F7' ;; teensy) TESTENV='teensy31' ;; t31) TESTENV='teensy31' ;; t32) TESTENV='teensy31' ;; diff --git a/buildroot/share/tests/ARMED-tests b/buildroot/share/tests/ARMED-tests new file mode 100644 index 000000000000..44af749a4827 --- /dev/null +++ b/buildroot/share/tests/ARMED-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 ARMED +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +use_example_configs ArmEd +exec_test $1 $2 "ArmEd Example Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/BIGTREE_SKR_MINI-tests b/buildroot/share/tests/BIGTREE_SKR_MINI-tests new file mode 100644 index 000000000000..11479feb0dd2 --- /dev/null +++ b/buildroot/share/tests/BIGTREE_SKR_MINI-tests @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 Bigtreetech (SKR Mini v1.1) +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_V1_1 +opt_set SERIAL_PORT 1 +opt_set SERIAL_PORT_2 -1 +exec_test $1 $2 "Bigtreetech SKR Mini v1.1 - Basic Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/BIGTREE_SKR_PRO-tests b/buildroot/share/tests/BIGTREE_SKR_PRO-tests new file mode 100644 index 000000000000..d0a99679e6e7 --- /dev/null +++ b/buildroot/share/tests/BIGTREE_SKR_PRO-tests @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F4 BigTree_SKR_Pro +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BIGTREE_SKR_PRO_V1_1 +opt_set SERIAL_PORT 1 +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/LPC1768-tests b/buildroot/share/tests/LPC1768-tests index 26dcf8f70eb1..0ba62ab6a31f 100755 --- a/buildroot/share/tests/LPC1768-tests +++ b/buildroot/share/tests/LPC1768-tests @@ -6,9 +6,12 @@ # exit on first failure set -e +# +# Build with the default configurations +# restore_configs opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB -exec_test $1 $2 "Build Re-ARM Default Configuration" +exec_test $1 $2 "Default Configuration" restore_configs opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB diff --git a/buildroot/share/tests/LPC1769-tests b/buildroot/share/tests/LPC1769-tests index 831df54f4054..5d3631aae12c 100755 --- a/buildroot/share/tests/LPC1769-tests +++ b/buildroot/share/tests/LPC1769-tests @@ -6,9 +6,11 @@ # exit on first failure set -e -restore_configs +# +# Build with the default configurations +# use_example_configs Azteeg/X5GT -exec_test $1 $2 "Azteeg X5GT Example Config" +exec_test $1 $2 "Azteeg X5GT Example Configuration" restore_configs opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD diff --git a/buildroot/share/tests/STM32F1-tests b/buildroot/share/tests/STM32F1-tests index 30cb4e4fce43..d7420a667e17 100755 --- a/buildroot/share/tests/STM32F1-tests +++ b/buildroot/share/tests/STM32F1-tests @@ -6,6 +6,9 @@ # exit on first failure set -e +# +# Build with the default configurations +# restore_configs opt_set MOTHERBOARD BOARD_STM32F1R opt_set EXTRUDERS 2 diff --git a/buildroot/share/tests/STM32F4-tests b/buildroot/share/tests/STM32F4-tests new file mode 100644 index 000000000000..b5beb7366377 --- /dev/null +++ b/buildroot/share/tests/STM32F4-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F4 disco_f407vg +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +use_example_configs STM32/STM32F4 +exec_test $1 $2 "STM32F4 Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/STM32F7-tests b/buildroot/share/tests/STM32F7-tests new file mode 100644 index 000000000000..281222f15634 --- /dev/null +++ b/buildroot/share/tests/STM32F7-tests @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F7 +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_REMRAM_V1 +opt_set SERIAL_PORT 1 +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/adafruit_grandcentral_m4-tests b/buildroot/share/tests/adafruit_grandcentral_m4-tests index 453cefc6ce29..fb8220f7dce7 100644 --- a/buildroot/share/tests/adafruit_grandcentral_m4-tests +++ b/buildroot/share/tests/adafruit_grandcentral_m4-tests @@ -6,6 +6,9 @@ # exit on first failure set -e +# +# Build with the default configurations +# restore_configs opt_set MOTHERBOARD BOARD_AGCM4_RURAMPS4D_13 exec_test $1 $2 "Build Grand Central M4 Default Configuration" diff --git a/buildroot/share/tests/at90usb1286_cdc-tests b/buildroot/share/tests/at90usb1286_cdc-tests new file mode 100644 index 000000000000..812e2ebcae32 --- /dev/null +++ b/buildroot/share/tests/at90usb1286_cdc-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for AT90USB1286 ARMED +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BRAINWAVE_PRO +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/at90usb1286_dfu-tests b/buildroot/share/tests/at90usb1286_dfu-tests new file mode 100644 index 000000000000..7571994ec47e --- /dev/null +++ b/buildroot/share/tests/at90usb1286_dfu-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for AT90USB1286 ARMED +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_PRINTRBOARD +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/esp32-tests b/buildroot/share/tests/esp32-tests index 42466fddf6e6..361750141bd2 100755 --- a/buildroot/share/tests/esp32-tests +++ b/buildroot/share/tests/esp32-tests @@ -6,6 +6,9 @@ # exit on first failure set -e +# +# Build with the default configurations +# restore_configs opt_set MOTHERBOARD BOARD_ESP32 opt_enable WIFISUPPORT GCODE_MACROS BAUD_RATE_GCODE diff --git a/buildroot/share/tests/fysetc_STM32F1-tests b/buildroot/share/tests/fysetc_STM32F1-tests new file mode 100644 index 000000000000..ad0f5ea81bdd --- /dev/null +++ b/buildroot/share/tests/fysetc_STM32F1-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 FYSETC +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +use_example_configs "FYSETC/Cheetah 1.2/base" +exec_test $1 $2 "Cheetah 1.2 Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/fysetc_f6_13-tests b/buildroot/share/tests/fysetc_f6_13-tests new file mode 100644 index 000000000000..5ddbac554e73 --- /dev/null +++ b/buildroot/share/tests/fysetc_f6_13-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for AVR ATmega FYSETC F6 1.3 +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_FYSETC_F6_13 +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/jgaurora_a5s_a1-tests b/buildroot/share/tests/jgaurora_a5s_a1-tests new file mode 100644 index 000000000000..c6cc9e3f9c9e --- /dev/null +++ b/buildroot/share/tests/jgaurora_a5s_a1-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103ZE JGAurora A5S A1 +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +use_example_configs JGAurora/A5S +exec_test $1 $2 "JGAurora/A5S Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/linux_native-tests b/buildroot/share/tests/linux_native-tests index 1ea3fd5bb68c..38f531dadc4d 100755 --- a/buildroot/share/tests/linux_native-tests +++ b/buildroot/share/tests/linux_native-tests @@ -6,6 +6,9 @@ # exit on first failure set -e +# +# Build with the default configurations +# restore_configs opt_set MOTHERBOARD BOARD_LINUX_RAMPS opt_set TEMP_SENSOR_BED 1 diff --git a/buildroot/share/tests/malyanm200-tests b/buildroot/share/tests/malyanm200-tests new file mode 100644 index 000000000000..3856d058669f --- /dev/null +++ b/buildroot/share/tests/malyanm200-tests @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 malyanM200 +# + +# exit on first failure +set -e + +use_example_configs Malyan/M200 +exec_test $1 $2 "Default Configuration" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/megaatmega1280-tests b/buildroot/share/tests/megaatmega1280-tests new file mode 100644 index 000000000000..ec30d478d59d --- /dev/null +++ b/buildroot/share/tests/megaatmega1280-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for AVR ATmega1280 +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/megaatmega2560-tests b/buildroot/share/tests/megaatmega2560-tests index dd69f1c49b8c..a1c10a4942c1 100755 --- a/buildroot/share/tests/megaatmega2560-tests +++ b/buildroot/share/tests/megaatmega2560-tests @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Build tests for AVR +# Build tests for AVR ATmega2560 # # exit on first failure @@ -54,7 +54,7 @@ opt_set TEMP_SENSOR_3 20 opt_set TEMP_SENSOR_4 1000 opt_set TEMP_SENSOR_BED 1 opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \ - REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING \ + REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING BOOT_MARLIN_LOGO_SMALL BOOT_MARLIN_LOGO_ANIMATED \ SDSUPPORT SDCARD_SORT_ALPHA USB_FLASH_DRIVE_SUPPORT SCROLL_LONG_FILENAMES \ EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_USER_MENUS \ MULTI_NOZZLE_DUPLICATION JUNCTION_DEVIATION LIN_ADVANCE QUICK_HOME \ @@ -93,18 +93,17 @@ exec_test $1 $2 "Spindle, MESH_BED_LEVELING, and LCD" # restore_configs opt_set MOTHERBOARD BOARD_MINIRAMBO -opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING MESH_EDIT_MENU \ - EEPROM_SETTINGS EEPROM_CHITCHAT \ +opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT \ + ULTIMAKERCONTROLLER SDSUPPORT PCA9632 LCD_INFO_MENU \ + AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY LCD_BED_LEVELING G26_MESH_EDITING MESH_EDIT_MENU \ M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR \ - INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \ - ULTIMAKERCONTROLLER SDSUPPORT \ - PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632 \ - BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS \ - ADVANCED_PAUSE_FEATURE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE \ - LCD_INFO_MENU M114_DETAIL + INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS \ + NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE \ + ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES \ + PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 M114_DETAIL opt_set PWM_MOTOR_CURRENT "{ 1300, 1300, 1250 }" opt_set I2C_SLAVE_ADDRESS 63 -exec_test $1 $2 "MINIRAMBO for PWM_MOTOR_CURRENT etc" +exec_test $1 $2 "MINIRAMBO with M100, PWM_MOTOR_CURRENT, PRINTCOUNTER, etc." # # Mixing Extruder with 5 steppers, Cyrillic @@ -250,11 +249,11 @@ exec_test $1 $2 "Many less common options" # #restore_configs #opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT -#for lang in an bg ca zh_CN zh_TW cz da de el el-gr en es eu fi fr gl hr it jp-kana nl pl pt pt-br ru sk tr uk test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff"; done +#for lang in an bg ca cz da de el el-gr en es eu fi fr gl hr it jp-kana nl pl pt pt-br ru sk tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff"; done # #restore_configs #opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT -#for lang in an bg ca zh_CN zh_TW cz da de el el-gr en es eu fi fr gl hr it jp-kana nl pl pt pt-br ru sk tr uk test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff"; done +#for lang in an bg ca cz da de el el-gr en es eu fi fr gl hr it jp-kana nl pl pt pt-br ru sk tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff"; done ######## Example Configurations ############## # diff --git a/buildroot/share/tests/mks_robin-tests b/buildroot/share/tests/mks_robin-tests new file mode 100644 index 000000000000..99d41ef4ad56 --- /dev/null +++ b/buildroot/share/tests/mks_robin-tests @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 genericSTM32F103ZE +# + +# exit on first failure +set -e + +use_example_configs Mks/Robin +exec_test $1 $2 "Default Configuration" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/mks_robin_lite-tests b/buildroot/share/tests/mks_robin_lite-tests new file mode 100644 index 000000000000..a50d7347f5b7 --- /dev/null +++ b/buildroot/share/tests/mks_robin_lite-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 genericSTM32F103RC +# + +# exit on first failure +set -e + +use_example_configs Mks/Robin +opt_set MOTHERBOARD BOARD_MKS_ROBIN_LITE +opt_set EXTRUDERS 1 +opt_set TEMP_SENSOR_1 0 +opt_disable FSMC_GRAPHICAL_TFT +exec_test $1 $2 "Default Configuration" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/mks_robin_mini-tests b/buildroot/share/tests/mks_robin_mini-tests new file mode 100644 index 000000000000..c8ba5a5a4870 --- /dev/null +++ b/buildroot/share/tests/mks_robin_mini-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 genericSTM32F103VE +# + +# exit on first failure +set -e + +use_example_configs Mks/Robin +opt_set MOTHERBOARD BOARD_MKS_ROBIN_MINI +opt_set EXTRUDERS 1 +opt_set TEMP_SENSOR_1 0 +exec_test $1 $2 "Default Configuration" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/mks_robin_nano-tests b/buildroot/share/tests/mks_robin_nano-tests new file mode 100644 index 000000000000..809fd6e6f503 --- /dev/null +++ b/buildroot/share/tests/mks_robin_nano-tests @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F1 genericSTM32F103VE +# + +# exit on first failure +set -e + +use_example_configs Mks/Robin +opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO +exec_test $1 $2 "Default Configuration" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/rambo-tests b/buildroot/share/tests/rambo-tests new file mode 100644 index 000000000000..649a0801dc2c --- /dev/null +++ b/buildroot/share/tests/rambo-tests @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Build tests for AVR ATmega2560 RAMBo +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_EINSY_RAMBO +opt_set X_DRIVER_TYPE TMC2130 +opt_set Y_DRIVER_TYPE TMC2130 +opt_set Z_DRIVER_TYPE TMC2130 +opt_set E0_DRIVER_TYPE TMC2130 +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/sanguino_atmega1284p-tests b/buildroot/share/tests/sanguino_atmega1284p-tests new file mode 100644 index 000000000000..7181f961c483 --- /dev/null +++ b/buildroot/share/tests/sanguino_atmega1284p-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for AVR ATmega 1284p +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12 +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/buildroot/share/tests/sanguino_atmega644p-tests b/buildroot/share/tests/sanguino_atmega644p-tests new file mode 100644 index 000000000000..41626b23f705 --- /dev/null +++ b/buildroot/share/tests/sanguino_atmega644p-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for AVR ATmega 644p +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12 +exec_test $1 $2 "Default Configuration" + +# clean up +restore_configs diff --git a/config/default/Configuration.h b/config/default/Configuration.h index 2744d43b1535..4ccbe90b1ffb 100644 --- a/config/default/Configuration.h +++ b/config/default/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/default/Configuration_adv.h b/config/default/Configuration_adv.h index 23ce491218a0..9741b3e8d022 100644 --- a/config/default/Configuration_adv.h +++ b/config/default/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/3DFabXYZ/Migbot/Configuration.h b/config/examples/3DFabXYZ/Migbot/Configuration.h index 72a38c7519ca..b01de1990ec1 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "AJMartel" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1610,10 +1609,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2064,6 +2063,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2075,7 +2080,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h index 1a7047a285eb..9b268ef81ef1 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN 9 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + #define CONTROLLER_FAN_PIN 9 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/ADIMLab/Gantry v1/Configuration.h b/config/examples/ADIMLab/Gantry v1/Configuration.h new file mode 100644 index 000000000000..73c02c563a9e --- /dev/null +++ b/config/examples/ADIMLab/Gantry v1/Configuration.h @@ -0,0 +1,2217 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// Author info of this build printed to the host during boot and M115 +#define STRING_CONFIG_H_AUTHOR "(ETE-Design, Gantry v1)" // Who made the changes. + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. +#define SHOW_CUSTOM_BOOTSCREEN + +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_2 -1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// Choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_HJC2560C_REV1 +#endif + +// Name displayed in the LCD "Ready" message and Info menu +#define CUSTOM_MACHINE_NAME "ADIMLab Gantry v1" + +// Printer's unique ID, used by some programs to differentiate between machines. +// Choose your own or use a service like http://www.uuidgenerator.net/version4 +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +/** + * Electromagnetic Switching Toolhead + * + * Parking for CoreXY / HBot kinematics. + * Toolheads are parked at one edge and held with an electromagnet. + * Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4 + */ +//#define ELECTROMAGNETIC_SWITCHING_TOOLHEAD + +#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY { 90, 150 } // (mm) Security distance X axis (T0,T1) + //#define PRIME_BEFORE_REMOVE // Prime the nozzle before release from the dock + #if ENABLED(PRIME_BEFORE_REMOVE) + #define SWITCHING_TOOLHEAD_PRIME_MM 20 // (mm) Extruder prime length + #define SWITCHING_TOOLHEAD_RETRACT_MM 10 // (mm) Retract after priming length + #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE 300 // (mm/m) Extruder prime feedrate + #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400 // (mm/m) Extruder retract feedrate + #endif + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Z_HOP 2 // (mm) Z raise for switching + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Power Supply Control + * + * Enable and connect the power supply to the PS_ON_PIN. + * Specify whether the power supply is active HIGH or active LOW. + */ +//#define PSU_CONTROL +//#define PSU_NAME "Power Supply" + +#if ENABLED(PSU_CONTROL) + #define PSU_ACTIVE_HIGH false // Set 'false' for ATX (1), 'true' for X-Box (2) + + //#define PS_DEFAULT_OFF // Keep power off until enabled directly with M80 + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU over this temperature + //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU over this temperature + #define POWER_TIMEOUT 30 + #endif +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 + * 20 : Pt100 with circuit in the Ultimainboard V2.x + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 1 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 1 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define HEATER_5_MAXTEMP 275 +#define BED_MAXTEMP 120 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + //#define MIN_BED_POWER 0 + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 1300 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, + * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80.4, 80.4, 400, 94 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 2000, 2000, 50, 2000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Junction Deviation + * + * Use Junction Deviation instead of traditional Jerk Limiting + * + * See: + * https://reprap.org/forum/read.php?1,739819 + * http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html + */ +//#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 20.0 + #define DEFAULT_YJERK 20.0 + #define DEFAULT_ZJERK 0.4 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH + +/** + * Touch-MI Probe by hotends.fr + * + * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed. + * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is + * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position. + * + * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, + * and a minimum Z_HOMING_HEIGHT of 10. + */ +//#define TOUCH_MI_PROBE +#if ENABLED(TOUCH_MI_PROBE) + #define TOUCH_MI_RETRACT_Z 0.5 // Height at which the probe retracts + //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2) // For a magnet on the right side of the bed + //#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu) +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +/** + * Multiple Probing + * + * You may get improved results by probing 2 or more times. + * With EXTRA_PROBING the more atypical reading(s) will be disregarded. + * + * A total of 2 does fast/slow probes with a weighted average. + * A total of 3 or more adds more slow probes, taking the average. + */ +//#define MULTIPLE_PROBING 2 +//#define EXTRA_PROBING 1 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false +#define INVERT_Y_DIR false +#define INVERT_Z_DIR true + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 325 +#define Y_BED_SIZE 325 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS 0 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 415 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +#define FILAMENT_RUNOUT_SENSOR +#define FIL_RUNOUT_PIN 24 +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (4*60) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 5 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 195 +#define PREHEAT_1_TEMP_BED 55 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 230 +#define PREHEAT_2_TEMP_BED 70 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 60 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT { 100, 60, (Z_MIN_POS + 1) } + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Move the nozzle to the initial position after cleaning + #define NOZZLE_CLEAN_GOBACK + + // Enable for a purge/clean station that's always at the gantry height (thus no Z move) + //#define NOZZLE_CLEAN_NO_Z +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// This option reverses the encoder direction for Select Screen. +// +// If CLOCKWISE normally moves LEFT this makes it go RIGHT. +// If CLOCKWISE normally moves RIGHT this makes it go LEFT. +// +//#define REVERSE_SELECT_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// MKS MINI12864 with graphic controller and SD support +// https://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/ +// +//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +//#define ANET_FULL_GRAPHICS_LCD + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//============================== OLED Displays ============================== +//============================================================================= + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + #define U8GLIB_SSD1306 + //#define U8GLIB_SH1106 +#endif + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// Einstart S OLED SSD1306 +// +//#define U8GLIB_SH1106_EINSTART + +// +// Overlord OLED display/controller with i2c buzzer and LEDs +// +//#define OVERLORD_OLED + +//============================================================================= +//========================== Extensible UI Displays =========================== +//============================================================================= + +// +// DGUS Touch Display with DWIN OS +// +//#define DGUS_LCD + +// +// Touch-screen LCD for Malyan M200 printers +// +//#define MALYAN_LCD + +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + +// +// Third-party or vendor-customized controller interfaces. +// Sources should be installed in 'src/lcd/extensible_ui'. +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) +// +//#define FSMC_GRAPHICAL_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 +// +//#define TOUCH_BUTTONS +#if ENABLED(TOUCH_BUTTONS) + #define XPT2046_X_CALIBRATION 12316 + #define XPT2046_Y_CALIBRATION -8981 + #define XPT2046_X_OFFSET -43 + #define XPT2046_Y_OFFSET 257 +#endif + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE + //#define NEOPIXEL2_PIN 5 + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup + + // Use a single Neopixel LED for static (background) lighting + //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use + //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/ADIMLab/Gantry v1/Configuration_adv.h b/config/examples/ADIMLab/Gantry v1/Configuration_adv.h new file mode 100644 index 000000000000..0dc4ce54860c --- /dev/null +++ b/config/examples/ADIMLab/Gantry v1/Configuration_adv.h @@ -0,0 +1,2671 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 360 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN -1 +#define E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define E5_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 + +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed +#define CHAMBER_AUTO_FAN_TEMPERATURE 30 +#define CHAMBER_AUTO_FAN_SPEED 255 + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 8 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + #define CASE_LIGHT_MENU // Add Case Light options to the LCD menu + #define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +#if ENABLED(BLTOUCH) + /** + * Either: Use the defaults (recommended) or: For special purposes, use the following DEFINES + * Do not activate settings that the probe might not understand. Clones might misunderstand + * advanced commands. + * + * Note: If the probe is not deploying, check a "Cmd: Reset" and "Cmd: Self-Test" and then + * check the wiring of the BROWN, RED and ORANGE wires. + * + * Note: If the trigger signal of your probe is not being recognized, it has been very often + * because the BLACK and WHITE wires needed to be swapped. They are not "interchangeable" + * like they would be with a real switch. So please check the wiring first. + * + * Settings for all BLTouch and clone probes: + */ + + // Safety: The probe needs time to recognize the command. + // Minimum command delay (ms). Enable and increase if needed. + //#define BLTOUCH_DELAY 500 + + /** + * Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones: + */ + + // Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful + // in special cases, like noisy or filtered input configurations. + //#define BLTOUCH_FORCE_SW_MODE + + /** + * Settings for BLTouch Smart 3.0 and 3.1 + * Summary: + * - Voltage modes: 5V and OD (open drain - "logic voltage free") output modes + * - High-Speed mode + * - Disable LCD voltage options + */ + + /** + * Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller! + * V3.0 or 3.1: Set default mode to 5V mode at Marlin startup. + * If disabled, OD mode is the hard-coded default on 3.0 + * On startup, Marlin will compare its eeprom to this vale. If the selected mode + * differs, a mode set eeprom write will be completed at initialization. + * Use the option below to force an eeprom write to a V3.1 probe regardless. + */ + //#define BLTOUCH_SET_5V_MODE + + /** + * Safety: Activate if connecting a probe with an unknown voltage mode. + * V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0 + * V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write ) + * To preserve the life of the probe, use this once then turn it off and re-flash. + */ + //#define BLTOUCH_FORCE_MODE_SET + + /** + * Use "HIGH SPEED" mode for probing. + * Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems. + * This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function + * If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state. + */ + //#define BLTOUCH_HS_MODE + + // Safety: Enable voltage mode settings in the LCD menu. + //#define BLTOUCH_LCD_VOLTAGE_MENU + +#endif // BLTOUCH + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + + // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm + #define G34_MAX_GRADE 5 // (%) Maximum incline G34 will handle + + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES { false, false, false, false } + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // Set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel + #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm) + #if ENABLED(ULTIPANEL) + #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" + #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen + #endif +#endif + +// @section motion + +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 75 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 160 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU + +// Scroll a longer status message into view +#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +#define LCD_TIMEOUT_TO_STATUS 60000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 28 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK true // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + // Leave the heaters on after Stop Print (not recommended!) + //#define SD_ABORT_NO_COOLDOWN + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define SD_ABORT_ON_ENDSTOP_HIT + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E must be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN + * SS --> SDSS + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + #if HAS_SDCARD_CONNECTION + /** + * Set this option to one of the following (or the board's defaults apply): + * + * LCD - Use the SD drive in the external LCD controller. + * ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + * CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file). + * + * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ] + */ + //#define SDCARD_CONNECTION LCD + #endif + +#endif // SDSUPPORT + +/** + * By default an onboard SD card reader may be shared as a USB mass- + * storage device. This option hides the SD card from the host PC. + */ +//#define NO_SD_HOST_DRIVE // Disable SD Card access over USB (for security). + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + //#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu + +#endif // HAS_GRAPHICAL_LCD + +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion. + + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +// Add M575 G-code to change the baud rate +//#define BAUD_RATE_GCODE + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +//#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + //#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 0 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. + * Set the address using jumpers on pins MS1 and MS2. + * Address | MS1 | MS2 + * 0 | LOW | LOW + * 1 | HIGH | LOW + * 2 | LOW | HIGH + * 3 | HIGH | HIGH + * + * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers + * on the same serial port, either here or in your board's pins file. + */ + #define X_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 0 + #define Z_SLAVE_ADDRESS 0 + #define X2_SLAVE_ADDRESS 0 + #define Y2_SLAVE_ADDRESS 0 + #define Z2_SLAVE_ADDRESS 0 + #define Z3_SLAVE_ADDRESS 0 + #define E0_SLAVE_ADDRESS 0 + #define E1_SLAVE_ADDRESS 0 + #define E2_SLAVE_ADDRESS 0 + #define E3_SLAVE_ADDRESS 0 + #define E4_SLAVE_ADDRESS 0 + #define E5_SLAVE_ADDRESS 0 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * Use StallGuard2 to home / probe X, Y, Z. + * + * TMC2130, TMC2160, TMC2209, TMC2660, TMC5130, and TMC5160 only + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) + * + * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. + * + * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** + * Poll the driver through SPI to determine load when homing. + * Removes the need for a wire from DIAG1 to an endstop pin. + * + * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when + * homing and adds a guard period for endstop triggering. + */ + //#define SENSORLESS_HOMING // StallGuard capable drivers only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // StallGuard capable drivers only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + // TMC2209: 0...255. TMC2130: -64...63 + #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + //#define SPI_ENDSTOPS // TMC2130 only + //#define IMPROVE_HOMING_RELIABILITY + #endif + + /** + * Beta feature! + * Create a 50/50 square wave step pulse optimal for stepper drivers. + */ + //#define SQUARE_WAVE_STEPPING + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop + + #if ENABLED(SPINDLE_FEATURE) + //#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction + #define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction + #define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif +#endif + +/** + * Coolant Control + * + * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off. + * + * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined. + */ +//#define COOLANT_CONTROL +#if ENABLED(COOLANT_CONTROL) + #define COOLANT_MIST // Enable if mist coolant is present + #define COOLANT_FLOOD // Enable if flood coolant is present + #define COOLANT_MIST_INVERT false // Set "true" if the on/off function is reversed + #define COOLANT_FLOOD_INVERT false // Set "true" if the on/off function is reversed +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + //#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + //#define SERVICE_NAME_1 "Service S" + //#define SERVICE_INTERVAL_1 100 // print hours + //#define SERVICE_NAME_2 "Service L" + //#define SERVICE_INTERVAL_2 200 // print hours + //#define SERVICE_NAME_3 "Service 3" + //#define SERVICE_INTERVAL_3 1 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/ADIMLab/Gantry v2/Configuration.h b/config/examples/ADIMLab/Gantry v2/Configuration.h new file mode 100644 index 000000000000..0f8ec357802a --- /dev/null +++ b/config/examples/ADIMLab/Gantry v2/Configuration.h @@ -0,0 +1,2217 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// Author info of this build printed to the host during boot and M115 +#define STRING_CONFIG_H_AUTHOR "(ETE-Design, Gantry v2)" // Who made the changes. + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. +#define SHOW_CUSTOM_BOOTSCREEN + +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_2 -1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// Choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_HJC2560C_REV2 +#endif + +// Name displayed in the LCD "Ready" message and Info menu +#define CUSTOM_MACHINE_NAME "ADIMLab Gantry v2" + +// Printer's unique ID, used by some programs to differentiate between machines. +// Choose your own or use a service like http://www.uuidgenerator.net/version4 +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +/** + * Electromagnetic Switching Toolhead + * + * Parking for CoreXY / HBot kinematics. + * Toolheads are parked at one edge and held with an electromagnet. + * Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4 + */ +//#define ELECTROMAGNETIC_SWITCHING_TOOLHEAD + +#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY { 90, 150 } // (mm) Security distance X axis (T0,T1) + //#define PRIME_BEFORE_REMOVE // Prime the nozzle before release from the dock + #if ENABLED(PRIME_BEFORE_REMOVE) + #define SWITCHING_TOOLHEAD_PRIME_MM 20 // (mm) Extruder prime length + #define SWITCHING_TOOLHEAD_RETRACT_MM 10 // (mm) Retract after priming length + #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE 300 // (mm/m) Extruder prime feedrate + #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400 // (mm/m) Extruder retract feedrate + #endif + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Z_HOP 2 // (mm) Z raise for switching + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Power Supply Control + * + * Enable and connect the power supply to the PS_ON_PIN. + * Specify whether the power supply is active HIGH or active LOW. + */ +//#define PSU_CONTROL +//#define PSU_NAME "Power Supply" + +#if ENABLED(PSU_CONTROL) + #define PSU_ACTIVE_HIGH false // Set 'false' for ATX (1), 'true' for X-Box (2) + + //#define PS_DEFAULT_OFF // Keep power off until enabled directly with M80 + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU over this temperature + //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU over this temperature + #define POWER_TIMEOUT 30 + #endif +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 + * 20 : Pt100 with circuit in the Ultimainboard V2.x + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 5 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define HEATER_5_MAXTEMP 275 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + //#define MIN_BED_POWER 0 + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, + * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 100 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Junction Deviation + * + * Use Junction Deviation instead of traditional Jerk Limiting + * + * See: + * https://reprap.org/forum/read.php?1,739819 + * http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html + */ +//#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 + #define DEFAULT_ZJERK 0.3 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH + +/** + * Touch-MI Probe by hotends.fr + * + * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed. + * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is + * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position. + * + * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, + * and a minimum Z_HOMING_HEIGHT of 10. + */ +//#define TOUCH_MI_PROBE +#if ENABLED(TOUCH_MI_PROBE) + #define TOUCH_MI_RETRACT_Z 0.5 // Height at which the probe retracts + //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2) // For a magnet on the right side of the bed + //#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu) +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +/** + * Multiple Probing + * + * You may get improved results by probing 2 or more times. + * With EXTRA_PROBING the more atypical reading(s) will be disregarded. + * + * A total of 2 does fast/slow probes with a weighted average. + * A total of 3 or more adds more slow probes, taking the average. + */ +//#define MULTIPLE_PROBING 2 +//#define EXTRA_PROBING 1 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR true +#define INVERT_Y_DIR true +#define INVERT_Z_DIR false + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 310 +#define Y_BED_SIZE 310 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS -5 +#define Y_MIN_POS -10 +#define Z_MIN_POS -3 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 410 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +//#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +//#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +#define FILAMENT_RUNOUT_SENSOR +#define FIL_RUNOUT_PIN 24 +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (4*60) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 180 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 60 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT { 100, 60, (Z_MIN_POS + 1) } + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Move the nozzle to the initial position after cleaning + #define NOZZLE_CLEAN_GOBACK + + // Enable for a purge/clean station that's always at the gantry height (thus no Z move) + //#define NOZZLE_CLEAN_NO_Z +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +#define REVERSE_MENU_DIRECTION + +// +// This option reverses the encoder direction for Select Screen. +// +// If CLOCKWISE normally moves LEFT this makes it go RIGHT. +// If CLOCKWISE normally moves RIGHT this makes it go LEFT. +// +//#define REVERSE_SELECT_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +//#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// MKS MINI12864 with graphic controller and SD support +// https://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/ +// +//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +//#define ANET_FULL_GRAPHICS_LCD + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//============================== OLED Displays ============================== +//============================================================================= + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + #define U8GLIB_SSD1306 + //#define U8GLIB_SH1106 +#endif + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// Einstart S OLED SSD1306 +// +//#define U8GLIB_SH1106_EINSTART + +// +// Overlord OLED display/controller with i2c buzzer and LEDs +// +//#define OVERLORD_OLED + +//============================================================================= +//========================== Extensible UI Displays =========================== +//============================================================================= + +// +// DGUS Touch Display with DWIN OS +// +//#define DGUS_LCD + +// +// Touch-screen LCD for Malyan M200 printers +// +//#define MALYAN_LCD + +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + +// +// Third-party or vendor-customized controller interfaces. +// Sources should be installed in 'src/lcd/extensible_ui'. +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) +// +//#define FSMC_GRAPHICAL_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 +// +//#define TOUCH_BUTTONS +#if ENABLED(TOUCH_BUTTONS) + #define XPT2046_X_CALIBRATION 12316 + #define XPT2046_Y_CALIBRATION -8981 + #define XPT2046_X_OFFSET -43 + #define XPT2046_Y_OFFSET 257 +#endif + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE + //#define NEOPIXEL2_PIN 5 + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup + + // Use a single Neopixel LED for static (background) lighting + //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use + //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/ADIMLab/Gantry v2/Configuration_adv.h b/config/examples/ADIMLab/Gantry v2/Configuration_adv.h new file mode 100644 index 000000000000..fb985c68d5d0 --- /dev/null +++ b/config/examples/ADIMLab/Gantry v2/Configuration_adv.h @@ -0,0 +1,2685 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN -1 +#define E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define E5_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 + +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed +#define CHAMBER_AUTO_FAN_TEMPERATURE 30 +#define CHAMBER_AUTO_FAN_SPEED 255 + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + #define CASE_LIGHT_PIN 8 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu + //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +#if ENABLED(BLTOUCH) + /** + * Either: Use the defaults (recommended) or: For special purposes, use the following DEFINES + * Do not activate settings that the probe might not understand. Clones might misunderstand + * advanced commands. + * + * Note: If the probe is not deploying, check a "Cmd: Reset" and "Cmd: Self-Test" and then + * check the wiring of the BROWN, RED and ORANGE wires. + * + * Note: If the trigger signal of your probe is not being recognized, it has been very often + * because the BLACK and WHITE wires needed to be swapped. They are not "interchangeable" + * like they would be with a real switch. So please check the wiring first. + * + * Settings for all BLTouch and clone probes: + */ + + // Safety: The probe needs time to recognize the command. + // Minimum command delay (ms). Enable and increase if needed. + //#define BLTOUCH_DELAY 500 + + /** + * Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones: + */ + + // Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful + // in special cases, like noisy or filtered input configurations. + //#define BLTOUCH_FORCE_SW_MODE + + /** + * Settings for BLTouch Smart 3.0 and 3.1 + * Summary: + * - Voltage modes: 5V and OD (open drain - "logic voltage free") output modes + * - High-Speed mode + * - Disable LCD voltage options + */ + + /** + * Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller! + * V3.0 or 3.1: Set default mode to 5V mode at Marlin startup. + * If disabled, OD mode is the hard-coded default on 3.0 + * On startup, Marlin will compare its eeprom to this vale. If the selected mode + * differs, a mode set eeprom write will be completed at initialization. + * Use the option below to force an eeprom write to a V3.1 probe regardless. + */ + //#define BLTOUCH_SET_5V_MODE + + /** + * Safety: Activate if connecting a probe with an unknown voltage mode. + * V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0 + * V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write ) + * To preserve the life of the probe, use this once then turn it off and re-flash. + */ + //#define BLTOUCH_FORCE_MODE_SET + + /** + * Use "HIGH SPEED" mode for probing. + * Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems. + * This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function + * If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state. + */ + //#define BLTOUCH_HS_MODE + + // Safety: Enable voltage mode settings in the LCD menu. + //#define BLTOUCH_LCD_VOLTAGE_MENU + +#endif // BLTOUCH + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + + // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm + #define G34_MAX_GRADE 5 // (%) Maximum incline G34 will handle + + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES { false, false, false, false } + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // Set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel + #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm) + #if ENABLED(ULTIPANEL) + #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" + #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen + #endif +#endif + +// @section motion + +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + // Leave the heaters on after Stop Print (not recommended!) + //#define SD_ABORT_NO_COOLDOWN + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define SD_ABORT_ON_ENDSTOP_HIT + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E can be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN [1] + * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is required for UHS3 compatibility. + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + #if HAS_SDCARD_CONNECTION + /** + * Set this option to one of the following (or the board's defaults apply): + * + * LCD - Use the SD drive in the external LCD controller. + * ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + * CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file). + * + * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ] + */ + //#define SDCARD_CONNECTION LCD + #endif + +#endif // SDSUPPORT + +/** + * By default an onboard SD card reader may be shared as a USB mass- + * storage device. This option hides the SD card from the host PC. + */ +//#define NO_SD_HOST_DRIVE // Disable SD Card access over USB (for security). + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + //#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu + +#endif // HAS_GRAPHICAL_LCD + +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion. + + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +// Add M575 G-code to change the baud rate +//#define BAUD_RATE_GCODE + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +//#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + //#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +//#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. + * Set the address using jumpers on pins MS1 and MS2. + * Address | MS1 | MS2 + * 0 | LOW | LOW + * 1 | HIGH | LOW + * 2 | LOW | HIGH + * 3 | HIGH | HIGH + * + * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers + * on the same serial port, either here or in your board's pins file. + */ + #define X_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 0 + #define Z_SLAVE_ADDRESS 0 + #define X2_SLAVE_ADDRESS 0 + #define Y2_SLAVE_ADDRESS 0 + #define Z2_SLAVE_ADDRESS 0 + #define Z3_SLAVE_ADDRESS 0 + #define E0_SLAVE_ADDRESS 0 + #define E1_SLAVE_ADDRESS 0 + #define E2_SLAVE_ADDRESS 0 + #define E3_SLAVE_ADDRESS 0 + #define E4_SLAVE_ADDRESS 0 + #define E5_SLAVE_ADDRESS 0 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * Use StallGuard2 to home / probe X, Y, Z. + * + * TMC2130, TMC2160, TMC2209, TMC2660, TMC5130, and TMC5160 only + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) + * + * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. + * + * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** + * Poll the driver through SPI to determine load when homing. + * Removes the need for a wire from DIAG1 to an endstop pin. + * + * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when + * homing and adds a guard period for endstop triggering. + */ + //#define SENSORLESS_HOMING // StallGuard capable drivers only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // StallGuard capable drivers only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + // TMC2209: 0...255. TMC2130: -64...63 + #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + //#define SPI_ENDSTOPS // TMC2130 only + //#define IMPROVE_HOMING_RELIABILITY + #endif + + /** + * Beta feature! + * Create a 50/50 square wave step pulse optimal for stepper drivers. + */ + //#define SQUARE_WAVE_STEPPING + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop + + #if ENABLED(SPINDLE_FEATURE) + //#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction + #define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction + #define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif +#endif + +/** + * Coolant Control + * + * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off. + * + * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined. + */ +//#define COOLANT_CONTROL +#if ENABLED(COOLANT_CONTROL) + #define COOLANT_MIST // Enable if mist coolant is present + #define COOLANT_FLOOD // Enable if flood coolant is present + #define COOLANT_MIST_INVERT false // Set "true" if the on/off function is reversed + #define COOLANT_FLOOD_INVERT false // Set "true" if the on/off function is reversed +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + //#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + //#define SERVICE_NAME_1 "Service S" + //#define SERVICE_INTERVAL_1 100 // print hours + //#define SERVICE_NAME_2 "Service L" + //#define SERVICE_INTERVAL_2 200 // print hours + //#define SERVICE_NAME_3 "Service 3" + //#define SERVICE_INTERVAL_3 1 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/ADIMLab/_Bootscreen.h b/config/examples/ADIMLab/_Bootscreen.h new file mode 100644 index 000000000000..ebb0ad9a81f2 --- /dev/null +++ b/config/examples/ADIMLab/_Bootscreen.h @@ -0,0 +1,86 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Made with Marlin Bitmap Converter + * http://marlinfw.org/tools/u8glib/converter.html + */ +#define CUSTOM_BOOTSCREEN_BMPWIDTH 88 + +const unsigned char custom_start_bmp[] PROGMEM = { + B00000000,B00000000,B00000000,B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00111111,B11111000,B00000000,B01000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00011110,B01111111,B11111111,B00000000,B10000100,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B00000100,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00111111,B11111111,B11111111,B11111110,B00001100,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B01111111,B11111111,B11111111,B11110000,B00001000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00001111,B11111111,B11100000,B00000000,B00011000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B11111111,B11100011,B10000000,B00111000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00010011,B11111111,B11100001,B10000000,B01111000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00011111,B10001111,B11100011,B10000000,B11110000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00011110,B00001111,B11111111,B10000001,B11110000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000110,B00011111,B11111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B11111111,B11111110,B00001111,B11100000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000111,B11111111,B11110000,B01111111,B11000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00001111,B11111100,B00000011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00011111,B11000000,B11111111,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00111110,B00011111,B11111111,B11111110,B00111111,B11000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B01111100,B11111111,B11111111,B11111100,B00001111,B11100000,B00000000,B00000000,B00000000, + B00000000,B00000000,B11111001,B11111111,B11111111,B11110000,B00001111,B11110000,B00000000,B00000000,B00000000, + B00000000,B00000000,B11110011,B11111111,B11111111,B11111000,B00011111,B11111000,B00000000,B00000000,B00000000, + B00000000,B00000000,B11100111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000000,B00000000, + B00000000,B00000001,B11101111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000, + B00000000,B00000001,B11101111,B11111110,B00001111,B11111111,B11111111,B11101111,B10000000,B00000000,B00000000, + B00000000,B00000001,B11001111,B11110000,B00000001,B11111111,B11111111,B11110011,B11111000,B00000000,B00000000, + B00000000,B00000000,B11101111,B11100000,B00000000,B11111111,B11111111,B11111000,B01100000,B00000000,B00000000, + B00000000,B00000000,B11101111,B11100000,B00000000,B00111111,B11111111,B11111000,B00000000,B00000000,B00000000, + B00000000,B00000000,B11101111,B11000000,B00000000,B00011111,B11111111,B11111000,B00000000,B00000000,B00000000, + B00000000,B00000000,B01100111,B11100100,B00000000,B00001111,B11111111,B11111100,B00000000,B00000000,B00000000, + B00000000,B00000000,B00110011,B11111100,B00000000,B00000111,B11111111,B11111100,B00000000,B00000000,B00000000, + B00000000,B00000000,B00011001,B11111100,B00000000,B00000011,B11100000,B11111100,B00000000,B00000000,B00000000, + B00000000,B00000000,B00001100,B01111000,B00000000,B00000001,B11100000,B00111100,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000111,B00000000,B00000000,B00000000,B01110000,B00011100,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000011,B10000000,B00000000,B00000000,B00000000,B00001110,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000001,B11100000,B00000000,B00000000,B00000000,B00001111,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000001,B11110000,B00000000,B00000000,B00000000,B00000111,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000001,B11111000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000, + B00000000,B00000000,B00000001,B11111100,B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000, + B00000000,B00000000,B00000011,B11111100,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B00000000, + B00000000,B00000000,B00000111,B11111100,B00000000,B00000000,B00000000,B00001111,B11100000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000111,B10000001,B11111111,B10000111,B10011111,B00000111,B10011110,B00000000,B00000000,B00111000,B00000000, + B00000111,B10000001,B11111111,B11000011,B10011111,B00000111,B10001110,B00000000,B00000000,B00111000,B00000000, + B00000111,B10000001,B11000011,B11100011,B10011111,B00000111,B10001110,B00000000,B00000000,B00111000,B00000000, + B00001111,B11000001,B11000000,B11100011,B10011111,B10001111,B10001110,B00000000,B00111100,B00111011,B00000000, + B00001111,B11000001,B11000000,B11100011,B10011111,B10001111,B10001110,B00000000,B11111110,B00111111,B10000000, + B00011101,B11000001,B11000000,B01110011,B10011111,B10011111,B10001110,B00000000,B11111111,B00111111,B10000000, + B00011100,B11100001,B11000000,B01110011,B10011101,B11011011,B10001110,B00000000,B01101111,B00111011,B11000000, + B00011100,B11100001,B11000000,B01110011,B10011101,B11111011,B10001110,B00000000,B00111111,B00111011,B11000000, + B00111111,B11110001,B11000000,B11100011,B10011100,B11111011,B10001110,B00000000,B11111111,B00111011,B11000000, + B00111111,B11110001,B11000000,B11100011,B10011100,B11110011,B10001110,B00000000,B11101111,B00111011,B11000000, + B01111000,B01110001,B11000001,B11100011,B10011100,B11110011,B10001110,B00000001,B11101111,B00111011,B11000000, + B01110000,B01111001,B11111111,B11000011,B10011100,B01100011,B10001111,B11111111,B11101111,B00111111,B10000000, + B01110000,B00111001,B11111111,B10000011,B10011100,B01100011,B10001111,B11111110,B11110111,B00111111,B10000000, + B11110000,B01111101,B11111111,B00000111,B10011110,B00000011,B11011111,B11111100,B01100111,B00100111,B00000000 +}; diff --git a/config/examples/AlephObjects/TAZ4/Configuration.h b/config/examples/AlephObjects/TAZ4/Configuration.h index 3a78a9164f88..33b6e114eaa0 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/config/examples/AlephObjects/TAZ4/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Aleph Objects Inc, TAZ)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 7 #define TEMP_SENSOR_1 0 @@ -1599,10 +1598,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2053,6 +2052,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2064,7 +2069,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/config/examples/AlephObjects/TAZ4/Configuration_adv.h index a2d8e4281660..0150a9e3c377 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -279,9 +279,10 @@ */ #define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN 2 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 130 // 255 == full speed + #define CONTROLLER_FAN_PIN 2 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 130 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Alfawise/U20-bltouch/Configuration.h b/config/examples/Alfawise/U20-bltouch/Configuration.h new file mode 100644 index 000000000000..73709f237620 --- /dev/null +++ b/config/examples/Alfawise/U20-bltouch/Configuration.h @@ -0,0 +1,2310 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +//=========================================================================== +//============================= Alfawise Printer ============================ +//=========================================================================== + +// Forum link to help with a tutorial, in French! : +// https://www.lesimprimantes3d.fr/forum/topic/18260-alfawise-u20x-u30-marlin-2x-firmware-alternatif/ +// +// 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE) +// and the touchscreen version, either 1.1 or 1.2. Most recent in France are v1.2 (blue pcb) +// These defines are set in platformio.ini build parameters, sample for U20 -DU20 -DTS_V12 +// U20_PLUS was not tested, as we do not have a printer to test. Print bed PID settings MUST be tuned for it. + +// Valid platformio.ini submodel values are U20_PLUS U20 U30 LK1 LK2 LK4 + +// Valid platformio.ini touchscreens are TS_V11 TS_V12 + +// 2 - Select the screen controller type. Most common is ILI9341 - First option. If your screen remains white, +// Try the alternate setting - this should enable ST7789V or ILI9328. For other LCDs... code is needed +// with the proper boot sequence to be developped. + +#define LCD_READ_ID 0xD3 // Read display identification information in reg ID4 0xD3, for ILI9341 screens +//#define LCD_READ_ID 0x04 // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others + +//=========================================================================== + +// @section info + +// Author info of this build printed to the host during boot and M115 +#define STRING_CONFIG_H_AUTHOR "Hobi, tpruvot" // Who made the changes. + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. +//#define SHOW_CUSTOM_BOOTSCREEN + +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. +#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 1 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT_2 2 +#define NUM_SERIAL 2 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// Choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_LONGER3D_LK +#endif + +// Name displayed in the LCD "Ready" message and Info menu +//#define CUSTOM_MACHINE_NAME "3D Printer" +#ifdef U20 +#define CUSTOM_MACHINE_NAME "Alfawise U20" +#elif defined(U30) +#define CUSTOM_MACHINE_NAME "Alfawise U30" +#elif defined(U20_PLUS) +#define CUSTOM_MACHINE_NAME "Alfawise U20+" +#elif defined(LK1) +#define CUSTOM_MACHINE_NAME "Longer3D LK1" +#elif defined(LK2) +#define CUSTOM_MACHINE_NAME "Longer3D LK2" +#elif defined(LK4) +#define CUSTOM_MACHINE_NAME "Longer3D LK4" +#endif + +// Printer's unique ID, used by some programs to differentiate between machines. +// Choose your own or use a service like http://www.uuidgenerator.net/version4 +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +/** + * Electromagnetic Switching Toolhead + * + * Parking for CoreXY / HBot kinematics. + * Toolheads are parked at one edge and held with an electromagnet. + * Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4 + */ +//#define ELECTROMAGNETIC_SWITCHING_TOOLHEAD + +#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY { 90, 150 } // (mm) Security distance X axis (T0,T1) + //#define PRIME_BEFORE_REMOVE // Prime the nozzle before release from the dock + #if ENABLED(PRIME_BEFORE_REMOVE) + #define SWITCHING_TOOLHEAD_PRIME_MM 20 // (mm) Extruder prime length + #define SWITCHING_TOOLHEAD_RETRACT_MM 10 // (mm) Retract after priming length + #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE 300 // (mm/m) Extruder prime feedrate + #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400 // (mm/m) Extruder retract feedrate + #endif + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Z_HOP 2 // (mm) Z raise for switching + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Power Supply Control + * + * Enable and connect the power supply to the PS_ON_PIN. + * Specify whether the power supply is active HIGH or active LOW. + */ +//#define PSU_CONTROL +//#define PSU_NAME "Power Supply" + +#if ENABLED(PSU_CONTROL) + #define PSU_ACTIVE_HIGH false // Set 'false' for ATX (1), 'true' for X-Box (2) + + //#define PS_DEFAULT_OFF // Keep power off until enabled directly with M80 + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU over this temperature + //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU over this temperature + #define POWER_TIMEOUT 30 + #endif +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 + * 20 : Pt100 with circuit in the Ultimainboard V2.x + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 5 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define HEATER_5_MAXTEMP 275 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Alfawise U30/U20 + // Please refine the PID settings for your own machine to avoid the E1 hotend error. These a basic settings allowing first startups. + // Use the command M303 E0 S200 C8 each time you make any changes to your extruder + + #define DEFAULT_Kp 17.22 + #define DEFAULT_Ki 1.00 + #define DEFAULT_Kd 74.22 + + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + //#define MIN_BED_POWER 0 + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + //#define DEFAULT_bedKp 10.00 + //#define DEFAULT_bedKi .023 + //#define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + +#if defined(U30) || defined(LK2) || defined(LK4) + //From M303 command for Alfawise U30 : + #define DEFAULT_bedKp 338.46 + #define DEFAULT_bedKi 63.96 + #define DEFAULT_bedKd 447.78 +#endif + +#if defined(U20) || defined(LK1) + //From M303 command for Alfawise U20 : + #define DEFAULT_bedKp 841.68 + #define DEFAULT_bedKi 152.12 + #define DEFAULT_bedKd 1164.25 +#endif + +#if defined(U20_PLUS) + // These PID setting MUST be updated. + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. + #define DEFAULT_bedKp 841.68 + #define DEFAULT_bedKi 152.12 + #define DEFAULT_bedKd 1164.25 +#endif + +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +//#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +//#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + #define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, + * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 98 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 200, 200, 100, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 200, 200, 100, 3000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 200 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 200 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Junction Deviation + * + * Use Junction Deviation instead of traditional Jerk Limiting + * + * See: + * https://reprap.org/forum/read.php?1,739819 + * http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html + */ +//#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 + #define DEFAULT_ZJERK 0.4 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +#define PROBE_MANUALLY +#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +#define BLTOUCH + +/** + * Touch-MI Probe by hotends.fr + * + * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed. + * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is + * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position. + * + * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, + * and a minimum Z_HOMING_HEIGHT of 10. + */ +//#define TOUCH_MI_PROBE +#if ENABLED(TOUCH_MI_PROBE) + #undef PROBE_MANUALLY + #define TOUCH_MI_RETRACT_Z 0.5 // Height at which the probe retracts + //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2) // For a magnet on the right side of the bed + //#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu) +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER -35 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER -6 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.5 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +/** + * Multiple Probing + * + * You may get improved results by probing 2 or more times. + * With EXTRA_PROBING the more atypical reading(s) will be disregarded. + * + * A total of 2 does fast/slow probes with a weighted average. + * A total of 3 or more adds more slow probes, taking the average. + */ +#define MULTIPLE_PROBING 2 +//#define EXTRA_PROBING 1 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR true +#define INVERT_Y_DIR false +#define INVERT_Z_DIR true + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 10 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +#if defined(U30) || defined(LK2) || defined(LK4) +#define X_BED_SIZE 220 +#define Y_BED_SIZE 220 +#define Z_MACHINE_MAX 250 +#endif + +#if defined(U20) || defined(LK1) +#define X_BED_SIZE 300 +#define Y_BED_SIZE 300 +#define Z_MACHINE_MAX 400 +#endif + +#if defined(U20_PLUS) +#define X_BED_SIZE 400 +#define Y_BED_SIZE 400 +#define Z_MACHINE_MAX 500 +#endif + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS 0 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS Z_MACHINE_MAX + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING true // Set to true to invert the logic of the sensor. + //#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 4 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.2 // (mm) Z height of nozzle at leveling points + #define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + //#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT MIN_PROBE_Y +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (40*60) +#define HOMING_FEEDRATE_Z (7*60) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 200 +#define PREHEAT_1_TEMP_BED 60 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 250 +#define PREHEAT_2_TEMP_BED 100 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT { 100, 60, (Z_MIN_POS + 1) } + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Move the nozzle to the initial position after cleaning + #define NOZZLE_CLEAN_GOBACK + + // Enable for a purge/clean station that's always at the gantry height (thus no Z move) + //#define NOZZLE_CLEAN_NO_Z +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT +#define SDIO_SUPPORT // Note from Hobi : Added as was not present in the file... + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// This option reverses the encoder direction for Select Screen. +// +// If CLOCKWISE normally moves LEFT this makes it go RIGHT. +// If CLOCKWISE normally moves RIGHT this makes it go LEFT. +// +//#define REVERSE_SELECT_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +//#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 250 +//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// MKS MINI12864 with graphic controller and SD support +// https://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/ +// +//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +//#define ANET_FULL_GRAPHICS_LCD + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//============================== OLED Displays ============================== +//============================================================================= + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + #define U8GLIB_SSD1306 + //#define U8GLIB_SH1106 +#endif + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// Einstart S OLED SSD1306 +// +//#define U8GLIB_SH1106_EINSTART + +// +// Overlord OLED display/controller with i2c buzzer and LEDs +// +//#define OVERLORD_OLED + +//============================================================================= +//========================== Extensible UI Displays =========================== +//============================================================================= + +// +// DGUS Touch Display with DWIN OS +// +//#define DGUS_LCD + +// +// Touch-screen LCD for Malyan M200 printers +// +//#define MALYAN_LCD + +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + +// +// Third-party or vendor-customized controller interfaces. +// Sources should be installed in 'src/lcd/extensible_ui'. +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) +// +#define FSMC_GRAPHICAL_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 +// +#define TOUCH_BUTTONS +#if ENABLED(TOUCH_BUTTONS) + #define TOUCH_CALIBRATION // Include user calibration widget in menus (Alfawise) + + #if ENABLED(TS_V11) + // Alfawise U20 ILI9341 2.8 TP Ver 1.1 / Green PCB on the back of touchscreen + #define XPT2046_X_CALIBRATION 11605 + #define XPT2046_Y_CALIBRATION 9091 + #define XPT2046_X_OFFSET -24 + #define XPT2046_Y_OFFSET -17 + #endif + + #if ENABLED(TS_V12) + // Alfawise U30 ILI9341 2.8 TP Ver 1.2 / Blue PCB on the back of touchscreen + #define XPT2046_X_CALIBRATION 12316 + #define XPT2046_Y_CALIBRATION -8981 + #define XPT2046_X_OFFSET -43 + #define XPT2046_Y_OFFSET 257 + #endif +#endif + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE + //#define NEOPIXEL2_PIN 5 + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup + + // Use a single Neopixel LED for static (background) lighting + //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use + //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/Alfawise/U20-bltouch/Configuration_adv.h b/config/examples/Alfawise/U20-bltouch/Configuration_adv.h new file mode 100644 index 000000000000..9741b3e8d022 --- /dev/null +++ b/config/examples/Alfawise/U20-bltouch/Configuration_adv.h @@ -0,0 +1,2685 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN -1 +#define E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define E5_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 + +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed +#define CHAMBER_AUTO_FAN_TEMPERATURE 30 +#define CHAMBER_AUTO_FAN_SPEED 255 + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu + //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +#if ENABLED(BLTOUCH) + /** + * Either: Use the defaults (recommended) or: For special purposes, use the following DEFINES + * Do not activate settings that the probe might not understand. Clones might misunderstand + * advanced commands. + * + * Note: If the probe is not deploying, check a "Cmd: Reset" and "Cmd: Self-Test" and then + * check the wiring of the BROWN, RED and ORANGE wires. + * + * Note: If the trigger signal of your probe is not being recognized, it has been very often + * because the BLACK and WHITE wires needed to be swapped. They are not "interchangeable" + * like they would be with a real switch. So please check the wiring first. + * + * Settings for all BLTouch and clone probes: + */ + + // Safety: The probe needs time to recognize the command. + // Minimum command delay (ms). Enable and increase if needed. + //#define BLTOUCH_DELAY 500 + + /** + * Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones: + */ + + // Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful + // in special cases, like noisy or filtered input configurations. + //#define BLTOUCH_FORCE_SW_MODE + + /** + * Settings for BLTouch Smart 3.0 and 3.1 + * Summary: + * - Voltage modes: 5V and OD (open drain - "logic voltage free") output modes + * - High-Speed mode + * - Disable LCD voltage options + */ + + /** + * Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller! + * V3.0 or 3.1: Set default mode to 5V mode at Marlin startup. + * If disabled, OD mode is the hard-coded default on 3.0 + * On startup, Marlin will compare its eeprom to this vale. If the selected mode + * differs, a mode set eeprom write will be completed at initialization. + * Use the option below to force an eeprom write to a V3.1 probe regardless. + */ + //#define BLTOUCH_SET_5V_MODE + + /** + * Safety: Activate if connecting a probe with an unknown voltage mode. + * V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0 + * V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write ) + * To preserve the life of the probe, use this once then turn it off and re-flash. + */ + //#define BLTOUCH_FORCE_MODE_SET + + /** + * Use "HIGH SPEED" mode for probing. + * Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems. + * This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function + * If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state. + */ + //#define BLTOUCH_HS_MODE + + // Safety: Enable voltage mode settings in the LCD menu. + //#define BLTOUCH_LCD_VOLTAGE_MENU + +#endif // BLTOUCH + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + + // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm + #define G34_MAX_GRADE 5 // (%) Maximum incline G34 will handle + + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES { false, false, false, false } + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // Set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel + #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm) + #if ENABLED(ULTIPANEL) + #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" + #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen + #endif +#endif + +// @section motion + +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + // Leave the heaters on after Stop Print (not recommended!) + //#define SD_ABORT_NO_COOLDOWN + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define SD_ABORT_ON_ENDSTOP_HIT + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E can be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN [1] + * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + #if HAS_SDCARD_CONNECTION + /** + * Set this option to one of the following (or the board's defaults apply): + * + * LCD - Use the SD drive in the external LCD controller. + * ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + * CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file). + * + * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ] + */ + //#define SDCARD_CONNECTION LCD + #endif + +#endif // SDSUPPORT + +/** + * By default an onboard SD card reader may be shared as a USB mass- + * storage device. This option hides the SD card from the host PC. + */ +//#define NO_SD_HOST_DRIVE // Disable SD Card access over USB (for security). + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + //#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu + +#endif // HAS_GRAPHICAL_LCD + +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +//#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion. + + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +// Add M575 G-code to change the baud rate +//#define BAUD_RATE_GCODE + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +//#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + //#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +//#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. + * Set the address using jumpers on pins MS1 and MS2. + * Address | MS1 | MS2 + * 0 | LOW | LOW + * 1 | HIGH | LOW + * 2 | LOW | HIGH + * 3 | HIGH | HIGH + * + * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers + * on the same serial port, either here or in your board's pins file. + */ + #define X_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 0 + #define Z_SLAVE_ADDRESS 0 + #define X2_SLAVE_ADDRESS 0 + #define Y2_SLAVE_ADDRESS 0 + #define Z2_SLAVE_ADDRESS 0 + #define Z3_SLAVE_ADDRESS 0 + #define E0_SLAVE_ADDRESS 0 + #define E1_SLAVE_ADDRESS 0 + #define E2_SLAVE_ADDRESS 0 + #define E3_SLAVE_ADDRESS 0 + #define E4_SLAVE_ADDRESS 0 + #define E5_SLAVE_ADDRESS 0 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * Use StallGuard2 to home / probe X, Y, Z. + * + * TMC2130, TMC2160, TMC2209, TMC2660, TMC5130, and TMC5160 only + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) + * + * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. + * + * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** + * Poll the driver through SPI to determine load when homing. + * Removes the need for a wire from DIAG1 to an endstop pin. + * + * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when + * homing and adds a guard period for endstop triggering. + */ + //#define SENSORLESS_HOMING // StallGuard capable drivers only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // StallGuard capable drivers only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + // TMC2209: 0...255. TMC2130: -64...63 + #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + //#define SPI_ENDSTOPS // TMC2130 only + //#define IMPROVE_HOMING_RELIABILITY + #endif + + /** + * Beta feature! + * Create a 50/50 square wave step pulse optimal for stepper drivers. + */ + //#define SQUARE_WAVE_STEPPING + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop + + #if ENABLED(SPINDLE_FEATURE) + //#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction + #define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction + #define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif +#endif + +/** + * Coolant Control + * + * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off. + * + * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined. + */ +//#define COOLANT_CONTROL +#if ENABLED(COOLANT_CONTROL) + #define COOLANT_MIST // Enable if mist coolant is present + #define COOLANT_FLOOD // Enable if flood coolant is present + #define COOLANT_MIST_INVERT false // Set "true" if the on/off function is reversed + #define COOLANT_FLOOD_INVERT false // Set "true" if the on/off function is reversed +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + //#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + //#define SERVICE_NAME_1 "Service S" + //#define SERVICE_INTERVAL_1 100 // print hours + //#define SERVICE_NAME_2 "Service L" + //#define SERVICE_INTERVAL_2 200 // print hours + //#define SERVICE_NAME_3 "Service 3" + //#define SERVICE_INTERVAL_3 1 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/Alfawise/U20-bltouch/_Statusscreen.h b/config/examples/Alfawise/U20-bltouch/_Statusscreen.h new file mode 100644 index 000000000000..519c0d06f416 --- /dev/null +++ b/config/examples/Alfawise/U20-bltouch/_Statusscreen.h @@ -0,0 +1,77 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * 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 . + * + */ + +/** + * Custom Status Screen bitmap + * + * Place this file in the root with your configuration files + * and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h. + * + * Use the Marlin Bitmap Converter to make your own: + * http://marlinfw.org/tools/u8glib/converter.html + */ + +#pragma once + +// +// Status Screen Logo bitmap +// +#define STATUS_LOGO_Y 0 +#define STATUS_LOGO_WIDTH 38 + +static unsigned char status_logo_bmp[] PROGMEM = { + B11111111,B11111111,B11111111,B11111111,B11111100, + B10000000,B00000000,B00010000,B00000111,B11111100, + B10000000,B00000000,B00010000,B00000000,B11111100, + B10000000,B00000000,B00110000,B00000000,B01111100, + B10000000,B00000000,B00110000,B00000000,B00111100, + B10000000,B00000000,B01110000,B00000000,B00011100, + B11111111,B10000000,B01110000,B00000000,B00001100, + B11111111,B10000000,B11110000,B11100000,B00001100, + B11111111,B00000000,B11110000,B11111000,B00001100, + B11111111,B00000001,B11110000,B11111100,B00000100, + B11111110,B00000001,B11110000,B11010010,B00000100, + B11111110,B00000011,B11110000,B10101110,B00000100, + B11111100,B00000000,B11110000,B10101111,B00000100, + B11111100,B00000000,B00110000,B10000011,B00000100, + B11111000,B00000000,B00110000,B11111111,B00000100, + B11111000,B00000000,B00010000,B11111111,B00000100, + B11111111,B11100000,B00010000,B10111111,B00000100, + B11111111,B11110000,B00010000,B10101111,B00000100, + B11111111,B11110000,B00010000,B10101110,B00000100, + B11111111,B11110000,B00010000,B10000010,B00000100, + B10000011,B11110000,B00010000,B11111100,B00000100, + B10000001,B11110000,B00010000,B11111000,B00001100, + B10000001,B11100000,B00010000,B11100000,B00001100, + B10000000,B00000000,B00010000,B00000000,B00001100, + B10000000,B00000000,B00110000,B00000000,B00011100, + B11000000,B00000000,B00110000,B00000000,B00111100, + B11000000,B00000000,B01110000,B00000000,B01111100, + B11100000,B00000000,B11110000,B00000000,B11111100, + B11111000,B00000011,B11110000,B00000111,B11111100 +}; + +// +// Use default bitmaps +// +#define STATUS_HOTEND_ANIM +#define STATUS_BED_ANIM +#define STATUS_LOGO_X 0 +#define STATUS_HEATERS_X 50 +#define STATUS_BED_X 74 diff --git a/config/examples/Alfawise/U20/Configuration.h b/config/examples/Alfawise/U20/Configuration.h index d3b878a800e5..2ecd3f8ae362 100644 --- a/config/examples/Alfawise/U20/Configuration.h +++ b/config/examples/Alfawise/U20/Configuration.h @@ -75,50 +75,28 @@ // Forum link to help with a tutorial, in French! : // https://www.lesimprimantes3d.fr/forum/topic/18260-alfawise-u20x-u30-marlin-2x-firmware-alternatif/ // -// 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE), +// 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE) +// and the touchscreen version, either 1.1 or 1.2. Most recent in France are v1.2 (blue pcb) // These defines are set in platformio.ini build parameters, sample for U20 -DU20 -DTS_V12 -// U20_PLUS is not tested, as we do not have a printer to test. -// Print bed PID settings MUST be tuned +// U20_PLUS was not tested, as we do not have a printer to test. Print bed PID settings MUST be tuned for it. -//#define U20_PLUS -//#define U20 -//#define U30 +// Valid platformio.ini submodel values are U20_PLUS U20 U30 LK1 LK2 LK4 + +// Valid platformio.ini touchscreens are TS_V11 TS_V12 // 2 - Select the screen controller type. Most common is ILI9341 - First option. If your screen remains white, // Try the alternate setting - this should enable ST7789V or ILI9328. For other LCDs... code is needed // with the proper boot sequence to be developped. -#define LCD_READ_ID 0xD3 // Read display identification information in reg ID4 0xD3, for ILI9341 screens -//#define LCD_READ_ID 0x04 // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others - -// 3 - Select the touch panel version, either 1.1 or 1.2. Most recent touch panel in France are V 1.2. Blue PCB -// V1.1 panels seem to be older, and came with green PCB. This selection only influence the calibration data -// Should calibration need to be redone, please follow the French Tutorial! (NO MORE REQUIRED HERE) - -//#define TS_V11 -//#define TS_V12 - -// 4 - If you want to tune the UI colors, define custom ones here. RGB 16 bits 5-6-5 format -// see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html - -//#define TFT_MARLINUI_COLOR 0xFFFF // White -//#define TFT_MARLINBG_COLOR 0x0000 // Black -//#define TFT_TOPICONS_COLOR 0x21DD // Blue -//#define TFT_DISABLED_COLOR 0x0003 // Almost black -//#define TFT_BTSLEFT_COLOR 0xDEE6 // 11011 110111 00110 Yellow -//#define TFT_BTRIGHT_COLOR 0x145F // 00010 100010 11111 Cyan +#define LCD_READ_ID 0xD3 // Read display identification information in reg ID4 0xD3, for ILI9341 screens +//#define LCD_READ_ID 0x04 // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others //=========================================================================== // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Hobi, tpruvot" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -131,10 +109,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -185,6 +166,12 @@ #define CUSTOM_MACHINE_NAME "Alfawise U30" #elif defined(U20_PLUS) #define CUSTOM_MACHINE_NAME "Alfawise U20+" +#elif defined(LK1) +#define CUSTOM_MACHINE_NAME "Longer3D LK1" +#elif defined(LK2) +#define CUSTOM_MACHINE_NAME "Longer3D LK2" +#elif defined(LK4) +#define CUSTOM_MACHINE_NAME "Longer3D LK4" #endif // Printer's unique ID, used by some programs to differentiate between machines. @@ -409,6 +396,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -452,7 +440,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -590,27 +578,28 @@ //#define DEFAULT_bedKi 1.41 //#define DEFAULT_bedKd 1675.16 -#if ENABLED(U30) +#if defined(U30) || defined(LK2) || defined(LK4) //From M303 command for Alfawise U30 : #define DEFAULT_bedKp 338.46 #define DEFAULT_bedKi 63.96 #define DEFAULT_bedKd 447.78 #endif -#if ENABLED(U20) +#if defined(U20) || defined(LK1) //From M303 command for Alfawise U20 : #define DEFAULT_bedKp 841.68 #define DEFAULT_bedKi 152.12 #define DEFAULT_bedKd 1164.25 #endif -#if ENABLED(U20_PLUS) // The PID setting MUST be updated. - //From M303 command for Alfawise U20 : +#if defined(U20_PLUS) + // These PID setting MUST be updated. + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. #define DEFAULT_bedKp 841.68 #define DEFAULT_bedKi 152.12 #define DEFAULT_bedKd 1164.25 #endif - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. + #endif // PIDTEMPBED // @section extruder @@ -1113,19 +1102,19 @@ // @section machine -#if ENABLED(U30) +#if defined(U30) || defined(LK2) || defined(LK4) #define X_BED_SIZE 220 #define Y_BED_SIZE 220 #define Z_MACHINE_MAX 250 #endif -#if ENABLED(U20) +#if defined(U20) || defined(LK1) #define X_BED_SIZE 300 #define Y_BED_SIZE 300 #define Z_MACHINE_MAX 400 #endif -#if ENABLED(U20_PLUS) +#if defined(U20_PLUS) #define X_BED_SIZE 400 #define Y_BED_SIZE 400 #define Z_MACHINE_MAX 500 @@ -1379,8 +1368,8 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners - #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points - #define LEVEL_CENTER_TOO // Move to the center after the last corner + #define LEVEL_CORNERS_HEIGHT 0.2 // (mm) Z height of nozzle at leveling points + #define LEVEL_CENTER_TOO // Move to the center after the last corner #endif /** @@ -1414,11 +1403,11 @@ #if ENABLED(Z_SAFE_HOMING) #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT MIN_PROBE_Y // Y point for Z homing when homing all axes (G28). #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (20*60) +#define HOMING_FEEDRATE_XY (40*60) #define HOMING_FEEDRATE_Z (7*60) // Validate that endstops are triggered on homing moves @@ -1668,10 +1657,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2123,6 +2112,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2134,7 +2129,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // #define FSMC_GRAPHICAL_TFT @@ -2151,10 +2146,10 @@ #if ENABLED(TS_V11) // Alfawise U20 ILI9341 2.8 TP Ver 1.1 / Green PCB on the back of touchscreen - #define XPT2046_X_CALIBRATION 11605 - #define XPT2046_Y_CALIBRATION 9091 - #define XPT2046_X_OFFSET -24 - #define XPT2046_Y_OFFSET -17 + #define XPT2046_X_CALIBRATION 11605 + #define XPT2046_Y_CALIBRATION 9091 + #define XPT2046_X_OFFSET -24 + #define XPT2046_Y_OFFSET -17 #endif #if ENABLED(TS_V12) diff --git a/config/examples/Alfawise/U20/Configuration_adv.h b/config/examples/Alfawise/U20/Configuration_adv.h index 7f80aad84a9d..a3ff7aafd748 100644 --- a/config/examples/Alfawise/U20/Configuration_adv.h +++ b/config/examples/Alfawise/U20/Configuration_adv.h @@ -138,7 +138,7 @@ */ #if ENABLED(THERMAL_PROTECTION_HOTENDS) #define THERMAL_PROTECTION_PERIOD 60 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius + #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -517,7 +518,7 @@ #define X_HOME_BUMP_MM 5 #define Y_HOME_BUMP_MM 5 #define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +#define HOMING_BUMP_DIVISOR { 4, 4, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially //#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing @@ -650,16 +651,17 @@ #if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel + #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm) #if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -878,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1021,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1160,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1170,66 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + // see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html + #define TFT_MARLINUI_COLOR COLOR_WHITE + #define TFT_MARLINBG_COLOR COLOR_BLACK + #define TFT_DISABLED_COLOR 0x10A2 // almost black + #define TFT_BTCANCEL_COLOR COLOR_RED + #define TFT_BTARROWS_COLOR COLOR_WHITE + #define TFT_BTOKMENU_COLOR COLOR_BLUE +#endif + // @section safety /** @@ -1649,78 +1734,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1957,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1986,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2345,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2406,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/AliExpress/CL-260/Configuration.h b/config/examples/AliExpress/CL-260/Configuration.h index cc5fc2de989c..055c925443e6 100644 --- a/config/examples/AliExpress/CL-260/Configuration.h +++ b/config/examples/AliExpress/CL-260/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, CL-260)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/AliExpress/UM2pExt/Configuration.h b/config/examples/AliExpress/UM2pExt/Configuration.h index 896150c28e59..748213128ec9 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration.h +++ b/config/examples/AliExpress/UM2pExt/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 20 #define TEMP_SENSOR_1 20 @@ -1590,10 +1589,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2044,6 +2043,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2055,7 +2060,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/AliExpress/UM2pExt/Configuration_adv.h b/config/examples/AliExpress/UM2pExt/Configuration_adv.h index 342685413200..0825d8699b6a 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration_adv.h +++ b/config/examples/AliExpress/UM2pExt/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Anet/A2/Configuration.h b/config/examples/Anet/A2/Configuration.h index 5043f6826366..84cb074948dc 100644 --- a/config/examples/Anet/A2/Configuration.h +++ b/config/examples/Anet/A2/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Modmike, Anet A2)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2035,6 +2034,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2046,7 +2051,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Anet/A2/Configuration_adv.h b/config/examples/Anet/A2/Configuration_adv.h index 8015e3e9b907..6a7b4f664a1d 100644 --- a/config/examples/Anet/A2/Configuration_adv.h +++ b/config/examples/Anet/A2/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Anet/A2plus/Configuration.h b/config/examples/Anet/A2plus/Configuration.h index 10710ca9dd11..8e40e7bb9c6f 100644 --- a/config/examples/Anet/A2plus/Configuration.h +++ b/config/examples/Anet/A2plus/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Modmike, Anet A2 Plus)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2035,6 +2034,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2046,7 +2051,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Anet/A2plus/Configuration_adv.h b/config/examples/Anet/A2plus/Configuration_adv.h index 8015e3e9b907..6a7b4f664a1d 100644 --- a/config/examples/Anet/A2plus/Configuration_adv.h +++ b/config/examples/Anet/A2plus/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Anet/A6/Configuration.h b/config/examples/Anet/A6/Configuration.h index 7f3103b4deb0..d934db8182da 100644 --- a/config/examples/Anet/A6/Configuration.h +++ b/config/examples/Anet/A6/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Ralf_E, ANET A6 config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 @@ -1730,10 +1729,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2186,6 +2185,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2197,7 +2202,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Anet/A6/Configuration_adv.h b/config/examples/Anet/A6/Configuration_adv.h index a1bb615739e4..0f8a3fc04478 100644 --- a/config/examples/Anet/A6/Configuration_adv.h +++ b/config/examples/Anet/A6/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Anet/A8/Configuration.h b/config/examples/Anet/A8/Configuration.h index ecd11e1b5a63..65f71a60e1d4 100644 --- a/config/examples/Anet/A8/Configuration.h +++ b/config/examples/Anet/A8/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Bob Kuhn, Anet config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -360,6 +358,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -403,7 +402,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1592,10 +1591,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2048,6 +2047,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2059,7 +2064,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Anet/A8/Configuration_adv.h b/config/examples/Anet/A8/Configuration_adv.h index 0a5057f7c567..fe5f486cae8d 100644 --- a/config/examples/Anet/A8/Configuration_adv.h +++ b/config/examples/Anet/A8/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Anet/A8plus/Configuration.h b/config/examples/Anet/A8plus/Configuration.h index 1a468840753f..9aad320fb2a7 100644 --- a/config/examples/Anet/A8plus/Configuration.h +++ b/config/examples/Anet/A8plus/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Martin Zeman - Zemistr, Anet A8 Plus)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -360,6 +358,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -403,7 +402,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1590,10 +1589,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2044,6 +2043,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2055,7 +2060,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Anet/A8plus/Configuration_adv.h b/config/examples/Anet/A8plus/Configuration_adv.h index 36d2594baec7..007ad171f27a 100644 --- a/config/examples/Anet/A8plus/Configuration_adv.h +++ b/config/examples/Anet/A8plus/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Anet/E16/Configuration.h b/config/examples/Anet/E16/Configuration.h index 9a41b9476419..519ed0b07ee3 100644 --- a/config/examples/Anet/E16/Configuration.h +++ b/config/examples/Anet/E16/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "InsanityAutomation" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1591,10 +1590,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2045,6 +2044,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2056,7 +2061,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Anet/E16/Configuration_adv.h b/config/examples/Anet/E16/Configuration_adv.h index f6cb50b3bd8b..0bb7cddd17a8 100644 --- a/config/examples/Anet/E16/Configuration_adv.h +++ b/config/examples/Anet/E16/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,7 +1156,8 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar - #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/AnimationExample/_Bootscreen.h b/config/examples/AnimationExample/_Bootscreen.h index 2c1d31e445c1..69fdca6f757b 100644 --- a/config/examples/AnimationExample/_Bootscreen.h +++ b/config/examples/AnimationExample/_Bootscreen.h @@ -25,7 +25,7 @@ * Animated boot screen example */ -#define ANIMATED_BOOTSCREEN +#define CUSTOM_BOOTSCREEN_ANIMATED #define CUSTOM_BOOTSCREEN_FRAME_TIME 100 // (ms) #define CUSTOM_BOOTSCREEN_BMPWIDTH 128 @@ -90,7 +90,7 @@ const unsigned char custom_start_bmp[] PROGMEM = { B00000000,B00000000,B00000000,B00000000,B00001110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000 }; -#if ENABLED(ANIMATED_BOOTSCREEN) +#if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED) const unsigned char custom_start_bmp1[] PROGMEM = { B11111001,B11111111,B11111111,B11111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, diff --git a/config/examples/AnyCubic/i3/Configuration.h b/config/examples/AnyCubic/i3/Configuration.h index 2617490f2da6..7a05f6be5d6e 100644 --- a/config/examples/AnyCubic/i3/Configuration.h +++ b/config/examples/AnyCubic/i3/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1589,10 +1588,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2043,6 +2042,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2054,7 +2059,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/AnyCubic/i3/Configuration_adv.h b/config/examples/AnyCubic/i3/Configuration_adv.h index b54cd4ea4a99..e2d1de252760 100644 --- a/config/examples/AnyCubic/i3/Configuration_adv.h +++ b/config/examples/AnyCubic/i3/Configuration_adv.h @@ -279,9 +279,10 @@ */ #define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN 7 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + #define CONTROLLER_FAN_PIN 7 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/ArmEd/Configuration.h b/config/examples/ArmEd/Configuration.h index 4a951432087d..3b5a4a5d74a7 100644 --- a/config/examples/ArmEd/Configuration.h +++ b/config/examples/ArmEd/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1580,10 +1579,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2034,6 +2033,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2045,7 +2050,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/ArmEd/Configuration_adv.h b/config/examples/ArmEd/Configuration_adv.h index 4eb3b4eb0050..72e433443ebf 100644 --- a/config/examples/ArmEd/Configuration_adv.h +++ b/config/examples/ArmEd/Configuration_adv.h @@ -283,9 +283,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -661,10 +662,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -854,11 +855,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -883,23 +908,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -934,6 +942,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1013,17 +1022,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1138,6 +1161,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1147,6 +1171,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1651,78 +1734,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1861,10 +1957,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1888,6 +1986,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2246,6 +2345,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2300,6 +2406,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Azteeg/X5GT/Configuration.h b/config/examples/Azteeg/X5GT/Configuration.h index 13b6bfd10751..f5ba349e064a 100644 --- a/config/examples/Azteeg/X5GT/Configuration.h +++ b/config/examples/Azteeg/X5GT/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration.h b/config/examples/BIBO/TouchX/cyclops/Configuration.h index 4eea9611d247..3cb2df1633ae 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 92e12f48ef7b..7a87c00493f2 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/BIBO/TouchX/default/Configuration.h b/config/examples/BIBO/TouchX/default/Configuration.h index 942030381cb4..9fd253aa0fa5 100644 --- a/config/examples/BIBO/TouchX/default/Configuration.h +++ b/config/examples/BIBO/TouchX/default/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 5 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/BIBO/TouchX/default/Configuration_adv.h b/config/examples/BIBO/TouchX/default/Configuration_adv.h index 72e36ed365ac..e23358938567 100644 --- a/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/BQ/Hephestos/Configuration.h b/config/examples/BQ/Hephestos/Configuration.h index e4088ad112f2..48888550f67b 100644 --- a/config/examples/BQ/Hephestos/Configuration.h +++ b/config/examples/BQ/Hephestos/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1567,10 +1566,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2021,6 +2020,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2032,7 +2037,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/BQ/Hephestos/Configuration_adv.h b/config/examples/BQ/Hephestos/Configuration_adv.h index 58edc2bbcf37..b11a7c053b6b 100644 --- a/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/config/examples/BQ/Hephestos/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/BQ/Hephestos_2/Configuration.h b/config/examples/BQ/Hephestos_2/Configuration.h index 5deedb2cd790..9906c6753d57 100644 --- a/config/examples/BQ/Hephestos_2/Configuration.h +++ b/config/examples/BQ/Hephestos_2/Configuration.h @@ -78,13 +78,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "@jbrazio" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -97,10 +92,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -367,6 +365,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -410,7 +409,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 70 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/BQ/Hephestos_2/Configuration_adv.h b/config/examples/BQ/Hephestos_2/Configuration_adv.h index 686bdbbebca3..241a75f0e526 100644 --- a/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -858,11 +859,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -887,23 +912,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -938,6 +946,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1017,17 +1026,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1142,6 +1165,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1151,6 +1175,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1655,78 +1738,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1865,10 +1961,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1892,6 +1990,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2250,6 +2349,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2304,6 +2410,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/BQ/WITBOX/Configuration.h b/config/examples/BQ/WITBOX/Configuration.h index 32a53cec7b7a..9064684047a5 100644 --- a/config/examples/BQ/WITBOX/Configuration.h +++ b/config/examples/BQ/WITBOX/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1567,10 +1566,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2021,6 +2020,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2032,7 +2037,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/BQ/WITBOX/Configuration_adv.h b/config/examples/BQ/WITBOX/Configuration_adv.h index 58edc2bbcf37..b11a7c053b6b 100644 --- a/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/config/examples/BQ/WITBOX/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Cartesio/Configuration.h b/config/examples/Cartesio/Configuration.h index 05142d8ab81e..e3c3d26186e3 100644 --- a/config/examples/Cartesio/Configuration.h +++ b/config/examples/Cartesio/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(MaukCC, CartesioE)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -360,6 +358,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -403,7 +402,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 -1 @@ -1578,10 +1577,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2032,6 +2031,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2043,7 +2048,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Cartesio/Configuration_adv.h b/config/examples/Cartesio/Configuration_adv.h index 4b2a9d40cc2d..5be8ed679712 100644 --- a/config/examples/Cartesio/Configuration_adv.h +++ b/config/examples/Cartesio/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-10/Configuration.h b/config/examples/Creality/CR-10/Configuration.h index caaf96e13f25..b6cac402b9d8 100644 --- a/config/examples/Creality/CR-10/Configuration.h +++ b/config/examples/Creality/CR-10/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Creality CR-10)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -410,7 +409,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_5 0 -#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 @@ -1589,10 +1588,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2043,6 +2042,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2054,7 +2059,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-10/Configuration_adv.h b/config/examples/Creality/CR-10/Configuration_adv.h index 0fb6d14116f7..9ae5f2489cb2 100644 --- a/config/examples/Creality/CR-10/Configuration_adv.h +++ b/config/examples/Creality/CR-10/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2245,6 +2344,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2299,6 +2405,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-10S/Configuration.h b/config/examples/Creality/CR-10S/Configuration.h index b3f8f667b478..7a3784554ed6 100644 --- a/config/examples/Creality/CR-10S/Configuration.h +++ b/config/examples/Creality/CR-10S/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(printedsolid.com, CR-10S)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -410,7 +409,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_5 0 -#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 @@ -1580,10 +1579,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2034,6 +2033,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2045,7 +2050,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-10S/Configuration_adv.h b/config/examples/Creality/CR-10S/Configuration_adv.h index 477e442b9961..3b3a66ad3780 100644 --- a/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-10_5S/Configuration.h b/config/examples/Creality/CR-10_5S/Configuration.h index 5ae4f2cb186b..beea8d80472d 100644 --- a/config/examples/Creality/CR-10_5S/Configuration.h +++ b/config/examples/Creality/CR-10_5S/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Evgeny-SPB, CR-10 S5)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -410,7 +409,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_5 0 -#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 @@ -1582,10 +1581,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2036,6 +2035,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2047,7 +2052,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-10_5S/Configuration_adv.h b/config/examples/Creality/CR-10_5S/Configuration_adv.h index 7f7a85389954..e2b25efdf03b 100644 --- a/config/examples/Creality/CR-10_5S/Configuration_adv.h +++ b/config/examples/Creality/CR-10_5S/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-10mini/Configuration.h b/config/examples/Creality/CR-10mini/Configuration.h index e90f053d217f..818d0c111654 100644 --- a/config/examples/Creality/CR-10mini/Configuration.h +++ b/config/examples/Creality/CR-10mini/Configuration.h @@ -79,13 +79,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -98,10 +93,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -368,6 +366,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -411,7 +410,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -419,7 +418,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_5 0 -#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 @@ -1598,10 +1597,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2052,6 +2051,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2063,7 +2068,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-10mini/Configuration_adv.h b/config/examples/Creality/CR-10mini/Configuration_adv.h index 181ebba9e686..350210ff7c9f 100644 --- a/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-20 Pro/Configuration.h b/config/examples/Creality/CR-20 Pro/Configuration.h index ef0a822fa991..78650721f322 100644 --- a/config/examples/Creality/CR-20 Pro/Configuration.h +++ b/config/examples/Creality/CR-20 Pro/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(CR-20 Pro)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1582,10 +1581,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2036,6 +2035,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2047,7 +2052,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-20 Pro/Configuration_adv.h b/config/examples/Creality/CR-20 Pro/Configuration_adv.h index 98a7ed32bb70..ca5548778a55 100644 --- a/config/examples/Creality/CR-20 Pro/Configuration_adv.h +++ b/config/examples/Creality/CR-20 Pro/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-20/Configuration.h b/config/examples/Creality/CR-20/Configuration.h index b2bda3c25024..d13a2e26fa49 100644 --- a/config/examples/Creality/CR-20/Configuration.h +++ b/config/examples/Creality/CR-20/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(m0oml)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1582,10 +1581,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2036,6 +2035,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2047,7 +2052,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-20/Configuration_adv.h b/config/examples/Creality/CR-20/Configuration_adv.h index 483d04a2477b..b2a30e80215a 100644 --- a/config/examples/Creality/CR-20/Configuration_adv.h +++ b/config/examples/Creality/CR-20/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/CR-8/Configuration.h b/config/examples/Creality/CR-8/Configuration.h index d7279c3c2461..66d1c95ae183 100644 --- a/config/examples/Creality/CR-8/Configuration.h +++ b/config/examples/Creality/CR-8/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(D-side, CR-8)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1589,10 +1588,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2043,6 +2042,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2054,7 +2059,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/CR-8/Configuration_adv.h b/config/examples/Creality/CR-8/Configuration_adv.h index d9d2f7cb6700..499ae3cd0ea5 100644 --- a/config/examples/Creality/CR-8/Configuration_adv.h +++ b/config/examples/Creality/CR-8/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/Ender-2/Configuration.h b/config/examples/Creality/Ender-2/Configuration.h index 10d2b959dd8c..3ef0a4f5464f 100644 --- a/config/examples/Creality/Ender-2/Configuration.h +++ b/config/examples/Creality/Ender-2/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(tommie, Ender 2/4)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1583,10 +1582,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2037,6 +2036,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2048,7 +2053,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/Ender-2/Configuration_adv.h b/config/examples/Creality/Ender-2/Configuration_adv.h index c234b9af7479..3ee4f5bbc15e 100644 --- a/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/config/examples/Creality/Ender-2/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/Ender-3/Configuration.h b/config/examples/Creality/Ender-3/Configuration.h index 24ada1036984..d97657d49ac6 100644 --- a/config/examples/Creality/Ender-3/Configuration.h +++ b/config/examples/Creality/Ender-3/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Ender-3)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1583,10 +1582,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2037,6 +2036,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2048,7 +2053,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/Ender-3/Configuration_adv.h b/config/examples/Creality/Ender-3/Configuration_adv.h index 5ad49e333ea6..8c92bed971f4 100644 --- a/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1644,81 +1727,94 @@ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #if AXIS_IS_TMC(X) - #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_CURRENT 580 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) - #define Y_CURRENT 800 + #define Y_CURRENT 580 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) - #define Z_CURRENT 800 + #define Z_CURRENT 580 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) - #define E0_CURRENT 800 + #define E0_CURRENT 650 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/Ender-4/Configuration.h b/config/examples/Creality/Ender-4/Configuration.h index bf52448c170c..88c955e25080 100644 --- a/config/examples/Creality/Ender-4/Configuration.h +++ b/config/examples/Creality/Ender-4/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Skorpi, Creality Ender-4, brandstaetter)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1589,10 +1588,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2043,6 +2042,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2054,7 +2059,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/Ender-4/Configuration_adv.h b/config/examples/Creality/Ender-4/Configuration_adv.h index bdbc640346b8..d5214a10bc0d 100644 --- a/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/config/examples/Creality/Ender-4/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Creality/Ender-5/Configuration.h b/config/examples/Creality/Ender-5/Configuration.h index 7290d3c3c928..efa62d4c9e0b 100644 --- a/config/examples/Creality/Ender-5/Configuration.h +++ b/config/examples/Creality/Ender-5/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Ender-5)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1582,10 +1581,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2036,6 +2035,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2047,7 +2052,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Creality/Ender-5/Configuration_adv.h b/config/examples/Creality/Ender-5/Configuration_adv.h index 145f402517aa..5fc0c33a6d08 100644 --- a/config/examples/Creality/Ender-5/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Dagoma/Disco Ultimate/Configuration.h b/config/examples/Dagoma/Disco Ultimate/Configuration.h index 086e254d871f..4c445045c62f 100644 --- a/config/examples/Dagoma/Disco Ultimate/Configuration.h +++ b/config/examples/Dagoma/Disco Ultimate/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "InsanityAutomation" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 18 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h index 259681dd5875..ff54abab3189 100644 --- a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h +++ b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1857,10 +1953,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1982,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2341,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2402,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration.h b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration.h index ebfaea4b8a66..8b5e3b182efa 100755 --- a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration.h +++ b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Sidewinder X1)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h index 0261fe8670ea..b65d2b065e4e 100755 --- a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h +++ b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Einstart-S/Configuration.h b/config/examples/Einstart-S/Configuration.h index 3c34ac16937e..ed70062d1c98 100644 --- a/config/examples/Einstart-S/Configuration.h +++ b/config/examples/Einstart-S/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "elsie tech corp" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 666 #define TEMP_SENSOR_1 0 @@ -1589,10 +1588,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2043,6 +2042,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2054,7 +2059,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Einstart-S/Configuration_adv.h b/config/examples/Einstart-S/Configuration_adv.h index e47e839321ee..7faf9c0aa994 100644 --- a/config/examples/Einstart-S/Configuration_adv.h +++ b/config/examples/Einstart-S/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FYSETC/AIO_II/Configuration.h b/config/examples/FYSETC/AIO_II/Configuration.h index 039af73bff16..3b3797d915c2 100644 --- a/config/examples/FYSETC/AIO_II/Configuration.h +++ b/config/examples/FYSETC/AIO_II/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FYSETC/AIO_II/Configuration_adv.h b/config/examples/FYSETC/AIO_II/Configuration_adv.h index 2e27154adc4b..ecfa75f60039 100644 --- a/config/examples/FYSETC/AIO_II/Configuration_adv.h +++ b/config/examples/FYSETC/AIO_II/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 650 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 650 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration.h b/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration.h index 2d53de4a56d1..5ce77ea0d28c 100644 --- a/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration.h +++ b/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -360,6 +358,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -403,7 +402,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1585,10 +1584,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2039,6 +2038,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2050,7 +2055,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h b/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h index 35d110145b14..e2c3b19ab9c2 100644 --- a/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h +++ b/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 500 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 650 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FYSETC/Cheetah 1.2/base/Configuration.h b/config/examples/FYSETC/Cheetah 1.2/base/Configuration.h index 60dd4a069f7a..db87ff31d3fc 100644 --- a/config/examples/FYSETC/Cheetah 1.2/base/Configuration.h +++ b/config/examples/FYSETC/Cheetah 1.2/base/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h b/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h index d6d26f9763a9..23c61bb7fdcb 100644 --- a/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h +++ b/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -656,10 +657,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 500 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 650 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FYSETC/Cheetah/BLTouch/Configuration.h b/config/examples/FYSETC/Cheetah/BLTouch/Configuration.h index 4508637ecdfe..058db6b6c6cd 100644 --- a/config/examples/FYSETC/Cheetah/BLTouch/Configuration.h +++ b/config/examples/FYSETC/Cheetah/BLTouch/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -355,6 +353,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -1576,10 +1575,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2021,6 +2020,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2032,7 +2037,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h b/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h index b840108dcf46..4f42307e4bea 100644 --- a/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h +++ b/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -656,10 +657,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 500 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 650 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FYSETC/Cheetah/base/Configuration.h b/config/examples/FYSETC/Cheetah/base/Configuration.h index 32cbd2f0a42f..569784a298b1 100644 --- a/config/examples/FYSETC/Cheetah/base/Configuration.h +++ b/config/examples/FYSETC/Cheetah/base/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FYSETC/Cheetah/base/Configuration_adv.h b/config/examples/FYSETC/Cheetah/base/Configuration_adv.h index b840108dcf46..4f42307e4bea 100644 --- a/config/examples/FYSETC/Cheetah/base/Configuration_adv.h +++ b/config/examples/FYSETC/Cheetah/base/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -656,10 +657,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 500 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 650 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FYSETC/F6_13/Configuration.h b/config/examples/FYSETC/F6_13/Configuration.h index da991ed98697..1f6bed0f4b51 100644 --- a/config/examples/FYSETC/F6_13/Configuration.h +++ b/config/examples/FYSETC/F6_13/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -361,6 +359,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -404,7 +403,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1581,10 +1580,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2035,6 +2034,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2046,7 +2051,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FYSETC/F6_13/Configuration_adv.h b/config/examples/FYSETC/F6_13/Configuration_adv.h index 7db5db8598f7..3dd442d6acb2 100644 --- a/config/examples/FYSETC/F6_13/Configuration_adv.h +++ b/config/examples/FYSETC/F6_13/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1018,8 +1027,8 @@ */ #define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN #endif /** @@ -1134,6 +1143,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1153,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1486,14 +1555,14 @@ * Requires NOZZLE_PARK_FEATURE. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. */ -//#define ADVANCED_PAUSE_FEATURE +#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract. // This short retract is done immediately, before parking the nozzle. #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 0 // (mm) The length of filament for a complete unload. // For Bowden, the full length of the tube and nozzle. // For direct drive, the full length of the nozzle. // Set to 0 for manual unloading. @@ -1647,78 +1716,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1831,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1941,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1970,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2329,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2390,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Felix/Configuration.h b/config/examples/Felix/Configuration.h index 40c9a2fb9dea..75237aef24ad 100644 --- a/config/examples/Felix/Configuration.h +++ b/config/examples/Felix/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, Felix)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1561,10 +1560,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2015,6 +2014,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2026,7 +2031,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Felix/Configuration_adv.h b/config/examples/Felix/Configuration_adv.h index 950fd138fb74..8acd047ed6f9 100644 --- a/config/examples/Felix/Configuration_adv.h +++ b/config/examples/Felix/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Felix/DUAL/Configuration.h b/config/examples/Felix/DUAL/Configuration.h index 410c533730e3..561d77a55124 100644 --- a/config/examples/Felix/DUAL/Configuration.h +++ b/config/examples/Felix/DUAL/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, Felix/DUAL)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1561,10 +1560,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2015,6 +2014,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2026,7 +2031,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FlashForge/CreatorPro/Configuration.h b/config/examples/FlashForge/CreatorPro/Configuration.h index 180ba94ba0e2..0723a5afbfdd 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration.h +++ b/config/examples/FlashForge/CreatorPro/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "M. Baker" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -2 #define TEMP_SENSOR_1 -2 @@ -1570,10 +1569,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2024,6 +2023,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2035,7 +2040,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/config/examples/FlashForge/CreatorPro/Configuration_adv.h index d1c1ccb0d9f1..02877a0302b9 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration_adv.h +++ b/config/examples/FlashForge/CreatorPro/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 255 // User defined GREEN value + #define LED_USER_PRESET_BLUE 255 // 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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 255 // User defined GREEN value - #define LED_USER_PRESET_BLUE 255 // 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/FolgerTech/i3-2020/Configuration.h b/config/examples/FolgerTech/i3-2020/Configuration.h index ae77f47bc921..de119d5c389d 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/config/examples/FolgerTech/i3-2020/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1588,10 +1587,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2042,6 +2041,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2053,7 +2058,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 51e3a1d3e130..42faae5dfeba 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Formbot/Raptor/Configuration.h b/config/examples/Formbot/Raptor/Configuration.h index c12737412131..d8196751a792 100644 --- a/config/examples/Formbot/Raptor/Configuration.h +++ b/config/examples/Formbot/Raptor/Configuration.h @@ -111,13 +111,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Tinymachines3D" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -130,10 +125,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -400,6 +398,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -443,7 +442,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1684,10 +1683,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2138,6 +2137,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2149,7 +2154,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Formbot/Raptor/Configuration_adv.h b/config/examples/Formbot/Raptor/Configuration_adv.h index 344b023e3d38..0890934223a0 100644 --- a/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/config/examples/Formbot/Raptor/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1751,6 +1847,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1859,10 +1957,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1986,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2345,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2406,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Formbot/T_Rex_2+/Configuration.h b/config/examples/Formbot/T_Rex_2+/Configuration.h index ff82069ab876..5988be8b4a27 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration.h @@ -73,13 +73,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Formbot-3D" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -92,10 +87,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -368,6 +366,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -411,7 +410,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1613,10 +1612,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2067,6 +2066,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2078,7 +2083,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index ac41ec45d8e8..6c766ce1b235 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -661,10 +662,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -854,11 +855,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -883,23 +908,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -934,6 +942,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1013,17 +1022,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1138,6 +1161,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1147,6 +1171,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1651,78 +1734,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1753,6 +1849,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1861,10 +1959,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1888,6 +1988,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2246,6 +2347,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2300,6 +2408,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Formbot/T_Rex_3/Configuration.h b/config/examples/Formbot/T_Rex_3/Configuration.h index ca14491baf46..d7be24f00e9a 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration.h +++ b/config/examples/Formbot/T_Rex_3/Configuration.h @@ -74,13 +74,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Formbot-3D" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -93,10 +88,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. #define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -363,6 +361,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -406,7 +405,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1604,10 +1603,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2061,6 +2060,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2072,7 +2077,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/config/examples/Formbot/T_Rex_3/Configuration_adv.h index d7ea6ed9fe6c..e92340dc6ac5 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -661,10 +662,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -854,11 +855,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -883,23 +908,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -934,6 +942,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1013,17 +1022,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1138,6 +1161,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1147,6 +1171,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1651,78 +1734,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1753,6 +1849,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1861,10 +1959,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1888,6 +1988,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2246,6 +2347,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2300,6 +2408,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Geeetech/A10/Configuration.h b/config/examples/Geeetech/A10/Configuration.h index 7e0fb6b8bf44..a56c41d52000 100644 --- a/config/examples/Geeetech/A10/Configuration.h +++ b/config/examples/Geeetech/A10/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Phr3d13, Geeetech A10 default)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1564,10 +1563,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2018,6 +2017,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2029,7 +2034,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/A10/Configuration_adv.h b/config/examples/Geeetech/A10/Configuration_adv.h index 135bece867df..7faaf1cc0683 100644 --- a/config/examples/Geeetech/A10/Configuration_adv.h +++ b/config/examples/Geeetech/A10/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Geeetech/A10M/Configuration.h b/config/examples/Geeetech/A10M/Configuration.h index 6dec6f844b50..33e835d69250 100644 --- a/config/examples/Geeetech/A10M/Configuration.h +++ b/config/examples/Geeetech/A10M/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1564,10 +1563,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2018,6 +2017,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2029,7 +2034,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/A10M/Configuration_adv.h b/config/examples/Geeetech/A10M/Configuration_adv.h index feced7eb1741..c8dae6bb45ed 100644 --- a/config/examples/Geeetech/A10M/Configuration_adv.h +++ b/config/examples/Geeetech/A10M/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) #define POWER_LOSS_PIN 69 // Pin to detect power loss #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ #define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Geeetech/A20M/Configuration.h b/config/examples/Geeetech/A20M/Configuration.h index 702017db7336..d2cff9902a2a 100644 --- a/config/examples/Geeetech/A20M/Configuration.h +++ b/config/examples/Geeetech/A20M/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1563,10 +1562,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2020,6 +2019,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2031,7 +2036,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/A20M/Configuration_adv.h b/config/examples/Geeetech/A20M/Configuration_adv.h index 93a2c38479e5..a386caae9f10 100644 --- a/config/examples/Geeetech/A20M/Configuration_adv.h +++ b/config/examples/Geeetech/A20M/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) #define POWER_LOSS_PIN 69 // Pin to detect power loss #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ #define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Geeetech/GT2560/Configuration.h b/config/examples/Geeetech/GT2560/Configuration.h index b79a7b2310cf..a3c0b9e66c59 100644 --- a/config/examples/Geeetech/GT2560/Configuration.h +++ b/config/examples/Geeetech/GT2560/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1594,10 +1593,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2048,6 +2047,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2059,7 +2064,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 7c5102b70423..a2b7d1bfb21b 100644 --- a/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(R. de Weerd, I3 Pro X)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/MeCreator2/Configuration.h b/config/examples/Geeetech/MeCreator2/Configuration.h index c89d38099531..65c64440ce29 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration.h +++ b/config/examples/Geeetech/MeCreator2/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Phr3d13, MeCreator2)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1586,10 +1585,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2040,6 +2039,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2051,7 +2056,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/config/examples/Geeetech/MeCreator2/Configuration_adv.h index 723b821a5626..ff8062eefa87 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 287178a539ed..533d9f9a3a5f 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(1138-4EB, Geeetech Prusa i3 Pro B BLTouch config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1600,10 +1599,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2054,6 +2053,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2065,7 +2070,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 62c8da63dc96..0554e3511c3d 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(1138-4EB, Geeetech Prusa i3 Pro B config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1599,10 +1598,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2053,6 +2052,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2064,7 +2069,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 1b905488f525..9339c97deae4 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Phr3d13, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 135bece867df..7faaf1cc0683 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index 924bb67f944b..1e6cc0a8dfdc 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Phr3d13, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 135bece867df..7faaf1cc0683 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/HMS434/Configuration.h b/config/examples/HMS434/Configuration.h new file mode 100644 index 000000000000..ba9ea6f8da32 --- /dev/null +++ b/config/examples/HMS434/Configuration.h @@ -0,0 +1,2197 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// Author info of this build printed to the host during boot and M115 +#define STRING_CONFIG_H_AUTHOR "(Scheepers, MaukCC)" // Who made the changes. + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. +//#define SHOW_CUSTOM_BOOTSCREEN + +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_2 -1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// Choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_CNCONTROLS_15 +#endif + +// Name displayed in the LCD "Ready" message and Info menu +//#define CUSTOM_MACHINE_NAME "3D Printer" + +// Printer's unique ID, used by some programs to differentiate between machines. +// Choose your own or use a service like http://www.uuidgenerator.net/version4 +#define MACHINE_UUID "75083866-86ea-42b2-b475-7b3a7855e716" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +/** + * Electromagnetic Switching Toolhead + * + * Parking for CoreXY / HBot kinematics. + * Toolheads are parked at one edge and held with an electromagnet. + * Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4 + */ +//#define ELECTROMAGNETIC_SWITCHING_TOOLHEAD + +#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY { 90, 150 } // (mm) Security distance X axis (T0,T1) + //#define PRIME_BEFORE_REMOVE // Prime the nozzle before release from the dock + #if ENABLED(PRIME_BEFORE_REMOVE) + #define SWITCHING_TOOLHEAD_PRIME_MM 20 // (mm) Extruder prime length + #define SWITCHING_TOOLHEAD_RETRACT_MM 10 // (mm) Retract after priming length + #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE 300 // (mm/m) Extruder prime feedrate + #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400 // (mm/m) Extruder retract feedrate + #endif + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Z_HOP 2 // (mm) Z raise for switching + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Power Supply Control + * + * Enable and connect the power supply to the PS_ON_PIN. + * Specify whether the power supply is active HIGH or active LOW. + */ +//#define PSU_CONTROL +//#define PSU_NAME "Power Supply" + +#if ENABLED(PSU_CONTROL) + #define PSU_ACTIVE_HIGH false // Set 'false' for ATX (1), 'true' for X-Box (2) + + //#define PS_DEFAULT_OFF // Keep power off until enabled directly with M80 + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU over this temperature + //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU over this temperature + #define POWER_TIMEOUT 30 + #endif +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 + * 20 : Pt100 with circuit in the Ultimainboard V2.x + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 -1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 331 +#define TEMP_SENSOR_CHAMBER 331 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 5 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 410 +#define HEATER_1_MAXTEMP 410 +#define HEATER_2_MAXTEMP 410 +#define HEATER_3_MAXTEMP 410 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX 170 // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + #define DEFAULT_Kp 11.3 + #define DEFAULT_Ki 0.61 + #define DEFAULT_Kd 52.77 + +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + //#define MIN_BED_POWER 0 + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 18 + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, + * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +//#define X_DRIVER_TYPE A4988 +//#define Y_DRIVER_TYPE A4988 +//#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +//#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 53.45, 71.19, 160, 169.05 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 1000, 1000, 40, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 10000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Junction Deviation + * + * Use Junction Deviation instead of traditional Jerk Limiting + * + * See: + * https://reprap.org/forum/read.php?1,739819 + * http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html + */ +//#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 + #define DEFAULT_ZJERK 0.3 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH + +/** + * Touch-MI Probe by hotends.fr + * + * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed. + * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is + * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position. + * + * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, + * and a minimum Z_HOMING_HEIGHT of 10. + */ +//#define TOUCH_MI_PROBE +#if ENABLED(TOUCH_MI_PROBE) + #define TOUCH_MI_RETRACT_Z 0.5 // Height at which the probe retracts + //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2) // For a magnet on the right side of the bed + //#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu) +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER -21 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 22 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER -1.54 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 20 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 12000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST 900 + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW 100 + +/** + * Multiple Probing + * + * You may get improved results by probing 2 or more times. + * With EXTRA_PROBING the more atypical reading(s) will be disregarded. + * + * A total of 2 does fast/slow probes with a weighted average. + * A total of 3 or more adds more slow probes, taking the average. + */ +#define MULTIPLE_PROBING 2 +//#define EXTRA_PROBING 1 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 1 // Z Clearance between multiple probes +#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR true +#define INVERT_Y_DIR false +#define INVERT_Z_DIR true + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 450 +#define Y_BED_SIZE 325 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS -72 +#define Y_MIN_POS -84 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 400 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 5 + #define GRID_MAX_POINTS_Y 3 + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (6000) +#define HOMING_FEEDRATE_Z (900) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 180 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { 225, -50, 5 } + #define NOZZLE_PARK_XY_FEEDRATE 150 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 15 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 4 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 2 + + // Specify positions as { X, Y, Z } . Leave Z blank to not change the Z position + #define NOZZLE_CLEAN_START_POINT { -37, -67, } + #define NOZZLE_CLEAN_END_POINT { 100, 60, (Z_MIN_POS + 1) } + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 8 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Move the nozzle to the initial position after cleaning + #define NOZZLE_CLEAN_GOBACK + + // Enable for a purge/clean station that's always at the gantry height (thus no Z move) + #define NOZZLE_CLEAN_NO_Z +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// This option reverses the encoder direction for Select Screen. +// +// If CLOCKWISE normally moves LEFT this makes it go RIGHT. +// If CLOCKWISE normally moves RIGHT this makes it go LEFT. +// +//#define REVERSE_SELECT_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// MKS MINI12864 with graphic controller and SD support +// https://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/ +// +//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +//#define ANET_FULL_GRAPHICS_LCD + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//============================== OLED Displays ============================== +//============================================================================= + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + #define U8GLIB_SSD1306 + //#define U8GLIB_SH1106 +#endif + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// Einstart S OLED SSD1306 +// +//#define U8GLIB_SH1106_EINSTART + +// +// Overlord OLED display/controller with i2c buzzer and LEDs +// +//#define OVERLORD_OLED + +//============================================================================= +//========================== Extensible UI Displays =========================== +//============================================================================= + +// +// DGUS Touch Display with DWIN OS +// +//#define DGUS_LCD + +// +// Touch-screen LCD for Malyan M200 printers +// +//#define MALYAN_LCD + +// +// Third-party or vendor-customized controller interfaces. +// Sources should be installed in 'src/lcd/extensible_ui'. +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) +// +//#define FSMC_GRAPHICAL_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 +// +//#define TOUCH_BUTTONS +#if ENABLED(TOUCH_BUTTONS) + #define XPT2046_X_CALIBRATION 12316 + #define XPT2046_Y_CALIBRATION -8981 + #define XPT2046_X_OFFSET -43 + #define XPT2046_Y_OFFSET 257 +#endif + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE + //#define NEOPIXEL2_PIN 5 + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup + + // Use a single Neopixel LED for static (background) lighting + //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use + //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/HMS434/Configuration_adv.h b/config/examples/HMS434/Configuration_adv.h new file mode 100644 index 000000000000..42903664210a --- /dev/null +++ b/config/examples/HMS434/Configuration_adv.h @@ -0,0 +1,2609 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 18 + #define CHAMBER_MAXTEMP 75 + #define TEMP_CHAMBER_HYSTERESIS 2 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 900 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 900 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 2.0 // compensate for 3V3 ref voltage +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ + +#define EXTRUDER_AUTO_FAN_TEMPERATURE 35 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed +#define CHAMBER_AUTO_FAN_TEMPERATURE 28 +#define CHAMBER_AUTO_FAN_SPEED 255 + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu + //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +#if ENABLED(BLTOUCH) + /** + * Either: Use the defaults (recommended) or: For special purposes, use the following DEFINES + * Do not activate settings that the probe might not understand. Clones might misunderstand + * advanced commands. + * + * Note: If the probe is not deploying, check a "Cmd: Reset" and "Cmd: Self-Test" and then + * check the wiring of the BROWN, RED and ORANGE wires. + * + * Note: If the trigger signal of your probe is not being recognized, it has been very often + * because the BLACK and WHITE wires needed to be swapped. They are not "interchangeable" + * like they would be with a real switch. So please check the wiring first. + * + * Settings for all BLTouch and clone probes: + */ + + // Safety: The probe needs time to recognize the command. + // Minimum command delay (ms). Enable and increase if needed. + //#define BLTOUCH_DELAY 500 + + /** + * Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones: + */ + + // Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful + // in special cases, like noisy or filtered input configurations. + //#define BLTOUCH_FORCE_SW_MODE + + /** + * Settings for BLTouch Smart 3.0 and 3.1 + * Summary: + * - Voltage modes: 5V and OD (open drain - "logic voltage free") output modes + * - High-Speed mode + * - Disable LCD voltage options + */ + + /** + * Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller! + * V3.0 or 3.1: Set default mode to 5V mode at Marlin startup. + * If disabled, OD mode is the hard-coded default on 3.0 + * On startup, Marlin will compare its eeprom to this vale. If the selected mode + * differs, a mode set eeprom write will be completed at initialization. + * Use the option below to force an eeprom write to a V3.1 probe regardless. + */ + //#define BLTOUCH_SET_5V_MODE + + /** + * Safety: Activate if connecting a probe with an unknown voltage mode. + * V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0 + * V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write ) + * To preserve the life of the probe, use this once then turn it off and re-flash. + */ + //#define BLTOUCH_FORCE_MODE_SET + + /** + * Use "HIGH SPEED" mode for probing. + * Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems. + * This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function + * If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state. + */ + //#define BLTOUCH_HS_MODE + + // Safety: Enable voltage mode settings in the LCD menu. + //#define BLTOUCH_LCD_VOLTAGE_MENU + +#endif // BLTOUCH + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + + // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm + #define G34_MAX_GRADE 5 // (%) Maximum incline G34 will handle + + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES { false, false, false, false } + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // Set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel + #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm) + #if ENABLED(ULTIPANEL) + #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" + #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen + #endif +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU +#if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages +#endif + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +/** + * 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) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + // Leave the heaters on after Stop Print (not recommended!) + //#define SD_ABORT_NO_COOLDOWN + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define SD_ABORT_ON_ENDSTOP_HIT + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E can be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN [1] + * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + #if HAS_SDCARD_CONNECTION + /** + * Set this option to one of the following (or the board's defaults apply): + * + * LCD - Use the SD drive in the external LCD controller. + * ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + * CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file). + * + * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ] + */ + //#define SDCARD_CONNECTION LCD + #endif + +#endif // SDSUPPORT + +/** + * By default an onboard SD card reader may be shared as a USB mass- + * storage device. This option hides the SD card from the host PC. + */ +//#define NO_SD_HOST_DRIVE // Disable SD Card access over USB (for security). + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + //#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu + +#endif // HAS_GRAPHICAL_LCD + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 16 // Babysteps are very small. Increase for faster motion. + + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.02 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 8 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 8 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 32 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + #define SERIAL_XON_XOFF +#endif + +// Add M575 G-code to change the baud rate +//#define BAUD_RATE_GCODE + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + //#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 30 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 0 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + + /** + * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. + * Set the address using jumpers on pins MS1 and MS2. + * Address | MS1 | MS2 + * 0 | LOW | LOW + * 1 | HIGH | LOW + * 2 | LOW | HIGH + * 3 | HIGH | HIGH + * + * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers + * on the same serial port, either here or in your board's pins file. + */ + #define X_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 0 + #define Z_SLAVE_ADDRESS 0 + #define X2_SLAVE_ADDRESS 0 + #define Y2_SLAVE_ADDRESS 0 + #define Z2_SLAVE_ADDRESS 0 + #define Z3_SLAVE_ADDRESS 0 + #define E0_SLAVE_ADDRESS 0 + #define E1_SLAVE_ADDRESS 0 + #define E2_SLAVE_ADDRESS 0 + #define E3_SLAVE_ADDRESS 0 + #define E4_SLAVE_ADDRESS 0 + #define E5_SLAVE_ADDRESS 0 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * Use StallGuard2 to home / probe X, Y, Z. + * + * TMC2130, TMC2160, TMC2209, TMC2660, TMC5130, and TMC5160 only + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) + * + * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. + * + * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** + * Poll the driver through SPI to determine load when homing. + * Removes the need for a wire from DIAG1 to an endstop pin. + * + * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when + * homing and adds a guard period for endstop triggering. + */ + //#define SENSORLESS_HOMING // StallGuard capable drivers only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // StallGuard capable drivers only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + // TMC2209: 0...255. TMC2130: -64...63 + #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + //#define SPI_ENDSTOPS // TMC2130 only + //#define IMPROVE_HOMING_RELIABILITY + #endif + + /** + * Beta feature! + * Create a 50/50 square wave step pulse optimal for stepper drivers. + */ + //#define SQUARE_WAVE_STEPPING + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop + + #if ENABLED(SPINDLE_FEATURE) + //#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction + #define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction + #define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif +#endif + +/** + * Coolant Control + * + * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off. + * + * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined. + */ +//#define COOLANT_CONTROL +#if ENABLED(COOLANT_CONTROL) + #define COOLANT_MIST // Enable if mist coolant is present + #define COOLANT_FLOOD // Enable if flood coolant is present + #define COOLANT_MIST_INVERT false // Set "true" if the on/off function is reversed + #define COOLANT_FLOOD_INVERT false // Set "true" if the on/off function is reversed +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + //#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + #define SERVICE_NAME_1 "Lubricate axis" + #define SERVICE_INTERVAL_1 100 // print hours + #define SERVICE_NAME_2 "Change X an Y belt" + #define SERVICE_INTERVAL_2 300 // print hours + #define SERVICE_NAME_3 "Change Z belt" + #define SERVICE_INTERVAL_3 1000 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/Infitary/i3-M508/Configuration.h b/config/examples/Infitary/i3-M508/Configuration.h index d60bdece1b88..94ee2072a981 100644 --- a/config/examples/Infitary/i3-M508/Configuration.h +++ b/config/examples/Infitary/i3-M508/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(tjclement, Infitary M508)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1583,10 +1582,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2037,6 +2036,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2048,7 +2053,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Infitary/i3-M508/Configuration_adv.h b/config/examples/Infitary/i3-M508/Configuration_adv.h index 870a7a1c01eb..1611f7c12abc 100644 --- a/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ //#define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/JGAurora/A1/Configuration.h b/config/examples/JGAurora/A1/Configuration.h index 43436a4e4fd5..32efe8d35d4c 100644 --- a/config/examples/JGAurora/A1/Configuration.h +++ b/config/examples/JGAurora/A1/Configuration.h @@ -70,18 +70,13 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 // ╦╔═╗╔═╗┬ ┬┬─┐┌─┐┬─┐┌─┐╔═╗┌─┐┬─┐┬ ┬┌┬┐ ┌─┐┌─┐┌┬┐ // ║║ ╦╠═╣│ │├┬┘│ │├┬┘├─┤╠╣ │ │├┬┘│ ││││ │ │ ││││ // ╚╝╚═╝╩ ╩└─┘┴└─└─┘┴└─┴ ┴╚ └─┘┴└─└─┘┴ ┴o└─┘└─┘┴ ┴ #define STRING_CONFIG_H_AUTHOR "(Roberto Mariani & Samuel Pinches)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 "JG-A1 v2.0 (29-7-19)" // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 "JGAuroraForum.com" // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -94,10 +89,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -364,6 +362,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -407,7 +406,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1586,10 +1585,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2041,6 +2040,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2052,7 +2057,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // #define FSMC_GRAPHICAL_TFT //#define PRINTER_EVENT_LEDS diff --git a/config/examples/JGAurora/A1/Configuration_adv.h b/config/examples/JGAurora/A1/Configuration_adv.h index 558c7dbc88f0..ffc43406418b 100644 --- a/config/examples/JGAurora/A1/Configuration_adv.h +++ b/config/examples/JGAurora/A1/Configuration_adv.h @@ -284,9 +284,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -662,10 +663,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -855,11 +856,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -884,23 +909,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -935,6 +943,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1014,17 +1023,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1139,6 +1162,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1148,6 +1172,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1652,78 +1735,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1754,6 +1850,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1862,10 +1960,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1889,6 +1989,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2247,6 +2348,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2301,6 +2409,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/JGAurora/A5/Configuration.h b/config/examples/JGAurora/A5/Configuration.h index 0fbcf2ec0d5f..3d6493bfed98 100644 --- a/config/examples/JGAurora/A5/Configuration.h +++ b/config/examples/JGAurora/A5/Configuration.h @@ -75,13 +75,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Telli Mantelli, Kris Waclawski, Samuel Pinches & Michael Gilardi, 21 Jan 2018)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -94,10 +89,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -364,6 +362,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -407,7 +406,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 15 // manual calibration of thermistor in JGAurora A5 hotend #define TEMP_SENSOR_1 0 @@ -1591,10 +1590,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2045,6 +2044,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2056,7 +2061,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/JGAurora/A5/Configuration_adv.h b/config/examples/JGAurora/A5/Configuration_adv.h index d1a29c977b58..9f4c112c35d3 100644 --- a/config/examples/JGAurora/A5/Configuration_adv.h +++ b/config/examples/JGAurora/A5/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/JGAurora/A5S/Configuration.h b/config/examples/JGAurora/A5S/Configuration.h index 898d333ca6e3..aed6764b16c3 100644 --- a/config/examples/JGAurora/A5S/Configuration.h +++ b/config/examples/JGAurora/A5S/Configuration.h @@ -70,18 +70,13 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 // ╦╔═╗╔═╗┬ ┬┬─┐┌─┐┬─┐┌─┐╔═╗┌─┐┬─┐┬ ┬┌┬┐ ┌─┐┌─┐┌┬┐ // ║║ ╦╠═╣│ │├┬┘│ │├┬┘├─┤╠╣ │ │├┬┘│ ││││ │ │ ││││ // ╚╝╚═╝╩ ╩└─┘┴└─└─┘┴└─┴ ┴╚ └─┘┴└─└─┘┴ ┴o└─┘└─┘┴ ┴ #define STRING_CONFIG_H_AUTHOR "(Roberto Mariani & Samuel Pinches)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 "JG-A5S v2.0 (29-7-19)" // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 "JGAuroraForum.com" // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -94,10 +89,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -364,6 +362,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -407,7 +406,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1586,10 +1585,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2041,6 +2040,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2052,7 +2057,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // #define FSMC_GRAPHICAL_TFT //#define PRINTER_EVENT_LEDS diff --git a/config/examples/JGAurora/A5S/Configuration_adv.h b/config/examples/JGAurora/A5S/Configuration_adv.h index 558c7dbc88f0..ffc43406418b 100644 --- a/config/examples/JGAurora/A5S/Configuration_adv.h +++ b/config/examples/JGAurora/A5S/Configuration_adv.h @@ -284,9 +284,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -662,10 +663,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -855,11 +856,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -884,23 +909,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -935,6 +943,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1014,17 +1023,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1139,6 +1162,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1148,6 +1172,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1652,78 +1735,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1754,6 +1850,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1862,10 +1960,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1889,6 +1989,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2247,6 +2348,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2301,6 +2409,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/MakerParts/Configuration.h b/config/examples/MakerParts/Configuration.h index 4700d5878a27..27c06b476b01 100644 --- a/config/examples/MakerParts/Configuration.h +++ b/config/examples/MakerParts/Configuration.h @@ -90,13 +90,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "ejtagle" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -109,10 +104,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -379,6 +377,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -422,7 +421,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1599,10 +1598,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2053,6 +2052,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2064,7 +2069,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/MakerParts/Configuration_adv.h b/config/examples/MakerParts/Configuration_adv.h index b2a62ba978cd..170603416ec7 100644 --- a/config/examples/MakerParts/Configuration_adv.h +++ b/config/examples/MakerParts/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ diff --git a/config/examples/Malyan/M150/Configuration.h b/config/examples/Malyan/M150/Configuration.h index 890b8d4c7b22..c2376fee455b 100644 --- a/config/examples/Malyan/M150/Configuration.h +++ b/config/examples/Malyan/M150/Configuration.h @@ -75,13 +75,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Gunther)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -94,10 +89,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -364,6 +362,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -407,7 +406,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1607,10 +1606,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2061,6 +2060,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2072,7 +2077,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Malyan/M150/Configuration_adv.h b/config/examples/Malyan/M150/Configuration_adv.h index e88b180435df..ee9fb70034d2 100644 --- a/config/examples/Malyan/M150/Configuration_adv.h +++ b/config/examples/Malyan/M150/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Malyan/M200/Configuration.h b/config/examples/Malyan/M200/Configuration.h index 39fbccdaf705..bbba62e74492 100644 --- a/config/examples/Malyan/M200/Configuration.h +++ b/config/examples/Malyan/M200/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(xC0000005, Malyan M200 build)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 @@ -1578,10 +1577,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2030,7 +2029,13 @@ // // Touch-screen LCD for Malyan M200 printers // -//#define MALYAN_LCD +#define MALYAN_LCD + +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI // // Third-party or vendor-customized controller interfaces. @@ -2043,7 +2048,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT @@ -2051,15 +2056,6 @@ //============================ Other Controllers ============================ //============================================================================= -// -// CONTROLLER TYPE: Standalone / Serial -// - -// -// LCD for Malyan M200 printers. -// -#define MALYAN_LCD - // // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 // diff --git a/config/examples/Malyan/M200/Configuration_adv.h b/config/examples/Malyan/M200/Configuration_adv.h index e2b77c9b2ed7..620fde8877ec 100644 --- a/config/examples/Malyan/M200/Configuration_adv.h +++ b/config/examples/Malyan/M200/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Malyan/M200/README.md b/config/examples/Malyan/M200/README.md new file mode 100644 index 000000000000..84490786e191 --- /dev/null +++ b/config/examples/Malyan/M200/README.md @@ -0,0 +1,33 @@ +### Malyan M200 Build Instructions + +Malyan M200 series firmware currently builds using the Arduino IDE. These instructions should +guide you through the configuration and compilation. + +1. Install the Arduino IDE from your favorite source (arduino.cc, windows store, app store) +2. Launch the IDE to add the ST boards manager: + - Open the **Preferences** dialog. + - Add this link in the "*Additional Boards Managers URLs*" field: + https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json + - Select "**Show verbose ouptut during: compilation**." +3. Select **Tools** > **Board** > **Boards Manager**. +4. Type "Malyan" into the Search field. +5. The only board listed will be "**STM32 Cores by STMicroelectronics**." Any version from 1.6.0 up is fine. Choose install. This will download many tools and packages, be patient. +6. Open the **Tools** > **Board** submenu, scroll all the way down, and select **3D Printer Boards**. +7. From the **Tools** menu, select a board part number: + - If you own a M200 V1 or early run (black V2), choose **Malyan M200 V1**. + - If you own a M200 V2 later run (white/black) or V3 (Pro), choose **Malyan M200 V2** (The V2 and V3 both share an STM32F070 MCU). Note that the V3 pinout is not complete (autolevel doesn't work as of this writing). +8. From the **Tools** menu, choose **USB Support** > **CDC No Generic Serial**. +9. Download the latest Marlin source (from the [bugfix-2.0.x](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x) branch) and unzip it. +10. Look in the `Marlin` subdirectory for the `Configuration.h` and `Configuration_adv.h` files. Replace these files with the configurations in the `config\examples\Malyan\M200` folder. +11. If you have an early-run V2, the steps-per-mm are roughly half. Consult the [mpminipro.com wiki](https://mpminipro.com/) for the steps that apply to your unit. Modify `Configuration.h`. +12. Inverting Axis. There's no pattern to axes will need to be inverted. The only way to know is to test your particular printer. If you *do* know, go ahead and invert the correct axes. +13. Open the `Marlin/Marlin.ino` file in Arduino IDE. +14. From the **Sketch** menu, select **File** > **Export Compiled Binary**. +15. When compilation is done you've built the firmware. The next stage is to flash it to the board. To do this look for a line like this: `"path/to/bin/arm-none-eabi-objcopy" -O binary "/path/to/Marlin.ino.elf" "/path/to/Marlin.ino.bin"` + The file `Marlin.ino.bin` is your firmware binary. M200 (v1-3) and M300 printers require flashing via SD card. Use the SD card that came with the printer if possible. The bootloader is very picky about SD cards. Copy `Marlin.ino.bin` to your SD card under three names: `firmware.bin`, `update.bin`, and `fcupdate.flg`. +16. Insert the SD card into your printer. Make sure the X and Y axes are centered in the middle of the bed. (When X and Y endstops are closed this signals a UI upgrade to the bootloader.) +17. Power-cycle the printer. The first flash may take longer. Don't be surprised if the .99 version number doesn't show up until after the UI has launched the default screen. +18. Remove the SD card and delete the `fcupdate.flg` file from the card to prevent an accidental re-flash. +19. Test the endstops and homing directions, run M303 PID autotune, and verify all features are working correctly. + +Welcome to Marlin 2.x... diff --git a/config/examples/Micromake/C1/basic/Configuration.h b/config/examples/Micromake/C1/basic/Configuration.h index 44fc963c8fb4..12397b98a047 100644 --- a/config/examples/Micromake/C1/basic/Configuration.h +++ b/config/examples/Micromake/C1/basic/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(MetalSearch, Micromake C1 factory settings)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1583,10 +1582,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2037,6 +2036,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2048,7 +2053,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Micromake/C1/enhanced/Configuration.h b/config/examples/Micromake/C1/enhanced/Configuration.h index 9a2867bc3f13..da50471d135c 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/config/examples/Micromake/C1/enhanced/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(MetalSearch, Micromake C1 enhanced)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1583,10 +1582,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2037,6 +2036,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2048,7 +2053,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/config/examples/Micromake/C1/enhanced/Configuration_adv.h index addbfce9e2dd..f87fe652c01e 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Mks/Robin/Configuration.h b/config/examples/Mks/Robin/Configuration.h index b8d3e6028852..2e1c8fe7e860 100644 --- a/config/examples/Mks/Robin/Configuration.h +++ b/config/examples/Mks/Robin/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -360,6 +358,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -403,7 +402,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1580,10 +1579,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2035,6 +2034,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2046,7 +2051,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // #define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Mks/Robin/Configuration_adv.h b/config/examples/Mks/Robin/Configuration_adv.h index d132396cbd36..441fee3a60df 100644 --- a/config/examples/Mks/Robin/Configuration_adv.h +++ b/config/examples/Mks/Robin/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Mks/Sbase/Configuration.h b/config/examples/Mks/Sbase/Configuration.h index e9c7159e53e9..5fefc7e3e3ab 100644 --- a/config/examples/Mks/Sbase/Configuration.h +++ b/config/examples/Mks/Sbase/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Mks/Sbase/Configuration_adv.h b/config/examples/Mks/Sbase/Configuration_adv.h index 203eb26e1cc1..f5aa68b7617e 100644 --- a/config/examples/Mks/Sbase/Configuration_adv.h +++ b/config/examples/Mks/Sbase/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -851,11 +852,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -880,23 +905,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -931,6 +939,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1010,17 +1019,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1135,6 +1158,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1144,6 +1168,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1648,78 +1731,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1750,6 +1846,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1858,10 +1956,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1885,6 +1985,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2243,6 +2344,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2297,6 +2405,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Printrbot/PrintrboardG2/Configuration.h b/config/examples/Printrbot/PrintrboardG2/Configuration.h index d6085cf86b4a..9989cf4cd994 100644 --- a/config/examples/Printrbot/PrintrboardG2/Configuration.h +++ b/config/examples/Printrbot/PrintrboardG2/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -360,6 +358,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -403,7 +402,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1587,10 +1586,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2041,6 +2040,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2052,7 +2057,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/RapideLite/RL200/Configuration.h b/config/examples/RapideLite/RL200/Configuration.h index c54e613948ad..bc06d0ea9647 100644 --- a/config/examples/RapideLite/RL200/Configuration.h +++ b/config/examples/RapideLite/RL200/Configuration.h @@ -70,14 +70,9 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(platon42)" // Who made the changes. -//#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 - +// /** * *** VENDORS PLEASE READ *** * @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/RapideLite/RL200/Configuration_adv.h b/config/examples/RapideLite/RL200/Configuration_adv.h index 6aa146c16f95..96a333b7d865 100644 --- a/config/examples/RapideLite/RL200/Configuration_adv.h +++ b/config/examples/RapideLite/RL200/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/RepRapPro/Huxley/Configuration.h b/config/examples/RepRapPro/Huxley/Configuration.h index 62a91b1b5049..6b59f07ef8b0 100644 --- a/config/examples/RepRapPro/Huxley/Configuration.h +++ b/config/examples/RepRapPro/Huxley/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(indazoo, Huxley v1)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1628,10 +1627,10 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2082,6 +2081,12 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2093,7 +2098,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/RepRapWorld/Megatronics/Configuration.h b/config/examples/RepRapWorld/Megatronics/Configuration.h index 1d84a576673b..ef3e20eba54f 100644 --- a/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/RigidBot/Configuration.h b/config/examples/RigidBot/Configuration.h index 413bf07ff68e..325c9635de50 100644 --- a/config/examples/RigidBot/Configuration.h +++ b/config/examples/RigidBot/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, RigidBot)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -362,6 +360,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -405,7 +404,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 // DGlass3D = 5; RigidBot = 1; 3DSv6 = 5 #define TEMP_SENSOR_1 0 @@ -1577,10 +1576,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/RigidBot/Configuration_adv.h b/config/examples/RigidBot/Configuration_adv.h index 641797b46a7d..df09c900ddcf 100644 --- a/config/examples/RigidBot/Configuration_adv.h +++ b/config/examples/RigidBot/Configuration_adv.h @@ -279,9 +279,10 @@ */ #define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN 4 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + #define CONTROLLER_FAN_PIN 4 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/SCARA/Configuration.h b/config/examples/SCARA/Configuration.h index cbd0e8930127..c347c57f32b5 100644 --- a/config/examples/SCARA/Configuration.h +++ b/config/examples/SCARA/Configuration.h @@ -97,13 +97,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -116,10 +111,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -386,6 +384,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -429,7 +428,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1588,10 +1587,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2042,6 +2041,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2053,7 +2058,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/SCARA/Configuration_adv.h b/config/examples/SCARA/Configuration_adv.h index 2f4b9bdbf1af..434c70b71ae3 100644 --- a/config/examples/SCARA/Configuration_adv.h +++ b/config/examples/SCARA/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full //#define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration.h b/config/examples/STM32/Black_STM32F407VET6/Configuration.h index 017a763e1796..222a8ef7f000 100644 --- a/config/examples/STM32/Black_STM32F407VET6/Configuration.h +++ b/config/examples/STM32/Black_STM32F407VET6/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h index 892f9653e139..039b8c7f45b9 100644 --- a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h +++ b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/STM32/STM32F10/Configuration.h b/config/examples/STM32/STM32F10/Configuration.h index 1ea7b3636e19..adbc7fc5cc95 100644 --- a/config/examples/STM32/STM32F10/Configuration.h +++ b/config/examples/STM32/STM32F10/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Victor Perez" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION "STM32F103RET6 board" // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #warning temp_sensor set to 998/999 (fake) #define TEMP_SENSOR_0 999 @@ -1581,10 +1580,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2035,6 +2034,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2046,7 +2051,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/STM32/STM32F4/Configuration.h b/config/examples/STM32/STM32F4/Configuration.h index b5171a41af4d..1492a1c57cb5 100644 --- a/config/examples/STM32/STM32F4/Configuration.h +++ b/config/examples/STM32/STM32F4/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/STM32/stm32f103ret6/Configuration.h b/config/examples/STM32/stm32f103ret6/Configuration.h index 8a09ecc75d0b..2a4bb277624b 100644 --- a/config/examples/STM32/stm32f103ret6/Configuration.h +++ b/config/examples/STM32/stm32f103ret6/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "Victor Perez" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION "STM32F103RET6 board" // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #warning temp_sensor set to 998/999 (fake) #define TEMP_SENSOR_0 999 @@ -1581,10 +1580,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2035,6 +2034,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2046,7 +2051,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Sanguinololu/Configuration.h b/config/examples/Sanguinololu/Configuration.h index bd7d65d97bd0..dea98d643dc4 100644 --- a/config/examples/Sanguinololu/Configuration.h +++ b/config/examples/Sanguinololu/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thinkyhead, Sanguinololu)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1610,10 +1609,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2064,6 +2063,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2075,7 +2080,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Sanguinololu/Configuration_adv.h b/config/examples/Sanguinololu/Configuration_adv.h index 3be52a3d76ef..9341b2977bc9 100644 --- a/config/examples/Sanguinololu/Configuration_adv.h +++ b/config/examples/Sanguinololu/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tevo/Michelangelo/Configuration.h b/config/examples/Tevo/Michelangelo/Configuration.h index 71849a7c8539..4d9d7ccc6b6c 100644 --- a/config/examples/Tevo/Michelangelo/Configuration.h +++ b/config/examples/Tevo/Michelangelo/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Tevo Michelangelo)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1334,8 +1333,8 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) +#define HOMING_FEEDRATE_XY (120*60) +#define HOMING_FEEDRATE_Z (30*60) // Validate that endstops are triggered on homing moves #define VALIDATE_HOMING_ENDSTOPS @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -1686,7 +1685,7 @@ // // Set this option if CLOCKWISE causes values to DECREASE // -#define REVERSE_ENCODER_DIRECTION +//#define REVERSE_ENCODER_DIRECTION // // This option reverses the encoder direction for navigating LCD menus. @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tevo/Michelangelo/Configuration_adv.h b/config/examples/Tevo/Michelangelo/Configuration_adv.h index 8088e6170944..dcfbad983d23 100644 --- a/config/examples/Tevo/Michelangelo/Configuration_adv.h +++ b/config/examples/Tevo/Michelangelo/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -656,10 +657,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tevo/Tarantula Pro/Configuration.h b/config/examples/Tevo/Tarantula Pro/Configuration.h index d8e320226425..a7c8c4e2fbcc 100644 --- a/config/examples/Tevo/Tarantula Pro/Configuration.h +++ b/config/examples/Tevo/Tarantula Pro/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Tevo Tarantula Pro)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -513,7 +512,7 @@ * heater. If your configuration is significantly different than this and you don't understand * the issues involved, don't use bed PID until someone else verifies that your hardware works. */ -#define PIDTEMPBED +//#define PIDTEMPBED //#define BED_LIMIT_SWITCHING @@ -1577,10 +1576,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2031,6 +2030,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2042,7 +2047,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h index ba2838391ffa..64878f7ead84 100755 --- a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h +++ b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -653,10 +654,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -846,11 +847,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -875,23 +900,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -926,6 +934,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1005,17 +1014,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1130,6 +1153,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1139,6 +1163,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1643,78 +1726,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1745,6 +1841,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1853,10 +1951,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1880,6 +1980,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2238,6 +2339,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2292,6 +2400,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration.h b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration.h index 1b6648a8f5c8..c94d5297b028 100644 --- a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration.h +++ b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Tevo Tornado V1)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h index 46dce6366394..e8b891f2a45e 100755 --- a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h +++ b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -656,10 +657,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration.h b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration.h index 73088c938f0b..1d451c8b489a 100644 --- a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration.h +++ b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Tevo Tornado V2)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h index 46dce6366394..e8b891f2a45e 100755 --- a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h +++ b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -656,10 +657,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -849,11 +850,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -878,23 +903,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -929,6 +937,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1008,17 +1017,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1133,6 +1156,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1142,6 +1166,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1646,78 +1729,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1748,6 +1844,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1856,10 +1954,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1883,6 +1983,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2241,6 +2342,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2295,6 +2403,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/TheBorg/Configuration.h b/config/examples/TheBorg/Configuration.h index 72e55c5f6364..57c1c765f133 100644 --- a/config/examples/TheBorg/Configuration.h +++ b/config/examples/TheBorg/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Spawn32, The_Borg)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/TheBorg/Configuration_adv.h b/config/examples/TheBorg/Configuration_adv.h index e4c6ffe2c811..ebf642ac1eb4 100644 --- a/config/examples/TheBorg/Configuration_adv.h +++ b/config/examples/TheBorg/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/TinyBoy2/Configuration.h b/config/examples/TinyBoy2/Configuration.h index 74d71e45f30f..15060dc0dadc 100644 --- a/config/examples/TinyBoy2/Configuration.h +++ b/config/examples/TinyBoy2/Configuration.h @@ -86,13 +86,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(StefanB, TinyBoy2)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -105,10 +100,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -381,6 +379,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -424,7 +423,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1635,10 +1634,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2089,6 +2088,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2100,7 +2105,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/TinyBoy2/Configuration_adv.h b/config/examples/TinyBoy2/Configuration_adv.h index ccf77020ebca..54ad2b490129 100644 --- a/config/examples/TinyBoy2/Configuration_adv.h +++ b/config/examples/TinyBoy2/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tronxy/X1/Configuration.h b/config/examples/Tronxy/X1/Configuration.h index 40f36f0b0b2e..c02a890864d9 100644 --- a/config/examples/Tronxy/X1/Configuration.h +++ b/config/examples/Tronxy/X1/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Claus Naeveke, 0.1)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tronxy/X3A/Configuration.h b/config/examples/Tronxy/X3A/Configuration.h index 3bc50c851f52..17d2e7c8daa0 100644 --- a/config/examples/Tronxy/X3A/Configuration.h +++ b/config/examples/Tronxy/X3A/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Schullebernd, Tronxy X3A)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 6 #define TEMP_SENSOR_1 0 @@ -1583,10 +1582,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2037,6 +2036,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2048,7 +2053,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tronxy/X3A/Configuration_adv.h b/config/examples/Tronxy/X3A/Configuration_adv.h index f301ee472875..b5c42fecc2cb 100644 --- a/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/config/examples/Tronxy/X3A/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tronxy/X5S-2E/Configuration.h b/config/examples/Tronxy/X5S-2E/Configuration.h index ac5465eed752..9b42b18ea360 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration.h +++ b/config/examples/Tronxy/X5S-2E/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Anthony Rich, OEM stock config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -361,6 +359,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -404,7 +403,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1600,10 +1599,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2054,6 +2053,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2065,7 +2070,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tronxy/X5S-2E/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Configuration_adv.h index 9317030014c9..bebb8338617c 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration_adv.h +++ b/config/examples/Tronxy/X5S-2E/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Tronxy/X5S/Configuration.h b/config/examples/Tronxy/X5S/Configuration.h index 9727dae89da7..de233d4c4d22 100644 --- a/config/examples/Tronxy/X5S/Configuration.h +++ b/config/examples/Tronxy/X5S/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Tronxy/XY100/Configuration.h b/config/examples/Tronxy/XY100/Configuration.h index 113327327daf..da0d2ea4431a 100644 --- a/config/examples/Tronxy/XY100/Configuration.h +++ b/config/examples/Tronxy/XY100/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Rob Griffiths, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1590,10 +1589,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2044,6 +2043,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2055,7 +2060,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/UltiMachine/Archim1/Configuration.h b/config/examples/UltiMachine/Archim1/Configuration.h index 0e1493bf6639..1661422d8b68 100644 --- a/config/examples/UltiMachine/Archim1/Configuration.h +++ b/config/examples/UltiMachine/Archim1/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/UltiMachine/Archim1/Configuration_adv.h b/config/examples/UltiMachine/Archim1/Configuration_adv.h index 19b8079f53e6..6556ad77d00f 100644 --- a/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/UltiMachine/Archim2/Configuration.h b/config/examples/UltiMachine/Archim2/Configuration.h index babab7bd43ae..d16057199d2b 100644 --- a/config/examples/UltiMachine/Archim2/Configuration.h +++ b/config/examples/UltiMachine/Archim2/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/UltiMachine/Archim2/Configuration_adv.h b/config/examples/UltiMachine/Archim2/Configuration_adv.h index 7c06591c97d6..c4d80f629f5f 100644 --- a/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/VORONDesign/Configuration.h b/config/examples/VORONDesign/Configuration.h index 072932261af5..bca56d5c91d9 100644 --- a/config/examples/VORONDesign/Configuration.h +++ b/config/examples/VORONDesign/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 5 @@ -1588,10 +1587,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2042,6 +2041,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2053,7 +2058,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/VORONDesign/Configuration_adv.h b/config/examples/VORONDesign/Configuration_adv.h index 72e79adc78fb..0b40458c633e 100644 --- a/config/examples/VORONDesign/Configuration_adv.h +++ b/config/examples/VORONDesign/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Velleman/K8200/Configuration.h b/config/examples/Velleman/K8200/Configuration.h index a67195e5e63d..51ddebf8c633 100644 --- a/config/examples/Velleman/K8200/Configuration.h +++ b/config/examples/Velleman/K8200/Configuration.h @@ -86,13 +86,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(K8200, @CONSULitAS)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -105,10 +100,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -379,6 +377,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -422,7 +421,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1612,10 +1611,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2031,6 +2030,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2042,7 +2047,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Velleman/K8200/Configuration_adv.h b/config/examples/Velleman/K8200/Configuration_adv.h index 1c9ebd39c4a1..cf2c4836031c 100644 --- a/config/examples/Velleman/K8200/Configuration_adv.h +++ b/config/examples/Velleman/K8200/Configuration_adv.h @@ -292,9 +292,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -670,10 +671,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -863,11 +864,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -892,23 +917,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -943,6 +951,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1022,17 +1031,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1147,6 +1170,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1156,6 +1180,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1660,78 +1743,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1762,6 +1858,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1870,10 +1968,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1897,6 +1997,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2255,6 +2356,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2309,6 +2417,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Velleman/K8400/Configuration.h b/config/examples/Velleman/K8400/Configuration.h index 2671f81e12cb..1fb962c0111f 100644 --- a/config/examples/Velleman/K8400/Configuration.h +++ b/config/examples/Velleman/K8400/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Anthony Birkett, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Velleman/K8400/Configuration_adv.h b/config/examples/Velleman/K8400/Configuration_adv.h index 104c6c0bd9ec..8242ea4bb450 100644 --- a/config/examples/Velleman/K8400/Configuration_adv.h +++ b/config/examples/Velleman/K8400/Configuration_adv.h @@ -279,9 +279,10 @@ */ #define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN 2 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + #define CONTROLLER_FAN_PIN 2 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Velleman/K8400/Dual-head/Configuration.h b/config/examples/Velleman/K8400/Dual-head/Configuration.h index ee191b328485..85afc42be127 100644 --- a/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Anthony Birkett, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 5 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/WASP/PowerWASP/Configuration.h b/config/examples/WASP/PowerWASP/Configuration.h index b4fffdcfd73f..961fad1941b0 100644 --- a/config/examples/WASP/PowerWASP/Configuration.h +++ b/config/examples/WASP/PowerWASP/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Julian + Jason)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -378,6 +376,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -421,7 +420,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 0 @@ -1598,10 +1597,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2052,6 +2051,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2063,7 +2068,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/WASP/PowerWASP/Configuration_adv.h b/config/examples/WASP/PowerWASP/Configuration_adv.h index 417819c9ea68..9d8dd2ee00b3 100644 --- a/config/examples/WASP/PowerWASP/Configuration_adv.h +++ b/config/examples/WASP/PowerWASP/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) #define POWER_LOSS_PIN 65 // Pin to detect power loss #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Wanhao/Duplicator 6/Configuration.h b/config/examples/Wanhao/Duplicator 6/Configuration.h index 7de297840e8c..b2b60f91c920 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Rob Mendon, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 20 #define TEMP_SENSOR_1 0 @@ -1589,10 +1588,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2046,6 +2045,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2057,7 +2062,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index dadd39b818cf..489238673794 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1751,6 +1847,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1859,10 +1957,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1986,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2345,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2406,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Wanhao/Duplicator i3 Mini/Configuration.h b/config/examples/Wanhao/Duplicator i3 Mini/Configuration.h index f32ae7ae9462..635424ba684c 100755 --- a/config/examples/Wanhao/Duplicator i3 Mini/Configuration.h +++ b/config/examples/Wanhao/Duplicator i3 Mini/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Wanhao i3 Mini)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -//#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. -//#define SHOW_CUSTOM_BOOTSCREEN +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. +#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 13 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -1895,7 +1894,7 @@ // MakerLab Mini Panel with graphic // controller and SD support - http://reprap.org/wiki/Mini_panel // -//#define MINIPANEL +#define MINIPANEL // // MaKr3d Makr-Panel with graphic controller and SD support. @@ -1936,7 +1935,7 @@ // MKS MINI12864 with graphic controller and SD support // https://reprap.org/wiki/MKS_MINI_12864 // -#define MKS_MINI_12864 +//#define MKS_MINI_12864 // // FYSETC variant of the MINI12864 graphic controller with SD support @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h b/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h index ecd538e7cfd6..c5b8cff2c022 100644 --- a/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/Wanhao/Duplicator i3 Mini/_Bootscreen.h b/config/examples/Wanhao/Duplicator i3 Mini/_Bootscreen.h new file mode 100755 index 000000000000..b647f46339b1 --- /dev/null +++ b/config/examples/Wanhao/Duplicator i3 Mini/_Bootscreen.h @@ -0,0 +1,53 @@ +/** + * Made with Marlin Bitmap Converter + * http://marlinfw.org/tools/u8glib/converter.html + */ +#define CUSTOM_BOOTSCREEN_BMPWIDTH 80 +#define CUSTOM_BOOTSCREEN_Y 3 + +const unsigned char custom_start_bmp[] PROGMEM = { + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B00110111,B00000000,B01111111,B10111100,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11111111,B10111111,B10000000,B00000000, + B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B01111111,B11000000,B00000000, + B00000000,B00000000,B00000000,B00011111,B11101111,B11111111,B11111111,B01111111,B11111111,B00000000, + B00000000,B00000000,B00000000,B00111111,B11101111,B11111111,B11111111,B11111111,B11111111,B11100000, + B00000000,B00000000,B00000000,B11111111,B11101111,B11111111,B11111111,B11111111,B11100000,B00110000, + B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B00000000, + B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B00000000, + B00000000,B00000000,B00110111,B11111111,B11111111,B11111111,B11111111,B01111111,B11110000,B00000000, + B00000000,B00010111,B11110111,B11111111,B11101111,B11111111,B11111111,B01111111,B11110000,B00000000, + B00000000,B00011111,B11110111,B11111111,B11101111,B11111111,B11111111,B01111111,B11110000,B00000000, + B00000000,B00001111,B11110111,B11111111,B11111111,B11111111,B11111111,B10111111,B11111000,B00000000, + B00000000,B00001111,B11110111,B11111111,B11110111,B11111111,B11111111,B10111111,B11111000,B00000000, + B00000000,B00001111,B11111111,B11111111,B11110111,B11111111,B11111111,B10111111,B11111100,B00000000, + B00000000,B00001111,B11111011,B11111111,B11110111,B11111111,B11111111,B10111111,B11111100,B00000000, + B00000000,B00001111,B11111011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000, + B00000000,B10001111,B11111101,B11111111,B11111011,B11111111,B11111111,B11011111,B11111000,B00000000, + B00000000,B11111111,B11111100,B11111111,B11111011,B11111111,B11111111,B10111111,B11110110,B00000000, + B00000100,B01111111,B11111110,B11111111,B11111011,B11111111,B11111111,B00011111,B11101111,B00000000, + B00000110,B01111111,B11111111,B00100101,B11111011,B11111111,B11111100,B11101111,B11011111,B10000000, + B00000111,B11111111,B11111111,B00111110,B01110000,B11111111,B11110000,B11110011,B11011111,B11000000, + B00000011,B11111111,B11111100,B00111111,B10000000,B00001111,B10000000,B01111101,B10111111,B11000000, + B00000001,B11111111,B11111000,B00011111,B11011000,B00000000,B00000000,B11111111,B10111111,B10000000, + B00000001,B11111111,B11100000,B00001111,B11011111,B00000000,B00000001,B11111111,B00011111,B10000000, + B00000000,B01111111,B11000000,B00001111,B11111111,B10000000,B00000011,B11111110,B00011111,B00000000, + B00000000,B00111111,B10000000,B00001111,B10111111,B10000000,B00000011,B11111000,B00111111,B00000000, + B00000000,B00111111,B00000000,B00001111,B10011111,B11000000,B00000111,B11000000,B00111110,B00000000, + B00000000,B00011100,B00000000,B00011111,B00000000,B11000000,B00001111,B11000000,B01111110,B00000000, + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, + B00000011,B10001100,B01110000,B11100000,B11100000,B11001100,B00011100,B00011000,B00000111,B11000000, + B00000011,B10011100,B01110000,B11110000,B11110001,B11001110,B00011100,B00111100,B00001111,B11100000, + B00000011,B10011100,B01110001,B11110000,B11110001,B11001110,B00011100,B00111100,B00011111,B11110000, + B00000011,B10011100,B01110001,B11110000,B11111001,B11001110,B00011100,B01111110,B00111100,B01111000, + B00000011,B10011100,B01110001,B11111000,B11111101,B11001111,B11111100,B01111110,B00111000,B00111000, + B00000001,B10011110,B11100011,B10111000,B11111111,B11001111,B11111100,B01100111,B00111000,B00011000, + B00000001,B11011110,B11100011,B10111000,B11101111,B11001111,B11111100,B11100111,B00111000,B00111000, + B00000001,B11111111,B11000011,B11111100,B11100111,B11001110,B00011100,B11111111,B00111100,B00111000, + B00000000,B11110111,B11000111,B11111100,B11100011,B11001110,B00011100,B11111111,B10011111,B11110000, + B00000000,B11110011,B10000111,B00011110,B11100011,B11001110,B00011101,B11100011,B10001111,B11110000, + B00000000,B01110011,B10000111,B00001110,B11100001,B11001110,B00011101,B11000011,B11000111,B11000000 +}; diff --git a/config/examples/adafruit/ST7565/Configuration.h b/config/examples/adafruit/ST7565/Configuration.h index e484c1ef49fb..7cca8d132b26 100644 --- a/config/examples/adafruit/ST7565/Configuration.h +++ b/config/examples/adafruit/ST7565/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1579,10 +1578,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2033,6 +2032,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2044,7 +2049,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/Anycubic/Kossel/Configuration.h b/config/examples/delta/Anycubic/Kossel/Configuration.h index 9bc449848067..fc0ecf1c78e0 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration.h @@ -85,13 +85,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "@brandstaetter, @grbd" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 "Welcome to ANYCUBIC" // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -104,10 +99,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -374,6 +372,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -417,7 +416,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1767,10 +1766,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2221,6 +2220,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2232,7 +2237,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index 8f985897212f..687f7d7fc260 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/Dreammaker/Overlord/Configuration.h b/config/examples/delta/Dreammaker/Overlord/Configuration.h index a60faac0de57..a03ef746fcf1 100644 --- a/config/examples/delta/Dreammaker/Overlord/Configuration.h +++ b/config/examples/delta/Dreammaker/Overlord/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Team Overlord/TimMoore)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 201 #define TEMP_SENSOR_1 201 @@ -1703,10 +1702,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2157,6 +2156,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2168,7 +2173,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h b/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h index e64b904a84e9..a11ddd300791 100644 --- a/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h +++ b/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 35 // User defined RED value + #define LED_USER_PRESET_GREEN 35 // User defined GREEN value + #define LED_USER_PRESET_BLUE 35 // 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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 35 // User defined RED value - #define LED_USER_PRESET_GREEN 35 // User defined GREEN value - #define LED_USER_PRESET_BLUE 35 // 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss (optional) #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1878,6 +1974,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 #endif @@ -2234,6 +2331,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2288,6 +2392,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h index 6dc8940ba53c..ea39c6d0ce78 100644 --- a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h +++ b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Team Overlord/TimMoore)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 201 #define TEMP_SENSOR_1 201 @@ -1714,10 +1713,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2168,6 +2167,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2179,7 +2184,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h index e64b904a84e9..a11ddd300791 100644 --- a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h +++ b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 35 // User defined RED value + #define LED_USER_PRESET_GREEN 35 // User defined GREEN value + #define LED_USER_PRESET_BLUE 35 // 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view #define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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 35 // User defined RED value - #define LED_USER_PRESET_GREEN 35 // User defined GREEN value - #define LED_USER_PRESET_BLUE 35 // 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss (optional) #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1878,6 +1974,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 #endif @@ -2234,6 +2331,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2288,6 +2392,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 393ec7b1f14f..03ab5a178fac 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(LVD, FLSUN-AC)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1707,10 +1706,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2161,6 +2160,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2172,7 +2177,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index e1c7134d052c..931b52fdde38 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/FLSUN/kossel/Configuration.h b/config/examples/delta/FLSUN/kossel/Configuration.h index 39797c4656c4..139355b4d60c 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/config/examples/delta/FLSUN/kossel/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(LVD, FLSUN-AC)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1706,10 +1705,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2160,6 +2159,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2171,7 +2176,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/config/examples/delta/FLSUN/kossel/Configuration_adv.h index e1c7134d052c..931b52fdde38 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 746e02338134..7a4576ac155d 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Michael Henke, flsun Kossel Mini)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1706,10 +1705,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2160,6 +2159,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2171,7 +2176,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index b00f6217fada..7b5b0b244d43 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration.h b/config/examples/delta/Geeetech/Rostock 301/Configuration.h index 2bf4f81e1849..6d374f8fc5f9 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(Phr3d13, Geeetech Rostock 301)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1694,10 +1693,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2149,6 +2148,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2160,7 +2165,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index e26cee71d0fc..b2b5c668b3d5 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/Hatchbox_Alpha/Configuration.h b/config/examples/delta/Hatchbox_Alpha/Configuration.h index 34cee53e2aa4..fd03cacd6367 100644 --- a/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -75,13 +75,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -94,10 +89,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -364,6 +362,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -407,7 +406,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1709,10 +1708,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2163,6 +2162,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2174,7 +2179,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/MKS/SBASE/Configuration.h b/config/examples/delta/MKS/SBASE/Configuration.h index 06ff5067b3f5..443f882eaa8e 100644 --- a/config/examples/delta/MKS/SBASE/Configuration.h +++ b/config/examples/delta/MKS/SBASE/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 0 @@ -1694,10 +1693,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2148,6 +2147,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2159,7 +2164,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/MKS/SBASE/Configuration_adv.h b/config/examples/delta/MKS/SBASE/Configuration_adv.h index 99552b8a493f..99cf3ffb87f8 100644 --- a/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/Tevo Little Monster/Configuration.h b/config/examples/delta/Tevo Little Monster/Configuration.h index a4a887c77a14..c40872d77994 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration.h +++ b/config/examples/delta/Tevo Little Monster/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(HEINRICHS)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1698,10 +1697,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2152,6 +2151,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2163,7 +2168,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/config/examples/delta/Tevo Little Monster/Configuration_adv.h index 941c8926740f..43a327689f99 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/generic/Configuration.h b/config/examples/delta/generic/Configuration.h index 66866b36f203..bab62f717a65 100644 --- a/config/examples/delta/generic/Configuration.h +++ b/config/examples/delta/generic/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 0 @@ -1694,10 +1693,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2148,6 +2147,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2159,7 +2164,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/generic/Configuration_adv.h b/config/examples/delta/generic/Configuration_adv.h index b00f6217fada..7b5b0b244d43 100644 --- a/config/examples/delta/generic/Configuration_adv.h +++ b/config/examples/delta/generic/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/kossel_mini/Configuration.h b/config/examples/delta/kossel_mini/Configuration.h index b4728dd7126a..f215c7a6b701 100644 --- a/config/examples/delta/kossel_mini/Configuration.h +++ b/config/examples/delta/kossel_mini/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 7 #define TEMP_SENSOR_1 0 @@ -1696,10 +1695,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2150,6 +2149,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2161,7 +2166,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/kossel_mini/Configuration_adv.h b/config/examples/delta/kossel_mini/Configuration_adv.h index b00f6217fada..7b5b0b244d43 100644 --- a/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/kossel_mini/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/delta/kossel_pro/Configuration.h b/config/examples/delta/kossel_pro/Configuration.h index f766c39d30e0..c5eb63c6d0f9 100644 --- a/config/examples/delta/kossel_pro/Configuration.h +++ b/config/examples/delta/kossel_pro/Configuration.h @@ -74,13 +74,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -93,10 +88,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -363,6 +361,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -406,7 +405,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1697,10 +1696,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2151,6 +2150,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2162,7 +2167,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/kossel_xl/Configuration.h b/config/examples/delta/kossel_xl/Configuration.h index 7038595fa309..38752f4ff3fa 100644 --- a/config/examples/delta/kossel_xl/Configuration.h +++ b/config/examples/delta/kossel_xl/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(oxivanisher)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1697,10 +1696,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2151,6 +2150,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2162,7 +2167,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/delta/kossel_xl/Configuration_adv.h b/config/examples/delta/kossel_xl/Configuration_adv.h index 2edf395d55bf..576d793c234f 100644 --- a/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/config/examples/delta/kossel_xl/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -658,10 +659,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full // (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) @@ -852,11 +853,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -881,23 +906,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -932,6 +940,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1011,17 +1020,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1136,6 +1159,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1145,6 +1169,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1281,7 +1364,7 @@ #endif // Moves (or segments) with fewer steps than this will be joined with the next move -#define MIN_STEPS_PER_SEGMENT 6 +#define MIN_STEPS_PER_SEGMENT 1 /** * Minimum delay after setting the stepper DIR (in ns) @@ -1649,78 +1732,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1859,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1886,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2244,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2298,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/gCreate/gMax1.5+/Configuration.h b/config/examples/gCreate/gMax1.5+/Configuration.h index 36c57a0aac53..d4bd7c2ad0d4 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/config/examples/gCreate/gMax1.5+/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. #define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -364,6 +362,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -407,7 +406,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1593,10 +1592,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2047,6 +2046,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2058,7 +2063,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/config/examples/gCreate/gMax1.5+/Configuration_adv.h index a6533618b7ac..3c8c833aa82b 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/makibox/Configuration.h b/config/examples/makibox/Configuration.h index af94e2998d38..efaac41a8da4 100644 --- a/config/examples/makibox/Configuration.h +++ b/config/examples/makibox/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -1582,10 +1581,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2036,6 +2035,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2047,7 +2052,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/makibox/Configuration_adv.h b/config/examples/makibox/Configuration_adv.h index 814d507ba1e0..53cc9afc9c34 100644 --- a/config/examples/makibox/Configuration_adv.h +++ b/config/examples/makibox/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/tvrrug/Round2/Configuration.h b/config/examples/tvrrug/Round2/Configuration.h index 3f31f05b0873..8af74ab7d54c 100644 --- a/config/examples/tvrrug/Round2/Configuration.h +++ b/config/examples/tvrrug/Round2/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -1574,10 +1573,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2028,6 +2027,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2039,7 +2044,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/tvrrug/Round2/Configuration_adv.h b/config/examples/tvrrug/Round2/Configuration_adv.h index dc4ba6943b87..d4635aeeb31f 100644 --- a/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/config/examples/tvrrug/Round2/Configuration_adv.h @@ -279,9 +279,10 @@ */ #define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - #define CONTROLLER_FAN_PIN 23 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + #define CONTROLLER_FAN_PIN 23 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -850,11 +851,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + //#define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -879,23 +904,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -930,6 +938,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1009,17 +1018,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1134,6 +1157,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1143,6 +1167,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1647,78 +1730,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1749,6 +1845,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1857,10 +1955,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1884,6 +1984,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2242,6 +2343,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2296,6 +2404,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/config/examples/wt150/Configuration.h b/config/examples/wt150/Configuration.h index e0fdb86b02f5..93d21dd7d503 100644 --- a/config/examples/wt150/Configuration.h +++ b/config/examples/wt150/Configuration.h @@ -70,13 +70,8 @@ // @section info -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. +// Author info of this build printed to the host during boot and M115 #define STRING_CONFIG_H_AUTHOR "(none, wt150)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 /** * *** VENDORS PLEASE READ *** @@ -89,10 +84,13 @@ * respectfully request that you retain the unmodified Marlin boot screen. */ -// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** +#define SHOW_BOOTSCREEN + +// Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN -// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +// Show the bitmap in Marlin/_Statusscreen.h on the status screen. //#define CUSTOM_STATUS_SCREEN_IMAGE // @section machine @@ -359,6 +357,7 @@ * -1 : thermocouple with AD595 * 0 : not used * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 331 : (3.3V scaled thermistor 1 table) * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) * 3 : Mendel-parts thermistor (4.7k pullup) * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! @@ -402,7 +401,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -2 #define TEMP_SENSOR_1 0 @@ -1584,10 +1583,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, - * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, jp-kana, + * ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } */ #define LCD_LANGUAGE en @@ -2038,6 +2037,12 @@ // //#define MALYAN_LCD +// +// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays +// See Configuration_adv.h for all configuration options. +// +//#define LULZBOT_TOUCH_UI + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extensible_ui'. @@ -2049,7 +2054,7 @@ //============================================================================= // -// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, A1, etc.) +// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.) // //#define FSMC_GRAPHICAL_TFT diff --git a/config/examples/wt150/Configuration_adv.h b/config/examples/wt150/Configuration_adv.h index 870fac3b27df..e90557d2ace3 100644 --- a/config/examples/wt150/Configuration_adv.h +++ b/config/examples/wt150/Configuration_adv.h @@ -279,9 +279,10 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled - #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed + //#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled #endif // When first starting the main fan, run it at full speed for the @@ -657,10 +658,10 @@ #endif #endif -// @section extras +// @section motion -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 +// Minimum time that a segment needs to take if the buffer is emptied +#define DEFAULT_MINSEGMENTTIME 20000 // (ms) // If defined the movements slow down when the look ahead buffer is only half full #define SLOWDOWN @@ -851,11 +852,35 @@ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #endif -// Include a page of printer information in the LCD Main Menu -#define LCD_INFO_MENU -#if ENABLED(LCD_INFO_MENU) - //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages -#endif +#if HAS_LCD_MENU + + // Include a page of printer information in the LCD Main Menu + #define LCD_INFO_MENU + #if ENABLED(LCD_INFO_MENU) + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages + #endif + + // BACK menu items keep the highlight at the top + //#define TURBO_BACK_MENU_ITEM + + /** + * LED Control Menu + * 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 + +#endif // HAS_LCD_MENU // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING @@ -880,23 +905,6 @@ #endif #endif -/** - * 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) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work @@ -931,6 +939,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) //#define POWER_LOSS_PIN 44 // Pin to detect power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. @@ -1010,17 +1019,31 @@ * equivalent MAX3421E breakout board. The USB thumb drive will appear * to Marlin as an SD card. * - * The MAX3421E must be assigned the same pins as the SD card reader, with + * The MAX3421E can be assigned the same pins as the SD card reader, with * the following pin mapping: * * SCLK, MOSI, MISO --> SCLK, MOSI, MISO - * INT --> SD_DETECT_PIN + * INT --> SD_DETECT_PIN [1] * SS --> SDSS + * + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_CS_PIN SDSS - #define USB_INTR_PIN SD_DETECT_PIN + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + + /** + * USB Host Shield Library + * + * - UHS2 uses no interrupts and has been production-tested + * on a LulzBot TAZ Pro with a 32-bit Archim board. + * + * - UHS3 is newer code with better USB compatibility. But it + * is less tested and is known to interfere with Servos. + * [1] This requires USB_INTR_PIN to be interrupt-capable. + */ + //#define USE_UHS3_USB #endif /** @@ -1135,6 +1158,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options //#define MARLIN_BRICKOUT @@ -1144,6 +1168,65 @@ #endif // HAS_GRAPHICAL_LCD +// +// Lulzbot Touch UI +// +#if ENABLED(LULZBOT_TOUCH_UI) + // Display board used + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240) + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + + // Correct the resolution if not using the stock TFT panel. + //#define TOUCH_UI_320x240 + //#define TOUCH_UI_480x272 + //#define TOUCH_UI_800x480 + + // Mappings for boards with a standard RepRapDiscount Display connector + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping + //#define OTHER_PIN_LAYOUT // Define pins manually below + #if ENABLED(OTHER_PIN_LAYOUT) + // The pins for CS and MOD_RESET (PD) must be chosen. + #define CLCD_MOD_RESET 9 + #define CLCD_SPI_CS 10 + + // If using software SPI, specify pins for SCLK, MOSI, MISO + //#define CLCD_USE_SOFT_SPI + #if ENABLED(CLCD_USE_SOFT_SPI) + #define CLCD_SOFT_SPI_MOSI 11 + #define CLCD_SOFT_SPI_MISO 12 + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + + // Display Orientation. An inverted (i.e. upside-down) display + // is supported on the FT800. The FT810 and beyond also support + // portrait and mirrored orientations. + //#define TOUCH_UI_INVERTED + //#define TOUCH_UI_PORTRAIT + //#define TOUCH_UI_MIRRORED + + // Use a numeric passcode for "Screen lock" keypad. + // (recommended for smaller displays) + //#define TOUCH_UI_PASSCODE +#endif + +// +// FSMC Graphical TFT +// +#if ENABLED(FSMC_GRAPHICAL_TFT) + //#define TFT_MARLINUI_COLOR 0xFFFF // White + //#define TFT_MARLINBG_COLOR 0x0000 // Black + //#define TFT_DISABLED_COLOR 0x0003 // Almost black + //#define TFT_BTCANCEL_COLOR 0xF800 // Red + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan +#endif + // @section safety /** @@ -1648,78 +1731,91 @@ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 + #define X_CHAIN_POS 0 // 0 - Not chained, 1 - MCU MOSI connected, 2 - next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 + #define X2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 + #define Y_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 + #define Y2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 + #define Z_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 + #define Z2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 + #define Z3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 + #define E0_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 + #define E1_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 + #define E2_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 + #define E3_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 + #define E4_CHAIN_POS 0 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 + #define E5_CHAIN_POS 0 #endif /** @@ -1750,6 +1846,8 @@ //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 + //#define TMC_USE_CHAIN // All active xx_CS_PIN defines must be set the same to use SPI daisy chain + /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. @@ -1858,10 +1956,12 @@ * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. * X, Y, and Z homing will always be done in spreadCycle mode. * - * X/Y/Z_STALL_SENSITIVITY is used to tune the trigger sensitivity. - * Use M914 X Y Z to live-adjust the sensitivity. - * Higher: LESS sensitive. (Too high => failure to trigger) - * Lower: MORE sensitive. (Too low => false positives) + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold. + * Use M914 X Y Z to set the stall threshold at runtime: + * + * Sensitivity TMC2209 Others + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set [XYZ]_HOME_BUMP_MM to 0. * @@ -1885,6 +1985,7 @@ #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only @@ -2243,6 +2344,13 @@ */ #define EXTENDED_CAPABILITIES_REPORT +/** + * Expected Printer Check + * Add the M16 G-code to compare a string to the MACHINE_NAME. + * M16 with a non-matching string causes the printer to halt. + */ +//#define EXPECTED_PRINTER_CHECK + /** * Disable all Volumetric extrusion options */ @@ -2297,6 +2405,13 @@ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif +/** + * Startup commands + * + * Execute certain G-code commands immediately after power-on. + */ +//#define STARTUP_COMMANDS "M17 Z" + /** * G-code Macros * diff --git a/platformio.ini b/platformio.ini index c98b0f4d32fc..18b1439544fc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -22,17 +22,17 @@ default_envs = megaatmega2560 [common] default_src_filter = + - - + +extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py build_flags = -fmax-errors=5 -g -ggdb lib_deps = - U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip + U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip LiquidCrystal@1.3.4 TMCStepper@<1.0.0 Adafruit NeoPixel@1.1.3 LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/dev.zip - TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip SailfishRGB_LED=https://github.com/mikeshub/SailfishRGB_LED/archive/master.zip SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip @@ -57,6 +57,7 @@ board = megaatmega2560 build_flags = ${common.build_flags} board_build.f_cpu = 16000000L lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -70,6 +71,7 @@ board = megaatmega1280 build_flags = ${common.build_flags} board_build.f_cpu = 16000000L lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -86,6 +88,7 @@ framework = arduino board = at90usb1286 build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + extra_scripts = pre:buildroot/share/atom/create_custom_upload_command_CDC.py monitor_speed = 250000 @@ -102,6 +105,7 @@ framework = arduino board = at90usb1286 build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + extra_scripts = pre:buildroot/share/atom/create_custom_upload_command_DFU.py monitor_speed = 250000 @@ -118,7 +122,6 @@ framework = arduino board = due build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper src_filter = ${common.default_src_filter} + monitor_speed = 250000 [env:DUE_USB] @@ -127,7 +130,6 @@ framework = arduino board = dueUSB build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper src_filter = ${common.default_src_filter} + monitor_speed = 250000 [env:DUE_debug] @@ -139,7 +141,6 @@ build_flags = ${common.build_flags} -funwind-tables -mpoke-function-name lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -161,7 +162,7 @@ src_filter = ${common.default_src_filter} + monitor_speed = 250000 lib_deps = Servo LiquidCrystal - U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip + U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip TMCStepper@<1.0.0 Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/master.zip SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip @@ -181,7 +182,7 @@ src_filter = ${common.default_src_filter} + monitor_speed = 250000 lib_deps = Servo LiquidCrystal - U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip + U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip TMCStepper@<1.0.0 Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/master.zip @@ -195,7 +196,7 @@ board = sanguino_atmega1284p build_flags = ${common.build_flags} -fmerge-all-constants upload_speed = 57600 lib_deps = ${common.lib_deps} -lib_ignore = TMCStepper, TMC26XStepper +lib_ignore = TMCStepper src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -209,7 +210,7 @@ board = sanguino_atmega1284p build_flags = ${common.build_flags} upload_speed = 115200 lib_deps = ${common.lib_deps} -lib_ignore = TMCStepper, TMC26XStepper +lib_ignore = TMCStepper src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -223,6 +224,7 @@ board = reprap_rambo build_flags = ${common.build_flags} board_build.f_cpu = 16000000L lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -235,6 +237,7 @@ framework = arduino board = sanguino_atmega644p build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -247,6 +250,7 @@ framework = arduino board = sanguino_atmega1284p build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -262,14 +266,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py -DDEBUG_LEVEL=0 build_unflags = -std=gnu++11 lib_deps = ${common.lib_deps} -lib_ignore = U8glib-HAL - TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e -#lib_ldf_mode = chain +lib_ignore = U8glib-HAL, Adafruit NeoPixel, SPI src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -277,53 +274,44 @@ monitor_speed = 250000 # fysetc_STM32F1 # [env:fysetc_STM32F1] -platform = ststm32 -framework = arduino -board = genericSTM32F103RC +platform = ststm32 +framework = arduino +board = genericSTM32F103RC #board_build.core = maple -extra_scripts = buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py -build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py +platform_packages = tool-stm32duino +extra_scripts = buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py +build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py ${common.build_flags} -std=gnu++14 - -DDEBUG_LEVEL=0 -build_unflags = -std=gnu++11 -lib_deps = ${common.lib_deps} + -DDEBUG_LEVEL=0 -DHAVE_SW_SERIAL +build_unflags = -std=gnu++11 +lib_deps = ${common.lib_deps} SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e -lib_ldf_mode = chain -src_filter = ${common.default_src_filter} + -monitor_speed = 250000 -debug_tool = stlink -upload_protocol = serial +lib_ignore = Adafruit NeoPixel, SPI +lib_ldf_mode = chain +src_filter = ${common.default_src_filter} + +monitor_speed = 250000 +debug_tool = stlink +upload_protocol = serial # # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3) # [env:BIGTREE_SKR_MINI] -platform = ststm32 -framework = arduino -board = genericSTM32F103RC -extra_scripts = buildroot/share/PlatformIO/scripts/STM32F1_SKR_MINI.py -build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py +platform = ststm32 +framework = arduino +board = genericSTM32F103RC +platform_packages = tool-stm32duino +extra_scripts = buildroot/share/PlatformIO/scripts/STM32F1_SKR_MINI.py +build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py ${common.build_flags} -std=gnu++14 -DDEBUG_LEVEL=0 -build_unflags = -std=gnu++11 -lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e -#lib_ldf_mode = chain -src_filter = ${common.default_src_filter} + -monitor_speed = 115200 -upload_protocol = stlink -debug_tool = stlink +build_unflags = -std=gnu++11 +lib_deps = ${common.lib_deps} +lib_ignore = Adafruit NeoPixel, SPI +src_filter = ${common.default_src_filter} + +monitor_speed = 115200 +upload_protocol = stlink +debug_tool = stlink # # STM32F4 with STM32GENERIC @@ -332,10 +320,10 @@ debug_tool = stlink platform = ststm32 framework = arduino board = disco_f407vg -build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB +build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB lib_deps = ${common.lib_deps} -lib_ignore = Adafruit NeoPixel, TMC26XStepper, TMCStepper -src_filter = ${common.default_src_filter} + - + +lib_ignore = Adafruit NeoPixel, TMCStepper +src_filter = ${common.default_src_filter} + - monitor_speed = 250000 # @@ -344,11 +332,11 @@ monitor_speed = 250000 [env:STM32F7] platform = ststm32 framework = arduino -board = disco_f765vg -build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB +board = remram_v1 +build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB lib_deps = ${common.lib_deps} -lib_ignore = Adafruit NeoPixel, TMC26XStepper, TMCStepper -src_filter = ${common.default_src_filter} + - + +lib_ignore = Adafruit NeoPixel, TMCStepper +src_filter = ${common.default_src_filter} + - monitor_speed = 250000 # @@ -360,12 +348,12 @@ framework = arduino board = armed_v1 build_flags = ${common.build_flags} -DUSBCON -DUSBD_VID=0x0483 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="ARMED_V1"' -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11 lib_deps = ${common.lib_deps} -lib_ignore = Adafruit NeoPixel, TMC26XStepper +lib_ignore = Adafruit NeoPixel src_filter = ${common.default_src_filter} + monitor_speed = 250000 # -# Alfawise U20 (STM32F103VET6) +# Longer 3D board in Alfawise U20 (STM32F103VET6) # [env:alfawise_U20] platform = ststm32 @@ -376,15 +364,10 @@ extra_scripts = buildroot/share/PlatformIO/scripts/alfawise_Ux0.py build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py ${common.build_flags} -std=gnu++14 -DSTM32F1xx -DU20 -DTS_V12 -build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 +build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e +lib_ignore = Adafruit NeoPixel, LiquidTWI2, SPI # # MKS Robin (STM32F103ZET6) @@ -399,13 +382,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py build_unflags = -std=gnu++11 src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e - U8glib-HAL +lib_ignore = Adafruit NeoPixel, SPI # # MKS ROBIN LITE/LITE2 (STM32F103RCT6) @@ -420,12 +397,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py build_unflags = -std=gnu++11 src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e +lib_ignore = Adafruit NeoPixel, SPI # # MKS Robin Mini (STM32F103VET6) @@ -440,12 +412,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py build_unflags = -std=gnu++11 src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e +lib_ignore = Adafruit NeoPixel, SPI # # MKS Robin Nano (STM32F103VET6) @@ -460,12 +427,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py build_unflags = -std=gnu++11 src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e +lib_ignore = Adafruit NeoPixel, SPI # # JGAurora A5S A1 (STM32F103ZET6) @@ -480,12 +442,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py build_unflags = -std=gnu++11 src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} -lib_ignore = TMC26XStepper - libf3c - lib066 - Adafruit NeoPixel_ID28 - Adafruit NeoPixel - libf3e +lib_ignore = Adafruit NeoPixel, SPI monitor_speed = 250000 # @@ -499,14 +456,14 @@ framework = arduino board = blackSTM32F407VET6 extra_scripts = pre:buildroot/share/PlatformIO/scripts/black_stm32f407vet6.py build_flags = ${common.build_flags} - -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"BLACK_F407VE\" + -DSTM32F4 -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"BLACK_F407VE\" lib_deps = ${common.lib_deps} -lib_ignore = Adafruit NeoPixel, TMC26XStepper, TMCStepper, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster +lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster src_filter = ${common.default_src_filter} + monitor_speed = 250000 # -# BIGTREE_SKR_PRO (STM32F407ZGT6 ARM Cortex-M4) +# Bigtreetech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) # [env:BIGTREE_SKR_PRO] platform = ststm32@5.4.3 @@ -517,7 +474,27 @@ build_flags = ${common.build_flags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\" -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 -DHAVE_HWSERIAL6 lib_deps = ${common.lib_deps} -lib_ignore = Adafruit NeoPixel, TMC26XStepper, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster +lib_ignore = Adafruit NeoPixel, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster +src_filter = ${common.default_src_filter} + +monitor_speed = 250000 + +# +# BIGTREE_SKR_BTT002 (STM32F407VET6 ARM Cortex-M4) +# +[env:BIGTREE_BTT002] +platform = ststm32@5.4.3 +framework = arduino +board = BigTree_Btt002 +extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py +build_flags = ${common.build_flags} + -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407VE\" + -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 + -DHAVE_HWSERIAL2 + -DHAVE_HWSERIAL3 + -DPIN_SERIAL2_RX=PD_6 + -DPIN_SERIAL2_TX=PD_5 +lib_deps = ${common.lib_deps} +lib_ignore = Adafruit NeoPixel, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -530,6 +507,7 @@ framework = arduino board = teensy31 build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip lib_ignore = Adafruit NeoPixel src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -543,6 +521,7 @@ framework = arduino board = teensy35 build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip lib_ignore = Adafruit NeoPixel src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -558,16 +537,7 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py -DMCU_ST -DDEBUG_LEVEL=0 src_filter = ${common.default_src_filter} + #- -lib_ignore = Adafruit NeoPixel - U8glib - LiquidCrystal_I2C - LiquidCrystal - NewliquidCrystal - LiquidTWI2 - TMC26XStepper - TMCStepper - Servo(STM32F1) - U8glib-HAL +lib_ignore = Adafruit NeoPixel, LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SPI # # Espressif ESP32 @@ -582,13 +552,7 @@ upload_port = /dev/ttyUSB0 lib_deps = AsyncTCP=https://github.com/me-no-dev/AsyncTCP/archive/master.zip ESPAsyncWebServer=https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip -lib_ignore = TMC26XStepper - LiquidCrystal_I2C - LiquidCrystal - NewliquidCrystal - LiquidTWI2 - SailfishLCD - SailfishRGB_LED +lib_ignore = LiquidCrystal, LiquidTWI2, SailfishLCD, SailfishRGB_LED src_filter = ${common.default_src_filter} + # @@ -601,6 +565,7 @@ board = fysetc_f6_13 build_flags = ${common.build_flags} board_build.f_cpu = 16000000L lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip src_filter = ${common.default_src_filter} + monitor_speed = 250000 @@ -626,8 +591,21 @@ platform = atmelsam board = adafruit_grandcentral_m4 framework = arduino build_flags = ${common.build_flags} -std=gnu++17 +extra_scripts = ${common.extra_scripts} build_unflags = -std=gnu++11 lib_deps = ${common.lib_deps} -lib_ignore = U8glib-HAL, TMC26XStepper +lib_ignore = U8glib-HAL src_filter = ${common.default_src_filter} + debug_tool = jlink + +# +# Just print the dependency tree +# +[env:include_tree] +platform = atmelavr +framework = arduino +board = megaatmega2560 +build_flags = -c -H -std=gnu++11 -Wall -Os +lib_deps = ${common.lib_deps} + TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip +src_filter = +