Merge remote-tracking branch 'upstream/bugfix-1.1.x' into 1.1.x

master
Scott Lahteine 7 years ago
commit 22c968ee32

@ -90,19 +90,24 @@ script:
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_RGBW_LED
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
- opt_enable_adv FWRETRACT
- opt_enable_adv FWRETRACT MAX7219_DEBUG
- opt_set ABL_GRID_POINTS_X 16
- opt_set ABL_GRID_POINTS_Y 16
- opt_set_adv FANMUX0_PIN 53
- build_marlin
#
# Test a simple build of AUTO_BED_LEVELING_UBL
# Test a probeless build of AUTO_BED_LEVELING_UBL
#
- restore_configs
- opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT FIX_MOUNTED_PROBE EEPROM_SETTINGS G3D_PANEL
- opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS G3D_PANEL
- opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING
- build_marlin
#
# And with a probe...
#
- opt_enable FIX_MOUNTED_PROBE
- build_marlin
#
# Test a Sled Z Probe
# ...with AUTO_BED_LEVELING_LINEAR, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, and EEPROM_CHITCHAT
#
@ -190,14 +195,14 @@ script:
# ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
# PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
# Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
# FILAMENT_CHANGE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
# ADVANCED_PAUSE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
#
- restore_configs
- opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR SDSUPPORT
- opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632
- opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
- opt_set_adv I2C_SLAVE_ADDRESS 63
- opt_enable_adv FILAMENT_CHANGE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
- opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
- pins_set RAMPS X_MAX_PIN -1
- opt_set_adv Z2_MAX_PIN 2
- build_marlin

