--- ./Marlin/Configuration.h.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/Configuration.h 2018-08-04 21:00:28.742579421 -0600 @@ -39,6 +39,8 @@ #define CONFIGURATION_H #define CONFIGURATION_H_VERSION 010109 +#include "PrintrBotConfig.h" + //=========================================================================== //============================= Getting Started ============================= //=========================================================================== @@ -74,7 +76,7 @@ // User-specified version info of this build to display in [Pronterface, etc] terminal window during // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this // build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. +#define STRING_CONFIG_H_AUTHOR "(Kelly Anderson, kelly@xilka.com)" // Who made the changes. #define SHOW_BOOTSCREEN #define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 #define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 @@ -116,7 +118,7 @@ * * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ -#define BAUDRATE 250000 +#define BAUDRATE 115200 // Enable the Bluetooth serial interface on AT90USB devices //#define BLUETOOTH @@ -124,16 +126,16 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB + #define MOTHERBOARD BOARD_PRINTRBOARD_REVF #endif // Optional custom name for your RepStrap or other custom machine // Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" +#define CUSTOM_MACHINE_NAME "Simple Metal" // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" +#define MACHINE_UUID "40ce61d1-2ed0-4530-8304-55e3eeaaebff" // @section extruder @@ -142,7 +144,7 @@ #define EXTRUDERS 1 // Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 // For Cyclops or any "multi-extruder" that shares a single nozzle. //#define SINGLENOZZLE @@ -308,7 +310,7 @@ #define TEMP_SENSOR_2 0 #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 -#define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_BED 7 #define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 @@ -333,12 +335,12 @@ // The minimal temperature defines the temperature below which the heater will not be enabled It is used // to check that the wiring to the thermistor is not broken. // Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define HEATER_4_MINTEMP 5 -#define BED_MINTEMP 5 +#define HEATER_0_MINTEMP 15 +#define HEATER_1_MINTEMP 15 +#define HEATER_2_MINTEMP 15 +#define HEATER_3_MINTEMP 15 +#define HEATER_4_MINTEMP 15 +#define BED_MINTEMP 15 // When temperature exceeds max temp, your heater will be switched off. // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! @@ -348,7 +350,7 @@ #define HEATER_2_MAXTEMP 275 #define HEATER_3_MAXTEMP 275 #define HEATER_4_MAXTEMP 275 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 110 //=========================================================================== //============================= PID Settings ================================ @@ -372,10 +374,15 @@ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + // Ubis 13S + #define DEFAULT_Kp 32.77 + #define DEFAULT_Ki 5.56 + #define DEFAULT_Kd 48.33 + // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 + //#define DEFAULT_Kp 22.2 + //#define DEFAULT_Ki 1.08 + //#define DEFAULT_Kd 114 // MakerGear //#define DEFAULT_Kp 7.0 @@ -501,14 +508,14 @@ // Almost all printers will be using one per axis. Probes will use one or more of the // extra connectors. Leave undefined any used for non-endstop and non-probe purposes. #define USE_XMIN_PLUG -#define USE_YMIN_PLUG +//#define USE_YMIN_PLUG #define USE_ZMIN_PLUG //#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG +#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG // Enable pullup for all endstops to prevent a floating state -#define ENDSTOPPULLUPS +//#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX @@ -540,17 +547,17 @@ * TMC5130, TMC5130_STANDALONE * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] */ -#define X_DRIVER_TYPE A4988 -#define Y_DRIVER_TYPE A4988 -#define Z_DRIVER_TYPE A4988 -#define X2_DRIVER_TYPE A4988 -#define Y2_DRIVER_TYPE A4988 -#define Z2_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE A4988 -#define E1_DRIVER_TYPE A4988 -#define E2_DRIVER_TYPE A4988 -#define E3_DRIVER_TYPE A4988 -#define E4_DRIVER_TYPE A4988 +#define X_DRIVER_TYPE TMC2130 +#define Y_DRIVER_TYPE TMC2130 +#define Z_DRIVER_TYPE TMC2130 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE TMC2130 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. @@ -598,14 +605,50 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 } +#define STEPS_PER_REV_1_8 (200.0) +#define MICROSTEPS_PER_STEP (16.0) +#define MICROSTEPS_PER_REV (STEPS_PER_REV_1_8*MICROSTEPS_PER_STEP) +#define ACME_QUARTER_MM_PER_REV (1.0/16.0*25.4) +#define ACME_FOUR_START_8MM_MM_PER_REV (8.0) + +#if defined(ZROD_FOUR_START_8MM) +/* 4-Start 8mm Acme lead screw upgrade */ +#define Z_STEPS_PER_MM (MICROSTEPS_PER_REV/ACME_FOUR_START_8MM_MM_PER_REV) +#elif defined(ZROD_QUARTER) +/* original simple metal quarter inch */ +/* + * Acme quarter inch should calculate to 2015.75 + * Simple Metal default was incorrect at 2020 + */ +#define Z_STEPS_PER_MM (MICROSTEPS_PER_REV/ACME_QUARTER_MM_PER_REV) +#else +#error "ZROD_QUARTER or ZROD_FOUR_START_8MM must be defined" +#endif + +#if defined(PULLEY_XY_16T) +#define XY_STEPS_PER_MM 100 +#elif defined(PULLEY_XY_20T) +#define XY_STEPS_PER_MM 80 +#else +#error "PULLEY_XY_16T or PULLEY_XY_20T must be defined" +#endif + +#if defined(EXTRUDER_GEARHEAD) +#define EXTRUDER_STEPS_PER_MM 127 +#elif defined(EXTRUDER_OLD) +#define EXTRUDER_STEPS_PER_MM 96 +#else +#error "EXTRUDER_OLD or EXTRUDER_GEARHEAD must be defined" +#endif + +#define DEFAULT_AXIS_STEPS_PER_UNIT { XY_STEPS_PER_MM, XY_STEPS_PER_MM, Z_STEPS_PER_MM, EXTRUDER_STEPS_PER_MM } /** * Default Max Feed Rate (mm/s) * Override with M203 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } +#define DEFAULT_MAX_FEEDRATE { 125, 125, 5, 25 } /** * Default Max Acceleration (change/s) change = mm/s @@ -613,7 +656,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } +#define DEFAULT_MAX_ACCELERATION { 2000, 2000, 300, 10000 } /** * Default Acceleration (change/s) change = mm/s @@ -623,9 +666,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1500 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1800 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk (mm/s) @@ -637,8 +680,8 @@ */ #define DEFAULT_XJERK 10.0 #define DEFAULT_YJERK 10.0 -#define DEFAULT_ZJERK 0.3 -#define DEFAULT_EJERK 5.0 +#define DEFAULT_ZJERK 0.4 +#define DEFAULT_EJERK 2.5 /** * S-Curve Acceleration @@ -648,7 +691,7 @@ * * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained */ -//#define S_CURVE_ACCELERATION +#define S_CURVE_ACCELERATION //=========================================================================== //============================= Z Probe Options ============================= @@ -706,7 +749,7 @@ * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. * (e.g., an inductive probe or a nozzle-based probe-switch.) */ -//#define FIX_MOUNTED_PROBE +#define FIX_MOUNTED_PROBE /** * Z Servo Probe, such as an endstop switch on a rotating arm. @@ -766,15 +809,15 @@ * O-- FRONT --+ * (0,0) */ -#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define X_PROBE_OFFSET_FROM_EXTRUDER 20 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle] #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] // Certain types of probes need to stay away from edges -#define MIN_PROBE_EDGE 10 +#define MIN_PROBE_EDGE 0 // X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 +#define XY_PROBE_SPEED 7200 // Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z @@ -785,7 +828,7 @@ // The number of probes to perform at each point. // Set to 2 for a fast/slow probe, using the second probe result. // Set to 3 or more for slow probes, averaging the results. -//#define MULTIPLE_PROBING 2 +#define MULTIPLE_PROBING 3 /** * Z probes require clearance when deploying, stowing, and moving between @@ -801,16 +844,16 @@ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. */ -#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_DEPLOY_PROBE 3 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points #define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes //#define Z_AFTER_PROBING 5 // Z position after probing is done #define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping // For M851 give a range for adjusting the Z probe offset -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 +#define Z_PROBE_OFFSET_RANGE_MIN -1.6 +#define Z_PROBE_OFFSET_RANGE_MAX 0 // Enable the M48 repeatability test to test probe accuracy //#define Z_MIN_PROBE_REPEATABILITY_TEST @@ -838,9 +881,9 @@ // @section machine // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false +#define INVERT_X_DIR true #define INVERT_Y_DIR true -#define INVERT_Z_DIR false +#define INVERT_Z_DIR true // @section extruder @@ -857,28 +900,40 @@ //#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... +#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. // Direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1] #define X_HOME_DIR -1 -#define Y_HOME_DIR -1 +#define Y_HOME_DIR 1 #define Z_HOME_DIR -1 // @section machine // The size of the print bed -#define X_BED_SIZE 200 -#define Y_BED_SIZE 200 +#if defined(X_AXIS_UPGRADE) +#define X_BED_SIZE 254 +#elif defined(X_AXIS_STANDARD) +#define X_BED_SIZE 152 +#else +#error "X_AXIS_UPGRADE or X_AXIS_STANDARD must be defined" +#endif +#define Y_BED_SIZE 150 +#if defined(ZROD_SUPER_Z) +#define Z_MAX_POS 240 +#elif defined(ZROD_STANDARD) +#define Z_MAX_POS 152 +#else +#error "ZROD_SUPER_Z or ZROD_STANDARD must be defined" +#endif // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 -#define Y_MIN_POS 0 +#define Y_MIN_POS -2 #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 200 /** * Software Endstops @@ -964,7 +1019,7 @@ * With an LCD controller the process is guided step-by-step. */ //#define AUTO_BED_LEVELING_3POINT -//#define AUTO_BED_LEVELING_LINEAR +#define AUTO_BED_LEVELING_LINEAR //#define AUTO_BED_LEVELING_BILINEAR //#define AUTO_BED_LEVELING_UBL //#define MESH_BED_LEVELING @@ -980,7 +1035,7 @@ * Turn on with the command 'M111 S32'. * NOTE: Requires a lot of PROGMEM! */ -//#define DEBUG_LEVELING_FEATURE +#define DEBUG_LEVELING_FEATURE #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, @@ -1009,8 +1064,12 @@ #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if ENABLED(AUTO_BED_LEVELING_LINEAR) + #define ENABLE_LEVELING_FADE_HEIGHT +#endif + // Set the number of grid points per dimension. - #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_X 2 #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X // Set the boundaries for probing (where the probe can reach). @@ -1018,6 +1077,10 @@ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE) //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE) + #define LEFT_PROBE_BED_POSITION (X_MIN_POS+X_PROBE_OFFSET_FROM_EXTRUDER) + #define RIGHT_PROBE_BED_POSITION (X_MAX_POS-10) + #define FRONT_PROBE_BED_POSITION (Y_MIN_POS+10) + #define BACK_PROBE_BED_POSITION (Y_MAX_POS-10) // Probe along the Y axis, advancing X after each column //#define PROBE_Y_FIRST @@ -1083,6 +1146,12 @@ //#define PROBE_PT_2_Y 20 //#define PROBE_PT_3_X 170 //#define PROBE_PT_3_Y 20 + #define PROBE_PT_1_X (X_MIN_POS+X_PROBE_OFFSET_FROM_EXTRUDER) + #define PROBE_PT_1_Y (Y_MAX_POS-10) + #define PROBE_PT_2_X (X_MIN_POS+X_PROBE_OFFSET_FROM_EXTRUDER) + #define PROBE_PT_2_Y (Y_MIN_POS+10) + #define PROBE_PT_3_X (X_MAX_POS-10) + #define PROBE_PT_3_Y (Y_MIN_POS+10) #endif /** @@ -1108,7 +1177,7 @@ * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. */ -//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" +//#define Z_PROBE_END_SCRIPT "G1 Z4 F360" // @section homing @@ -1131,7 +1200,7 @@ // - 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 +#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). @@ -1140,7 +1209,7 @@ // Homing speeds (mm/m) #define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) +#define HOMING_FEEDRATE_Z (6*60) // @section calibrate @@ -1213,7 +1282,7 @@ // 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 EEPROM_SETTINGS // Enable for M500 and M501 commands +#define EEPROM_SETTINGS // Enable for M500 and M501 commands //#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. @@ -1245,13 +1314,13 @@ // @section temperature // Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 +#define PREHEAT_1_TEMP_HOTEND 215 +#define PREHEAT_1_TEMP_BED 60 +#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 #define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 +#define PREHEAT_2_TEMP_BED 85 +#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 /** * Nozzle Park @@ -1264,7 +1333,7 @@ * P1 Raise the nozzle always to Z-park height. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. */ -//#define NOZZLE_PARK_FEATURE +#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z } @@ -1416,7 +1485,7 @@ * you must uncomment the following option or it won't work. * */ -//#define SDSUPPORT +#define SDSUPPORT /** * SD CARD: SPI SPEED @@ -1488,7 +1557,7 @@ // // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. // -//#define INDIVIDUAL_AXIS_HOMING_MENU +#define INDIVIDUAL_AXIS_HOMING_MENU // // SPEAKER/BUZZER @@ -1646,7 +1715,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 // // ReprapWorld Graphical LCD @@ -1867,14 +1936,15 @@ #endif // Support for Adafruit Neopixel LED driver -//#define NEOPIXEL_LED +#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + /* EinsyRambo PLUG3-PIN9 (PJ5) */ + #define NEOPIXEL_PIN 76 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup + #define NEOPIXEL_BRIGHTNESS 255 // Initial brightness (0-255) + #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup #endif /** --- ./Marlin/Configuration_adv.h.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/Configuration_adv.h 2018-08-23 07:31:40.509125466 -0600 @@ -237,7 +237,7 @@ * 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 E0_AUTO_FAN_PIN 8 #define E1_AUTO_FAN_PIN -1 #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 @@ -444,7 +444,7 @@ // // Use Junction Deviation instead of traditional Jerk Limiting // -//#define JUNCTION_DEVIATION +#define JUNCTION_DEVIATION #if ENABLED(JUNCTION_DEVIATION) #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge #endif @@ -482,7 +482,7 @@ */ //#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 +#define DAC_MOTOR_CURRENT_DEFAULT { 80, 70, 90, 80 } // Default drive percent - X, Y, Z, E axis // Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) //#define DIGIPOT_I2C @@ -531,7 +531,7 @@ //#define LCD_TIMEOUT_TO_STATUS 15000 // Add an 'M73' G-code to set the current percentage -//#define LCD_SET_PROGRESS_MANUALLY +#define LCD_SET_PROGRESS_MANUALLY #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY) //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing @@ -617,11 +617,11 @@ * - 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 + #define SDCARD_SORT_ALPHA // SD Card Sorting options #if ENABLED(SDCARD_SORT_ALPHA) - #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define SDSORT_LIMIT 100 // 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. @@ -633,10 +633,10 @@ #endif // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT + #define LONG_FILENAME_HOST_SUPPORT // Enable this option to scroll long filenames in the SD card menu - //#define SCROLL_LONG_FILENAMES + #define SCROLL_LONG_FILENAMES /** * This option allows you to abort SD printing when any endstop is triggered. @@ -650,7 +650,7 @@ * On print completion the LCD Menu will open with the file selected. * You can just click to start the print, or navigate elsewhere. */ - //#define SD_REPRINT_LAST_SELECTED_FILE + #define SD_REPRINT_LAST_SELECTED_FILE /** * Auto-report SdCard status with M27 S @@ -739,7 +739,7 @@ * * Warning: Does not respect endstops! */ -//#define BABYSTEPPING +#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 @@ -769,9 +769,9 @@ * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. * Mention @Sebastianv650 on GitHub to alert the author of any issues. */ -//#define LIN_ADVANCE +#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + #define LIN_ADVANCE_K 0 // Unit: mm compression per 1mm/s extruder speed //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif @@ -940,14 +940,14 @@ * Note that M207 / M208 / M209 settings are saved to EEPROM. * */ -//#define FWRETRACT // ONLY PARTIALLY TESTED +#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_LENGTH 0.8 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 3 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 16 // Default feedrate for retracting (mm/s) + #define RETRACT_ZLIFT 0.2 // 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) @@ -973,7 +973,7 @@ * Requires NOZZLE_PARK_FEATURE. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. */ -//#define ADVANCED_PAUSE_FEATURE +#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. @@ -1093,14 +1093,18 @@ */ #if HAS_TRINAMIC +#if MB(EINSY_RAMBO) + #define R_SENSE 0.22 +#else #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 +#endif #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. + #define X_CURRENT 540 // rms current in mA. Multiply by 1.41 for peak current. #define X_MICROSTEPS 16 // 0..256 - #define Y_CURRENT 800 + #define Y_CURRENT 540 #define Y_MICROSTEPS 16 #define Z_CURRENT 800 @@ -1115,7 +1119,7 @@ #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 - #define E0_CURRENT 800 + #define E0_CURRENT 500 #define E0_MICROSTEPS 16 #define E1_CURRENT 800 @@ -1144,7 +1148,7 @@ * Use Trinamic's ultra quiet stepping mode. * When disabled, Marlin will use spreadCycle stepping mode. */ - #define STEALTHCHOP + //#define STEALTHCHOP /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, @@ -1440,7 +1444,7 @@ /** * Disable all Volumetric extrusion options */ -//#define NO_VOLUMETRICS +#define NO_VOLUMETRICS #if DISABLED(NO_VOLUMETRICS) /** @@ -1460,7 +1464,7 @@ * - M206 and M428 are disabled. * - G92 will revert to its behavior from Marlin 1.0. */ -//#define NO_WORKSPACE_OFFSETS +#define NO_WORKSPACE_OFFSETS /** * Set the number of proportional font spaces required to fill up a typical character space. @@ -1479,7 +1483,7 @@ /** * User-defined menu items that execute custom GCode */ -//#define CUSTOM_USER_MENUS +#define CUSTOM_USER_MENUS #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK --- ./Marlin/Makefile.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/Makefile 2018-08-01 01:13:30.164371535 -0600 @@ -87,7 +87,7 @@ U8GLIB ?= 1 # this defines whether to add a workaround for the avr-gcc relocation bug # https://www.stix.id.au/wiki/AVR_relocation_truncations_workaround -RELOC_WORKAROUND ?= 1 +RELOC_WORKAROUND ?= 0 ############################################################################ # Below here nothing should be changed... @@ -221,14 +221,19 @@ else ifeq ($(HARDWARE_MOTHERBOARD),703) # Megatronics v3.1 else ifeq ($(HARDWARE_MOTHERBOARD),704) # Rambo +HARDWARE_SUB_VARIANT ?= rambo else ifeq ($(HARDWARE_MOTHERBOARD),301) # Mini-Rambo +HARDWARE_SUB_VARIANT ?= rambo else ifeq ($(HARDWARE_MOTHERBOARD),302) # Mini-Rambo 1.0a +HARDWARE_SUB_VARIANT ?= rambo else ifeq ($(HARDWARE_MOTHERBOARD),303) # Einsy Rambo +HARDWARE_SUB_VARIANT ?= rambo else ifeq ($(HARDWARE_MOTHERBOARD),304) # Einsy Retro +HARDWARE_SUB_VARIANT ?= rambo else ifeq ($(HARDWARE_MOTHERBOARD),305) # Elefu Ra Board (v3) else ifeq ($(HARDWARE_MOTHERBOARD),21) @@ -411,31 +416,49 @@ TARGET = $(notdir $(CURDIR)) VPATH = . VPATH += $(BUILD_DIR) +ifeq ($(HARDWARE_VARIANT), Teensy) +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/avr/cores/teensy +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/avr/libraries/Wire +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/avr/libraries/Wire/utility +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/avr/libraries/SPI +else +VPATH += $(HOME)/.arduino15/packages/arduino/hardware/avr/1.6.21/cores/arduino +VPATH += $(HOME)/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/SPI +VPATH += $(HOME)/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/SPI/src VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino - VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src +VPATH += $(HARDWARE_DIR)/arduino/hardware/teensy/avr/libraries/SPI +endif ifeq ($(LIQUID_TWI2), 1) VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2 +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src/utility +VPATH += $(HOME)/Arduino/libraries/LiquidTWI2 endif ifeq ($(WIRE), 1) -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src/utility +VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/avr/libraries/Wire/src endif ifeq ($(NEOPIXEL), 1) -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel +VPATH += $(HOME)/Arduino/libraries/Adafruit_NeoPixel +CXXSRC += leds.cpp neopixel.cpp Adafruit_NeoPixel.cpp endif ifeq ($(U8GLIB), 1) -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/utility +VPATH += $(HOME)/Arduino/libraries/U8glib/src +VPATH += $(HOME)/Arduino/libraries/U8glib/src/clib endif ifeq ($(HARDWARE_VARIANT), arduino) HARDWARE_SUB_VARIANT ?= mega +ifeq ($(HARDWARE_SUB_VARIANT), rambo) +VPATH += $(HOME)/.arduino15/packages/rambo/hardware/avr/1.0.1/variants/rambo +else VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT) +endif +VPATH += $(HARDWARE_DIR)/arduino/hardware/arduino/avr/libraries/SPI else ifeq ($(HARDWARE_VARIANT), Sanguino) VPATH += $(HARDWARE_DIR)/marlin/avr/variants/sanguino @@ -444,31 +467,47 @@ HARDWARE_SUB_VARIANT ?= standard VPATH += $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT) endif endif +ifeq ($(HARDWARE_VARIANT), Teensy) +SRC = wiring.c twi.c +CXXSRC = WMath.cpp HardwareSerial.cpp Print.cpp Wire.cpp +else SRC = wiring.c \ wiring_analog.c wiring_digital.c \ wiring_pulse.c \ wiring_shift.c WInterrupts.c hooks.c -ifeq ($(HARDWARE_VARIANT), Teensy) -SRC = wiring.c -VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy -endif CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp Tone.cpp +endif CXXSRC += $(wildcard *.cpp) ifeq ($(NEOPIXEL), 1) CXXSRC += Adafruit_NeoPixel.cpp endif +ifneq (0, 0) +ifneq ($(HARDWARE_VARIANT), Teensy) ifeq ($(LIQUID_TWI2), 0) CXXSRC += LiquidCrystal.cpp else SRC += twi.c CXXSRC += Wire.cpp LiquidTWI2.cpp endif +endif +endif ifeq ($(WIRE), 1) SRC += twi.c CXXSRC += Wire.cpp endif +ifeq ($(TMC2130), 1) +VPATH += $(HOME)/Arduino/libraries/TMC2130Stepper/src +VPATH += $(HOME)/Arduino/libraries/TMC2130Stepper/src/source +ifeq ($(HARDWARE_VARIANT), Teensy) +CXXSRC += SPI.cpp +endif +CXXSRC += TMC2130Stepper.cpp TMC2130Stepper_DRV_STATUS.cpp TMC2130Stepper_CHOPCONF.cpp TMC2130Stepper_GCONF.cpp +CXXSRC += TMC2130Stepper_PWMCONF.cpp TMC2130Stepper_COOLCONF.cpp TMC2130Stepper_IHOLD_IRUN.cpp +CXXSRC += SW_SPI.cpp +endif + ifeq ($(U8GLIB), 1) SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c u8g_font_data.c endif @@ -516,7 +555,7 @@ CDEFS = -DF_CPU=$(F_CPU) ${addprefix CXXDEFS = $(CDEFS) ifeq ($(HARDWARE_VARIANT), Teensy) -CDEFS += -DUSB_SERIAL +CDEFS += -DUSB_SERIAL -DUSBCON=1286 SRC += usb.c pins_teensy.c CXXSRC += usb_api.cpp endif @@ -532,7 +571,6 @@ CDEBUG = -g$(DEBUG) CWARN = -Wall -Wstrict-prototypes CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \ -fshort-enums -w -ffunction-sections -fdata-sections \ - -flto \ -DARDUINO=$(ARDUINO_VERSION) ifneq ($(HARDWARE_MOTHERBOARD),) CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} --- ./Marlin/Marlin_main.cpp.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/Marlin_main.cpp 2018-08-01 01:06:03.312111749 -0600 @@ -316,7 +316,7 @@ #include "servo.h" #endif -#if HAS_DIGIPOTSS +#if AXIS_DRIVER_TYPE(X, TMC2130) || ENABLED(SDSUPPORT) || HAS_DIGIPOTSS #include #endif @@ -539,6 +539,10 @@ uint8_t target_extruder; float zprobe_zoffset; // Initialized by settings.load() #endif +#if MB(EINSY_RAMBO) && (NUM_DIGITAL_PINS != 82) +#error "included wrong pins_arduino.h, you need rambo/pins_arduino.h" +#endif + #if HAS_ABL float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED); #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s @@ -14449,6 +14453,10 @@ void setup() { SERIAL_PROTOCOLLNPGM("start"); SERIAL_ECHO_START(); + #if AXIS_DRIVER_TYPE(X, TMC2130) || ENABLED(SDSUPPORT) || HAS_DIGIPOTSS + SPI.begin(); + #endif + // Prepare communication for TMC drivers #if HAS_DRIVER(TMC2130) tmc_init_cs_pins(); --- ./Marlin/neopixel.cpp.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/neopixel.cpp 2018-07-31 15:25:20.217331844 -0600 @@ -28,6 +28,8 @@ #if ENABLED(NEOPIXEL_LED) +#include "types.h" +#include "utility.h" #include "neopixel.h" #if ENABLED(NEOPIXEL_STARTUP_TEST) --- ./Marlin/pins_PRINTRBOARD_REVF.h.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/pins_PRINTRBOARD_REVF.h 2018-07-31 15:25:20.217331844 -0600 @@ -197,7 +197,9 @@ // // LCD / Controller // -//#define USE_INTERNAL_SD +#define USE_INTERNAL_SD +#define SDSS 20 +#define SD_DETECT_PIN 15 #if ENABLED(ULTRA_LCD) #define LCD_PINS_RS 9 // E1 JP11-11 --- ./Marlin/planner.cpp.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/planner.cpp 2018-08-01 01:50:09.023027023 -0600 @@ -1350,13 +1350,32 @@ void Planner::check_axes_activity() { #if ABL_PLANAR - float dx = rx - (X_TILT_FULCRUM), - dy = ry - (Y_TILT_FULCRUM); + float dx(rx - (X_TILT_FULCRUM)); + float dy(ry - (Y_TILT_FULCRUM)); - apply_rotation_xyz(bed_level_matrix, dx, dy, rz); - - rx = dx + X_TILT_FULCRUM; - ry = dy + Y_TILT_FULCRUM; + if ( z_fade_height != 0.0 ) + { + static float z_fade_factor = 1.0; + static float prev_rz = -999.0; + + if ( rz < z_fade_height ) + { + if ( prev_rz != rz ) + { + prev_rz = rz; + z_fade_factor = 1.0 - rz * inverse_z_fade_height; + } + + rz = bed_level_matrix.get_z_by_factor(vector_3(dx, dy, rz), z_fade_factor); + } + } + else + { + apply_rotation_xyz(bed_level_matrix, dx, dy, rz); + + rx = dx + X_TILT_FULCRUM; + ry = dy + Y_TILT_FULCRUM; + } #elif HAS_MESH @@ -1397,23 +1416,40 @@ void Planner::check_axes_activity() { #if ABL_PLANAR - matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix); - - float dx = raw[X_AXIS] - (X_TILT_FULCRUM), - dy = raw[Y_AXIS] - (Y_TILT_FULCRUM); - - apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]); - - raw[X_AXIS] = dx + X_TILT_FULCRUM; - raw[Y_AXIS] = dy + Y_TILT_FULCRUM; + if ( z_fade_height != 0.0 ) + { + const float rz(raw[Z_AXIS]); + + if ( rz < z_fade_height ) + { + matrix_3x3 inverse(matrix_3x3::transpose(bed_level_matrix)); + const float dx(raw[X_AXIS] - (X_TILT_FULCRUM)); + const float dy(raw[Y_AXIS] - (Y_TILT_FULCRUM)); + + raw[Z_AXIS] = inverse.get_z_by_factor(vector_3(dx, dy, rz), (z_fade_height - rz) / z_fade_height); + } + } + else + { + matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix); + float dx(raw[X_AXIS] - (X_TILT_FULCRUM)); + float dy(raw[Y_AXIS] - (Y_TILT_FULCRUM)); + + apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]); + + raw[X_AXIS] = dx + X_TILT_FULCRUM; + raw[Y_AXIS] = dy + Y_TILT_FULCRUM; + } #elif HAS_MESH + #if 0 #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]); #else constexpr float fade_scaling_factor = 1.0; #endif + #endif raw[Z_AXIS] -= ( #if ENABLED(MESH_BED_LEVELING) --- ./Marlin/stepper.cpp.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/stepper.cpp 2018-07-31 15:25:20.222331921 -0600 @@ -2347,7 +2347,7 @@ void Stepper::report_positions() { static const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT; - SPI.begin(); + // SPI.begin(); this should be done only once in setup() SET_OUTPUT(DIGIPOTSS_PIN); for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) { --- ./Marlin/vector_3.cpp.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/vector_3.cpp 2018-07-31 15:25:20.220331890 -0600 @@ -84,6 +84,35 @@ void vector_3::apply_rotation(matrix_3x3 z = resultZ; } +namespace { + +/* + * https://en.wikipedia.org/wiki/Identity_matrix + * + * | 1 0 0 | + * | 0 1 0 | + * | 0 0 1 | + */ + +inline float calcFact0(float n, float factor) +{ + return n * factor; +} + +inline float calcFact1(float n, float factor) +{ + return 1.0 + ((n-1.0)*factor); +} + +} // namespace + +float matrix_3x3::get_z_by_factor(vector_3 input, float factor) +{ + return input.x * calcFact0(matrix[3 * 0 + 2], factor) + + input.y * calcFact0(matrix[3 * 1 + 2], factor) + + input.z * calcFact1(matrix[3 * 2 + 2], factor); +} + void vector_3::debug(const char * const title) { serialprintPGM(title); SERIAL_PROTOCOLPGM(" x: "); --- ./Marlin/vector_3.h.orig 2018-07-31 01:30:48.000000000 -0600 +++ ./Marlin/vector_3.h 2018-07-31 15:25:20.220331890 -0600 @@ -70,6 +70,7 @@ struct matrix_3x3 { static matrix_3x3 transpose(matrix_3x3 original); void set_to_identity(); + float get_z_by_factor(vector_3 input, float factor); // factor should be 1.0 to 0.0, 1.0 occurs at z == 0.0 void debug(const char * const title); }; --- ./Marlin/ultralcd_st7920_u8glib_rrd.h.orig 2018-07-31 15:25:20.219331875 -0600 +++ ./Marlin/ultralcd_st7920_u8glib_rrd.h 2018-08-01 00:21:38.307669098 -0600 @@ -53,7 +53,7 @@ #define CPU_ST7920_DELAY_1 DELAY_NS(0) #define CPU_ST7920_DELAY_2 DELAY_NS(188) #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(MINIRAMBO) +#elif MB(MINIRAMBO) || MB(EINSY_RAMBO) #define CPU_ST7920_DELAY_1 DELAY_NS(0) #define CPU_ST7920_DELAY_2 DELAY_NS(250) #define CPU_ST7920_DELAY_3 DELAY_NS(0) --- ./Marlin/build-printrbot.sh.orig 2018-07-31 15:25:20.220331890 -0600 +++ ./Marlin/build-printrbot.sh 2018-07-31 15:25:20.220331890 -0600 @@ -0,0 +1,46 @@ +#! /bin/bash +IDE_VERSION=$(xip list ArduinoIde | cut -d/ -f2 | tr '.' '0') + +set -e + +# +# Assumptions: +# using a Ubis 13s hotend +# using a heated bed +# + +mkdir -p /var/tmp/PrintrBotFirmware + +for extruder in EXTRUDER_OLD EXTRUDER_GEARHEAD; do + extrudername=extold + [[ $extruder != EXTRUDER_GEARHEAD ]] || extrudername=extgh + for zrod in ZROD_STANDARD ZROD_SUPER_Z; do + zrodname=origz + [[ $zrod != ZROD_SUPER_Z ]] || zrodname=superz + for axis in X_AXIS_STANDARD X_AXIS_UPGRADE; do + axisname=origx + [[ $axis != X_AXIS_UPGRADE ]] || axisname=xupg + for rod in ZROD_QUARTER ZROD_FOUR_START_8MM; do + rodname=quarter + [[ $rod != ZROD_FOUR_START_8MM ]] || rodname=fs8 + for pulley in PULLEY_XY_20T PULLEY_XY_16T; do + pulleyname=20t + [[ $pulley != PULLEY_XY_16T ]] || pulleyname=16t + cat > PrintrBotConfig.h < PrintrBotConfig.h <