@ -34,17 +34,13 @@
#define DOGLCD
#define ULTIPANEL
#define NEWPANEL
#define DEFAULT_LCD_CONTRAST 90
#define LCD_CONTRAST_MIN 60
#define LCD_CONTRAST_MAX 140
#elif ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
#elif ENABLED(MAKRPANEL)
#define DOGLCD
#define ULTIPANEL
#define NEWPANEL
#define DEFAULT_LCD_CONTRAST 17
#define U8GLIB_ST7565_64128N
#elif ENABLED(ANET_KEYPAD_LCD)
@ -53,7 +49,9 @@
#define ADC_KEYPAD
#define ADC_KEY_NUM 8
#define ULTIPANEL
// this helps to implement ADC_KEYPAD menus
#define ENCODER_PULSES_PER_STEP 1
#define ENCODER_STEPS_PER_MENU_ITEM 1
#define REVERSE_MENU_DIRECTION
@ -76,8 +74,12 @@
#define LCD_CONTRAST_MIN 75
#define LCD_CONTRAST_MAX 115
#define DEFAULT_LCD_CONTRAST 95
#define U8GLIB_ST7565_64128N
#elif ENABLED(VIKI2)
#define DEFAULT_LCD_CONTRAST 40
#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
@ -90,7 +92,6 @@
#define U8GLIB_SSD1306
#define ULTIPANEL
#define NEWPANEL
#define REVERSE_ENCODER_DIRECTION
#define REVERSE_MENU_DIRECTION
@ -99,15 +100,41 @@
#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTIPANEL
#define NEWPANEL
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define DOGLCD
#define U8GLIB_ST7920
#define ULTIPANEL
#define NEWPANEL
#elif ENABLED(CR10_STOCKDISPLAY)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_2_NOP
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_2_NOP
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_2_NOP
#endif
#elif ENABLED(MKS_12864OLED)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define U8GLIB_SH1106
#elif ENABLED(MKS_MINI_12864)
#define MINIPANEL
#endif
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
#define DOGLCD
#define ULTIPANEL
#define DEFAULT_LCD_CONTRAST 17
#endif
// Generic support for SSD1306 / SH1106 OLED based LCDs.
@ -117,7 +144,15 @@
#endif
#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
#define ULTIMAKERCONTROLLER
#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define LCD_WIDTH 16
#define LCD_HEIGHT 2
#endif
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI)
@ -131,7 +166,6 @@
|| ENABLED(G3D_PANEL) \
|| ENABLED(RIGIDBOT_PANEL)
#define ULTIPANEL
#define NEWPANEL
#endif
#if ENABLED(REPRAPWORLD_KEYPAD)
@ -153,7 +187,6 @@
#define LCD_I2C_TYPE_PCF8575
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTIPANEL
#define NEWPANEL
#elif ENABLED(LCD_I2C_PANELOLU2)
@ -163,7 +196,6 @@
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
#define ULTIPANEL
#define NEWPANEL
#elif ENABLED(LCD_I2C_VIKI)
@ -179,27 +211,41 @@
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
#define ULTIPANEL
#define NEWPANEL
#define ENCODER_FEEDRATE_DEADZONE 4
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 1
#define STD_ENCODER_PULSES_PER_STEP 1
#define STD_ENCODER_STEPS_PER_MENU_ITEM 2
#elif ENABLED(G3D_PANEL)
#define STD_ENCODER_PULSES_PER_STEP 2
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|| ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|| ENABLED(OLED_PANEL_TINYBOY2) \
|| ENABLED(BQ_LCD_SMART_CONTROLLER) \
|| ENABLED(LCD_I2C_PANELOLU2) \
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define STD_ENCODER_PULSES_PER_STEP 4
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 2
#ifndef STD_ENCODER_PULSES_PER_STEP
#define STD_ENCODER_PULSES_PER_STEP 5
#endif
#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif
// Set encoder detents for well-known controllers
#if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(OLED_PANEL_TINYBOY2) \
|| ENABLED(BQ_LCD_SMART_CONTROLLER) || ENABLED(LCD_I2C_PANELOLU2) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4
#define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 1
#define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
#endif
#ifndef ENCODER_FEEDRATE_DEADZONE
#define ENCODER_FEEDRATE_DEADZONE 6
#endif
// Shift register panels
@ -210,7 +256,6 @@
#if ENABLED(SAV_3DLCD)
#define SR_LCD_2W_NL // Non latching 2 wire shift register
#define ULTIPANEL
#define NEWPANEL
#endif
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
@ -223,7 +268,7 @@
#endif
#if ENABLED(ULTIPANEL)
#define NEWPANEL //enable this if you have a click-encoder panel
#define NEWPANEL // Disable this if you actually have no click-encoder panel
#define ULTRA_LCD
#ifndef LCD_WIDTH
#define LCD_WIDTH 20
@ -231,8 +276,7 @@
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 4
#endif
#else // no panel but just LCD
#if ENABLED(ULTRA_LCD)
#elif ENABLED(ULTRA_LCD) // no panel but just LCD
#ifndef LCD_WIDTH
#define LCD_WIDTH 16
#endif
@ -240,7 +284,6 @@
#define LCD_HEIGHT 2
#endif
#endif
#endif
#if ENABLED(DOGLCD)
/* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
@ -432,6 +475,6 @@
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED))
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
#endif // CONDITIONALS_LCD_H

@ -28,6 +28,10 @@
#ifndef CONDITIONALS_POST_H
#define CONDITIONALS_POST_H
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
#define IS_CARTESIAN !IS_KINEMATIC
/**
* Axis lengths and center
*/
@ -43,6 +47,12 @@
#define Y_BED_SIZE Y_MAX_LENGTH
#endif
// Require 0,0 bed center for Delta and SCARA
#if IS_KINEMATIC
#define BED_CENTER_AT_0_0
#endif
// Define center values for future use
#if ENABLED(BED_CENTER_AT_0_0)
#define X_CENTER 0
#define Y_CENTER 0
@ -52,6 +62,7 @@
#endif
#define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
// Get the linear boundaries of the bed
#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
@ -85,10 +96,6 @@
#endif
#endif
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
#define IS_CARTESIAN !IS_KINEMATIC
/**
* No adjustable bed on non-cartesians
*/
@ -220,13 +227,8 @@
#define MICROSTEP16 HIGH,HIGH
/**
* Advance calculated values
* Override here because this is set in Configuration_adv.h
*/
#if ENABLED(ADVANCE)
#define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS_N] / (EXTRUSION_AREA))
#endif
#if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#undef SD_DETECT_INVERTED
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -181,7 +182,7 @@
*/
//#define PARKING_EXTRUDER
#if ENABLED(PARKING_EXTRUDER)
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid not magnetized with applied voltage
#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 // Delay (ms) for magnetic field. No delay if 0 or not defined.
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif
@ -1590,7 +1633,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1382,4 +1393,32 @@
#endif // I2C_POSITION_ENCODERS
/**
* MAX7219 Debug Matrix
*
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/**
* 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_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -136,13 +136,8 @@
extern float destination[XYZE];
void set_destination_to_current();
void prepare_move_to_destination();
#if AVR_AT90USB1286_FAMILY // Teensyduino & Printrboard IDE extensions have compile errors without this
inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
inline void set_current_to_destination() { COPY(current_position, destination); }
#else
void sync_plan_position_e();
void set_current_to_destination();
#endif
#if ENABLED(NEWPANEL)
void lcd_setstatusPGM(const char* const message, const int8_t level);
void chirp_at_user();

@ -302,9 +302,9 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
delta_diagonal_rod,
delta_calibration_radius,
delta_segments_per_second,
delta_tower_angle_trim[2],
delta_tower_angle_trim[ABC],
delta_clip_start_height;
void recalc_delta_settings(float radius, float diagonal_rod);
void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]);
#elif IS_SCARA
void forward_kinematics_SCARA(const float &a, const float &b);
#endif
@ -422,7 +422,17 @@ void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
#define HAS_AXIS_UNHOMED_ERR ( \
ENABLED(Z_PROBE_ALLEN_KEY) \
|| ENABLED(Z_PROBE_SLED) \
|| HAS_PROBING_PROCEDURE \
|| HOTENDS > 1 \
|| ENABLED(NOZZLE_CLEAN_FEATURE) \
|| ENABLED(NOZZLE_PARK_FEATURE) \
|| (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
) || ENABLED(NO_MOTION_BEFORE_HOMING)
#if HAS_AXIS_UNHOMED_ERR
bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
#endif

@ -27,14 +27,29 @@
* Modified 23 November 2006 by David A. Mellis
* Modified 28 September 2010 by Mark Sproul
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
*/
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
#include "MarlinConfig.h"
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#include "MarlinSerial.h"
#include "Marlin.h"
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
struct ring_buffer_r {
unsigned char buffer[RX_BUFFER_SIZE];
volatile ring_buffer_pos_t head, tail;
};
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#if TX_BUFFER_SIZE > 0
struct ring_buffer_t {
unsigned char buffer[TX_BUFFER_SIZE];
volatile uint8_t head, tail;
};
#endif
#if UART_PRESENT(SERIAL_PORT)
ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
@ -44,6 +59,23 @@
#endif
#endif
#if ENABLED(SERIAL_XON_XOFF)
constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80; // XON / XOFF Character was sent
constexpr uint8_t XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
// XON / XOFF character definitions
constexpr uint8_t XON_CHAR = 17;
constexpr uint8_t XOFF_CHAR = 19;
uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
#endif
#if ENABLED(SERIAL_STATS_DROPPED_RX)
uint8_t rx_dropped_bytes = 0;
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
ring_buffer_pos_t rx_max_enqueued = 0;
#endif
#if ENABLED(EMERGENCY_PARSER)
#include "stepper.h"
@ -136,20 +168,78 @@
#endif // EMERGENCY_PARSER
FORCE_INLINE void store_char(unsigned char c) {
CRITICAL_SECTION_START;
const uint8_t h = rx_buffer.head,
i = (uint8_t)(h + 1) & (RX_BUFFER_SIZE - 1);
FORCE_INLINE void store_rxd_char() {
const ring_buffer_pos_t h = rx_buffer.head,
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// if we should be storing the received character into the location
// just before the tail (meaning that the head would advance to the
// current location of the tail), we're about to overflow the buffer
// and so we don't write the character or advance the head.
// If the character is to be stored at the index just before the tail
// (such that the head would advance to the current tail), the buffer is
// critical, so don't write the character or advance the head.
if (i != rx_buffer.tail) {
rx_buffer.buffer[h] = c;
rx_buffer.buffer[h] = M_UDRx;
rx_buffer.head = i;
}
CRITICAL_SECTION_END;
else {
(void)M_UDRx;
#if ENABLED(SERIAL_STATS_DROPPED_RX)
if (!++rx_dropped_bytes) ++rx_dropped_bytes;
#endif
}
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
// calculate count of bytes stored into the RX buffer
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// Keep track of the maximum count of enqueued bytes
NOLESS(rx_max_enqueued, rx_count);
#endif
#if ENABLED(SERIAL_XON_XOFF)
// for high speed transfers, we can use XON/XOFF protocol to do
// software handshake and avoid overruns.
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
// calculate count of bytes stored into the RX buffer
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// if we are above 12.5% of RX buffer capacity, send XOFF before
// we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
// let the host react and stop sending bytes. This translates to 13mS
// propagation time.
if (rx_count >= (RX_BUFFER_SIZE) / 8) {
// If TX interrupts are disabled and data register is empty,
// just write the byte to the data register and be done. This
// shortcut helps significantly improve the effective datarate
// at high (>500kbit/s) bitrates, where interrupt overhead
// becomes a slowdown.
if (!TEST(M_UCSRxB, M_UDRIEx) && TEST(M_UCSRxA, M_UDREx)) {
// Send an XOFF character
M_UDRx = XOFF_CHAR;
// clear the TXC bit -- "can be cleared by writing a one to its bit
// location". This makes sure flush() won't return until the bytes
// actually got written
SBI(M_UCSRxA, M_TXCx);
// And remember it was sent
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
}
else {
// TX interrupts disabled, but buffer still not empty ... or
// TX interrupts enabled. Reenable TX ints and schedule XOFF
// character to be sent
#if TX_BUFFER_SIZE > 0
SBI(M_UCSRxB, M_UDRIEx);
xon_xoff_state = XOFF_CHAR;
#else
// We are not using TX interrupts, we will have to send this manually
while (!TEST(M_UCSRxA, M_UDREx)) {/* nada */}
M_UDRx = XOFF_CHAR;
// And remember we already sent it
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
#endif
}
}
}
#endif // SERIAL_XON_XOFF
#if ENABLED(EMERGENCY_PARSER)
emergency_parser(c);
@ -160,37 +250,41 @@
FORCE_INLINE void _tx_udr_empty_irq(void) {
// If interrupts are enabled, there must be more data in the output
// buffer. Send the next byte
const uint8_t t = tx_buffer.tail,
c = tx_buffer.buffer[t];
tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
// buffer.
#if ENABLED(SERIAL_XON_XOFF)
// Do a priority insertion of an XON/XOFF char, if needed.
const uint8_t state = xon_xoff_state;
if (!(state & XON_XOFF_CHAR_SENT)) {
M_UDRx = state & XON_XOFF_CHAR_MASK;
xon_xoff_state = state | XON_XOFF_CHAR_SENT;
}
else
#endif
{ // Send the next byte
const uint8_t t = tx_buffer.tail, c = tx_buffer.buffer[t];
tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
M_UDRx = c;
}
// clear the TXC bit -- "can be cleared by writing a one to its bit
// location". This makes sure flush() won't return until the bytes
// actually got written
SBI(M_UCSRxA, M_TXCx);
if (tx_buffer.head == tx_buffer.tail) {
// Buffer empty, so disable interrupts
// Disable interrupts if the buffer is empty
if (tx_buffer.head == tx_buffer.tail)
CBI(M_UCSRxB, M_UDRIEx);
}
}
#ifdef M_USARTx_UDRE_vect
ISR(M_USARTx_UDRE_vect) {
_tx_udr_empty_irq();
}
ISR(M_USARTx_UDRE_vect) { _tx_udr_empty_irq(); }
#endif
#endif // TX_BUFFER_SIZE
#ifdef M_USARTx_RX_vect
ISR(M_USARTx_RX_vect) {
const unsigned char c = M_UDRx;
store_char(c);
}
ISR(M_USARTx_RX_vect) { store_rxd_char(); }
#endif
// Public Methods
@ -200,9 +294,9 @@
bool useU2X = true;
#if F_CPU == 16000000UL && SERIAL_PORT == 0
// hard-coded exception for compatibility with the bootloader shipped
// with the Duemilanove and previous boards and the firmware on the 8U2
// on the Uno and Mega 2560.
// Hard-coded exception for compatibility with the bootloader shipped
// with the Duemilanove and previous boards, and the firmware on the
// 8U2 on the Uno and Mega 2560.
if (baud == 57600) useU2X = false;
#endif
@ -237,8 +331,9 @@
void MarlinSerial::checkRx(void) {
if (TEST(M_UCSRxA, M_RXCx)) {
const uint8_t c = M_UDRx;
store_char(c);
CRITICAL_SECTION_START;
store_rxd_char();
CRITICAL_SECTION_END;
}
}
@ -252,51 +347,81 @@
int MarlinSerial::read(void) {
int v;
CRITICAL_SECTION_START;
const uint8_t t = rx_buffer.tail;
const ring_buffer_pos_t t = rx_buffer.tail;
if (rx_buffer.head == t)
v = -1;
else {
v = rx_buffer.buffer[t];
rx_buffer.tail = (uint8_t)(t + 1) & (RX_BUFFER_SIZE - 1);
rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
#if ENABLED(SERIAL_XON_XOFF)
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
// Get count of bytes in the RX buffer
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// When below 10% of RX buffer capacity, send XON before
// running out of RX buffer bytes
if (rx_count < (RX_BUFFER_SIZE) / 10) {
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
CRITICAL_SECTION_END; // End critical section before returning!
writeNoHandshake(XON_CHAR);
return v;
}
}
#endif
}
CRITICAL_SECTION_END;
return v;
}
uint8_t MarlinSerial::available(void) {
ring_buffer_pos_t MarlinSerial::available(void) {
CRITICAL_SECTION_START;
const uint8_t h = rx_buffer.head,
t = rx_buffer.tail;
const ring_buffer_pos_t h = rx_buffer.head, t = rx_buffer.tail;
CRITICAL_SECTION_END;
return (uint8_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
return (ring_buffer_pos_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
}
void MarlinSerial::flush(void) {
// RX
// don't reverse this or there may be problems if the RX interrupt
// occurs after reading the value of rx_buffer_head but before writing
// the value to rx_buffer_tail; the previous value of rx_buffer_head
// may be written to rx_buffer_tail, making it appear as if the buffer
// were full, not empty.
// Don't change this order of operations. If the RX interrupt occurs between
// reading rx_buffer_head and updating rx_buffer_tail, the previous rx_buffer_head
// may be written to rx_buffer_tail, making the buffer appear full rather than empty.
CRITICAL_SECTION_START;
rx_buffer.head = rx_buffer.tail;
CRITICAL_SECTION_END;
#if ENABLED(SERIAL_XON_XOFF)
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
writeNoHandshake(XON_CHAR);
}
#endif
}
#if TX_BUFFER_SIZE > 0
uint8_t MarlinSerial::availableForWrite(void) {
CRITICAL_SECTION_START;
const uint8_t h = tx_buffer.head,
t = tx_buffer.tail;
const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
CRITICAL_SECTION_END;
return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1);
}
void MarlinSerial::write(const uint8_t c) {
#if ENABLED(SERIAL_XON_XOFF)
const uint8_t state = xon_xoff_state;
if (!(state & XON_XOFF_CHAR_SENT)) {
// Send 2 chars: XON/XOFF, then a user-specified char
writeNoHandshake(state & XON_XOFF_CHAR_MASK);
xon_xoff_state = state | XON_XOFF_CHAR_SENT;
}
#endif
writeNoHandshake(c);
}
void MarlinSerial::writeNoHandshake(const uint8_t c) {
_written = true;
CRITICAL_SECTION_START;
bool emty = (tx_buffer.head == tx_buffer.tail);
CRITICAL_SECTION_END;
// If the buffer and the data register is empty, just write the byte
// to the data register and be done. This shortcut helps
// significantly improve the effective datarate at high (>
@ -355,18 +480,30 @@
// the hardware finished tranmission (TXC is set).
}
#else
void MarlinSerial::write(uint8_t c) {
while (!TEST(M_UCSRxA, M_UDREx))
;
M_UDRx = c;
#else // TX_BUFFER_SIZE == 0
void MarlinSerial::write(const uint8_t c) {
#if ENABLED(SERIAL_XON_XOFF)
// Do a priority insertion of an XON/XOFF char, if needed.
const uint8_t state = xon_xoff_state;
if (!(state & XON_XOFF_CHAR_SENT)) {
writeNoHandshake(state & XON_XOFF_CHAR_MASK);
xon_xoff_state = state | XON_XOFF_CHAR_SENT;
}
#endif
writeNoHandshake(c);
}
// end NEW
void MarlinSerial::writeNoHandshake(uint8_t c) {
while (!TEST(M_UCSRxA, M_UDREx)) {/* nada */}
M_UDRx = c;
}
/// imports from print.h
#endif // TX_BUFFER_SIZE == 0
/**
* Imports from print.h
*/
void MarlinSerial::print(char c, int base) {
print((long)c, base);

@ -87,32 +87,29 @@
#ifndef TX_BUFFER_SIZE
#define TX_BUFFER_SIZE 32
#endif
#if !((RX_BUFFER_SIZE == 256) ||(RX_BUFFER_SIZE == 128) ||(RX_BUFFER_SIZE == 64) ||(RX_BUFFER_SIZE == 32) ||(RX_BUFFER_SIZE == 16) ||(RX_BUFFER_SIZE == 8) ||(RX_BUFFER_SIZE == 4) ||(RX_BUFFER_SIZE == 2))
#error "RX_BUFFER_SIZE has to be a power of 2 and >= 2"
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
#error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
#endif
#if !((TX_BUFFER_SIZE == 256) ||(TX_BUFFER_SIZE == 128) ||(TX_BUFFER_SIZE == 64) ||(TX_BUFFER_SIZE == 32) ||(TX_BUFFER_SIZE == 16) ||(TX_BUFFER_SIZE == 8) ||(TX_BUFFER_SIZE == 4) ||(TX_BUFFER_SIZE == 2) ||(TX_BUFFER_SIZE == 0))
#error TX_BUFFER_SIZE has to be a power of 2 or 0
#if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
#error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
#endif
#if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
#error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
#endif
struct ring_buffer_r {
unsigned char buffer[RX_BUFFER_SIZE];
volatile uint8_t head;
volatile uint8_t tail;
};
#if TX_BUFFER_SIZE > 0
struct ring_buffer_t {
unsigned char buffer[TX_BUFFER_SIZE];
volatile uint8_t head;
volatile uint8_t tail;
};
#if RX_BUFFER_SIZE > 256
typedef uint16_t ring_buffer_pos_t;
#else
typedef uint8_t ring_buffer_pos_t;
#endif
#if UART_PRESENT(SERIAL_PORT)
extern ring_buffer_r rx_buffer;
#if TX_BUFFER_SIZE > 0
extern ring_buffer_t tx_buffer;
#if ENABLED(SERIAL_STATS_DROPPED_RX)
extern uint8_t rx_dropped_bytes;
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
extern ring_buffer_pos_t rx_max_enqueued;
#endif
class MarlinSerial { //: public Stream
@ -124,13 +121,22 @@
static int peek(void);
static int read(void);
static void flush(void);
static uint8_t available(void);
static ring_buffer_pos_t available(void);
static void checkRx(void);
static void write(const uint8_t c);
#if TX_BUFFER_SIZE > 0
static uint8_t availableForWrite(void);
static void flushTX(void);
#endif
static void writeNoHandshake(const uint8_t c);
#if ENABLED(SERIAL_STATS_DROPPED_RX)
FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
#endif
private:
static void printNumber(unsigned long, const uint8_t);

@ -142,7 +142,7 @@
* M140 - Set bed target temp. S<temp>
* M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
* M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
* M150 - Set Status LED Color as R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, or PCA9632)
* M150 - Set Status LED Color as R<red> U<green> B<blue> P<bright>. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, or PCA9632).
* M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
* M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
* M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS)
@ -283,7 +283,7 @@
#include "Max7219_Debug_LEDs.h"
#endif
#if ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(NEOPIXEL_LED)
#include <Adafruit_NeoPixel.h>
#endif
@ -349,6 +349,20 @@
|| isnan(ubl.z_values[0][0]))
#endif
#if ENABLED(NEOPIXEL_LED)
#if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR
#define NEO_WHITE 255, 255, 255
#else
#define NEO_WHITE 0, 0, 0, 255
#endif
#endif
#if ENABLED(RGB_LED) || ENABLED(BLINKM) || ENABLED(PCA9632)
#define LED_WHITE 255, 255, 255
#elif ENABLED(RGBW_LED)
#define LED_WHITE 0, 0, 0, 255
#endif
bool Running = true;
uint8_t marlin_debug_flags = DEBUG_NONE;
@ -596,7 +610,7 @@ static uint8_t target_extruder;
// Initialized by settings.load()
float delta_radius,
delta_tower_angle_trim[2],
delta_tower_angle_trim[ABC],
delta_tower[ABC][2],
delta_diagonal_rod,
delta_calibration_radius,
@ -978,9 +992,9 @@ void servo_init() {
#if HAS_COLOR_LEDS
#if ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(NEOPIXEL_LED)
Adafruit_NeoPixel pixels(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEO_GRBW + NEO_KHZ800);
Adafruit_NeoPixel pixels(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800);
void set_neopixel_color(const uint32_t color) {
for (uint16_t i = 0; i < pixels.numPixels(); ++i)
@ -989,7 +1003,7 @@ void servo_init() {
}
void setup_neopixel() {
pixels.setBrightness(255); // 0 - 255 range
pixels.setBrightness(NEOPIXEL_BRIGHTNESS); // 0 - 255 range
pixels.begin();
pixels.show(); // initialize to all off
@ -1002,26 +1016,28 @@ void servo_init() {
set_neopixel_color(pixels.Color(0, 0, 255, 0)); // blue
delay(2000);
#endif
set_neopixel_color(pixels.Color(0, 0, 0, 255)); // white
set_neopixel_color(pixels.Color(NEO_WHITE)); // white
}
#endif // NEOPIXEL_RGBW_LED
#endif // NEOPIXEL_LED
void set_led_color(
const uint8_t r, const uint8_t g, const uint8_t b
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
, const uint8_t w = 0
#if ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(NEOPIXEL_LED)
, const uint8_t p = NEOPIXEL_BRIGHTNESS
, bool isSequence = false
#endif
#endif
) {
#if ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(NEOPIXEL_LED)
const uint32_t color = pixels.Color(r, g, b, w);
static uint16_t nextLed = 0;
pixels.setBrightness(p);
if (!isSequence)
set_neopixel_color(color);
else {
@ -1098,9 +1114,10 @@ inline void get_serial_commands() {
/**
* Loop while serial characters are incoming and the queue is not full
*/
while (commands_in_queue < BUFSIZE && MYSERIAL.available() > 0) {
int c;
while (commands_in_queue < BUFSIZE && (c = MYSERIAL.read()) >= 0) {
char serial_char = MYSERIAL.read();
char serial_char = c;
/**
* If the character ends the line
@ -1200,9 +1217,9 @@ inline void get_serial_commands() {
// The command will be injected when EOL is reached
}
else if (serial_char == '\\') { // Handle escapes
if (MYSERIAL.available() > 0) {
if ((c = MYSERIAL.read()) >= 0) {
// if we have one more character, copy it over
serial_char = MYSERIAL.read();
serial_char = c;
if (!serial_comment_mode) serial_line_buffer[serial_count++] = serial_char;
}
// otherwise do nothing
@ -1822,7 +1839,7 @@ static void clean_up_after_endstop_or_probe_move() {
#endif // HAS_BED_PROBE
#if HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION)
#if HAS_AXIS_UNHOMED_ERR
bool axis_unhomed_error(const bool x/*=true*/, const bool y/*=true*/, const bool z/*=true*/) {
#if ENABLED(HOME_AFTER_DEACTIVATE)
@ -1850,7 +1867,7 @@ static void clean_up_after_endstop_or_probe_move() {
return false;
}
#endif
#endif // HAS_AXIS_UNHOMED_ERR
#if ENABLED(Z_PROBE_SLED)
@ -2053,7 +2070,7 @@ static void clean_up_after_endstop_or_probe_move() {
#endif
}
#endif
#endif // Z_PROBE_ALLEN_KEY
#if ENABLED(PROBING_FANS_OFF)
@ -3093,7 +3110,7 @@ static void homeaxis(const AxisEnum axis) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("endstop_adj:");
#endif
do_homing_move(axis, endstop_adj[axis] - 0.1);
do_homing_move(axis, endstop_adj[axis] - 0.1 * Z_HOME_DIR);
}
#else
@ -3193,6 +3210,8 @@ static void homeaxis(const AxisEnum axis) {
// The current position will be the destination for E and Z moves
set_destination_to_current();
stepper.synchronize(); // Wait for all moves to finish
if (retracting) {
// Remember the Z height since G-code may include its own Z-hop
// For best results turn off Z hop if G-code already includes it
@ -3381,6 +3400,10 @@ inline void gcode_G0_G1(
bool fast_move=false
#endif
) {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
gcode_get_destination(); // For X Y Z E F
@ -3436,6 +3459,10 @@ inline void gcode_G0_G1(
#if ENABLED(ARC_SUPPORT)
inline void gcode_G2_G3(bool clockwise) {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
#if ENABLED(SF_ARC_FIX)
@ -3533,8 +3560,20 @@ inline void gcode_G4() {
* G5: Cubic B-spline
*/
inline void gcode_G5() {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
#if ENABLED(CNC_WORKSPACE_PLANES)
if (workspace_plane != PLANE_XY) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_BAD_PLANE_MODE);
return;
}
#endif
gcode_get_destination();
const float offset[] = {
@ -5325,6 +5364,7 @@ void home_all_axes() { gcode_G28(true); }
*
* Pn Number of probe points:
*
* P0 No probe. Normalize only.
* P1 Probe center and set height only.
* P2 Probe center and towers. Set height, endstops, and delta radius.
* P3 Probe all positions: center, towers and opposite towers. Set all.
@ -5353,7 +5393,7 @@ void home_all_axes() { gcode_G28(true); }
SERIAL_PROTOCOL_F(f, 2);
}
inline void print_G33_settings(const bool end_stops, const bool tower_angles){ // TODO echo these to LCD ???
void print_G33_settings(const bool end_stops, const bool tower_angles) {
SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
if (end_stops) {
print_signed_float(PSTR(" Ex"), endstop_adj[A_AXIS]);
@ -5366,7 +5406,8 @@ void home_all_axes() { gcode_G28(true); }
SERIAL_PROTOCOLPGM(".Tower angle : ");
print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
SERIAL_PROTOCOLLNPGM(" Tz:+0.00");
print_signed_float(PSTR("Tz"), delta_tower_angle_trim[C_AXIS]);
SERIAL_EOL();
}
}
@ -5388,8 +5429,8 @@ void home_all_axes() { gcode_G28(true); }
inline void gcode_G33() {
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
if (!WITHIN(probe_points, 1, 7)) {
SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (1-7).");
if (!WITHIN(probe_points, 0, 7)) {
SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (0-7).");
return;
}
@ -5413,11 +5454,12 @@ void home_all_axes() { gcode_G28(true); }
const bool towers_set = parser.boolval('T', true),
stow_after_each = parser.boolval('E'),
_0p_calibration = probe_points == 0,
_1p_calibration = probe_points == 1,
_4p_calibration = probe_points == 2,
_4p_towers_points = _4p_calibration && towers_set,
_4p_opposite_points = _4p_calibration && !towers_set,
_7p_calibration = probe_points >= 3,
_7p_calibration = probe_points >= 3 || _0p_calibration,
_7p_half_circle = probe_points == 3,
_7p_double_circle = probe_points == 5,
_7p_triple_circle = probe_points == 6,
@ -5432,17 +5474,20 @@ void home_all_axes() { gcode_G28(true); }
zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
zero_std_dev_old = zero_std_dev,
zero_std_dev_min = zero_std_dev,
e_old[XYZ] = {
e_old[ABC] = {
endstop_adj[A_AXIS],
endstop_adj[B_AXIS],
endstop_adj[C_AXIS]
},
dr_old = delta_radius,
zh_old = home_offset[Z_AXIS],
alpha_old = delta_tower_angle_trim[A_AXIS],
beta_old = delta_tower_angle_trim[B_AXIS];
ta_old[ABC] = {
delta_tower_angle_trim[A_AXIS],
delta_tower_angle_trim[B_AXIS],
delta_tower_angle_trim[C_AXIS]
};
if (!_1p_calibration) { // test if the outer radius is reachable
if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable
const float circles = (_7p_quadruple_circle ? 1.5 :
_7p_triple_circle ? 1.0 :
_7p_double_circle ? 0.5 : 0),
@ -5472,9 +5517,11 @@ void home_all_axes() { gcode_G28(true); }
setup_for_endstop_or_probe_move();
endstops.enable(true);
if (!_0p_calibration) {
if (!home_delta())
return;
endstops.not_homing();
}
// print settings
@ -5486,22 +5533,16 @@ void home_all_axes() { gcode_G28(true); }
print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
#if DISABLED(PROBE_MANUALLY)
const float measured_z = probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
if (isnan(measured_z)) return G33_CLEANUP();
home_offset[Z_AXIS] -= measured_z;
#endif
do {
float z_at_pt[13] = { 0.0 };
test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
iterations++;
// Probe the points
if (!_0p_calibration){
if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
#if ENABLED(PROBE_MANUALLY)
z_at_pt[0] += lcd_probe_pt(0, 0);
@ -5549,6 +5590,7 @@ void home_all_axes() { gcode_G28(true); }
for (uint8_t axis = 1; axis < 13; axis += 2)
z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
}
float S1 = z_at_pt[0],
S2 = sq(z_at_pt[0]);
int16_t N = 1;
@ -5559,96 +5601,104 @@ void home_all_axes() { gcode_G28(true); }
N++;
}
zero_std_dev_old = zero_std_dev;
zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;
zero_std_dev = round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
// Solve matrices
if ((zero_std_dev < test_precision && zero_std_dev > calibration_precision) || iterations <= force_iterations) {
if ((zero_std_dev < test_precision || iterations <= force_iterations) && zero_std_dev > calibration_precision) {
if (zero_std_dev < zero_std_dev_min) {
COPY(e_old, endstop_adj);
dr_old = delta_radius;
zh_old = home_offset[Z_AXIS];
alpha_old = delta_tower_angle_trim[A_AXIS];
beta_old = delta_tower_angle_trim[B_AXIS];
COPY(ta_old, delta_tower_angle_trim);
}
float e_delta[XYZ] = { 0.0 }, r_delta = 0.0, t_alpha = 0.0, t_beta = 0.0;
float e_delta[ABC] = { 0.0 }, r_delta = 0.0, t_delta[ABC] = { 0.0 };
const float r_diff = delta_radius - delta_calibration_radius,
h_factor = 1.00 + r_diff * 0.001, //1.02 for r_diff = 20mm
r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), //2.25 for r_diff = 20mm
a_factor = 100.0 / delta_calibration_radius; //1.25 for cal_rd = 80mm
h_factor = (1.00 + r_diff * 0.001) / 6.0, // 1.02 for r_diff = 20mm
r_factor = (-(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff))) / 6.0, // 2.25 for r_diff = 20mm
a_factor = (66.66 / delta_calibration_radius) / (iterations == 1 ? 16.0 : 2.0); // 0.83 for cal_rd = 80mm (Slow down on 1st iteration)
#define ZP(N,I) ((N) * z_at_pt[I])
#define Z1000(I) ZP(1.00, I)
#define Z1050(I) ZP(h_factor, I)
#define Z0700(I) ZP(h_factor * 2.0 / 3.00, I)
#define Z0350(I) ZP(h_factor / 3.00, I)
#define Z0175(I) ZP(h_factor / 6.00, I)
#define Z2250(I) ZP(r_factor, I)
#define Z0750(I) ZP(r_factor / 3.00, I)
#define Z0375(I) ZP(r_factor / 6.00, I)
#define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
#define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
#define Z6(I) ZP(6, I)
#define Z4(I) ZP(4, I)
#define Z2(I) ZP(2, I)
#define Z1(I) ZP(1, I)
#if ENABLED(PROBE_MANUALLY)
test_precision = 0.00; // forced end
#endif
switch (probe_points) {
case 0:
#if DISABLED(PROBE_MANUALLY)
test_precision = 0.00; // forced end
#endif
break;
case 1:
#if DISABLED(PROBE_MANUALLY)
test_precision = 0.00; // forced end
LOOP_XYZ(i) e_delta[i] = Z1000(0);
#endif
LOOP_XYZ(axis) e_delta[axis] = Z1(0);
break;
case 2:
if (towers_set) {
e_delta[X_AXIS] = Z1050(0) + Z0700(1) - Z0350(5) - Z0350(9);
e_delta[Y_AXIS] = Z1050(0) - Z0350(1) + Z0700(5) - Z0350(9);
e_delta[Z_AXIS] = Z1050(0) - Z0350(1) - Z0350(5) + Z0700(9);
r_delta = Z2250(0) - Z0750(1) - Z0750(5) - Z0750(9);
e_delta[A_AXIS] = (Z6(0) + Z4(1) - Z2(5) - Z2(9)) * h_factor;
e_delta[B_AXIS] = (Z6(0) - Z2(1) + Z4(5) - Z2(9)) * h_factor;
e_delta[C_AXIS] = (Z6(0) - Z2(1) - Z2(5) + Z4(9)) * h_factor;
r_delta = (Z6(0) - Z2(1) - Z2(5) - Z2(9)) * r_factor;
}
else {
e_delta[X_AXIS] = Z1050(0) - Z0700(7) + Z0350(11) + Z0350(3);
e_delta[Y_AXIS] = Z1050(0) + Z0350(7) - Z0700(11) + Z0350(3);
e_delta[Z_AXIS] = Z1050(0) + Z0350(7) + Z0350(11) - Z0700(3);
r_delta = Z2250(0) - Z0750(7) - Z0750(11) - Z0750(3);
e_delta[A_AXIS] = (Z6(0) - Z4(7) + Z2(11) + Z2(3)) * h_factor;
e_delta[B_AXIS] = (Z6(0) + Z2(7) - Z4(11) + Z2(3)) * h_factor;
e_delta[C_AXIS] = (Z6(0) + Z2(7) + Z2(11) - Z4(3)) * h_factor;
r_delta = (Z6(0) - Z2(7) - Z2(11) - Z2(3)) * r_factor;
}
break;
default:
e_delta[X_AXIS] = Z1050(0) + Z0350(1) - Z0175(5) - Z0175(9) - Z0350(7) + Z0175(11) + Z0175(3);
e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3);
e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
r_delta = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
e_delta[A_AXIS] = (Z6(0) + Z2(1) - Z1(5) - Z1(9) - Z2(7) + Z1(11) + Z1(3)) * h_factor;
e_delta[B_AXIS] = (Z6(0) - Z1(1) + Z2(5) - Z1(9) + Z1(7) - Z2(11) + Z1(3)) * h_factor;
e_delta[C_AXIS] = (Z6(0) - Z1(1) - Z1(5) + Z2(9) + Z1(7) + Z1(11) - Z2(3)) * h_factor;
r_delta = (Z6(0) - Z1(1) - Z1(5) - Z1(9) - Z1(7) - Z1(11) - Z1(3)) * r_factor;
if (towers_set) {
t_alpha = Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
t_beta = Z0888(1) - Z0444(5) - Z0444(9) + Z0888(7) - Z0444(11) - Z0444(3);
t_delta[A_AXIS] = ( - Z2(5) + Z2(9) - Z2(11) + Z2(3)) * a_factor;
t_delta[B_AXIS] = ( Z2(1) - Z2(9) + Z2(7) - Z2(3)) * a_factor;
t_delta[C_AXIS] = (-Z2(1) + Z2(5) - Z2(7) + Z2(11) ) * a_factor;
e_delta[A_AXIS] += (t_delta[B_AXIS] - t_delta[C_AXIS]) / 4.5;
e_delta[B_AXIS] += (t_delta[C_AXIS] - t_delta[A_AXIS]) / 4.5;
e_delta[C_AXIS] += (t_delta[A_AXIS] - t_delta[B_AXIS]) / 4.5;
}
break;
}
LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
delta_radius += r_delta;
delta_tower_angle_trim[A_AXIS] += t_alpha;
delta_tower_angle_trim[B_AXIS] += t_beta;
// adjust delta_height and endstops by the max amount
const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
home_offset[Z_AXIS] -= z_temp;
LOOP_XYZ(i) endstop_adj[i] -= z_temp;
recalc_delta_settings(delta_radius, delta_diagonal_rod);
LOOP_XYZ(axis) delta_tower_angle_trim[axis] += t_delta[axis];
}
else if (zero_std_dev >= test_precision) { // step one back
COPY(endstop_adj, e_old);
delta_radius = dr_old;
home_offset[Z_AXIS] = zh_old;
delta_tower_angle_trim[A_AXIS] = alpha_old;
delta_tower_angle_trim[B_AXIS] = beta_old;
COPY(delta_tower_angle_trim, ta_old);
}
recalc_delta_settings(delta_radius, delta_diagonal_rod);
if (verbose_level != 0) { // !dry run
// normalise angles to least squares
float a_sum = 0.0;
LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis];
LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0;
// adjust delta_height and endstops by the max amount
const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
home_offset[Z_AXIS] -= z_temp;
LOOP_XYZ(axis) endstop_adj[axis] -= z_temp;
}
recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
NOMORE(zero_std_dev_min, zero_std_dev);
// print report
@ -5674,7 +5724,7 @@ void home_all_axes() { gcode_G28(true); }
}
}
if (verbose_level != 0) { // !dry run
if ((zero_std_dev >= test_precision || zero_std_dev <= calibration_precision) && iterations > force_iterations) { // end iterations
if ((zero_std_dev >= test_precision && iterations > force_iterations) || zero_std_dev <= calibration_precision) { // end iterations
SERIAL_PROTOCOLPGM("Calibration OK");
SERIAL_PROTOCOL_SP(36);
#if DISABLED(PROBE_MANUALLY)
@ -5736,7 +5786,7 @@ void home_all_axes() { gcode_G28(true); }
endstops.not_homing();
}
while ((zero_std_dev < test_precision && zero_std_dev > calibration_precision && iterations < 31) || iterations <= force_iterations);
while (((zero_std_dev < test_precision && iterations < 31) || iterations <= force_iterations) && zero_std_dev > calibration_precision);
G33_CLEANUP();
}
@ -5842,6 +5892,10 @@ void home_all_axes() { gcode_G28(true); }
* G42: Move X & Y axes to mesh coordinates (I & J)
*/
inline void gcode_G42() {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
const bool hasI = parser.seenval('I');
const int8_t ix = hasI ? parser.value_int() : 0;
@ -6333,6 +6387,8 @@ inline void gcode_M17() {
filament_change_beep(max_beep_count, true);
#endif
set_destination_to_current();
if (load_length != 0) {
#if ENABLED(ULTIPANEL)
// Show "insert filament"
@ -7550,8 +7606,12 @@ inline void gcode_M109() {
if (blue != old_blue) {
old_blue = blue;
set_led_color(255, 0, blue
#if ENABLED(NEOPIXEL_RGBW_LED)
, 0, true
#if ENABLED(NEOPIXEL_LED)
, 0
, pixels.getBrightness()
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
, true
#endif
#endif
);
}
@ -7589,10 +7649,11 @@ inline void gcode_M109() {
if (wait_for_heatup) {
LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
#if ENABLED(PRINTER_EVENT_LEDS)
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_RGBW_LED)
set_led_color(0, 0, 0, 255); // Turn on the WHITE LED
#else
set_led_color(255, 255, 255); // Set LEDs All On
#if ENABLED(RGB_LED) || ENABLED(BLINKM) || ENABLED(PCA9632) || ENABLED(RGBW_LED)
set_led_color(LED_WHITE);
#endif
#if ENABLED(NEOPIXEL_LED)
set_neopixel_color(pixels.Color(NEO_WHITE));
#endif
#endif
}
@ -7690,8 +7751,11 @@ inline void gcode_M109() {
if (red != old_red) {
old_red = red;
set_led_color(red, 0, 255
#if ENABLED(NEOPIXEL_RGBW_LED)
, 0, true
#if ENABLED(NEOPIXEL_LED)
, 0, pixels.getBrightness()
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
, true
#endif
#endif
);
}
@ -7745,16 +7809,17 @@ inline void gcode_M110() {
* M111: Set the debug level
*/
inline void gcode_M111() {
marlin_debug_flags = parser.byteval('S', (uint8_t)DEBUG_NONE);
if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO;
const static char str_debug_2[] PROGMEM = MSG_DEBUG_INFO;
const static char str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS;
const static char str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN;
const static char str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION;
const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
str_debug_2[] PROGMEM = MSG_DEBUG_INFO,
str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS,
str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN,
str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION
#if ENABLED(DEBUG_LEVELING_FEATURE)
const static char str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING;
, str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING
#endif
;
const static char* const debug_strings[] PROGMEM = {
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16
@ -8337,8 +8402,10 @@ inline void gcode_M121() { endstops.enable_globally(false); }
/**
* M150: Set Status LED Color - Use R-U-B-W for R-G-B-W
* and Brightness - Use P (for NEOPIXEL only)
*
* Always sets all 3 or 4 components. If a component is left out, set to 0.
* If brightness is left out, no value changed
*
* Examples:
*
@ -8347,15 +8414,19 @@ inline void gcode_M121() { endstops.enable_globally(false); }
* M150 ; Turn LED off
* M150 R U B ; Turn LED white
* M150 W ; Turn LED white using a white LED
*
* M150 P127 ; Set LED 50% brightness
* M150 P ; Set LED full brightness
*/
inline void gcode_M150() {
set_led_color(
parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
, parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0
#if ENABLED(NEOPIXEL_LED)
, parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : pixels.getBrightness()
#endif
#endif
);
}
@ -8529,11 +8600,8 @@ inline void gcode_M205() {
if (parser.seen('B')) delta_calibration_radius = parser.value_float();
if (parser.seen('X')) delta_tower_angle_trim[A_AXIS] = parser.value_float();
if (parser.seen('Y')) delta_tower_angle_trim[B_AXIS] = parser.value_float();
if (parser.seen('Z')) { // rotate all 3 axis for Z = 0
delta_tower_angle_trim[A_AXIS] -= parser.value_float();
delta_tower_angle_trim[B_AXIS] -= parser.value_float();
}
recalc_delta_settings(delta_radius, delta_diagonal_rod);
if (parser.seen('Z')) delta_tower_angle_trim[C_AXIS] = parser.value_float();
recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
}
/**
* M666: Set delta endstop adjustment
@ -8546,6 +8614,7 @@ inline void gcode_M205() {
#endif
LOOP_XYZ(i) {
if (parser.seen(axis_codes[i])) {
if (parser.value_linear_units() * Z_HOME_DIR <= 0)
endstop_adj[i] = parser.value_linear_units();
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
@ -8560,10 +8629,6 @@ inline void gcode_M205() {
SERIAL_ECHOLNPGM("<<< gcode_M666");
}
#endif
// normalize endstops so all are <=0; set the residue to delta height
const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
home_offset[Z_AXIS] -= z_temp;
LOOP_XYZ(i) endstop_adj[i] -= z_temp;
}
#elif IS_SCARA
@ -10088,12 +10153,11 @@ inline void gcode_M907() {
#ifndef INVERT_CASE_LIGHT
#define INVERT_CASE_LIGHT false
#endif
int case_light_brightness; // LCD routine wants INT
uint8_t case_light_brightness; // LCD routine wants INT
bool case_light_on;
void update_case_light() {
pinMode(CASE_LIGHT_PIN, OUTPUT); // digitalWrite doesn't set the port mode
uint8_t case_light_bright = (uint8_t)case_light_brightness;
if (case_light_on) {
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) {
analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 - case_light_brightness : case_light_brightness);
@ -10130,7 +10194,7 @@ inline void gcode_M355() {
}
else {
if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLN("Case light: on");
else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness);
else SERIAL_ECHOLNPAIR("Case light: ", (int)case_light_brightness);
}
#else
@ -11822,15 +11886,15 @@ void ok_to_send() {
* Recalculate factors used for delta kinematics whenever
* settings have been changed (e.g., by M665).
*/
void recalc_delta_settings(float radius, float diagonal_rod) {
void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]) {
const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
delta_tower[C_AXIS][X_AXIS] = 0.0; // back middle tower
delta_tower[C_AXIS][Y_AXIS] = (radius + trt[C_AXIS]);
delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
delta_tower[C_AXIS][X_AXIS] = cos(RADIANS( 90 + tower_angle_trim[C_AXIS])) * (radius + trt[C_AXIS]); // back middle tower
delta_tower[C_AXIS][Y_AXIS] = sin(RADIANS( 90 + tower_angle_trim[C_AXIS])) * (radius + trt[C_AXIS]);
delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + drt[B_AXIS]);
delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + drt[C_AXIS]);
@ -12437,7 +12501,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
break;
}
}
return false;
return prepare_move_to_destination_cartesian();
}
#endif // DUAL_X_CARRIAGE
@ -12479,7 +12543,7 @@ void prepare_move_to_destination() {
#elif IS_KINEMATIC
prepare_kinematic_move_to(destination)
#elif ENABLED(DUAL_X_CARRIAGE)
prepare_move_to_destination_dualx() || prepare_move_to_destination_cartesian()
prepare_move_to_destination_dualx()
#else
prepare_move_to_destination_cartesian()
#endif
@ -12591,7 +12655,7 @@ void prepare_move_to_destination() {
millis_t next_idle_ms = millis() + 200UL;
#if N_ARC_CORRECTION > 1
int8_t count = N_ARC_CORRECTION;
int8_t arc_recalc_count = N_ARC_CORRECTION;
#endif
for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times
@ -12603,7 +12667,7 @@ void prepare_move_to_destination() {
}
#if N_ARC_CORRECTION > 1
if (--count) {
if (--arc_recalc_count) {
// Apply vector rotation matrix to previous r_P / 1
const float r_new_Y = r_P * sin_T + r_Q * cos_T;
r_P = r_P * cos_T - r_Q * sin_T;
@ -12613,7 +12677,7 @@ void prepare_move_to_destination() {
#endif
{
#if N_ARC_CORRECTION > 1
count = N_ARC_CORRECTION;
arc_recalc_count = N_ARC_CORRECTION;
#endif
// Arc correction to radius vector. Computed only every N_ARC_CORRECTION increments.
@ -12643,8 +12707,9 @@ void prepare_move_to_destination() {
// motion control system might still be processing the action and the real tool position
// in any intermediate location.
set_current_to_destination();
}
#endif
} // plan_arc
#endif // ARC_SUPPORT
#if ENABLED(BEZIER_CURVE_SUPPORT)
@ -13008,9 +13073,6 @@ void disable_all_steppers() {
#if ENABLED(E4_IS_TMC2130)
automatic_current_control(stepperE4, "E4");
#endif
#if ENABLED(E4_IS_TMC2130)
automatic_current_control(stepperE4);
#endif
}
}
@ -13460,7 +13522,7 @@ void setup() {
OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off
#endif
#if ENABLED(NEOPIXEL_RGBW_LED)
#if ENABLED(NEOPIXEL_LED)
SET_OUTPUT(NEOPIXEL_PIN);
setup_neopixel();
#endif
@ -13551,6 +13613,12 @@ void setup() {
pe_deactivate_magnet(1);
#endif
#endif
#if ENABLED(MKS_12864OLED)
SET_OUTPUT(LCD_PINS_DC);
OUT_WRITE(LCD_PINS_RS, LOW);
delay(1000);
WRITE(LCD_PINS_RS, HIGH);
#endif
}
/**
@ -13580,6 +13648,15 @@ void loop() {
// M29 closes the file
card.closefile();
SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
#if ENABLED(SERIAL_STATS_DROPPED_RX)
SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped());
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued());
#endif
ok_to_send();
}
else {

@ -21,37 +21,39 @@
*/
/**
* This module is normally not enabled. It can be enabled to facilitate
* the display of extra debug information during code development.
* It assumes the existance of a Max7219 LED Matrix. A suitable
* device can be obtained on eBay similar to this: http://www.ebay.com/itm/191781645249
* for under $2.00 including shipping.
* This module is off by default, but can be enabled to facilitate the display of
* extra debug information during code development. It assumes the existence of a
* Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
* http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
*
* Just connect up +5v and Gnd to give it power. And then 3 wires declared in the
* #define's below. Actual pin assignments can be changed in MAX7219_DEBUG section
* of configuration_adv.h
* Just connect up +5v and GND to give it power, then connect up the pins assigned
* in Configuration_adv.h. For example, on the Re-ARM you could use:
*
* #define Max7219_clock 77
* #define Max7219_data_in 78
* #define Max7219_load 79
* #define MAX7219_CLK_PIN 77
* #define MAX7219_DIN_PIN 78
* #define MAX7219_LOAD_PIN 79
*
* First call Max7219_init() and then there are a number of support functions available
* to control the LED's in the 8x8 grid.
* Max7219_init() is called automatically at startup, and then there are a number of
* support functions available to control the LEDs in the 8x8 grid.
*
* void Max7219_init();
* void Max7219_PutByte(uint8_t data);
* void Max7219(uint8_t reg, uint8_t data);
* void Max7219_LED_On( int8_t row, int8_t col);
* void Max7219_LED_Off( int8_t row, int8_t col);
* void Max7219_LED_Toggle( int8_t row, int8_t col);
* void Max7219_Clear_Row( int8_t row);
* void Max7219_Clear_Column( int8_t col);
* void Max7219_LED_On(uint8_t row, uint8_t col);
* void Max7219_LED_Off(uint8_t row, uint8_t col);
* void Max7219_LED_Toggle(uint8_t row, uint8_t col);
* void Max7219_Clear_Row(uint8_t row);
* void Max7219_Clear_Column(uint8_t col);
* void Max7219_Set_Row(uint8_t row, uint8_t val);
* void Max7219_Set_Column(uint8_t col, uint8_t val);
* void Max7219_idle_tasks();
*/
#include "Marlin.h"
#include "MarlinConfig.h"
#if ENABLED(MAX7219_DEBUG)
#include "Marlin.h"
#include "planner.h"
#include "stepper.h"
#include "Max7219_Debug_LEDs.h"
@ -59,161 +61,120 @@
static uint8_t LEDs[8] = { 0 };
void Max7219_PutByte(uint8_t data) {
uint8_t i = 8;
while(i > 0) {
digitalWrite( Max7219_clock, LOW); // tick
if (data & 0x80) // check bit
digitalWrite(Max7219_data_in,HIGH); // send 1
else
digitalWrite(Max7219_data_in,LOW); // send 0
digitalWrite(Max7219_clock, HIGH); // tock
data = data << 0x01;
--i; // move to lesser bit
for (uint8_t i = 8; i--;) {
WRITE(MAX7219_CLK_PIN, LOW); // tick
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
WRITE(MAX7219_CLK_PIN, HIGH); // tock
data <<= 1;
}
}
void Max7219( uint8_t reg, uint8_t data) {
digitalWrite(Max7219_load, LOW); // begin
void Max7219(const uint8_t reg, const uint8_t data) {
WRITE(MAX7219_LOAD_PIN, LOW); // begin
Max7219_PutByte(reg); // specify register
Max7219_PutByte(data); // put data
digitalWrite(Max7219_load, LOW); // and tell the chip to load the data
digitalWrite(Max7219_load,HIGH);
WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
WRITE(MAX7219_LOAD_PIN, HIGH);
}
void Max7219_LED_On( int8_t row, int8_t col) {
int x_index;
if ( row>=8 || row<0 || col>=8 || col<0)
return;
if ( LEDs[row] & (0x01<<col) ) // if LED is already on, just leave
return;
LEDs[row] |= (0x01<<col);
x_index = 7-row;
Max7219( x_index+1, LEDs[row] );
void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
if (row > 7 || col > 7) return;
if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
Max7219(8 - row, LEDs[row]);
}
void Max7219_LED_Off( int8_t row, int8_t col) {
int x_index;
if ( row>=8 || row<0 || col>=8 || col<0)
return;
if ( !(LEDs[row] & (0x01<<col)) ) // if LED is already off, just leave
return;
void Max7219_LED_On(const uint8_t row, const uint8_t col) {
Max7219_LED_Set(row, col, true);
}
LEDs[row] ^= (0x01<<col);
x_index = 7-row;
Max7219( x_index+1, LEDs[row] );
void Max7219_LED_Off(const uint8_t row, const uint8_t col) {
Max7219_LED_Set(row, col, false);
}
void Max7219_LED_Toggle( int8_t row, int8_t col) {
if ( row>=8 || row<0 || col>=8 || col<0)
return;
if ( (LEDs[row] & (0x01<<col)) )
void Max7219_LED_Toggle(const uint8_t row, const uint8_t col) {
if (row > 7 || col > 7) return;
if (TEST(LEDs[row], col))
Max7219_LED_Off(row, col);
else
Max7219_LED_On(row, col);
}
void Max7219_Clear_Column( int8_t col) {
int x_index;
if ( col>=8 || col<0 )
return;
void Max7219_Clear_Column(const uint8_t col) {
if (col > 7) return;
LEDs[col] = 0;
x_index = 7-col;
Max7219( x_index+1, LEDs[col] );
Max7219(8 - col, LEDs[col]);
}
void Max7219_Clear_Row( int8_t row) {
int c;
if ( row>=8 || row<0 )
return;
for(c=0; c<8; c++)
void Max7219_Clear_Row(const uint8_t row) {
if (row > 7) return;
for (uint8_t c = 0; c <= 7; c++)
Max7219_LED_Off(c, row);
}
void Max7219_Set_Row( int8_t row, uint8_t val) {
int b;
if ( row<0 || row>7 )
return;
if ( val<0 || val>255 )
return;
for(b=0; b<8; b++)
if ( val & (0x01 << b) )
void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
if (row > 7) return;
for (uint8_t b = 0; b <= 7; b++)
if (TEST(val, b))
Max7219_LED_On(7 - b, row);
else
Max7219_LED_Off(7 - b, row);
}
void Max7219_Set_Column( int8_t col, uint8_t val) {
int x_index;
if ( col>=8 || col<0 )
return;
if ( val<0 || val>255 )
return;
void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
if (col > 7) return;
LEDs[col] = val;
x_index = 7-col;
Max7219( x_index+1, LEDs[col] );
Max7219(8 - col, LEDs[col]);
}
void Max7219_init() {
int i, x, y;
uint8_t i, x, y;
pinMode(Max7219_data_in, OUTPUT);
pinMode(Max7219_clock, OUTPUT);
pinMode(Max7219_load, OUTPUT);
SET_OUTPUT(MAX7219_DIN_PIN);
SET_OUTPUT(MAX7219_CLK_PIN);
digitalWrite(Max7219_load, HIGH);
OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
//initiation of the max 7219
Max7219(max7219_reg_scanLimit, 0x07);
Max7219(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
Max7219(max7219_reg_shutdown, 0x01); // not in shutdown mode
Max7219(max7219_reg_displayTest, 0x00); // no display test
Max7219(max7219_reg_intensity, 0x01 & 0x0f); // the first 0x0f is the value you can set
// range: 0x00 to 0x0f
for (i=0; i<8; i++) { // empty registers, turn all LEDs off
Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
// range: 0x00 to 0x0F
for (i = 0; i <= 7; i++) { // empty registers, turn all LEDs off
LEDs[i] = 0x00;
Max7219(i + 1, 0);
}
for(x=0; x<8; x++) { // Do an austetically pleasing pattern to fully test
for(y=0; y<8; y++) { // the Max7219 module and LED's. First, turn them
for (x = 0; x <= 7; x++) // Do an aesthetically pleasing pattern to fully test
for (y = 0; y <= 7; y++) { // the Max7219 module and LEDs. First, turn them
Max7219_LED_On(x, y); // all on.
delay(3);
}
}
for(x=0; x<8; x++) { // Now, turn them all off.
for(y=0; y<8; y++) {
for (x = 0; x <= 7; x++) // Now, turn them all off.
for (y = 0; y <= 7; y++) {
Max7219_LED_Off(x, y);
delay(3); // delay() is OK here. Max7219_init() is only called from
} // setup() and nothing is running yet.
}
delay(150);
for(x=7; x>=0; x--) { // Now, do the same thing from the opposite direction
for(y=0; y<8; y++) {
for (x = 8; x--;) // Now, do the same thing from the opposite direction
for (y = 0; y <= 7; y++) {
Max7219_LED_On(x, y);
delay(2);
}
}
for(x=7; x>=0; x--) {
for(y=0; y<8; y++) {
for (x = 8; x--;)
for (y = 0; y <= 7; y++) {
Max7219_LED_Off(x, y);
delay(2);
}
}
}
/*
/**
* These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
* There is very little CPU burden added to the system by displaying information within the idle()
* task.
@ -223,7 +184,7 @@
* or clear a row is not very significant.
*/
void Max7219_idle_tasks() {
#ifdef MAX7219_DEBUG_PRINTER_ALIVE
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
static int debug_cnt = 0;
if (debug_cnt++ > 100) {
Max7219_LED_Toggle(7, 7);
@ -250,37 +211,26 @@
#endif
#ifdef MAX7219_DEBUG_STEPPER_QUEUE
static int16_t last_depth=0, current_depth;
uint8_t i;
current_depth = planner.block_buffer_head - planner.block_buffer_tail;
static int16_t last_depth = 0;
int16_t current_depth = planner.block_buffer_head - planner.block_buffer_tail;
if (current_depth != last_depth) { // usually, no update will be needed.
if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
NOMORE(current_depth, BLOCK_BUFFER_SIZE);
NOMORE(current_depth, 16); // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
// of LEDs is enough to see if the buffer is draining
if ( current_depth < 0 )
current_depth += BLOCK_BUFFER_SIZE;
if ( current_depth >= BLOCK_BUFFER_SIZE )
current_depth = BLOCK_BUFFER_SIZE;
if ( current_depth > 16 ) // if the BLOCK_BUFFER_SIZE is greater than 16 two lines
current_depth = 16; // of LED's is enough to see if the buffer is draining
const uint8_t st = min(current_depth, last_depth),
en = max(current_depth, last_depth);
if (current_depth < last_depth)
for(i=current_depth; i<=last_depth; i++) { // clear the highest order LED's
if ( i & 1)
Max7219_LED_Off(i>>1, MAX7219_DEBUG_STEPPER_QUEUE+1);
for (uint8_t i = st; i <= en; i++) // clear the highest order LEDs
Max7219_LED_Off(i >> 1, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
else
Max7219_LED_Off(i>>1, MAX7219_DEBUG_STEPPER_QUEUE+0);
}
else
for(i=last_depth; i<=current_depth; i++) { // light up the highest order LED's
if ( i & 1)
Max7219_LED_On(i>>1, MAX7219_DEBUG_STEPPER_QUEUE+1);
else
Max7219_LED_On(i>>1, MAX7219_DEBUG_STEPPER_QUEUE+0);
}
for (uint8_t i = st; i <= en; i++) // set the highest order LEDs
Max7219_LED_On(i >> 1, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
last_depth = current_depth;
}
#endif
}
#endif //MAX7219_DEBUG
#endif // MAX7219_DEBUG

@ -21,34 +21,38 @@
*/
/**
* This module is normally not enabled and does not generate any code. But it
* can be enabled to facilitate the display of extra debug information during
* code development. It assumes the existance of a Max7219 LED Matrix. You
* can get one on eBay similar to this: http://www.ebay.com/itm/191781645249
* for under $2.00 including shipping.
* This module is off by default, but can be enabled to facilitate the display of
* extra debug information during code development. It assumes the existence of a
* Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
* http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
*
* Just connect up +5v and Gnd to give it power. And then 3 wires declared in the
* #define's below. Actual pin assignments can be changed in MAX7219_DEBUG section
* of configuration_adv.h
* Just connect up +5v and GND to give it power, then connect up the pins assigned
* in Configuration_adv.h. For example, on the Re-ARM you could use:
*
* You first call Max7219_init() and then you have 3 support functions available
* to control the LED's in the 8x8 grid.
* #define MAX7219_CLK_PIN 77
* #define MAX7219_DIN_PIN 78
* #define MAX7219_LOAD_PIN 79
*
* Max7219_init() is called automatically at startup, and then there are a number of
* support functions available to control the LEDs in the 8x8 grid.
*
* void Max7219_init();
* void Max7219_PutByte(uint8_t data);
* void Max7219(uint8_t reg, uint8_t data);
* void Max7219_LED_On( int8_t row, int8_t col);
* void Max7219_LED_Off( int8_t row, int8_t col);
* void Max7219_LED_Toggle( int8_t row, int8_t col);
* void Max7219_Clear_Row( int8_t row);
* void Max7219_Clear_Column( int8_t col);
* void Max7219_Set_Row( int8_t row, int8_t val);
* void Max7219_Set_Column( int8_t column, int8_t val);
* void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
* void Max7219_LED_On(uint8_t row, uint8_t col);
* void Max7219_LED_Off(uint8_t row, uint8_t col);
* void Max7219_LED_Toggle(uint8_t row, uint8_t col);
* void Max7219_Clear_Row(uint8_t row);
* void Max7219_Clear_Column(uint8_t col);
* void Max7219_Set_Row(uint8_t row, uint8_t val);
* void Max7219_Set_Column(uint8_t col, uint8_t val);
* void Max7219_idle_tasks();
*/
#ifndef __MAX7219_DEBUG_LEDS_H__
#define __MAX7219_DEBUG_LEDS_H__
#if ENABLED(MAX7219_DEBUG)
//
// define max7219 registers
//
@ -62,24 +66,23 @@
#define max7219_reg_digit6 0x07
#define max7219_reg_digit7 0x08
#define max7219_reg_intensity 0x0a
#define max7219_reg_displayTest 0x0f
#define max7219_reg_intensity 0x0A
#define max7219_reg_displayTest 0x0F
#define max7219_reg_decodeMode 0x09
#define max7219_reg_scanLimit 0x0b
#define max7219_reg_shutdown 0x0c
#define max7219_reg_scanLimit 0x0B
#define max7219_reg_shutdown 0x0C
void Max7219_init();
void Max7219_PutByte(uint8_t data);
void Max7219(uint8_t reg, uint8_t data);
void Max7219_LED_On( int8_t row, int8_t col);
void Max7219_LED_Off( int8_t row, int8_t col);
void Max7219_LED_Toggle( int8_t row, int8_t col);
void Max7219_Clear_Row( int8_t row);
void Max7219_Clear_Column( int8_t col);
void Max7219_Set_Row( int8_t row, uint8_t val);
void Max7219_Set_Column( int8_t col, uint8_t val);
void Max7219(const uint8_t reg, const uint8_t data);
void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
void Max7219_LED_On(const uint8_t row, const uint8_t col);
void Max7219_LED_Off(const uint8_t row, const uint8_t col);
void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
void Max7219_Clear_Row(const uint8_t row);
void Max7219_Clear_Column(const uint8_t col);
void Max7219_Set_Row(const uint8_t row, const uint8_t val);
void Max7219_Set_Column(const uint8_t col, const uint8_t val);
void Max7219_idle_tasks();
#endif
#endif // __MAX7219_DEBUG_LEDS_H__

@ -208,6 +208,10 @@
#error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
#elif defined(MIN_RETRACT)
#error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
#elif defined(ADVANCE)
#error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
#elif defined(NEOPIXEL_RGBW_LED)
#error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
#endif
/**
@ -305,6 +309,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination"
#elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
#error "BABYSTEP_ZPROBE_OFFSET requires a probe."
#elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(DOGLCD)
#error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a DOGLCD."
#elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(BABYSTEP_ZPROBE_OFFSET)
#error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
#endif
#endif
@ -643,13 +651,9 @@ static_assert(1 >= 0
/**
* Require some kind of probe for bed leveling and probe testing
*/
#if HAS_ABL
#if ENABLED(AUTO_BED_LEVELING_UBL)
#error "Unified Bed Leveling requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
#else
#if HAS_ABL && DISABLED(AUTO_BED_LEVELING_UBL)
#error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
#endif
#endif
#endif
@ -811,13 +815,6 @@ static_assert(1 >= 0
#endif
#endif // DISABLE_[XYZ]
/**
* Advance Extrusion
*/
#if ENABLED(ADVANCE) && ENABLED(LIN_ADVANCE)
#error "You can enable ADVANCE or LIN_ADVANCE, but not both."
#endif
/**
* Filament Width Sensor
*/
@ -955,28 +952,28 @@ static_assert(1 >= 0
#error "TEMP_4_PIN not defined for this board."
#endif
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 4 extruders."
#error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS."
#endif
#elif TEMP_SENSOR_3 != 0
#error "TEMP_SENSOR_3 shouldn't be set with only 3 extruders."
#error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS."
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 3 extruders."
#error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS."
#endif
#elif TEMP_SENSOR_2 != 0
#error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders."
#error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_3 != 0
#error "TEMP_SENSOR_3 shouldn't be set with only 2 extruders."
#error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS."
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 2 extruders."
#error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS."
#endif
#elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
#error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder."
#error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_2 != 0
#error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder."
#error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_3 != 0
#error "TEMP_SENSOR_3 shouldn't be set with only 1 extruder."
#error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND."
#elif TEMP_SENSOR_4 != 0
#error "TEMP_SENSOR_4 shouldn't be set with only 1 extruder."
#error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND."
#endif
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
@ -1104,12 +1101,12 @@ static_assert(1 >= 0
#if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W))
#error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN."
#endif
#elif ENABLED(NEOPIXEL_RGBW_LED)
#elif ENABLED(NEOPIXEL_LED)
#if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0)
#error "NEOPIXEL_RGBW_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
#error "NEOPIXEL_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
#endif
#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) && DISABLED(NEOPIXEL_RGBW_LED)
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_RGBW_LED."
#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) && DISABLED(NEOPIXEL_LED)
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
#endif
/**
@ -1134,6 +1131,7 @@ static_assert(1 >= 0
* Note: BQ_LCD_SMART_CONTROLLER => REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
* REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER => REPRAP_DISCOUNT_SMART_CONTROLLER
* SAV_3DGLCD => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
* MKS_12864OLED => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
* miniVIKI => ULTIMAKERCONTROLLER
* VIKI2 => ULTIMAKERCONTROLLER
* ELB_FULL_GRAPHIC_CONTROLLER => ULTIMAKERCONTROLLER
@ -1141,19 +1139,34 @@ static_assert(1 >= 0
*/
static_assert(1 >= 0
#if ENABLED(ULTIMAKERCONTROLLER) \
&& DISABLED(SAV_3DGLCD) && DISABLED(miniVIKI) && DISABLED(VIKI2) \
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) && DISABLED(PANEL_ONE)
&& DISABLED(SAV_3DGLCD) \
&& DISABLED(miniVIKI) \
&& DISABLED(VIKI2) \
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
&& DISABLED(PANEL_ONE) \
&& DISABLED(MKS_12864OLED)
+ 1
#endif
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && DISABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
&& DISABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
&& DISABLED(LCD_FOR_MELZI) \
&& DISABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
&& DISABLED(MKS_12864OLED)
+ 1
#endif
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(BQ_LCD_SMART_CONTROLLER)
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
&& DISABLED(BQ_LCD_SMART_CONTROLLER)
+ 1
#endif
#if ENABLED(LCD_FOR_MELZI)
+ 1
#endif
#if ENABLED(MKS_12864OLED)
+ 1
#endif
#if ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
+ 1
#endif
#if ENABLED(CARTESIO_UI)
+ 1
#endif
@ -1178,10 +1191,15 @@ static_assert(1 >= 0
#if ENABLED(G3D_PANEL)
+ 1
#endif
#if ENABLED(MINIPANEL)
#if ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)
+ 1
#endif
#if ENABLED(MKS_MINI_12864)
+ 1
#endif
#if ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI) && DISABLED(ANET_KEYPAD_LCD)
#if ENABLED(REPRAPWORLD_KEYPAD) \
&& DISABLED(CARTESIO_UI) \
&& DISABLED(ANET_KEYPAD_LCD)
+ 1
#endif
#if ENABLED(RIGIDBOT_PANEL)

@ -532,7 +532,7 @@ void CardReader::write_command(char *buf) {
}
void CardReader::checkautostart(bool force) {
if (!force && (!autostart_stilltocheck || ELAPSED(millis(), next_autostart_ms)))
if (!force && (!autostart_stilltocheck || PENDING(millis(), next_autostart_ms)))
return;
autostart_stilltocheck = false;

@ -120,10 +120,10 @@ private:
char **sortshort, **sortnames;
#else
char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
char sortnames[SDSORT_LIMIT][FILENAME_LENGTH];
char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH];
#endif
#elif DISABLED(SDSORT_USES_STACK)
char sortnames[SDSORT_LIMIT][FILENAME_LENGTH];
char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH];
#endif
// Folder sorting uses an isDir array when caching items.

@ -36,13 +36,13 @@
*
*/
#define EEPROM_VERSION "V40"
#define EEPROM_VERSION "V41"
// Change EEPROM version if these are changed:
#define EEPROM_OFFSET 100
/**
* V39 EEPROM Layout:
* V41 EEPROM Layout:
*
* 100 Version (char x4)
* 104 EEPROM CRC16 (uint16_t)
@ -100,7 +100,7 @@
* 372 M665 B delta_calibration_radius (float)
* 376 M665 X delta_tower_angle_trim[A] (float)
* 380 M665 Y delta_tower_angle_trim[B] (float)
* --- M665 Z delta_tower_angle_trim[C] (float) is always 0.0
* 384 M665 Z delta_tower_angle_trim[C] (float)
*
* Z_DUAL_ENDSTOPS: 48 bytes
* 348 M666 Z z_endstop_adj (float)
@ -215,7 +215,7 @@ void MarlinSettings::postprocess() {
// Make sure delta kinematics are updated before refreshing the
// planner position so the stepper counts will be set correctly.
#if ENABLED(DELTA)
recalc_delta_settings(delta_radius, delta_diagonal_rod);
recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
#endif
// Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
@ -448,16 +448,16 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(storage_slot);
#endif // AUTO_BED_LEVELING_UBL
// 9 floats for DELTA / Z_DUAL_ENDSTOPS
// 10 floats for DELTA / Z_DUAL_ENDSTOPS
#if ENABLED(DELTA)
EEPROM_WRITE(endstop_adj); // 3 floats
EEPROM_WRITE(delta_radius); // 1 float
EEPROM_WRITE(delta_diagonal_rod); // 1 float
EEPROM_WRITE(delta_segments_per_second); // 1 float
EEPROM_WRITE(delta_calibration_radius); // 1 float
EEPROM_WRITE(delta_tower_angle_trim); // 2 floats
EEPROM_WRITE(delta_tower_angle_trim); // 3 floats
dummy = 0.0f;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
for (uint8_t q = 2; q--;) EEPROM_WRITE(dummy);
#elif ENABLED(Z_DUAL_ENDSTOPS)
EEPROM_WRITE(z_endstop_adj); // 1 float
dummy = 0.0f;
@ -844,9 +844,9 @@ void MarlinSettings::postprocess() {
EEPROM_READ(delta_diagonal_rod); // 1 float
EEPROM_READ(delta_segments_per_second); // 1 float
EEPROM_READ(delta_calibration_radius); // 1 float
EEPROM_READ(delta_tower_angle_trim); // 2 floats
EEPROM_READ(delta_tower_angle_trim); // 3 floats
dummy = 0.0f;
for (uint8_t q=3; q--;) EEPROM_READ(dummy);
for (uint8_t q=2; q--;) EEPROM_READ(dummy);
#elif ENABLED(Z_DUAL_ENDSTOPS)
EEPROM_READ(z_endstop_adj);
dummy = 0.0f;
@ -1233,8 +1233,7 @@ void MarlinSettings::reset() {
delta_diagonal_rod = DELTA_DIAGONAL_ROD;
delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
delta_calibration_radius = DELTA_CALIBRATION_RADIUS;
delta_tower_angle_trim[A_AXIS] = dta[A_AXIS] - dta[C_AXIS];
delta_tower_angle_trim[B_AXIS] = dta[B_AXIS] - dta[C_AXIS];
COPY(delta_tower_angle_trim, dta);
home_offset[Z_AXIS] = 0;
#elif ENABLED(Z_DUAL_ENDSTOPS)
@ -1657,7 +1656,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" B", LINEAR_UNIT(delta_calibration_radius));
SERIAL_ECHOPAIR(" X", LINEAR_UNIT(delta_tower_angle_trim[A_AXIS]));
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(delta_tower_angle_trim[B_AXIS]));
SERIAL_ECHOPAIR(" Z", 0.00);
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(delta_tower_angle_trim[C_AXIS]));
SERIAL_EOL();
#elif ENABLED(Z_DUAL_ENDSTOPS)
if (!forReplay) {

@ -419,4 +419,96 @@
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
#endif // Extruders
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
const unsigned char cw_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x07,0xf8,0x00, // 000001111111100000000000
0x0c,0x0c,0x00, // 000011000000110000000000
0x10,0x02,0x00, // 000100000000001000000000
0x20,0x01,0x00, // 001000000000000100000000
0x60,0x01,0x80, // 011000000000000100000000
0x40,0x00,0x80, // 010000000000000010000000
0x40,0x03,0xe0, // 010000000000000011100000
0x40,0x01,0xc0, // 010000000000000011000000
0x40,0x00,0x80, // 010000000000000010000000
0x40,0x00,0x00, // 010000000000000000000000
0x40,0x00,0x00, // 010000000000000000000000
0x60,0x00,0x00, // 011000000000000000000000
0x20,0x00,0x00, // 001000000000000000000000
0x10,0x00,0x00, // 000100000000000000000000
0x0c,0x0c,0x00, // 000011000000110000000000
0x07,0xf8,0x00 // 000001111111100000000000
};
const unsigned char ccw_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x01,0xfe,0x00, // 000000011111111000000000
0x03,0x03,0x00, // 000000110000001100000000
0x04,0x00,0x80, // 000001000000000010000000
0x08,0x00,0x40, // 000010000000000001000000
0x18,0x00,0x60, // 000110000000000001100000
0x10,0x00,0x20, // 000100000000000000100000
0x7c,0x00,0x20, // 011111000000000000100000
0x38,0x00,0x20, // 001110000000000000100000
0x10,0x00,0x20, // 000100000000000000100000
0x00,0x00,0x20, // 000000000000000000100000
0x00,0x00,0x20, // 000000000000000000100000
0x00,0x00,0x60, // 000000000000000001100000
0x00,0x00,0x40, // 000000000000000001000000
0x00,0x00,0x80, // 000000000000000010000000
0x03,0x03,0x00, // 000000110000001100000000
0x01,0xfe,0x00 // 000000011111111000000000
};
const unsigned char up_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x06,0x00, // 000001100000
0x0F,0x00, // 000011110000
0x1F,0x80, // 000111111000
0x3F,0xC0, // 001111111100
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00 // 000001100000
};
const unsigned char down_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x06,0x00, // 000001100000
0x3F,0xC0, // 001111111100
0x1F,0x80, // 000111111000
0x0F,0x00, // 000011110000
0x06,0x00 // 000001100000
};
const unsigned char offset_bedline_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0xFF,0xFF,0xFF // 111111111111111111111111
};
const unsigned char nozzle_bmp[] PROGMEM = { //AVR-GCC, WinAVR
0x7F,0x80, // 0111111110000000
0xFF,0xC0, // 1111111111000000
0xFF,0xC0, // 1111111111000000
0xFF,0xC0, // 1111111111000000
0x7F,0x80, // 0111111110000000
0x7F,0x80, // 0111111110000000
0xFF,0xC0, // 1111111111000000
0xFF,0xC0, // 1111111111000000
0xFF,0xC0, // 1111111111000000
0x3F,0x00, // 0011111100000000
0x1E,0x00, // 0001111000000000
0x0C,0x00 // 0000110000000000
};
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY
#endif // HAS_TEMP_BED

@ -0,0 +1,151 @@
/*
Fontname: ISO10646_SK
Copyright: A. Hardtung, modified by Roman Moravcik
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_SK[2203] U8G_SECTION(".progmem.ISO10646_SK") = {
0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,80,
0,112,136,136,248,136,136,5,8,8,6,0,0,8,16,248,
128,128,240,128,248,3,8,8,6,1,0,32,64,224,64,64,
64,64,224,5,8,8,6,0,0,16,32,112,136,136,136,136,
112,5,8,8,6,0,0,32,80,112,136,136,136,136,112,5,
8,8,6,0,0,16,32,136,136,136,136,136,112,5,8,8,
6,0,0,16,32,136,136,80,32,32,32,5,8,8,6,0,
0,16,32,0,112,8,120,136,120,5,7,7,6,0,0,80,
0,112,8,120,136,120,5,8,8,6,0,0,16,32,0,112,
136,248,128,112,2,8,8,6,2,0,64,128,0,128,128,128,
128,128,5,8,8,6,0,0,16,32,0,112,136,136,136,112,
5,8,8,6,0,0,32,80,0,112,136,136,136,112,5,8,
8,6,0,0,16,32,0,136,136,136,152,104,5,9,9,6,
0,255,16,32,0,136,136,136,120,8,112,5,8,8,6,0,
0,80,32,112,136,128,128,136,112,5,8,8,6,0,0,80,
32,0,112,128,128,136,112,5,8,8,6,0,0,80,32,240,
136,136,136,136,240,6,8,8,6,0,0,4,20,24,112,144,
144,144,112,5,8,8,6,0,0,16,32,128,128,128,128,128,
248,3,8,8,6,1,0,32,64,0,192,64,64,64,224,5,
8,8,6,0,0,16,144,160,128,128,128,128,248,5,8,8,
6,1,0,8,200,80,64,64,64,64,224,5,8,8,6,0,
0,80,32,136,200,168,152,136,136,5,8,8,6,0,0,80,
32,0,176,200,136,136,136,5,8,8,6,0,0,16,32,240,
136,240,160,144,136,5,8,8,6,0,0,16,32,0,176,200,
128,128,128,5,8,8,6,0,0,80,32,120,128,128,112,8,
240,5,8,8,6,0,0,80,32,0,112,128,112,8,240,5,
8,8,6,0,0,80,32,248,32,32,32,32,32,6,8,8,
6,0,0,4,68,72,224,64,64,64,48,5,8,8,6,0,
0,80,32,248,8,48,64,128,248,5,8,8,6,0,0,80,
32,0,248,16,32,64,248,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0};

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -779,6 +780,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -975,9 +978,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1218,7 +1223,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1518,6 +1523,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1574,16 +1608,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1592,10 +1632,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -843,6 +844,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -1098,9 +1101,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1355,7 +1360,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1657,6 +1662,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1713,16 +1747,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1731,10 +1771,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -765,6 +766,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -961,9 +964,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1204,7 +1209,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1506,6 +1511,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1562,16 +1596,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1580,10 +1620,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -750,6 +751,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -946,9 +949,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1189,7 +1194,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1489,6 +1494,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1545,16 +1579,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1563,10 +1603,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -106,8 +106,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -760,6 +761,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 5 // (in 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.
@ -956,9 +959,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1199,7 +1204,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1499,6 +1504,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1555,16 +1589,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1573,10 +1613,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -750,6 +751,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -946,9 +949,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1189,7 +1194,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1489,6 +1494,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1545,16 +1579,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1563,10 +1603,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -758,6 +759,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -954,9 +957,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1197,7 +1202,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1497,6 +1502,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1553,16 +1587,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1571,10 +1611,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -77,7 +77,7 @@
#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
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
//
// *** VENDORS PLEASE READ *****************************************************
@ -90,7 +90,7 @@
// boot image unmodified. For an example have a look at the bq Hephestos 2
// example configuration folder.
//
//#define SHOW_CUSTOM_BOOTSCREEN
#define SHOW_CUSTOM_BOOTSCREEN
// @section machine
/**
@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -282,7 +283,7 @@
*
* :{ '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)", '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", '66':"Dyze Design 4.7M 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)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
@ -702,7 +703,7 @@
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// Use double touch for probing
#define PROBE_DOUBLE_TOUCH
//#define PROBE_DOUBLE_TOUCH
/**
* Z probes require clearance when deploying, stowing, and moving between
@ -769,6 +770,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 5 // (in 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.
@ -788,7 +791,7 @@
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define X_MAX_POS X_BED_SIZE + 20
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 400
@ -939,7 +942,7 @@
#define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
//#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING)
@ -965,9 +968,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -994,6 +999,7 @@
// - 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)
@ -1018,13 +1024,10 @@
// M500 - stores parameters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
// Define this to enable EEPROM support
#define EEPROM_SETTINGS
#if ENABLED(EEPROM_SETTINGS)
//
#define EEPROM_SETTINGS // Enable for M500 and M501 commands
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Print a report on M500. Please keep turned on.
#endif
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
//
// Host Keepalive
@ -1054,7 +1057,7 @@
// @section temperature
// Preheat Constants
#define PREHEAT_1_TEMP_HOTEND 200
#define PREHEAT_1_TEMP_HOTEND 190
#define PREHEAT_1_TEMP_BED 70
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
@ -1157,7 +1160,7 @@
* M76 - Pause the print job timer
* M77 - Stop the print job timer
*/
//#define PRINTJOB_TIMER_AUTOSTART
#define PRINTJOB_TIMER_AUTOSTART
/**
* Print Counter
@ -1210,7 +1213,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1388,7 +1391,7 @@
// RepRapDiscount FULL GRAPHIC Smart Controller
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
//
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
//
// MakerLab Mini Panel with graphic
@ -1510,6 +1513,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1566,16 +1598,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1584,10 +1622,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -0,0 +1,1424 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* 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
*
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H_VERSION 010100
// @section temperature
//===========================================================================
//=============================Thermal Settings ============================
//===========================================================================
#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 protects your printer from damage and fire if a
* thermistor falls out or temperature sensors fail in any way.
*
* The issue: If a thermistor falls out or a temperature sensor fails,
* Marlin can no longer sense the actual temperature. Since a disconnected
* thermistor reads as a low temperature, 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
/**
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* 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 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
/**
* Whenever an M140 or M190 increases the target temperature the firmware will wait for the
* WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
* but only if the current temperature is far enough below the target for a reliable test.
*
* If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
* WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
*/
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
#endif
#if ENABLED(PIDTEMP)
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
//#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<mintemp> B<maxtemp> F<factor>
* 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 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
//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0
#define TEMP_SENSOR_AD595_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 FAN1_PIN // 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
// This defines the minimal speed for the main fan, run in PWM mode
// to enable uncomment and set minimal PWM speed for reliable running (1-255)
// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
//#define FAN_MIN_PWM 50
// @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 EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
/**
* 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 MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
#endif
//===========================================================================
//============================ Mechanical Settings ==========================
//===========================================================================
// @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.
// Dual X Steppers
// Uncomment this option to drive two X axis motors.
// The next unused E driver will be assigned to the second X stepper.
//#define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
// Set true if the two X motors need to rotate in opposite directions
#define INVERT_X2_VS_X_DIR true
#endif
// Dual Y Steppers
// Uncomment this option to drive two Y axis motors.
// The next unused E driver will be assigned to the second Y stepper.
//#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
// Set true if the two Y motors need to rotate in opposite directions
#define INVERT_Y2_VS_Y_DIR true
#endif
// A single Z stepper driver is usually used to drive 2 stepper motors.
// Uncomment this option to use a separate stepper driver for each Z axis motor.
// The next unused E driver will be assigned to the second Z stepper.
//#define Z_DUAL_STEPPER_DRIVERS
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
// Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper.
// That way the machine is capable to align the bed during home, since both Z steppers are homed.
// There is also an implementation of M666 (software endstops adjustment) to this feature.
// After Z homing, this adjustment is applied to just one of the steppers in order to align the bed.
// One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2.
// If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive.
// Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well.
//#define Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
#define Z2_USE_ENDSTOP _XMAX_
#define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 // Use M666 to determine/test this value
#endif
#endif // Z_DUAL_STEPPER_DRIVERS
// Enable this for dual x-carriage printers.
// A dual x-carriage design has the advantage that the inactive extruder can be parked which
// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
//#define DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
// Configuration for second X-carriage
// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
// the second x-carriage always homes to the maximum endstop.
#define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
#define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
// 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.
// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0 (DXC_FULL_CONTROL_MODE): 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)
// Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
// that additional slicer support is not required. (M605 S1)
// Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
// This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
// Default settings in "Auto-park Mode"
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
#define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
// 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 the endstop, then retracts by this distance, before it tries to slowly bump again:
#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 this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
// Allow duplication mode with a basic dual-nozzle extruder
//#define DUAL_NOZZLE_DUPLICATION_MODE
// 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 ENABLED(ULTIPANEL)
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#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/sec)
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
#define MICROSTEP_MODES {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, 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
// Uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
//#define DIGIPOT_I2C
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
#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===========================
//===========================================================================
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
// @section lcd
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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
#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 //if sd support and the file is finished: disable steppers?
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
#define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order.
// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
// using:
//#define MENU_ADDAUTOSTART
/**
* 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 256 // 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 false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
#define SDSORT_CACHE_NAMES true // 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!
#endif
// Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
#if ENABLED(LCD_PROGRESS_BAR)
// Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message
#define PROGRESS_BAR_MSG_TIME 3000
// Amount of time (ms) to retain the status message (0=forever)
#define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE
// Add a menu item to test the progress bar:
//#define LCD_PROGRESS_BAR_TEST
#endif
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
// 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 ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
#endif // SDSUPPORT
/**
* 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 ENABLED(DOGLCD)
// 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
#endif // DOGLCD
// @section safety
// The hardware watchdog should reset the microcontroller disabling all outputs,
// in case the firmware gets stuck and doesn't do temperature regulation.
#define USE_WATCHDOG
#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
// However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
//#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_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 10 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
/**
* Implementation of linear pressure control
*
* Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
* See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
#define LIN_ADVANCE_K 75
/**
* Some Slicers produce Gcode with randomly jumping extrusion widths occasionally.
* For example within a 0.4mm perimeter it may produce a single segment of 0.05mm width.
* While this is harmless for normal printing (the fluid nature of the filament will
* close this very, very tiny gap), it throws off the LIN_ADVANCE pressure adaption.
*
* For this case LIN_ADVANCE_E_D_RATIO can be used to set the extrusion:distance ratio
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Průša Control) produces Gcode compatible with the automatic mode.
* Cura (as of this writing) may produce Gcode incompatible with the automatic mode.
*/
#define LIN_ADVANCE_E_D_RATIO 0 // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI)
// Example: 0.4 * 0.2 / ((1.75 / 2) ^ 2 * PI) = 0.033260135
#endif
// @section leveling
// Default mesh area is an area with an inset margin on the print area.
// Below are the macros that are used to define the borders for the mesh area,
// made available here for specialized needs, ie dual extruder setup.
#if ENABLED(MESH_BED_LEVELING)
#define MESH_MIN_X MESH_INSET
#define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
#define MESH_MIN_Y MESH_INSET
#define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
#elif ENABLED(AUTO_BED_LEVELING_UBL)
#define UBL_MESH_MIN_X UBL_MESH_INSET
#define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
#define UBL_MESH_MIN_Y UBL_MESH_INSET
#define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
// If this is defined, the currently active mesh will be saved in the
// current slot on M500.
#define UBL_SAVE_ACTIVE_ON_M500
#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 N_ARC_CORRECTION 25 // Number of intertpolated 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.2 and G38.3 Probe Target
// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
//#define G38_PROBE_TARGET
#if ENABLED(G38_PROBE_TARGET)
#define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
#endif
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
// The minimum pulse width (in µs) for stepping a stepper.
// Set this if you find stepping unreliable, or if using a very fast CPU.
#define MINIMUM_STEPPER_PULSE 0 // (µs) The smallest stepper pulse allowed
// @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, i.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
#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
// @section extras
/**
* 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 // ONLY PARTIALLY TESTED
#if ENABLED(FWRETRACT)
#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
#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_ZLIFT 0 // Default retract Z-lift
#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)
#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.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_X_POS 3 // X position of hotend
#define PAUSE_PARK_Y_POS 297 // Y position of hotend
#define PAUSE_PARK_Z_ADD 5 // Z addition of hotend (lift)
#define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define PAUSE_PARK_RETRACT_LENGTH 4 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // Unload filament length from hotend in mm
// Longer length for bowden printers to unload filament from whole bowden tube,
// shorter length for printers without bowden to unload filament from extruder only,
// 0 to disable unloading for manual unloading
#define FILAMENT_CHANGE_LOAD_FEEDRATE 8 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used
#define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change
#define PAUSE_PARK_NOZZLE_TIMEOUT 120 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 3 // Number of alert beeps before printer goes quiet
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif
// @section tmc
/**
* Enable this section if you have TMC26X motor drivers.
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
//#define HAVE_TMCDRIVER
#if ENABLED(HAVE_TMCDRIVER)
//#define X_IS_TMC
//#define X2_IS_TMC
//#define Y_IS_TMC
//#define Y2_IS_TMC
//#define Z_IS_TMC
//#define Z2_IS_TMC
//#define E0_IS_TMC
//#define E1_IS_TMC
//#define E2_IS_TMC
//#define E3_IS_TMC
//#define E4_IS_TMC
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
#define X_MICROSTEPS 16 // number of microsteps
#define X2_MAX_CURRENT 1000
#define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#define Y_MAX_CURRENT 1000
#define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#define Y2_MAX_CURRENT 1000
#define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#define Z_MAX_CURRENT 1000
#define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#define Z2_MAX_CURRENT 1000
#define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#define E0_MAX_CURRENT 1000
#define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#define E1_MAX_CURRENT 1000
#define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#define E2_MAX_CURRENT 1000
#define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#define E3_MAX_CURRENT 1000
#define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#define E4_MAX_CURRENT 1000
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
// @section TMC2130
/**
* Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
*
* You'll also need the TMC2130Stepper Arduino library
* (https://github.com/teemuatlut/TMC2130Stepper).
*
* To use TMC2130 stepper drivers in SPI mode connect your SPI2130 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.).
*/
//#define HAVE_TMC2130
#if ENABLED(HAVE_TMC2130)
// CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
//#define X_IS_TMC2130
//#define X2_IS_TMC2130
//#define Y_IS_TMC2130
//#define Y2_IS_TMC2130
//#define Z_IS_TMC2130
//#define Z2_IS_TMC2130
//#define E0_IS_TMC2130
//#define E1_IS_TMC2130
//#define E2_IS_TMC2130
//#define E3_IS_TMC2130
//#define E4_IS_TMC2130
/**
* Stepper driver settings
*/
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256
#define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current.
#define X_MICROSTEPS 16 // 0..256
#define Y_CURRENT 1000
#define Y_MICROSTEPS 16
#define Z_CURRENT 1000
#define Z_MICROSTEPS 16
//#define X2_CURRENT 1000
//#define X2_MICROSTEPS 16
//#define Y2_CURRENT 1000
//#define Y2_MICROSTEPS 16
//#define Z2_CURRENT 1000
//#define Z2_MICROSTEPS 16
//#define E0_CURRENT 1000
//#define E0_MICROSTEPS 16
//#define E1_CURRENT 1000
//#define E1_MICROSTEPS 16
//#define E2_CURRENT 1000
//#define E2_MICROSTEPS 16
//#define E3_CURRENT 1000
//#define E3_MICROSTEPS 16
//#define E4_CURRENT 1000
//#define E4_MICROSTEPS 16
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
*/
#define STEALTHCHOP
/**
* Let Marlin automatically control stepper current.
* This is still an experimental feature.
* Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
* then decrease current by CURRENT_STEP until temperature prewarn is cleared.
* Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
* 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.
* M906 S1 - Start adjusting current
* M906 S0 - Stop adjusting current
* M911 - Report stepper driver overtemperature pre-warn condition.
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
*/
//#define AUTOMATIC_CURRENT_CONTROL
#if ENABLED(AUTOMATIC_CURRENT_CONTROL)
#define CURRENT_STEP 50 // [mA]
#define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak
#define REPORT_CURRENT_CHANGE
#endif
/**
* 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 needs to be enabled.
* 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 4
#define Z2_HYBRID_THRESHOLD 4
#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
/**
* Use stallGuard2 to sense an obstacle and trigger an endstop.
* You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
* If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
*
* X/Y_HOMING_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_HOME_BUMP_MM to 0.
* M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 19
#define Y_HOMING_SENSITIVITY 19
#endif
/**
* 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/TMC2130Stepper
*
* Example:
* #define TMC2130_ADV() { \
* stepperX.diag0_temp_prewarn(1); \
* stepperX.interpolate(0); \
* }
*/
#define TMC2130_ADV() { }
#endif // HAVE_TMC2130
// @section L6470
/**
* Enable this section if you have L6470 motor drivers.
* You need to import the L6470 library into the Arduino IDE for this.
* (https://github.com/ameyer/Arduino-L6470)
*/
//#define HAVE_L6470DRIVER
#if ENABLED(HAVE_L6470DRIVER)
//#define X_IS_L6470
//#define X2_IS_L6470
//#define Y_IS_L6470
//#define Y2_IS_L6470
//#define Z_IS_L6470
//#define Z2_IS_L6470
//#define E0_IS_L6470
//#define E1_IS_L6470
//#define E2_IS_L6470
//#define E3_IS_L6470
//#define E4_IS_L6470
#define X_MICROSTEPS 16 // number of microsteps
#define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
#define X2_MICROSTEPS 16
#define X2_K_VAL 50
#define X2_OVERCURRENT 2000
#define X2_STALLCURRENT 1500
#define Y_MICROSTEPS 16
#define Y_K_VAL 50
#define Y_OVERCURRENT 2000
#define Y_STALLCURRENT 1500
#define Y2_MICROSTEPS 16
#define Y2_K_VAL 50
#define Y2_OVERCURRENT 2000
#define Y2_STALLCURRENT 1500
#define Z_MICROSTEPS 16
#define Z_K_VAL 50
#define Z_OVERCURRENT 2000
#define Z_STALLCURRENT 1500
#define Z2_MICROSTEPS 16
#define Z2_K_VAL 50
#define Z2_OVERCURRENT 2000
#define Z2_STALLCURRENT 1500
#define E0_MICROSTEPS 16
#define E0_K_VAL 50
#define E0_OVERCURRENT 2000
#define E0_STALLCURRENT 1500
#define E1_MICROSTEPS 16
#define E1_K_VAL 50
#define E1_OVERCURRENT 2000
#define E1_STALLCURRENT 1500
#define E2_MICROSTEPS 16
#define E2_K_VAL 50
#define E2_OVERCURRENT 2000
#define E2_STALLCURRENT 1500
#define E3_MICROSTEPS 16
#define E3_K_VAL 50
#define E3_OVERCURRENT 2000
#define E3_STALLCURRENT 1500
#define E4_MICROSTEPS 16
#define E4_K_VAL 50
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
#endif
/**
* 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<base 10> 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
/**
* 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_LASER_ENABLE
#if ENABLED(SPINDLE_LASER_ENABLE)
#define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
#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 // delay in milliseconds to allow the spindle/laser to come up to speed/power
#define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
#define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
#define SPINDLE_INVERT_DIR false
#define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
/**
* 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
//#define SPEED_POWER_SLOPE 0.3922
//#define SPEED_POWER_INTERCEPT 0
//#define SPEED_POWER_MIN 10
//#define SPEED_POWER_MAX 100 // 0-100%
#endif
/**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/
//#define PINS_DEBUGGING
/**
* Auto-report temperatures with M155 S<seconds>
*/
#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
#define EXTENDED_CAPABILITIES_REPORT
/**
* 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
/**
* 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
/**
* User-defined menu items that execute custom GCode
*/
//#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
#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 PLA"
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
#define USER_DESC_3 "Preheat for ABS"
#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
/**
* Specify an action command to send to the host when the printer is killed.
* Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
* The host must be configured to handle the action command.
*/
//#define ACTION_ON_KILL "poweroff"
//===========================================================================
//====================== 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/
*
* Reilabuild 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. <X|Y|Z|E>_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_NONE // 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_NONE
#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 behaviour.
#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 100 // Minimum time in miliseconds 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, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/**
* 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_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -0,0 +1,100 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Tongue-in-cheek placeholder for a more Marlin-specific bitmap
* The joke is that every "CR-10" has different branding!
* Made using The Gimp and...
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
*/
#include <avr/pgmspace.h>
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#define CUSTOM_BOOTSCREEN_BMPWIDTH 54
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
const unsigned char custom_start_bmp[] PROGMEM = {
0x00, 0x00, 0x00, 0x01, 0xE0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00,
0x00, 0x00, 0x03, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x0F, 0xF0,
0x00, 0x00, 0xFF, 0xFF, 0xFD, 0xFF, 0xF8,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00,
0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x7F, 0xFC, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x1F, 0x80, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xFF, 0xFF, 0xFE, 0x3F, 0xF8,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xC0,
0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFE, 0x00,
0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xE0, 0x00,
0x00, 0x00, 0x07, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00
};

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -741,6 +742,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -937,9 +940,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1180,7 +1185,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1480,6 +1485,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1536,16 +1570,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1554,10 +1594,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -741,6 +742,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -937,9 +940,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1180,7 +1185,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1480,6 +1485,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1536,16 +1570,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1554,10 +1594,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -762,6 +763,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 2 // (in 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.
@ -960,9 +963,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1203,7 +1208,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1503,6 +1508,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1559,16 +1593,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1577,10 +1617,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 2 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -774,6 +775,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -970,9 +973,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1213,7 +1218,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1513,6 +1518,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1569,16 +1603,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1587,10 +1627,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 8 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -763,6 +764,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -959,9 +962,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1202,7 +1207,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1502,6 +1507,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1558,16 +1592,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1576,10 +1616,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -112,8 +112,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -783,6 +784,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -983,9 +986,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1226,7 +1231,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1526,6 +1531,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1582,16 +1616,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1600,10 +1640,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -757,6 +758,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -953,9 +956,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1196,7 +1201,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 8
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -137,8 +137,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -771,6 +772,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -967,9 +970,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1210,7 +1215,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1510,6 +1515,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1566,16 +1600,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1584,10 +1624,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -181,7 +182,7 @@
*/
//#define PARKING_EXTRUDER
#if ENABLED(PARKING_EXTRUDER)
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid not magnetized with applied voltage
#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 // Delay (ms) for magnetic field. No delay if 0 or not defined.
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
@ -790,6 +791,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 4 // (in 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.
@ -986,9 +989,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1229,7 +1234,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1529,6 +1534,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1585,16 +1619,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 11
#define RGB_LED_G_PIN 10
@ -1603,10 +1643,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -499,7 +499,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -590,31 +590,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -731,7 +719,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -1263,6 +1251,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1372,29 +1361,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -123,8 +123,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -810,6 +811,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -1011,9 +1014,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1254,7 +1259,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1554,6 +1559,35 @@
//
#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1610,16 +1644,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1628,10 +1668,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
#define TX_BUFFER_SIZE 64
// 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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -123,8 +123,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -787,6 +788,9 @@
#define INVERT_E4_DIR true
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
// K8200: it is usual to have clamps for the glass plate on the heatbed
#define Z_HOMING_HEIGHT 4 // (in 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.
@ -984,9 +988,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1230,7 +1236,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1530,6 +1536,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
#endif // K8200_VM8201
//=============================================================================
@ -1588,16 +1623,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1606,10 +1647,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -523,7 +523,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -614,31 +614,19 @@
*/
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -755,7 +743,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -764,6 +752,28 @@
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
#define TX_BUFFER_SIZE 128
// 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
#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
@ -1287,6 +1297,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1396,29 +1407,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 26
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -759,6 +760,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -955,9 +958,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1198,7 +1203,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1498,6 +1503,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1554,16 +1588,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1572,10 +1612,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -883,6 +884,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 15 // (in 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.
@ -1083,9 +1086,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1325,7 +1330,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1626,6 +1631,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1682,16 +1716,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1700,10 +1740,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -512,7 +512,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -610,24 +610,12 @@
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -744,7 +732,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -753,6 +741,28 @@
// :[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
#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
@ -1276,6 +1286,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1385,29 +1396,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -883,6 +884,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 15 // (in 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.
@ -1077,9 +1080,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1319,7 +1324,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1619,6 +1624,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1675,16 +1709,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1693,10 +1733,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -512,7 +512,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -603,31 +603,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -744,7 +732,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -753,6 +741,28 @@
// :[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
#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
@ -1276,6 +1286,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1385,29 +1396,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -870,6 +871,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -1072,9 +1075,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1314,7 +1319,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1614,6 +1619,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1670,16 +1704,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1688,10 +1728,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -512,7 +512,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -603,31 +603,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -744,7 +732,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -753,6 +741,28 @@
// :[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
#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
@ -1276,6 +1286,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1385,29 +1396,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -873,6 +874,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 15 // (in 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.
@ -1075,9 +1078,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1317,7 +1322,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1617,6 +1622,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1673,16 +1707,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1691,10 +1731,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -512,7 +512,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -603,31 +603,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -744,7 +732,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -753,6 +741,28 @@
// :[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
#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
@ -1276,6 +1286,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1385,29 +1396,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -111,8 +111,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -873,6 +874,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -1075,9 +1078,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1317,7 +1322,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1617,6 +1622,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1673,16 +1707,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1691,10 +1731,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -517,7 +517,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -608,31 +608,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -749,7 +737,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -758,6 +746,28 @@
// :[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
#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
@ -1281,6 +1291,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1390,29 +1401,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -882,6 +883,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -1084,9 +1087,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1326,7 +1331,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1626,6 +1631,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1682,16 +1716,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1700,10 +1740,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -512,7 +512,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -603,31 +603,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -744,7 +732,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -753,6 +741,28 @@
// :[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
#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
@ -1276,6 +1286,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1385,29 +1396,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -772,6 +773,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define Z_HOMING_HEIGHT 10 // (in 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.
@ -969,9 +972,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1212,7 +1217,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1512,6 +1517,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1568,16 +1602,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1586,10 +1626,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,32 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -762,6 +763,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -958,9 +961,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1201,7 +1206,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1501,6 +1506,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1557,16 +1591,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1575,10 +1615,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
@ -754,6 +755,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -950,9 +953,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1193,7 +1198,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1493,6 +1498,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1549,16 +1583,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1567,10 +1607,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -107,8 +107,9 @@
*
* 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]
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
@ -764,6 +765,8 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define Z_HOMING_HEIGHT 4 // (in 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.
@ -960,9 +963,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@ -1203,7 +1208,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
@ -1503,6 +1508,35 @@
//
//#define OLED_PANEL_TINYBOY2
//
// 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
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864
//
// 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
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -1559,16 +1593,22 @@
* 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 overall brightness parameters is also available
*
* *** CAUTION ***
* LED Strips require a MOFSET 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!
* The Neopixel LED is 5V powered, but linear 5V regulator on Arduino
* cannot handle such current, separate 5V power supply must be used
* *** CAUTION ***
*
* LED type. This options are mutualy exclusive. Uncomment only one.
*
*/
//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
@ -1577,10 +1617,13 @@
#endif
// Support for Adafruit Neopixel LED driver
//#define NEOPIXEL_RGBW_LED
#if ENABLED(NEOPIXEL_RGBW_LED)
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
#define NEOPIXEL_PIXELS 3
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (definned in Adafruit_NeoPixel.h)
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
#define NEOPIXEL_PIXELS 30 // Number of LEDs on strip
#define NEOPIXEL_IS_SEQUENTIAL // Sequent display for temperature change - LED by LED. Comment out for change all LED at time
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness 0-255
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#endif

@ -510,7 +510,7 @@
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256).
#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.
@ -601,31 +601,19 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#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 BABYSTEP_MULTIPLICATOR 100 // Babysteps are very small. Increase for faster motion.
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen 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_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
//#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators
#endif
// @section extruder
// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif
/**
* Implementation of linear pressure control
*
@ -742,7 +730,7 @@
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
// Transfer Buffer Size
// 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.
@ -751,6 +739,28 @@
// :[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
#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
@ -1274,6 +1284,7 @@
#if ENABLED(CUSTOM_USER_MENUS)
#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"
@ -1383,29 +1394,31 @@
#endif // I2C_POSITION_ENCODERS
/**
* Debug LED's using an 8x8 LED Matrix driven by a Max7219 chip. Fully assembled versions are available on
* eBay for under $2.00 (including shipping) and only require 3 signal wires.
* MAX7219 Debug Matrix
*
* Check out auctions similar to this: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=332349290049&_sacat=0
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
* display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*
* Fully assembled MAX7219 boards can be found on the internet for under $2(US).
* For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
#define Max7219_clock 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define Max7219_data_in 57 // 78 on Re-ARM
#define Max7219_load 44 // 79 on Re-ARM
#define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
#define MAX7219_DIN_PIN 57 // 78 on Re-ARM
#define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
/*
* These are sample debug features that can be turned on and configured for your use.
* The developer will need to manage the use of the various LED's in the 8x8 matrix to avoid conflicts.
/**
* 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 from idle() routine if firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Display row position of stepper queue head on this line and the next line of LED matrix
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Display row position of stepper queue tail on this line and the next line of LED matrix
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
#define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Display row position of stepper queue depth on this line and the next line of LED matrix
// If you have stuttering on your Delta printer, this option may help you understand how
// various tweaks you make to your configuration are affecting the printer.
#define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper 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
#endif // CONFIGURATION_ADV_H

@ -44,7 +44,7 @@
//
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
// ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
// See also http://marlinfw.org/docs/development/lcd_language.html
// Languages
// an Aragonese
@ -160,6 +160,7 @@
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define MSG_ERR_M355_NONE "No case light"
#define MSG_ERR_M421_PARAMETERS "M421 incorrect parameter usage"
#define MSG_ERR_BAD_PLANE_MODE "G5 requires XY plane mode"
#define MSG_ERR_MESH_XY "Mesh point cannot be resolved"
#define MSG_ERR_ARC_ARGS "G2/G3 bad parameters"
#define MSG_ERR_PROTECTED_PIN "Protected Pin"
@ -197,9 +198,6 @@
#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
#define MSG_TOO_COLD_FOR_M600 "M600 Hotend too cold to change filament"
#define MSG_BABYSTEPPING_X "Babystepping X"
#define MSG_BABYSTEPPING_Y "Babystepping Y"
#define MSG_BABYSTEPPING_Z "Babystepping Z"
#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure"
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"

@ -24,7 +24,7 @@
* Aragonese
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_AN_H

@ -24,7 +24,7 @@
* Bulgarian
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_BG_H

@ -24,7 +24,7 @@
* Catalan
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_CA_H

@ -24,7 +24,7 @@
* Chinese
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_CN_H

@ -24,7 +24,7 @@
* Czech
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
* Translated by Petr Zahradnik, Computer Laboratory
* Blog and video blog Zahradnik se bavi

@ -25,7 +25,7 @@
* UTF-8 for Graphical Display
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
* Translated by Petr Zahradnik, Computer Laboratory
* Blog and video blog Zahradnik se bavi

@ -24,7 +24,7 @@
* Danish
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_DA_H

@ -24,7 +24,7 @@
* German
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_DE_H

@ -24,7 +24,7 @@
* Greek (Greece)
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_EL_GR_H

@ -24,7 +24,7 @@
* Greek
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_EL_H

@ -24,7 +24,7 @@
* English
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_EN_H

@ -24,7 +24,7 @@
* Spanish
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_ES_H

@ -24,7 +24,7 @@
* Basque-Euskera
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_EU_H

@ -24,7 +24,7 @@
* Finnish
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_FI_H

@ -24,7 +24,7 @@
* French
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_FR_H

@ -24,7 +24,7 @@
* Galician language (ISO "gl")
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_GL_H

@ -24,7 +24,7 @@
* Croatian (Hrvatski)
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_HR_H

@ -24,7 +24,7 @@
* Italian
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_IT_H

@ -24,7 +24,7 @@
* Japanese (Kana)
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/

@ -25,7 +25,7 @@
* UTF-8 for Graphical Display
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/

@ -24,7 +24,7 @@
* Dutch
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_NL_H

@ -24,7 +24,7 @@
* Polish
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_PL_H

@ -24,7 +24,7 @@
* Portuguese (Brazil)
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_PT_BR_H

@ -25,7 +25,7 @@
* UTF-8 for Graphical Display
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_PT_BR_UTF_H

@ -24,7 +24,7 @@
* Portuguese
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_PT_H

@ -25,7 +25,7 @@
* UTF-8 for Graphical Display
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_PT_UTF_H

@ -24,7 +24,7 @@
* Russian
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_RU_H

@ -25,7 +25,7 @@
* UTF-8 for Graphical Display
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
* Translated by Michal Holeš, Farma MaM
* http://www.facebook.com/farmamam
@ -34,12 +34,8 @@
#ifndef LANGUAGE_SK_UTF_H
#define LANGUAGE_SK_UTF_H
#define MAPPER_NON
#define DISPLAY_CHARSET_ISO10646_1
// TBD
//#define MAPPER_C3C4C5_SK
//#define DISPLAY_CHARSET_ISO10646_SK
#define MAPPER_C3C4C5_SK
#define DISPLAY_CHARSET_ISO10646_SK
#define WELCOME_MSG MACHINE_NAME _UxGT(" pripravená.")
#define MSG_BACK _UxGT("Naspať")

@ -24,7 +24,7 @@
* TEST
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_TEST_H

@ -24,7 +24,7 @@
* Turkish
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_TR_H

@ -24,7 +24,7 @@
* Ukrainian
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_UK_H

@ -24,7 +24,7 @@
* Simplified Chinese
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_ZH_CN_H

@ -24,7 +24,7 @@
* Traditional Chinese
*
* LCD Menu Messages
* See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See also http://marlinfw.org/docs/development/lcd_language.html
*
*/
#ifndef LANGUAGE_ZH_TW_H

@ -99,6 +99,9 @@
#define CBI(n,b) (n &= ~_BV(b))
#define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (_BV(b))
// Macro to check that a number if a power if 2
#define IS_POWER_OF_2(x) ((x) && !((x) & ((x) - 1)))
// Macros for maths shortcuts
#ifndef M_PI
#define M_PI 3.14159265358979323846

@ -182,12 +182,8 @@
#define ST7920_DELAY_1 DELAY_0_NOP
#define ST7920_DELAY_2 DELAY_1_NOP
#define ST7920_DELAY_3 DELAY_2_NOP
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4
#endif
#define STD_ENCODER_PULSES_PER_STEP 4
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#endif // ULTRA_LCD && NEWPANEL

@ -50,6 +50,9 @@
//
// LCD / Controller
//
#undef STAT_LED_RED_PIN
#undef STAT_LED_BLUE_PIN
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#undef DOGLCD_A0
@ -59,8 +62,6 @@
#define DOGLCD_CS 32
#define BTN_ENC 12
#undef STAT_LED_RED_PIN
#undef STAT_LED_BLUE_PIN
#define STAT_LED_RED_PIN 64
#define STAT_LED_BLUE_PIN 63

@ -29,4 +29,8 @@
#undef BOARD_NAME
#define BOARD_NAME "GT2560 Rev.A+"
#if ENABLED(BLTOUCH)
#define SERVO0_PIN 32
#else
#define SERVO0_PIN 11
#endif

@ -52,9 +52,6 @@
#define LCD_PINS_RS 28 // st9720 CS
#define LCD_PINS_ENABLE 17 // st9720 DAT
#define LCD_PINS_D4 30 // st9720 CLK
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#define FIL_RUNOUT_PIN -1 // Uses Beeper/LED Pin Pulled to GND
// Alter timing for graphical display

@ -237,35 +237,79 @@
//
// Průša i3 MK2 Multiplexer Support
//
#ifndef E_MUX0_PIN
#define E_MUX0_PIN 40 // Z_CS_PIN
#endif
#ifndef E_MUX1_PIN
#define E_MUX1_PIN 42 // E0_CS_PIN
#endif
#ifndef E_MUX2_PIN
#define E_MUX2_PIN 44 // E1_CS_PIN
#endif
//////////////////////////
// LCDs and Controllers //
//////////////////////////
//
// LCD / Controller
//
#if ENABLED(ULTRA_LCD)
//
// LCD Display output pins
//
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 25
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 37
#endif
#else
#if ENABLED(MKS_12864OLED)
#define LCD_PINS_DC 25 // Set as output on init
#define LCD_PINS_RS 27 // Pull low for 1s to init
// DOGM SPI LCD Support
#define DOGLCD_CS 16
#define DOGLCD_MOSI 17
#define DOGLCD_SCK 23
#define DOGLCD_A0 LCD_PINS_DC
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#endif
#define LCD_PINS_D7 29
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 33
#endif
#endif
#if DISABLED(NEWPANEL)
// Buttons are attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
@ -273,18 +317,27 @@
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#endif
#endif
//
// LCD Display input pins
//
#if ENABLED(NEWPANEL)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#if ENABLED(CR10_STOCKDISPLAY)
#define BTN_EN1 17
#define BTN_EN2 23
#else
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#endif
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 41
@ -305,85 +358,112 @@
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define DOGLCD_A0 44
#define LCD_SCREEN_ROT_180
#define BEEPER_PIN 33
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS 53
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define BEEPER_PIN 23
#define LCD_BACKLIGHT_PIN 33
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6
#define DOGLCD_A0 27
#define LCD_BACKLIGHT_PIN 33
#define DOGLCD_CS 25
// GLCD features
//#define LCD_CONTRAST 190
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#define BEEPER_PIN 37
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SDSS 53
#define SD_DETECT_PIN 49
#define KILL_PIN 64
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
//#define LCD_CONTRAST 190
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
// not connected to a pin
#define SDSS 53
#define SD_DETECT_PIN 49
#define KILL_PIN 64
#else
// Beeper on AUX-4
#define BEEPER_PIN 33
// buttons are directly attached using AUX-2
// Buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SHIFT_OUT 40
#define SHIFT_CLK 44
#define SHIFT_LD 42
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
@ -397,8 +477,6 @@
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#else
//#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif

@ -240,7 +240,7 @@
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_0_NOP
#endif
#ifndef ST7920_DELAY_3
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_3_NOP
#endif
#ifndef ST7920_DELAY_3

@ -211,10 +211,6 @@ void Planner::calculate_trapezoid_for_block(block_t* const block, const float &e
block->decelerate_after = accelerate_steps + plateau_steps;
block->initial_rate = initial_rate;
block->final_rate = final_rate;
#if ENABLED(ADVANCE)
block->initial_advance = block->advance * sq(entry_factor);
block->final_advance = block->advance * sq(exit_factor);
#endif
}
CRITICAL_SECTION_END;
}
@ -1405,27 +1401,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
* axis_steps_per_mm[E_AXIS_N] * 256.0
);
#elif ENABLED(ADVANCE)
// Calculate advance rate
if (esteps && (block->steps[X_AXIS] || block->steps[Y_AXIS] || block->steps[Z_AXIS])) {
const long acc_dist = estimate_acceleration_distance(0, block->nominal_rate, block->acceleration_steps_per_s2);
const float advance = ((STEPS_PER_CUBIC_MM_E) * (EXTRUDER_ADVANCE_K)) * HYPOT(current_speed[E_AXIS], EXTRUSION_AREA) * 256;
block->advance = advance;
block->advance_rate = acc_dist ? advance / (float)acc_dist : 0;
}
else
block->advance_rate = block->advance = 0;
/**
SERIAL_ECHO_START();
SERIAL_ECHOPGM("advance :");
SERIAL_ECHO(block->advance/256.0);
SERIAL_ECHOPGM("advance rate :");
SERIAL_ECHOLN(block->advance_rate/256.0);
*/
#endif // ADVANCE or LIN_ADVANCE
#endif // LIN_ADVANCE
calculate_trapezoid_for_block(block, block->entry_speed / block->nominal_speed, safe_speed / block->nominal_speed);

@ -96,11 +96,6 @@ typedef struct {
#if ENABLED(LIN_ADVANCE)
bool use_advance_lead;
uint32_t abs_adv_steps_multiplier8; // Factorised by 2^8 to avoid float
#elif ENABLED(ADVANCE)
int32_t advance_rate;
volatile int32_t initial_advance;
volatile int32_t final_advance;
float advance;
#endif
// Fields used by the motion planner to manage acceleration

@ -57,8 +57,8 @@ extern const char errormagic[] PROGMEM;
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHOPAIR(name,value) SERIAL_PROTOCOLPAIR(name, value)
#define SERIAL_ECHOLNPAIR(name, value) SERIAL_PROTOCOLLNPAIR(name, value)
#define SERIAL_ECHOPAIR(pre,value) SERIAL_PROTOCOLPAIR(pre, value)
#define SERIAL_ECHOLNPAIR(pre,value) SERIAL_PROTOCOLLNPAIR(pre, value)
#define SERIAL_ECHO_F(x,y) SERIAL_PROTOCOL_F(x,y)
#define SERIAL_ERROR_START() (serialprintPGM(errormagic))
@ -68,10 +68,10 @@ extern const char errormagic[] PROGMEM;
#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
// These macros compensate for float imprecision
#define SERIAL_PROTOCOLPAIR_F(name, value) SERIAL_PROTOCOLPAIR(name, FIXFLOAT(value))
#define SERIAL_PROTOCOLLNPAIR_F(name, value) SERIAL_PROTOCOLLNPAIR(name, FIXFLOAT(value))
#define SERIAL_ECHOPAIR_F(name,value) SERIAL_ECHOPAIR(name, FIXFLOAT(value))
#define SERIAL_ECHOLNPAIR_F(name, value) SERIAL_ECHOLNPAIR(name, FIXFLOAT(value))
#define SERIAL_PROTOCOLPAIR_F(pre, value) SERIAL_PROTOCOLPAIR(pre, FIXFLOAT(value))
#define SERIAL_PROTOCOLLNPAIR_F(pre, value) SERIAL_PROTOCOLLNPAIR(pre, FIXFLOAT(value))
#define SERIAL_ECHOPAIR_F(pre,value) SERIAL_ECHOPAIR(pre, FIXFLOAT(value))
#define SERIAL_ECHOLNPAIR_F(pre, value) SERIAL_ECHOLNPAIR(pre, FIXFLOAT(value))
void serial_echopair_P(const char* s_P, const char *v);
void serial_echopair_P(const char* s_P, char v);

@ -97,7 +97,7 @@ long Stepper::counter_X = 0,
volatile uint32_t Stepper::step_events_completed = 0; // The number of step events executed in the current block
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
#if ENABLED(LIN_ADVANCE)
constexpr uint16_t ADV_NEVER = 65535;
@ -105,18 +105,10 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
Stepper::nextAdvanceISR = ADV_NEVER,
Stepper::eISR_Rate = ADV_NEVER;
#if ENABLED(LIN_ADVANCE)
volatile int Stepper::e_steps[E_STEPPERS];
int Stepper::final_estep_rate,
Stepper::current_estep_rate[E_STEPPERS],
Stepper::current_adv_steps[E_STEPPERS];
#else
long Stepper::e_steps[E_STEPPERS],
Stepper::final_advance = 0,
Stepper::old_advance = 0,
Stepper::advance_rate,
Stepper::advance;
#endif
/**
* See https://github.com/MarlinFirmware/Marlin/issues/5699#issuecomment-309264382
@ -133,7 +125,7 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
return ADV_NEVER;
}
#endif // ADVANCE || LIN_ADVANCE
#endif // LIN_ADVANCE
long Stepper::acceleration_time, Stepper::deceleration_time;
@ -325,7 +317,7 @@ void Stepper::set_directions() {
SET_STEP_DIR(Z); // C
#endif
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
if (motor_direction(E_AXIS)) {
REV_E_DIR();
count_direction[E_AXIS] = -1;
@ -334,7 +326,7 @@ void Stepper::set_directions() {
NORM_E_DIR();
count_direction[E_AXIS] = 1;
}
#endif // !ADVANCE && !LIN_ADVANCE
#endif // !LIN_ADVANCE
}
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
@ -356,7 +348,7 @@ void Stepper::set_directions() {
* 4000 500 Hz - init rate
*/
ISR(TIMER1_COMPA_vect) {
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
#if ENABLED(LIN_ADVANCE)
Stepper::advance_isr_scheduler();
#else
Stepper::isr();
@ -372,7 +364,7 @@ void Stepper::isr() {
#define ENDSTOP_NOMINAL_OCR_VAL 3000 // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch
#define OCR_VAL_TOLERANCE 1000 // First max delay is 2.0ms, last min delay is 0.5ms, all others 1.5ms
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
// Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
CBI(TIMSK0, OCIE0B); // Temperature ISR
DISABLE_STEPPER_DRIVER_INTERRUPT();
@ -455,10 +447,6 @@ void Stepper::isr() {
return;
}
#endif
// #if ENABLED(ADVANCE)
// e_steps[TOOL_E_INDEX] = 0;
// #endif
}
else {
_NEXT_ISR(2000); // Run at slow speed - 1 KHz
@ -504,33 +492,7 @@ void Stepper::isr() {
}
#endif
#elif ENABLED(ADVANCE)
// Always count the unified E axis
counter_E += current_block->steps[E_AXIS];
if (counter_E > 0) {
counter_E -= current_block->step_event_count;
#if DISABLED(MIXING_EXTRUDER)
// Don't step E here for mixing extruder
motor_direction(E_AXIS) ? --e_steps[TOOL_E_INDEX] : ++e_steps[TOOL_E_INDEX];
#endif
}
#if ENABLED(MIXING_EXTRUDER)
// Step mixing steppers proportionally
const bool dir = motor_direction(E_AXIS);
MIXING_STEPPERS_LOOP(j) {
counter_m[j] += current_block->steps[E_AXIS];
if (counter_m[j] > 0) {
counter_m[j] -= current_block->mix_event_count[j];
dir ? --e_steps[j] : ++e_steps[j];
}
}
#endif // MIXING_EXTRUDER
#endif // ADVANCE or LIN_ADVANCE
#endif // LIN_ADVANCE
#define _COUNTER(AXIS) counter_## AXIS
#define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
@ -591,7 +553,7 @@ void Stepper::isr() {
#else
#define _CYCLE_APPROX_6 _CYCLE_APPROX_5
#endif
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
#if ENABLED(MIXING_EXTRUDER)
#define _CYCLE_APPROX_7 _CYCLE_APPROX_6 + (MIXING_STEPPERS) * 6
#else
@ -627,7 +589,7 @@ void Stepper::isr() {
#endif
// For non-advance use linear interpolation for E also
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
#if ENABLED(MIXING_EXTRUDER)
// Keep updating the single E axis
counter_E += current_block->steps[E_AXIS];
@ -641,7 +603,7 @@ void Stepper::isr() {
#else // !MIXING_EXTRUDER
PULSE_START(E);
#endif
#endif // !ADVANCE && !LIN_ADVANCE
#endif // !LIN_ADVANCE
// For minimum pulse time wait before stopping pulses
#if EXTRA_CYCLES_XYZE > 20
@ -661,7 +623,7 @@ void Stepper::isr() {
PULSE_STOP(Z);
#endif
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
#if ENABLED(MIXING_EXTRUDER)
// Always step the single E axis
if (counter_E > 0) {
@ -677,7 +639,7 @@ void Stepper::isr() {
#else // !MIXING_EXTRUDER
PULSE_STOP(E);
#endif
#endif // !ADVANCE && !LIN_ADVANCE
#endif // !LIN_ADVANCE
if (++step_events_completed >= current_block->step_event_count) {
all_steps_done = true;
@ -694,6 +656,7 @@ void Stepper::isr() {
} // steps_loop
#if ENABLED(LIN_ADVANCE)
if (current_block->use_advance_lead) {
const int delta_adv_steps = current_estep_rate[TOOL_E_INDEX] - current_adv_steps[TOOL_E_INDEX];
current_adv_steps[TOOL_E_INDEX] += delta_adv_steps;
@ -706,12 +669,10 @@ void Stepper::isr() {
e_steps[TOOL_E_INDEX] += delta_adv_steps;
#endif
}
#endif
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
// If we have esteps to execute, fire the next advance_isr "now"
if (e_steps[TOOL_E_INDEX]) nextAdvanceISR = 0;
#endif
#endif // LIN_ADVANCE
// Calculate new timer value
if (step_events_completed <= (uint32_t)current_block->accelerate_until) {
@ -740,32 +701,9 @@ void Stepper::isr() {
current_estep_rate[TOOL_E_INDEX] = ((uint32_t)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
#endif
}
#elif ENABLED(ADVANCE)
advance += advance_rate * step_loops;
//NOLESS(advance, current_block->advance);
const long advance_whole = advance >> 8,
advance_factor = advance_whole - old_advance;
// Do E steps + advance steps
#if ENABLED(MIXING_EXTRUDER)
// ...for mixing steppers proportionally
MIXING_STEPPERS_LOOP(j)
e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
#else
// ...for the active extruder
e_steps[TOOL_E_INDEX] += advance_factor;
#endif
old_advance = advance_whole;
#endif // ADVANCE or LIN_ADVANCE
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
#endif
#endif // LIN_ADVANCE
}
else if (step_events_completed > (uint32_t)current_block->decelerate_after) {
uint16_t step_rate;
@ -796,30 +734,9 @@ void Stepper::isr() {
current_estep_rate[TOOL_E_INDEX] = ((uint32_t)step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
#endif
}
#elif ENABLED(ADVANCE)
advance -= advance_rate * step_loops;
NOLESS(advance, final_advance);
// Do E steps + advance steps
const long advance_whole = advance >> 8,
advance_factor = advance_whole - old_advance;
#if ENABLED(MIXING_EXTRUDER)
MIXING_STEPPERS_LOOP(j)
e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
#else
e_steps[TOOL_E_INDEX] += advance_factor;
#endif
old_advance = advance_whole;
#endif // ADVANCE or LIN_ADVANCE
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
#endif
#endif // LIN_ADVANCE
}
else {
@ -839,7 +756,7 @@ void Stepper::isr() {
step_loops = step_loops_nominal;
}
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
NOLESS(OCR1A, TCNT1 + 16);
#endif
@ -848,12 +765,12 @@ void Stepper::isr() {
current_block = NULL;
planner.discard_current_block();
}
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
#if DISABLED(LIN_ADVANCE)
_ENABLE_ISRs(); // re-enable ISRs
#endif
}
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
#if ENABLED(LIN_ADVANCE)
#define CYCLES_EATEN_E (E_STEPPERS * 5)
#define EXTRA_CYCLES_E (STEP_PULSE_CYCLES - (CYCLES_EATEN_E))
@ -987,7 +904,7 @@ void Stepper::isr() {
_ENABLE_ISRs();
}
#endif // ADVANCE or LIN_ADVANCE
#endif // LIN_ADVANCE
void Stepper::init() {
@ -1170,12 +1087,10 @@ void Stepper::init() {
TCNT1 = 0;
ENABLE_STEPPER_DRIVER_INTERRUPT();
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
for (uint8_t i = 0; i < COUNT(e_steps); i++) e_steps[i] = 0;
#if ENABLED(LIN_ADVANCE)
for (uint8_t i = 0; i < COUNT(e_steps); i++) e_steps[i] = 0;
ZERO(current_adv_steps);
#endif
#endif // ADVANCE || LIN_ADVANCE
endstops.enable(true); // Start with endstops active. After homing they can be disabled
sei();

@ -111,24 +111,21 @@ class Stepper {
static long counter_X, counter_Y, counter_Z, counter_E;
static volatile uint32_t step_events_completed; // The number of step events executed in the current block
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
#if ENABLED(LIN_ADVANCE)
static uint16_t nextMainISR, nextAdvanceISR, eISR_Rate;
#define _NEXT_ISR(T) nextMainISR = T
#if ENABLED(LIN_ADVANCE)
static volatile int e_steps[E_STEPPERS];
static int final_estep_rate;
static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]
static int current_adv_steps[E_STEPPERS]; // The amount of current added esteps due to advance.
// i.e., the current amount of pressure applied
// to the spring (=filament).
#else
static long e_steps[E_STEPPERS];
static long advance_rate, advance, final_advance;
static long old_advance;
#endif
#else
#else // !LIN_ADVANCE
#define _NEXT_ISR(T) OCR1A = T
#endif // ADVANCE or LIN_ADVANCE
#endif // !LIN_ADVANCE
static long acceleration_time, deceleration_time;
//unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
@ -177,7 +174,7 @@ class Stepper {
static void isr();
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
#if ENABLED(LIN_ADVANCE)
static void advance_isr();
static void advance_isr_scheduler();
#endif
@ -337,26 +334,6 @@ class Stepper {
set_directions();
}
#if ENABLED(ADVANCE)
advance = current_block->initial_advance;
final_advance = current_block->final_advance;
// Do E steps + advance steps
#if ENABLED(MIXING_EXTRUDER)
long advance_factor = (advance >> 8) - old_advance;
// ...for mixing steppers proportionally
MIXING_STEPPERS_LOOP(j)
e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
#else
// ...for the active extruder
e_steps[TOOL_E_INDEX] += ((advance >> 8) - old_advance);
#endif
old_advance = advance >> 8;
#endif
deceleration_time = 0;
// step_rate to timer interval
OCR1A_nominal = calc_timer(current_block->nominal_rate);

@ -2098,13 +2098,10 @@ void Temperature::isr() {
#if ENABLED(BABYSTEPPING)
LOOP_XYZ(axis) {
const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance
if (curTodo > 0) {
stepper.babystep((AxisEnum)axis, /*fwd*/true);
babystepsTodo[axis]--;
}
else if (curTodo < 0) {
stepper.babystep((AxisEnum)axis, /*fwd*/false);
babystepsTodo[axis]++;
if (curTodo) {
stepper.babystep((AxisEnum)axis, curTodo > 0);
if (curTodo > 0) babystepsTodo[axis]--;
else babystepsTodo[axis]++;
}
}
#endif // BABYSTEPPING

@ -91,13 +91,16 @@
g29_phase_value,
g29_repetition_cnt,
g29_storage_slot,
g29_map_type,
g29_grid_size;
g29_map_type;
static bool g29_c_flag, g29_x_flag, g29_y_flag;
static float g29_x_pos, g29_y_pos,
g29_card_thickness,
g29_constant;
#if HAS_BED_PROBE
static int g29_grid_size;
#endif
#if ENABLED(UBL_G26_MESH_VALIDATION)
static float g26_extrusion_multiplier,
g26_retraction_multiplier,

@ -64,8 +64,7 @@
unified_bed_leveling::g29_phase_value,
unified_bed_leveling::g29_repetition_cnt,
unified_bed_leveling::g29_storage_slot = 0,
unified_bed_leveling::g29_map_type,
unified_bed_leveling::g29_grid_size;
unified_bed_leveling::g29_map_type;
bool unified_bed_leveling::g29_c_flag,
unified_bed_leveling::g29_x_flag,
unified_bed_leveling::g29_y_flag;
@ -74,6 +73,10 @@
unified_bed_leveling::g29_card_thickness = 0.0,
unified_bed_leveling::g29_constant = 0.0;
#if HAS_BED_PROBE
int unified_bed_leveling::g29_grid_size;
#endif
/**
* G29: Unified Bed Leveling by Roxy
*
@ -309,6 +312,8 @@
return;
}
if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
// Check for commands that require the printer to be homed
if (axis_unhomed_error()) {
const int8_t p_val = parser.intval('P', -1);
@ -316,8 +321,6 @@
home_all_axes();
}
if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
// Invalidate Mesh Points. This command is a little bit asymmetrical because
// it directly specifies the repetition count and does not use the 'R' parameter.
if (parser.seen('I')) {
@ -380,6 +383,8 @@
}
}
#if HAS_BED_PROBE
if (parser.seen('J')) {
if (g29_grid_size) { // if not 0 it is a normal n x n grid being probed
save_ubl_active_state_and_disable();
@ -415,6 +420,8 @@
}
}
#endif // HAS_BED_PROBE
if (parser.seen('P')) {
if (WITHIN(g29_phase_value, 0, 1) && state.storage_slot == -1) {
state.storage_slot = 0;
@ -430,6 +437,8 @@
SERIAL_PROTOCOLLNPGM("Mesh zeroed.");
break;
#if HAS_BED_PROBE
case 1:
//
// Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
@ -448,6 +457,8 @@
parser.seen('T'), parser.seen('E'), parser.seen('U'));
break;
#endif // HAS_BED_PROBE
case 2: {
#if ENABLED(NEWPANEL)
//
@ -775,6 +786,7 @@
z_values[x][y] += g29_constant;
}
#if HAS_BED_PROBE
/**
* Probe all invalidated locations of the mesh that can be reached by the probe.
* This attempts to fill in locations closest to the nozzle's start location first.
@ -928,6 +940,7 @@
}
}
}
#endif // HAS_BED_PROBE
#if ENABLED(NEWPANEL)
float unified_bed_leveling::measure_point_with_encoder() {
@ -1079,7 +1092,7 @@
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
do_blocking_move_to_xy(lx, ly);
}
#endif
#endif // NEWPANEL
bool unified_bed_leveling::g29_parameter_parsing() {
bool err_flag = false;
@ -1113,19 +1126,34 @@
}
if (parser.seen('P')) {
g29_phase_value = parser.value_int();
const int pv = parser.value_int();
#if !HAS_BED_PROBE
if (pv == 1) {
SERIAL_PROTOCOLLNPGM("G29 P1 requires a probe.\n");
err_flag = true;
}
else
#endif
{
g29_phase_value = pv;
if (!WITHIN(g29_phase_value, 0, 6)) {
SERIAL_PROTOCOLLNPGM("?(P)hase value invalid (0-6).\n");
err_flag = true;
}
}
}
if (parser.seen('J')) {
#if HAS_BED_PROBE
g29_grid_size = parser.has_value() ? parser.value_int() : 0;
if (g29_grid_size && !WITHIN(g29_grid_size, 2, 9)) {
SERIAL_PROTOCOLLNPGM("?Invalid grid size (J) specified (2-9).\n");
err_flag = true;
}
#else
SERIAL_PROTOCOLLNPGM("G29 J action requires a probe.\n");
err_flag = true;
#endif
}
if (g29_x_flag != g29_y_flag) {
@ -1238,6 +1266,8 @@
SERIAL_EOL();
#endif
find_mean_mesh_height();
#if HAS_BED_PROBE
SERIAL_PROTOCOLPGM("zprobe_zoffset: ");
SERIAL_PROTOCOL_F(zprobe_zoffset, 7);
@ -1623,6 +1653,8 @@
}
}
#if HAS_BED_PROBE
void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map) {
constexpr int16_t x_min = max(MIN_PROBE_X, UBL_MESH_MIN_X),
x_max = min(MAX_PROBE_X, UBL_MESH_MAX_X),
@ -1768,6 +1800,8 @@
if (do_ubl_mesh_map) display_map(g29_map_type);
}
#endif // HAS_BED_PROBE
#if ENABLED(UBL_G29_P31)
void unified_bed_leveling::smart_fill_wlsf(const float &weight_factor) {

@ -44,7 +44,7 @@
endstop_adj[ABC];
extern float delta_radius,
delta_tower_angle_trim[2],
delta_tower_angle_trim[ABC],
delta_tower[ABC][2],
delta_diagonal_rod,
delta_calibration_radius,

@ -20,8 +20,11 @@
*
*/
#include "ultralcd.h"
#include "MarlinConfig.h"
#if ENABLED(ULTRA_LCD)
#include "ultralcd.h"
#include "Marlin.h"
#include "language.h"
#include "cardreader.h"
@ -79,6 +82,36 @@ char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kan
#include "ultralcd_impl_HD44780.h"
#endif
#if ENABLED(ULTIPANEL)
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
inline void lcd_implementation_drawmenu_setting_edit_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
UNUSED(pstr2); \
DRAWMENU_SETTING_EDIT_GENERIC(_strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_callback_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
UNUSED(pstr2); \
DRAWMENU_SETTING_EDIT_GENERIC(_strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_accessor_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type (*pget)(), void (*pset)(_type), ...) { \
UNUSED(pstr2); UNUSED(pset); \
DRAWMENU_SETTING_EDIT_GENERIC(_strFunc(pget())); \
} \
typedef void _name##_void
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(int16_t, int3, itostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint8_t, int8, i8tostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float3, ftostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float32, ftostr32);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float43, ftostr43sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float5, ftostr5rj);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float51, ftostr51sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52, ftostr52sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float62, ftostr62rj);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint32_t, long5, ftostr5rj);
#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) DRAW_BOOL_SETTING(sel, row, pstr, data)
#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) DRAW_BOOL_SETTING(sel, row, pstr, data)
#define lcd_implementation_drawmenu_setting_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data)
#endif // ULTIPANEL
// The main status screen
void lcd_status_screen();
@ -104,6 +137,7 @@ uint16_t max_display_update_time = 0;
// Function pointer to menu functions.
typedef void (*screenFunc_t)();
typedef void (*menuAction_t)();
#if HAS_POWER_SWITCH
extern bool powersupply_on;
@ -173,7 +207,7 @@ uint16_t max_display_update_time = 0;
void _menu_action_back();
void menu_action_submenu(screenFunc_t data);
void menu_action_gcode(const char* pgcode);
void menu_action_function(screenFunc_t data);
void menu_action_function(menuAction_t data);
#define DECLARE_MENU_EDIT_TYPE(_type, _name) \
bool _menu_edit_ ## _name(); \
@ -209,13 +243,7 @@ uint16_t max_display_update_time = 0;
////////////////////////////////////////////
#ifndef ENCODER_FEEDRATE_DEADZONE
#define ENCODER_FEEDRATE_DEADZONE 10
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 5
#endif
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 1
#define ENCODER_FEEDRATE_DEADZONE 6
#endif
/**
@ -432,6 +460,13 @@ uint16_t max_display_update_time = 0;
#define manual_move_e_index 0
#endif
#if IS_KINEMATIC
bool processing_manual_move = false;
float manual_move_offset = 0.0;
#else
constexpr bool processing_manual_move = false;
#endif
#if PIN_EXISTS(SD_DETECT)
uint8_t lcd_sd_status;
#endif
@ -752,7 +787,7 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(MENU_ITEM_CASE_LIGHT)
extern int case_light_brightness;
extern uint8_t case_light_brightness;
extern bool case_light_on;
extern void update_case_light();
@ -762,7 +797,7 @@ void kill_screen(const char* lcd_msg) {
// ^ Main
//
MENU_BACK(MSG_MAIN);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_CASE_LIGHT_BRIGHTNESS, &case_light_brightness, 0, 255, update_case_light, true);
MENU_ITEM_EDIT_CALLBACK(int8, MSG_CASE_LIGHT_BRIGHTNESS, &case_light_brightness, 0, 255, update_case_light, true);
MENU_ITEM_EDIT_CALLBACK(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light);
END_MENU();
}
@ -844,6 +879,9 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(USER_SCRIPT_AUDIBLE_FEEDBACK)
lcd_completion_feedback();
#endif
#if ENABLED(USER_SCRIPT_RETURN)
lcd_return_to_status();
#endif
}
#if defined(USER_DESC_1) && defined(USER_GCODE_1)
@ -990,14 +1028,56 @@ void kill_screen(const char* lcd_msg) {
}
#if ENABLED(BABYSTEP_XY)
void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEPPING_X)); }
void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); }
void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEP_X)); }
void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEP_Y)); }
void lcd_babystep_x() { lcd_goto_screen(_lcd_babystep_x); babysteps_done = 0; defer_return_to_status = true; }
void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; }
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
void _lcd_babystep_zoffset_overlay(const float zprobe_zoffset) {
// Determine whether the user is raising or lowering the nozzle.
static int dir = 0;
static float old_zprobe_zoffset = 0;
if (zprobe_zoffset != old_zprobe_zoffset) {
dir = (zprobe_zoffset > old_zprobe_zoffset) ? 1 : -1;
old_zprobe_zoffset = zprobe_zoffset;
}
#if ENABLED(BABYSTEP_ZPROBE_GFX_REVERSE)
const unsigned char* rot_up = ccw_bmp;
const unsigned char* rot_down = cw_bmp;
#else
const unsigned char* rot_up = cw_bmp;
const unsigned char* rot_down = ccw_bmp;
#endif
#if ENABLED(USE_BIG_EDIT_FONT)
const int left = 0,
right = 45,
nozzle = 95;
#else
const int left = 5,
right = 90,
nozzle = 60;
#endif
// Draw a representation of the nozzle
if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp);
if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp);
// Draw cw/ccw indicator and up/down arrows.
if (PAGE_CONTAINS(47, 62)) {
u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down);
u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up);
u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp);
u8g.drawBitmapP(left + 20, 49 - dir, 2, 13, down_arrow_bmp);
}
}
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY
void lcd_babystep_zoffset() {
if (lcd_clicked) { return lcd_goto_previous_menu_no_defer(); }
defer_return_to_status = true;
@ -1017,13 +1097,17 @@ void kill_screen(const char* lcd_msg) {
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
}
}
if (lcdDrawUpdate)
if (lcdDrawUpdate) {
lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
_lcd_babystep_zoffset_overlay(zprobe_zoffset);
#endif
}
}
#else // !BABYSTEP_ZPROBE_OFFSET
void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEP_Z)); }
void lcd_babystep_z() { lcd_goto_screen(_lcd_babystep_z); babysteps_done = 0; defer_return_to_status = true; }
#endif // !BABYSTEP_ZPROBE_OFFSET
@ -1946,8 +2030,8 @@ void kill_screen(const char* lcd_msg) {
*/
void _lcd_ubl_adjust_height_cmd() {
char UBL_LCD_GCODE[16];
const int ind = ubl_height_amount < 0 ? 6 : 7;
strcpy_P(UBL_LCD_GCODE, PSTR("G29 P6-"));
const int ind = ubl_height_amount > 0 ? 9 : 10;
strcpy_P(UBL_LCD_GCODE, PSTR("G29 P6 C -"));
sprintf_P(&UBL_LCD_GCODE[ind], PSTR(".%i"), abs(ubl_height_amount));
enqueue_and_echo_command(UBL_LCD_GCODE);
}
@ -1963,8 +2047,7 @@ void kill_screen(const char* lcd_msg) {
void _lcd_ubl_height_adjust_menu() {
START_MENU();
MENU_BACK(MSG_UBL_EDIT_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_MESH_HEIGHT_AMOUNT, &ubl_height_amount, -9, 9);
MENU_ITEM(function, MSG_UBL_MESH_HEIGHT_ADJUST, _lcd_ubl_adjust_height_cmd);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_UBL_MESH_HEIGHT_AMOUNT, &ubl_height_amount, -9, 9, _lcd_ubl_adjust_height_cmd);
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
@ -2100,8 +2183,7 @@ void kill_screen(const char* lcd_msg) {
void _lcd_ubl_fillin_menu() {
START_MENU();
MENU_BACK(MSG_UBL_BUILD_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_FILLIN_AMOUNT, &ubl_fillin_amount, 0, 9);
MENU_ITEM(function, MSG_UBL_FILLIN_MESH, _lcd_ubl_fillin_amount_cmd);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_UBL_FILLIN_AMOUNT, &ubl_fillin_amount, 0, 9, _lcd_ubl_fillin_amount_cmd);
MENU_ITEM(function, MSG_UBL_SMART_FILLIN, _lcd_ubl_smart_fillin_cmd);
MENU_ITEM(gcode, MSG_UBL_MANUAL_FILLIN, PSTR("G29 P2 B T0"));
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
@ -2629,7 +2711,7 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT(float52, MSG_DELTA_RADIUS, &delta_radius, DELTA_RADIUS - 5.0, DELTA_RADIUS + 5.0);
MENU_ITEM_EDIT(float43, "Tx", &delta_tower_angle_trim[A_AXIS], -5.0, 5.0);
MENU_ITEM_EDIT(float43, "Ty", &delta_tower_angle_trim[B_AXIS], -5.0, 5.0);
MENU_ITEM_EDIT(float43, "Tz", &Tz, -5.0, 5.0);
MENU_ITEM_EDIT(float43, "Tz", &delta_tower_angle_trim[C_AXIS], -5.0, 5.0);
END_MENU();
}
@ -2657,14 +2739,60 @@ void kill_screen(const char* lcd_msg) {
#endif // DELTA_CALIBRATION_MENU
#if IS_KINEMATIC
extern float feedrate_mm_s;
extern float destination[XYZE];
void set_destination_to_current();
void prepare_move_to_destination();
#endif
/**
* If the most recent manual move hasn't been fed to the planner yet,
* and the planner can accept one, send immediately
*/
inline void manage_manual_move() {
if (processing_manual_move) return;
if (manual_move_axis != (int8_t)NO_AXIS && ELAPSED(millis(), manual_move_start_time) && !planner.is_full()) {
#if IS_KINEMATIC
const float old_feedrate = feedrate_mm_s;
feedrate_mm_s = MMM_TO_MMS(manual_feedrate_mm_m[manual_move_axis]);
#if EXTRUDERS > 1
const int8_t old_extruder = active_extruder;
active_extruder = manual_move_e_index;
#endif
// Set movement on a single axis
set_destination_to_current();
destination[manual_move_axis] += manual_move_offset;
// Reset for the next move
manual_move_offset = 0.0;
manual_move_axis = (int8_t)NO_AXIS;
// DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
// move_to_destination. This will cause idle() to be called, which can then call this function while the
// previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
// processing_manual_move is true or the planner will get out of sync.
processing_manual_move = true;
prepare_move_to_destination(); // will call set_current_to_destination
processing_manual_move = false;
feedrate_mm_s = old_feedrate;
#if EXTRUDERS > 1
active_extruder = old_extruder;
#endif
#else
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[manual_move_axis]), manual_move_e_index);
manual_move_axis = (int8_t)NO_AXIS;
#endif
}
}
@ -2677,8 +2805,11 @@ void kill_screen(const char* lcd_msg) {
, int8_t eindex=-1
#endif
) {
#if ENABLED(DUAL_X_CARRIAGE) || E_MANUAL > 1
#if E_MANUAL > 1
if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
if (axis == E_AXIS)
#endif
manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
#endif
manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
manual_move_axis = (int8_t)axis;
@ -2693,9 +2824,10 @@ void kill_screen(const char* lcd_msg) {
void _lcd_move_xyz(const char* name, AxisEnum axis) {
if (lcd_clicked) { return lcd_goto_previous_menu(); }
ENCODER_DIRECTION_NORMAL();
if (encoderPosition) {
if (encoderPosition && !processing_manual_move) {
refresh_cmd_timeout();
// Start with no limits to movement
float min = current_position[axis] - 1000,
max = current_position[axis] + 1000;
@ -2711,29 +2843,43 @@ void kill_screen(const char* lcd_msg) {
}
#endif
// Get the new position
current_position[axis] += float((int32_t)encoderPosition) * move_menu_scale;
// Delta limits XY based on the current offset from center
// This assumes the center is 0,0
#if ENABLED(DELTA)
if (axis != Z_AXIS) {
max = SQRT(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis]));
max = SQRT(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis
min = -max;
}
#endif
// Get the new position
const float diff = float((int32_t)encoderPosition) * move_menu_scale;
#if IS_KINEMATIC
manual_move_offset += diff;
// Limit only when trying to move towards the limit
if ((int32_t)encoderPosition < 0) NOLESS(manual_move_offset, min - current_position[axis]);
if ((int32_t)encoderPosition > 0) NOMORE(manual_move_offset, max - current_position[axis]);
#else
current_position[axis] += diff;
// Limit only when trying to move towards the limit
if ((int32_t)encoderPosition < 0) NOLESS(current_position[axis], min);
if ((int32_t)encoderPosition > 0) NOMORE(current_position[axis], max);
#endif
encoderPosition = 0;
manual_move_to_current(axis);
encoderPosition = 0;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
}
if (lcdDrawUpdate)
lcd_implementation_drawedit(name, move_menu_scale >= 0.1 ? ftostr41sign(current_position[axis]) : ftostr43sign(current_position[axis]));
if (lcdDrawUpdate) {
const float pos = current_position[axis]
#if IS_KINEMATIC
+ manual_move_offset
#endif
;
lcd_implementation_drawedit(name, move_menu_scale >= 0.1 ? ftostr41sign(pos) : ftostr43sign(pos));
}
}
void lcd_move_x() { _lcd_move_xyz(PSTR(MSG_MOVE_X), X_AXIS); }
void lcd_move_y() { _lcd_move_xyz(PSTR(MSG_MOVE_Y), Y_AXIS); }
@ -2746,8 +2892,13 @@ void kill_screen(const char* lcd_msg) {
if (lcd_clicked) { return lcd_goto_previous_menu(); }
ENCODER_DIRECTION_NORMAL();
if (encoderPosition) {
current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale;
encoderPosition = 0;
if (!processing_manual_move) {
const float diff = float((int32_t)encoderPosition) * move_menu_scale;
#if IS_KINEMATIC
manual_move_offset += diff;
#else
current_position[E_AXIS] += diff;
#endif
manual_move_to_current(E_AXIS
#if E_MANUAL > 1
, eindex
@ -2755,7 +2906,9 @@ void kill_screen(const char* lcd_msg) {
);
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
}
if (lcdDrawUpdate) {
encoderPosition = 0;
}
if (lcdDrawUpdate && !processing_manual_move) {
PGM_P pos_label;
#if E_MANUAL == 1
pos_label = PSTR(MSG_MOVE_E);
@ -2774,7 +2927,11 @@ void kill_screen(const char* lcd_msg) {
#endif // E_MANUAL > 2
}
#endif // E_MANUAL > 1
lcd_implementation_drawedit(pos_label, ftostr41sign(current_position[E_AXIS]));
lcd_implementation_drawedit(pos_label, ftostr41sign(current_position[E_AXIS]
#if IS_KINEMATIC
+ manual_move_offset
#endif
));
}
}
@ -2855,8 +3012,12 @@ void kill_screen(const char* lcd_msg) {
*
*/
#if IS_KINEMATIC
#if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
#define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
#else
#define _MOVE_XYZ_ALLOWED true
#endif
#if ENABLED(DELTA)
#define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height)
void lcd_lower_z_to_clip_height() {
@ -2866,10 +3027,6 @@ void kill_screen(const char* lcd_msg) {
#else
#define _MOVE_XY_ALLOWED true
#endif
#else
#define _MOVE_XYZ_ALLOWED true
#define _MOVE_XY_ALLOWED true
#endif
void lcd_move_menu() {
START_MENU();
@ -2890,7 +3047,7 @@ void kill_screen(const char* lcd_msg) {
else
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
#if ENABLED(SWITCHING_EXTRUDER)
#if ENABLED(SWITCHING_EXTRUDER) || ENABLED(DUAL_X_CARRIAGE)
if (active_extruder)
MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0"));
else
@ -2930,6 +3087,23 @@ void kill_screen(const char* lcd_msg) {
lcd_completion_feedback();
}
#if ENABLED(EEPROM_SETTINGS)
static void lcd_init_eeprom() {
lcd_factory_settings();
settings.save();
lcd_goto_previous_menu();
}
static void lcd_init_eeprom_confirm() {
START_MENU();
MENU_BACK(MSG_CONTROL);
MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom);
END_MENU();
}
#endif
void lcd_control_menu() {
START_MENU();
MENU_BACK(MSG_MAIN);
@ -2960,7 +3134,7 @@ void kill_screen(const char* lcd_msg) {
#endif
MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings);
#if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500")); // TODO: Add "Are You Sure?" step
MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
#endif
END_MENU();

@ -43,7 +43,15 @@
* These are common LCD 128x64 pixel graphic displays.
*/
#include "ultralcd.h"
#if ENABLED(U8GLIB_ST7920)
#include "ultralcd_st7920_u8glib_rrd.h"
#endif
#if ENABLED(U8GLIB_ST7565_64128N)
#include "ultralcd_st7565_u8glib_VIKI.h"
#endif
#include "dogm_bitmaps.h"
#include "utility.h"
#include "duration_t.h"
@ -100,6 +108,9 @@
#elif ENABLED(DISPLAY_CHARSET_ISO10646_CZ)
#include "dogm_font_data_ISO10646_CZ.h"
#define FONT_MENU_NAME ISO10646_CZ
#elif ENABLED(DISPLAY_CHARSET_ISO10646_SK)
#include "dogm_font_data_ISO10646_SK.h"
#define FONT_MENU_NAME ISO10646_SK
#else // fall-back
#include "dogm_font_data_ISO10646_1.h"
#define FONT_MENU_NAME ISO10646_1_5x7
@ -171,14 +182,19 @@
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
//U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
#elif ENABLED(MAKRPANEL) || ENABLED(VIKI2) || ENABLED(miniVIKI)
#elif ENABLED(U8GLIB_ST7565_64128N)
// The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller as well
//U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
// U8GLIB_ST7565_64128n_2x_VIKI u8g(0); // using SW-SPI DOGLCD_MOSI != -1 && DOGLCD_SCK
U8GLIB_ST7565_64128n_2x_VIKI u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI
//U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes HWSPI
#elif ENABLED(U8GLIB_SSD1306)
// Generic support for SSD1306 OLED I2C LCDs
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes
U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
#elif ENABLED(MKS_12864OLED)
// MKS 128x64 (SH1106) OLED I2C LCD
U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 8 stripes
//U8GLIB_SH1106_128X64_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
#elif ENABLED(U8GLIB_SH1106)
// Generic support for SH1106 OLED I2C LCDs
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes
@ -417,7 +433,7 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
if (!axis_homed[axis])
u8g.print('?');
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
#if DISABLED(HOME_AFTER_DEACTIVATE) && DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[axis])
u8g.print(' ');
else
@ -854,35 +870,8 @@ static void lcd_implementation_status_screen() {
#define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false)
#define lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, true)
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
inline void lcd_implementation_drawmenu_setting_edit_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
UNUSED(pstr2); \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_callback_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
UNUSED(pstr2); \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_accessor_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type (*pget)(), void (*pset)(_type), ...) { \
UNUSED(pstr2); UNUSED(pset); \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _strFunc(pget())); \
} \
typedef void _name##_void
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(int16_t, int3, itostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint8_t, int8, i8tostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float3, ftostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float32, ftostr32);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float43, ftostr43sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float5, ftostr5rj);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float51, ftostr51sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52, ftostr52sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float62, ftostr62rj);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint32_t, long5, ftostr5rj);
#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
#define lcd_implementation_drawmenu_setting_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
#define DRAWMENU_SETTING_EDIT_GENERIC(_src) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _src)
#define DRAW_BOOL_SETTING(sel, row, pstr, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
void lcd_implementation_drawedit(const char* const pstr, const char* const value=NULL) {
const uint8_t labellen = lcd_strlen_P(pstr),
@ -944,7 +933,7 @@ static void lcd_implementation_status_screen() {
uint8_t n = LCD_WIDTH - (START_COL) - 1;
if (longFilename[0]) {
filename = longFilename;
longFilename[n] = '\0';
longFilename[n] = '\0'; // cutoff at screen edge
}
if (isDir) lcd_print(LCD_STR_FOLDER[0]);

@ -597,7 +597,7 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
if (!axis_homed[axis])
lcd.write('?');
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
#if DISABLED(HOME_AFTER_DEACTIVATE) && DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[axis])
lcd.write(' ');
else
@ -791,6 +791,10 @@ static void lcd_implementation_status_screen() {
_draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
lcd.print(ftostr52sp(FIXFLOAT(current_position[Z_AXIS])));
#if HAS_LEVELING
lcd.write(leveling_is_active() || blink ? '_' : ' ');
#endif
#endif // LCD_HEIGHT > 2
//
@ -964,32 +968,8 @@ static void lcd_implementation_status_screen() {
lcd_printPGM(data);
}
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
inline void lcd_implementation_drawmenu_setting_edit_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', _strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_callback_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', _strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_accessor_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type (*pget)(), void (*pset)(_type), ...) { \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', _strFunc(pget())); \
} \
typedef void _name##_void
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(int16_t, int3, itostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint8_t, int8, i8tostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float3, ftostr3);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float32, ftostr32);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float43, ftostr43sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float5, ftostr5rj);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float51, ftostr51sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52, ftostr52sign);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float62, ftostr62rj);
DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint32_t, long5, ftostr5rj);
#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
#define lcd_implementation_drawmenu_setting_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
#define DRAWMENU_SETTING_EDIT_GENERIC(_src) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', _src)
#define DRAW_BOOL_SETTING(sel, row, pstr, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
void lcd_implementation_drawedit(const char* pstr, const char* const value=NULL) {
lcd.setCursor(1, 1);
@ -1007,7 +987,6 @@ static void lcd_implementation_status_screen() {
static void lcd_implementation_drawmenu_sd(const bool sel, const uint8_t row, const char* const pstr, const char* filename, char* const longFilename, const uint8_t concat, const char post_char) {
UNUSED(pstr);
char c;
uint8_t n = LCD_WIDTH - concat;
lcd.setCursor(0, row);
lcd.print(sel ? '>' : ' ');
@ -1015,7 +994,7 @@ static void lcd_implementation_status_screen() {
filename = longFilename;
longFilename[n] = '\0';
}
while ((c = *filename) && n > 0) {
while (char c = *filename) {
n -= charset_mapper(c);
filename++;
}

@ -0,0 +1,253 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016, 2017 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULCDST7565_H
#define ULCDST7565_H
#include <U8glib.h>
#define ST7565_CLK_PIN DOGLCD_SCK
#define ST7565_DAT_PIN DOGLCD_MOSI
#define ST7565_CS_PIN DOGLCD_CS
#define ST7565_A0_PIN DOGLCD_A0
#define LCD_PIXEL_WIDTH 128
#define LCD_PIXEL_HEIGHT 64
#define PAGE_HEIGHT 8
//set optimization so ARDUINO optimizes this file
#pragma GCC optimize (3)
// If you want you can define your own set of delays in Configuration.h
//#define ST7565_DELAY_1 DELAY_0_NOP
//#define ST7565_DELAY_2 DELAY_0_NOP
//#define ST7565_DELAY_3 DELAY_0_NOP
/*
#define ST7565_DELAY_1 u8g_10MicroDelay()
#define ST7565_DELAY_2 u8g_10MicroDelay()
#define ST7565_DELAY_3 u8g_10MicroDelay()
*/
#if F_CPU >= 20000000
#define CPU_ST7565_DELAY_1 DELAY_0_NOP
#define CPU_ST7565_DELAY_2 DELAY_0_NOP
#define CPU_ST7565_DELAY_3 DELAY_1_NOP
#elif (MOTHERBOARD == BOARD_3DRAG) || (MOTHERBOARD == BOARD_K8200) || (MOTHERBOARD == BOARD_K8400)
#define CPU_ST7565_DELAY_1 DELAY_0_NOP
#define CPU_ST7565_DELAY_2 DELAY_3_NOP
#define CPU_ST7565_DELAY_3 DELAY_0_NOP
#elif (MOTHERBOARD == BOARD_MINIRAMBO)
#define CPU_ST7565_DELAY_1 DELAY_0_NOP
#define CPU_ST7565_DELAY_2 DELAY_4_NOP
#define CPU_ST7565_DELAY_3 DELAY_0_NOP
#elif (MOTHERBOARD == BOARD_RAMBO)
#define CPU_ST7565_DELAY_1 DELAY_0_NOP
#define CPU_ST7565_DELAY_2 DELAY_0_NOP
#define CPU_ST7565_DELAY_3 DELAY_0_NOP
#elif F_CPU == 16000000
#define CPU_ST7565_DELAY_1 DELAY_0_NOP
#define CPU_ST7565_DELAY_2 DELAY_0_NOP
#define CPU_ST7565_DELAY_3 DELAY_1_NOP
#else
#error "No valid condition for delays in 'ultralcd_st7565_u8glib_VIKI.h'"
#endif
#ifndef ST7565_DELAY_1
#define ST7565_DELAY_1 CPU_ST7565_DELAY_1
#endif
#ifndef ST7565_DELAY_2
#define ST7565_DELAY_2 CPU_ST7565_DELAY_2
#endif
#ifndef ST7565_DELAY_3
#define ST7565_DELAY_3 CPU_ST7565_DELAY_3
#endif
#if ENABLED(SHARED_SPI) // Re-ARM requires that the LCD and the SD card share a single SPI
#define ST7565_WRITE_BYTE(a) { spiSend((uint8_t)a); U8G_DELAY(); }
#define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) {spiSend( *ptr++);} DELAY_10US; }
#else
#define ST7565_SND_BIT \
WRITE(ST7565_CLK_PIN, LOW); ST7565_DELAY_1; \
WRITE(ST7565_DAT_PIN, val & 0x80); ST7565_DELAY_2; \
WRITE(ST7565_CLK_PIN, HIGH); ST7565_DELAY_3; \
WRITE(ST7565_CLK_PIN, LOW);\
val <<= 1
static void ST7565_SWSPI_SND_8BIT(uint8_t val) {
ST7565_SND_BIT; // 1
ST7565_SND_BIT; // 2
ST7565_SND_BIT; // 3
ST7565_SND_BIT; // 4
ST7565_SND_BIT; // 5
ST7565_SND_BIT; // 6
ST7565_SND_BIT; // 7
ST7565_SND_BIT; // 8
}
#define ST7565_WRITE_BYTE(a) { ST7565_SWSPI_SND_8BIT((uint8_t)a); U8G_DELAY(); }
#define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) {ST7565_SWSPI_SND_8BIT( *ptr++);} DELAY_10US; }
#endif
#if defined(DOGM_SPI_DELAY_US) && DOGM_SPI_DELAY_US > 0
#define U8G_DELAY() delayMicroseconds(DOGM_SPI_DELAY_US)
#else
#define U8G_DELAY() u8g_10MicroDelay()
#endif
#define ST7565_CS() { WRITE(ST7565_CS_PIN,1); U8G_DELAY(); }
#define ST7565_NCS() { WRITE(ST7565_CS_PIN,0); }
#define ST7565_A0() { WRITE(ST7565_A0_PIN,1); U8G_DELAY(); }
#define ST7565_NA0() { WRITE(ST7565_A0_PIN,0); }
uint8_t u8g_dev_st7565_64128n_2x_VIKI_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT: {
OUT_WRITE(ST7565_CS_PIN, LOW);
#if ENABLED(SHARED_SPI)
u8g_Delay(250);
spiBegin();
#ifndef SPI_SPEED
#define SPI_SPEED SPI_FULL_SPEED // use same SPI speed as SD card
#endif
spiInit(SPI_SPEED);
#else
OUT_WRITE(ST7565_DAT_PIN, LOW);
OUT_WRITE(ST7565_CLK_PIN, LOW);
#endif
OUT_WRITE(ST7565_A0_PIN, LOW);
ST7565_CS(); /* disable chip */
ST7565_NA0(); /* instruction mode */
ST7565_NCS(); /* enable chip */
ST7565_WRITE_BYTE(0x0A2); /* 0x0A2: LCD bias 1/9 (according to Displaytech 64128N datasheet) */
ST7565_WRITE_BYTE(0x0A0); /* Normal ADC Select (according to Displaytech 64128N datasheet) */
ST7565_WRITE_BYTE(0x0C8); /* common output mode: set scan direction normal operation/SHL Select; 0x0C0 --> SHL = 0; normal; 0x0C8 --> SHL = 1 */
ST7565_WRITE_BYTE(0x040); /* Display start line for Displaytech 64128N */
ST7565_WRITE_BYTE(0x028 | 0x04); /* power control: turn on voltage converter */
//U8G_ESC_DLY(50); /* delay 50 ms - hangs after a reset if used */
ST7565_WRITE_BYTE(0x028 | 0x06); /* power control: turn on voltage regulator */
//U8G_ESC_DLY(50); /* delay 50 ms - hangs after a reset if used */
ST7565_WRITE_BYTE(0x028 | 0x07); /* power control: turn on voltage follower */
//U8G_ESC_DLY(50); /* delay 50 ms - hangs after a reset if used */
ST7565_WRITE_BYTE(0x010); /* Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N */
ST7565_WRITE_BYTE(0x0A6); /* display normal, bit val 0: LCD pixel off. */
ST7565_WRITE_BYTE(0x081); /* set contrast */
ST7565_WRITE_BYTE(0x01E); /* Contrast value. Setting for controlling brightness of Displaytech 64128N */
ST7565_WRITE_BYTE(0x0AF); /* display on */
U8G_ESC_DLY(100); /* delay 100 ms */
ST7565_WRITE_BYTE(0x0A5); /* display all points; ST7565 */
U8G_ESC_DLY(100); /* delay 100 ms */
U8G_ESC_DLY(100); /* delay 100 ms */
ST7565_WRITE_BYTE(0x0A4); /* normal display */
ST7565_CS(); /* disable chip */
} /* end of sequence */
break;
case U8G_DEV_MSG_STOP: break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
ST7565_CS(); /* disable chip */
ST7565_NA0(); /* instruction mode */
ST7565_NCS(); /* enable chip */
ST7565_WRITE_BYTE(0x010); /* set upper 4 bit of the col adr to 0x10 */
ST7565_WRITE_BYTE(0x000); /* set lower 4 bit of the col adr to 0x00. Changed for DisplayTech 64128N */
/* end of sequence */
ST7565_WRITE_BYTE(0x0B0 | (2*pb->p.page));; /* select current page (ST7565R) */
ST7565_A0(); /* data mode */
ST7560_WriteSequence( (uint8_t) pb->width, (uint8_t *)pb->buf);
ST7565_CS(); /* disable chip */
ST7565_NA0(); /* instruction mode */
ST7565_NCS(); /* enable chip */
ST7565_WRITE_BYTE(0x010); /* set upper 4 bit of the col adr to 0x10 */
ST7565_WRITE_BYTE(0x000); /* set lower 4 bit of the col adr to 0x00. Changed for DisplayTech 64128N */
/* end of sequence */
ST7565_WRITE_BYTE(0x0B0 | (2*pb->p.page+1)); /* select current page (ST7565R) */
ST7565_A0(); /* data mode */
ST7560_WriteSequence( (uint8_t) pb->width, (uint8_t *)(pb->buf)+pb->width);
ST7565_CS(); /* disable chip */
}
break;
case U8G_DEV_MSG_CONTRAST:
ST7565_NCS();
ST7565_NA0(); /* instruction mode */
ST7565_WRITE_BYTE(0x081);
ST7565_WRITE_BYTE((*(uint8_t *)arg) >> 2);
ST7565_CS(); /* disable chip */
return 1;
case U8G_DEV_MSG_SLEEP_ON:
ST7565_NA0(); /* instruction mode */
ST7565_NCS(); /* enable chip */
ST7565_WRITE_BYTE(0x0AC); /* static indicator off */
ST7565_WRITE_BYTE(0x000); /* indicator register set (not sure if this is required) */
ST7565_WRITE_BYTE(0x0AE); /* display off */
ST7565_WRITE_BYTE(0x0A5); /* all points on */
ST7565_CS(); /* disable chip , bugfix 12 nov 2014 */
/* end of sequence */
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
ST7565_NA0(); /* instruction mode */
ST7565_NCS(); /* enable chip */
ST7565_WRITE_BYTE(0x0A4); /* all points off */
ST7565_WRITE_BYTE(0x0AF); /* display on */
U8G_ESC_DLY(50); /* delay 50 ms */
ST7565_CS(); /* disable chip , bugfix 12 nov 2014 */
/* end of sequence */
return 1;
}
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_st7565_64128n_2x_VIKI_buf[LCD_PIXEL_WIDTH*2] U8G_NOCOMMON;
u8g_pb_t u8g_dev_st7565_64128n_2x_VIKI_pb = {{16, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7565_64128n_2x_VIKI_buf};
u8g_dev_t u8g_dev_st7565_64128n_2x_VIKI_sw_spi = {u8g_dev_st7565_64128n_2x_VIKI_fn, &u8g_dev_st7565_64128n_2x_VIKI_pb, &u8g_com_null_fn};
class U8GLIB_ST7565_64128n_2x_VIKI : public U8GLIB {
public:
U8GLIB_ST7565_64128n_2x_VIKI(uint8_t dummy)
: U8GLIB(&u8g_dev_st7565_64128n_2x_VIKI_sw_spi)
{ }
U8GLIB_ST7565_64128n_2x_VIKI(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
: U8GLIB(&u8g_dev_st7565_64128n_2x_VIKI_sw_spi)
{ }
};
#pragma GCC reset_options
#endif // ULCDST7565_H

@ -23,9 +23,7 @@
#ifndef ULCDST7920_H
#define ULCDST7920_H
#include "Marlin.h"
#if ENABLED(U8GLIB_ST7920)
#include <U8glib.h>
#define ST7920_CLK_PIN LCD_PINS_D4
#define ST7920_DAT_PIN LCD_PINS_ENABLE
@ -38,8 +36,6 @@
#define LCD_PIXEL_WIDTH 128
#define LCD_PIXEL_HEIGHT 64
#include <U8glib.h>
//set optimization so ARDUINO optimizes this file
#pragma GCC optimize (3)
@ -139,8 +135,9 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
ST7920_NCS();
}
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_STOP: break;
case U8G_DEV_MSG_PAGE_NEXT: {
uint8_t* ptr;
u8g_pb_t* pb = (u8g_pb_t*)(dev->dev_mem);
@ -186,5 +183,4 @@ class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
#pragma GCC reset_options
#endif // U8GLIB_ST7920
#endif // ULCDST7920_H

@ -26,9 +26,9 @@
#include "language.h"
#if ENABLED(DOGLCD)
#define HARDWARE_CHAR_OUT u8g.print
#define HARDWARE_CHAR_OUT(C) u8g.print((char)(C))
#else
#define HARDWARE_CHAR_OUT lcd.write
#define HARDWARE_CHAR_OUT(C) lcd.write((char)(C))
#endif
#if DISABLED(SIMULATE_ROMFONT) && ENABLED(DOGLCD)
@ -161,9 +161,9 @@
else if (seen_c2) {
d &= 0x3Fu;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else
HARDWARE_CHAR_OUT((char)(0x80u + (utf_hi_char << 6) + d)) ;
HARDWARE_CHAR_OUT(0x80u + (utf_hi_char << 6) + d);
#endif
}
else {
@ -171,7 +171,7 @@
}
}
else {
HARDWARE_CHAR_OUT((char) c );
HARDWARE_CHAR_OUT(c);
}
seen_c2 = false;
return 1;
@ -203,7 +203,7 @@
case 0xB1u: d = 0xFDu; break;
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
else if (seen_c5) {
switch(d) {
@ -211,14 +211,14 @@
case 0x9Fu: d = 0xFEu; break;
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
else if (seen_c2) {
d &= 0x3Fu;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else
HARDWARE_CHAR_OUT((char)(0x80u + (utf_hi_char << 6) + d)) ;
HARDWARE_CHAR_OUT(0x80u + (utf_hi_char << 6) + d);
#endif
}
else {
@ -226,7 +226,7 @@
}
}
else {
HARDWARE_CHAR_OUT((char) c );
HARDWARE_CHAR_OUT(c);
}
seen_c2 = seen_c4 = seen_c5 = false;
return 1;
@ -247,9 +247,9 @@
else if (seen_ce) {
d &= 0x3F;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else
HARDWARE_CHAR_OUT((char)(0x80 + (utf_hi_char << 6) + d)) ;
HARDWARE_CHAR_OUT(0x80 + (utf_hi_char << 6) + d);
#endif
}
else {
@ -257,7 +257,7 @@
}
}
else {
HARDWARE_CHAR_OUT((char)c);
HARDWARE_CHAR_OUT(c);
}
seen_ce = false;
return 1;
@ -278,9 +278,9 @@
else if (seen_ce) {
d &= 0x3F;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else
HARDWARE_CHAR_OUT((char)(0x80 + (utf_hi_char << 6) + d)) ;
HARDWARE_CHAR_OUT(0x80 + (utf_hi_char << 6) + d);
#endif
}
else {
@ -288,7 +288,7 @@
}
}
else {
HARDWARE_CHAR_OUT((char) c );
HARDWARE_CHAR_OUT(c);
}
seen_ce = false;
return 1;
@ -311,13 +311,13 @@
else if (seen_d5) {
d &= 0x3F;
if (!utf_hi_char && d == 1) {
HARDWARE_CHAR_OUT((char) 0xA2); // Ё
HARDWARE_CHAR_OUT(0xA2); // Ё
}
else if (utf_hi_char == 1 && d == 0x11) {
HARDWARE_CHAR_OUT((char)0xB5); // ё
HARDWARE_CHAR_OUT(0xB5); // ё
}
else {
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x10));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x10));
}
}
else {
@ -325,7 +325,7 @@
}
}
else {
HARDWARE_CHAR_OUT((char) c );
HARDWARE_CHAR_OUT(c);
}
seen_d5 = false;
return 1;
@ -346,9 +346,9 @@
else if (seen_d5) {
d &= 0x3Fu;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else
HARDWARE_CHAR_OUT((char)(0xA0u + (utf_hi_char << 6) + d)) ;
HARDWARE_CHAR_OUT(0xA0u + (utf_hi_char << 6) + d);
#endif
}
else {
@ -356,7 +356,7 @@
}
}
else {
HARDWARE_CHAR_OUT((char) c );
HARDWARE_CHAR_OUT(c);
}
seen_d5 = false;
return 1;
@ -382,18 +382,17 @@
else if (seen_e3 && seen_82_83) {
d &= 0x3F;
#ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
HARDWARE_CHAR_OUT(pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else
HARDWARE_CHAR_OUT((char)(0x80 + (utf_hi_char << 6) + d)) ;
HARDWARE_CHAR_OUT(0x80 + (utf_hi_char << 6) + d);
#endif
}
else {
HARDWARE_CHAR_OUT((char) '?' );
}
}
else {
HARDWARE_CHAR_OUT((char) c );
else
HARDWARE_CHAR_OUT('?');
}
else
HARDWARE_CHAR_OUT(c);
seen_e3 = false;
seen_82_83 = false;
return 1;
@ -437,7 +436,7 @@
case 0x98u ... 0x99u: d -= 20; break; //Ę i ę
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
else if (seen_c5) {
switch(d) {
@ -446,7 +445,7 @@
case 0xB9u ... 0xBCu: d -= 0x2Bu; break; //Ź - ż
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
else if (seen_c3) {
switch(d) {
@ -454,13 +453,13 @@
case 0xB3u: d = 0x8Bu; break; //ó
d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
}
else {
HARDWARE_CHAR_OUT((char) c );
}
else
HARDWARE_CHAR_OUT(c);
seen_c3 = seen_c4 = seen_c5 = false;
return 1;
}
@ -515,7 +514,7 @@
case 0x9Au ... 0x9Bu: d -= 10; break; // Ěě
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
else if (seen_c5) {
switch(d) {
@ -527,7 +526,7 @@
case 0xBDu ... 0xBEu: d -= 0x21u; break; // Žž
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
else if (seen_c3) {
switch(d) {
@ -545,21 +544,115 @@
case 0xBDu: d = 0x8Bu; break; // ý
default: d = '?';
}
HARDWARE_CHAR_OUT((char)d) ;
HARDWARE_CHAR_OUT(d);
}
}
else {
HARDWARE_CHAR_OUT((char) c );
}
else
HARDWARE_CHAR_OUT(c);
seen_c3 = seen_c4 = seen_c5 = false;
return 1;
}
#elif ENABLED(MAPPER_C3C4C5_SK)
// TBD
#error "No mapping for Slovak at this time. Use MAPPER_NON."
/**
* Á C3 81 = 80
* Ä C3 84 = 81
* É C3 89 = 82
* Í C3 8D = 83
* Ó C3 93 = 84
* Ô C3 94 = 85
* Ú C3 9A = 86
* Ý C3 9D = 87
* á C3 A1 = 88
* ä C3 A4 = 89
* é C3 A9 = 8A
* í C3 AD = 8B
* ó C3 B3 = 8C
* ô C3 B4 = 8D
* ú C3 BA = 8E
* ý C3 BD = 8F
* Č C4 8C = 90
* č C4 8D = 91
* Ď C4 8E = 92
* ď C4 8F = 93
* Ĺ C4 B9 = 94
* ĺ C4 BA = 95
* Ľ C4 BD = 96
* ľ C4 BE = 97
* Ň C5 87 = 98
* ň C5 88 = 99
* Ŕ C5 94 = 9A
* ŕ C5 95 = 9B
* Š C5 A0 = 9C
* š C5 A1 = 9D
* Ť C5 A4 = 9E
* ť C5 A5 = 9F
* Ž C5 BD = A0
* ž C5 BE = A1
*/
char charset_mapper(const char c) {
static bool seen_c3 = false,
seen_c4 = false,
seen_c5 = false;
uint8_t d = c;
if (d >= 0x80u) { // UTF-8 handling
if (d == 0xC4u) { seen_c4 = true; return 0; }
else if (d == 0xC5u) { seen_c5 = true; return 0; }
else if (d == 0xC3u) { seen_c3 = true; return 0; }
else if (seen_c4) {
switch(d) {
case 0x8Cu ... 0x8Fu: d += 0x04u; break; // ČčĎď
case 0xB9u ... 0xBAu: d -= 0x25u; break; // Ĺĺ
case 0xBDu ... 0xBEu: d -= 0x27u; break; // Ľľ
default: d = '?';
}
HARDWARE_CHAR_OUT(d);
}
else if (seen_c5) {
switch(d) {
case 0x87u ... 0x88u: d += 0x11u; break; // Ňň
case 0x94u ... 0x95u: d += 0x06u; break; // Ŕŕ
case 0xA0u ... 0xA1u: d -= 0x04u; break; // Šš
case 0xA4u ... 0xA5u: d -= 0x06u; break; // Ťť
case 0xBDu ... 0xBEu: d -= 0x1Du; break; // Žž
default: d = '?';
}
HARDWARE_CHAR_OUT(d);
}
else if (seen_c3) {
switch(d) {
case 0x81u: d = 0x80u; break; // Á
case 0x84u: d = 0x81u; break; // Ä
case 0x89u: d = 0x82u; break; // É
case 0x8Du: d = 0x83u; break; // Í
case 0x93u: d = 0x84u; break; // Ó
case 0x94u: d = 0x85u; break; // Ô
case 0x9Au: d = 0x86u; break; // Ú
case 0x9Du: d = 0x87u; break; // Ý
case 0xA1u: d = 0x88u; break; // á
case 0xA4u: d = 0x89u; break; // ä
case 0xA9u: d = 0x8Au; break; // é
case 0xADu: d = 0x8Bu; break; // í
case 0xB3u: d = 0x8Cu; break; // ó
case 0xB4u: d = 0x8Du; break; // ô
case 0xBAu: d = 0x8Eu; break; // ú
case 0xBDu: d = 0x8Fu; break; // ý
default: d = '?';
}
HARDWARE_CHAR_OUT(d);
}
}
else
HARDWARE_CHAR_OUT(c);
seen_c3 = seen_c4 = seen_c5 = false;
return 1;
}
#else

Loading…
Cancel
Save