Merge pull request #6491 from thinkyhead/rc_cleanup_wednesday

Various cleanups for recent merges
master
Scott Lahteine 8 years ago committed by GitHub
commit f169c04604

@ -534,7 +534,7 @@
* =========================================================================== * ===========================================================================
* ============================= Z Probe Options ============================= * ============================= Z Probe Options =============================
* =========================================================================== * ===========================================================================
* @section probes * @section probes
* *
* *
* Probe Type * Probe Type

@ -2060,65 +2060,66 @@ static void clean_up_after_endstop_or_probe_move() {
#endif #endif
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
void bltouch_command(int angle) { void bltouch_command(int angle) {
servo[Z_ENDSTOP_SERVO_NR].move(angle); // Give the BL-Touch the command and wait servo[Z_ENDSTOP_SERVO_NR].move(angle); // Give the BL-Touch the command and wait
safe_delay(BLTOUCH_DELAY); safe_delay(BLTOUCH_DELAY);
} }
// /**
// The BL-Touch probes have a HAL effect sensor. The high currents switching * BLTouch probes have a Hall effect sensor. The high currents switching
// on and off cause big magnetic fields that can affect the repeatability of the * on and off cause a magnetic field that can affect the repeatability of the
// sensor. So, for BL-Touch probes, we turn off the heaters during the actual probe. * sensor. So for BLTouch probes, heaters are turned off during the probe,
// And then we quickly turn them back on after we have sampled the point * then quickly turned back on after the point is sampled.
// */
#if ENABLED(BLTOUCH_HEATERS_OFF) #if ENABLED(BLTOUCH_HEATERS_OFF)
void turn_heaters_on_or_off_for_bltouch(const bool deploy) {
static int8_t bltouch_recursion_cnt=0;
static millis_t last_emi_protection=0;
static float temps_at_entry[HOTENDS];
#if HAS_TEMP_BED
static float bed_temp_at_entry;
#endif
if (deploy && bltouch_recursion_cnt>0) // if already in the correct state, we don't need to do anything
return; // with the heaters.
if (!deploy && bltouch_recursion_cnt<1) // if already in the correct state, we don't need to do anything
return; // with the heaters.
if (deploy) { bool set_heaters_for_bltouch(const bool deploy) {
bltouch_recursion_cnt++; static bool heaters_were_disabled = false;
last_emi_protection = millis(); static millis_t next_emi_protection;
HOTEND_LOOP() temps_at_entry[e] = thermalManager.degTargetHotend(e); // save the current target temperatures static float temps_at_entry[HOTENDS];
HOTEND_LOOP() thermalManager.setTargetHotend(0, e); // so we know what to restore them to.
#if HAS_TEMP_BED #if HAS_TEMP_BED
bed_temp_at_entry = thermalManager.degTargetBed(); static float bed_temp_at_entry;
thermalManager.setTargetBed(0.0);
#endif #endif
}
else { // If called out of order or far apart something is seriously wrong
bltouch_recursion_cnt--; // the heaters are only turned back on if (deploy == heaters_were_disabled
if (bltouch_recursion_cnt==0 && ((last_emi_protection+20000L)>millis())) { // if everything is perfect. It is expected || (next_emi_protection && ELAPSED(millis(), next_emi_protection)))
HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e); // that the bltouch_recursion_cnt is zero and kill(PSTR(MSG_KILLED));
#if HAS_TEMP_BED // that the heaters were shut off less than
thermalManager.setTargetBed(bed_temp_at_entry); // 20 seconds ago if (deploy) {
next_emi_protection = millis() + 20 * 1000UL;
HOTEND_LOOP() {
temps_at_entry[e] = thermalManager.degTargetHotend(e);
thermalManager.setTargetHotend(0, e);
}
#if HAS_TEMP_BED
bed_temp_at_entry = thermalManager.degTargetBed();
thermalManager.setTargetBed(0);
#endif
}
else {
HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
#if HAS_TEMP_BED
thermalManager.setTargetBed(bed_temp_at_entry);
#endif #endif
} }
} }
}
#endif #endif // BLTOUCH_HEATERS_OFF
void set_bltouch_deployed(const bool deploy) { void set_bltouch_deployed(const bool deploy) {
#if ENABLED(BLTOUCH_HEATERS_OFF) #if ENABLED(BLTOUCH_HEATERS_OFF)
turn_heaters_on_or_off_for_bltouch(deploy); set_heaters_for_bltouch(deploy);
#endif #endif
if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered
bltouch_command(BLTOUCH_RESET); // try to reset it. bltouch_command(BLTOUCH_RESET); // try to reset it.
bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to
bltouch_command(BLTOUCH_STOW); // clear the triggered condition. bltouch_command(BLTOUCH_STOW); // clear the triggered condition.
safe_delay(1500); // wait for internal self test to complete safe_delay(1500); // Wait for internal self-test to complete.
// measured completion time was 0.65 seconds // (Measured completion time was 0.65 seconds
// after reset, deploy & stow sequence // after reset, deploy, and stow sequence)
if (TEST_BLTOUCH()) { // If it still claims to be triggered... if (TEST_BLTOUCH()) { // If it still claims to be triggered...
SERIAL_ERROR_START; SERIAL_ERROR_START;
SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH); SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
@ -2134,7 +2135,8 @@ static void clean_up_after_endstop_or_probe_move() {
} }
#endif #endif
} }
#endif
#endif // BLTOUCH
// returns false for ok and true for failure // returns false for ok and true for failure
bool set_probe_deployed(bool deploy) { bool set_probe_deployed(bool deploy) {
@ -2146,10 +2148,8 @@ static void clean_up_after_endstop_or_probe_move() {
} }
#endif #endif
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
#if ENABLED(BLTOUCH_HEATERS_OFF) set_heaters_for_bltouch(deploy);
turn_heaters_on_or_off_for_bltouch(deploy);
#endif
#endif #endif
if (endstops.z_probe_enabled == deploy) return false; if (endstops.z_probe_enabled == deploy) return false;
@ -2330,15 +2330,15 @@ static void clean_up_after_endstop_or_probe_move() {
return current_position[Z_AXIS] + zprobe_zoffset; return current_position[Z_AXIS] + zprobe_zoffset;
} }
// /**
// - Move to the given XY * - Move to the given XY
// - Deploy the probe, if not already deployed * - Deploy the probe, if not already deployed
// - Probe the bed, get the Z position * - Probe the bed, get the Z position
// - Depending on the 'stow' flag * - Depending on the 'stow' flag
// - Stow the probe, or * - Stow the probe, or
// - Raise to the BETWEEN height * - Raise to the BETWEEN height
// - Return the probed Z position * - Return the probed Z position
// */
float probe_pt(const float x, const float y, const bool stow/*=true*/, const int verbose_level/*=1*/) { float probe_pt(const float x, const float y, const bool stow/*=true*/, const int verbose_level/*=1*/) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
@ -2507,14 +2507,14 @@ static void clean_up_after_endstop_or_probe_move() {
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING) #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING)
// /**
// Enable if you prefer your output in JSON format * Enable to produce output in JSON format suitable
// suitable for SCAD or JavaScript mesh visualizers. * for SCAD or JavaScript mesh visualizers.
// *
// Visualize meshes in OpenSCAD using the included script. * Visualize meshes in OpenSCAD using the included script.
// *
// buildroot/shared/scripts/MarlinMesh.scad * buildroot/shared/scripts/MarlinMesh.scad
// */
//#define SCAD_MESH_OUTPUT //#define SCAD_MESH_OUTPUT
/** /**

@ -293,6 +293,7 @@
#define HEATER_1_MAXTEMP 245 #define HEATER_1_MAXTEMP 245
#define HEATER_2_MAXTEMP 245 #define HEATER_2_MAXTEMP 245
#define HEATER_3_MAXTEMP 245 #define HEATER_3_MAXTEMP 245
#define HEATER_4_MAXTEMP 245
#define BED_MAXTEMP 115 #define BED_MAXTEMP 115
//=========================================================================== //===========================================================================
@ -317,12 +318,16 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// FolgerTech i3-2020 // FolgerTech i3-2020
#define DEFAULT_Kp 11.50 #define DEFAULT_Kp 11.50
#define DEFAULT_Ki 0.50 #define DEFAULT_Ki 0.50
#define DEFAULT_Kd 60.00 #define DEFAULT_Kd 60.00
// Ultimaker
//#define DEFAULT_Kp 22.2
//#define DEFAULT_Ki 1.08
//#define DEFAULT_Kd 114
// MakerGear // MakerGear
//#define DEFAULT_Kp 7.0 //#define DEFAULT_Kp 7.0
//#define DEFAULT_Ki 0.1 //#define DEFAULT_Ki 0.1
@ -563,7 +568,6 @@
*/ */
//#define FIX_MOUNTED_PROBE //#define FIX_MOUNTED_PROBE
/** /**
* Z Servo Probe, such as an endstop switch on a rotating arm. * Z Servo Probe, such as an endstop switch on a rotating arm.
* NUM_SERVOS also needs to be set. This is found later in this file. Set it to * NUM_SERVOS also needs to be set. This is found later in this file. Set it to
@ -579,7 +583,7 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event //#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
@ -602,7 +606,7 @@
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
//#define Z_PROBE_SLED //#define Z_PROBE_SLED
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
/** /**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0). * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
@ -631,8 +635,10 @@
#define XY_PROBE_SPEED 7500 #define XY_PROBE_SPEED 7500
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) // Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
// Speed for the "accurate" probe of each point // Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// Use double touch for probing // Use double touch for probing
//#define PROBE_DOUBLE_TOUCH //#define PROBE_DOUBLE_TOUCH
@ -694,7 +700,6 @@
*/ */
//#define Z_MIN_PROBE_ENDSTOP //#define Z_MIN_PROBE_ENDSTOP
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
// Enable Z Probe Repeatability test to see how accurate your probe is // Enable Z Probe Repeatability test to see how accurate your probe is
@ -771,7 +776,6 @@
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
// @section machine // @section machine
// Travel limits after homing (units are in mm) // Travel limits after homing (units are in mm)
@ -804,7 +808,6 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section bedlevel
/** /**
@ -851,7 +854,6 @@
#define AUTO_BED_LEVELING_UBL #define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING //#define MESH_BED_LEVELING
/** /**
* Enable detailed logging of G28, G29, M48, etc. * Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'. * Turn on with the command 'M111 S32'.
@ -902,7 +904,6 @@
// 3 arbitrary points to probe. // 3 arbitrary points to probe.
// A simple cross-product is used to estimate the plane of the bed. // A simple cross-product is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 39 #define ABL_PROBE_PT_1_X 39
#define ABL_PROBE_PT_1_Y 170 #define ABL_PROBE_PT_1_Y 170
#define ABL_PROBE_PT_2_X 39 #define ABL_PROBE_PT_2_X 39
@ -918,16 +919,17 @@
//========================= Unified Bed Leveling ============================ //========================= Unified Bed Leveling ============================
//=========================================================================== //===========================================================================
#define UBL_MESH_INSET 1 // Mesh inset margin on print area #define UBL_MESH_INSET 1 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y 10 #define GRID_MAX_POINTS_Y 10
#define UBL_PROBE_PT_1_X 45 // These set the probe locations for when UBL does a 3-Point leveling #define UBL_PROBE_PT_1_X 45 // These set the probe locations for when UBL does a 3-Point leveling
#define UBL_PROBE_PT_1_Y 170 // of the mesh. #define UBL_PROBE_PT_1_Y 170 // of the mesh.
#define UBL_PROBE_PT_2_X 45 #define UBL_PROBE_PT_2_X 45
#define UBL_PROBE_PT_2_Y 25 #define UBL_PROBE_PT_2_Y 25
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 25 #define UBL_PROBE_PT_3_Y 25
#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_EDITING // Enable G26 mesh editing
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)
//=========================================================================== //===========================================================================
@ -1607,7 +1609,7 @@
*/ */
//#define FILAMENT_WIDTH_SENSOR //#define FILAMENT_WIDTH_SENSOR
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3) #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)

@ -327,7 +327,7 @@
// Default x offset in duplication mode (typically set to half print bed width) // Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100 #define DEFAULT_DUPLICATION_X_OFFSET 100
#endif //DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE
// Activate a solenoid on the active extruder with M380. Disable all with M381. // 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 SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
@ -419,7 +419,6 @@
* M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
*/ */
//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps //#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 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 { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
@ -587,10 +586,9 @@
*/ */
#define BABYSTEPPING #define BABYSTEPPING
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions #define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//not implemented for deltabots! #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
#define BABYSTEP_INVERT_Z false //true for inverse movements in Z #define BABYSTEP_MULTIPLICATOR 2 // Babysteps are very small. Increase for faster motion.
#define BABYSTEP_MULTIPLICATOR 2 //faster movements
//#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping //#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_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
@ -1034,7 +1032,6 @@
* (https://github.com/ameyer/Arduino-L6470) * (https://github.com/ameyer/Arduino-L6470)
*/ */
//#define HAVE_L6470DRIVER //#define HAVE_L6470DRIVER
#if ENABLED(HAVE_L6470DRIVER) #if ENABLED(HAVE_L6470DRIVER)
@ -1155,7 +1152,6 @@
*/ */
//#define EXTENDED_CAPABILITIES_REPORT //#define EXTENDED_CAPABILITIES_REPORT
/** /**
* Volumetric extrusion default state * Volumetric extrusion default state
* Activate to make volumetric extrusion the default method, * Activate to make volumetric extrusion the default method,

@ -130,7 +130,7 @@
// The following define selects which electronics board you have. // The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup // Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD #ifndef MOTHERBOARD
//#define MOTHERBOARD BOARD_RAMPS_14_EEF //#define MOTHERBOARD BOARD_RAMPS_14_EEF
#define MOTHERBOARD BOARD_RAMPS_14_EFB // gMax users please note: This is a Roxy modification. I print on glass and #define MOTHERBOARD BOARD_RAMPS_14_EFB // gMax users please note: This is a Roxy modification. I print on glass and
// I use Marlin to control the bed's temperature. So, if you have a single nozzle // I use Marlin to control the bed's temperature. So, if you have a single nozzle
// machine, this will work fine for you. You just set the // machine, this will work fine for you. You just set the
@ -327,14 +327,14 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// gMax J-Head // gMax J-Head
#define DEFAULT_Kp 15.35 #define DEFAULT_Kp 15.35
#define DEFAULT_Ki 0.85 #define DEFAULT_Ki 0.85
#define DEFAULT_Kd 69.45 #define DEFAULT_Kd 69.45
// Ultimaker // Ultimaker
// #define DEFAULT_Kp 22.2 //#define DEFAULT_Kp 22.2
// #define DEFAULT_Ki 1.08 //#define DEFAULT_Ki 1.08
// #define DEFAULT_Kd 114 //#define DEFAULT_Kd 114
// MakerGear // MakerGear
//#define DEFAULT_Kp 7.0 //#define DEFAULT_Kp 7.0
@ -474,7 +474,7 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable. // 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. // This will remove the need to poll the interrupt pins, saving many CPU cycles.
@ -548,7 +548,7 @@
* =========================================================================== * ===========================================================================
* ============================= Z Probe Options ============================= * ============================= Z Probe Options =============================
* =========================================================================== * ===========================================================================
* @section probes * @section probes
* *
* *
* Probe Type * Probe Type
@ -730,8 +730,6 @@
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow #define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 6 // Z Clearance between probe points #define Z_CLEARANCE_BETWEEN_PROBES 6 // Z Clearance between probe points
//
// For M851 give a range for adjusting the Z probe offset // For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20 #define Z_PROBE_OFFSET_RANGE_MAX 20
@ -792,9 +790,9 @@
#define X_MIN_POS 0 #define X_MIN_POS 0
#define Y_MIN_POS 0 #define Y_MIN_POS 0
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS 420 // These numbers are not accurate for an unaltered gMax 1.5+ printer. My print bed #define X_MAX_POS 420 // These numbers are not accurate for an unaltered gMax 1.5+ printer. My print bed
#define Y_MAX_POS 420 // is inset a noticable amount from the edge of the bed. Combined with the inset, #define Y_MAX_POS 420 // is inset a noticable amount from the edge of the bed. Combined with the inset,
// the nozzle can reach all cordinates of the mesh. // the nozzle can reach all cordinates of the mesh.
#define Z_MAX_POS 500 #define Z_MAX_POS 500
// If enabled, axes won't move below MIN_POS in response to movement commands. // If enabled, axes won't move below MIN_POS in response to movement commands.
@ -994,8 +992,8 @@
#define Z_SAFE_HOMING #define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING) #if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT (((X_MIN_POS+X_MAX_POS)/2)-4) // X point for Z homing when homing all axis (G28). #define Z_SAFE_HOMING_X_POINT (((X_MIN_POS + X_MAX_POS) / 2) - 4) // X point for Z homing when homing all axis (G28).
#define Z_SAFE_HOMING_Y_POINT (((Y_MIN_POS+Y_MAX_POS)/2)+4) // Y point for Z homing when homing all axis (G28). #define Z_SAFE_HOMING_Y_POINT (((Y_MIN_POS + Y_MAX_POS) / 2) + 4) // Y point for Z homing when homing all axis (G28).
#endif #endif
// Homing speeds (mm/m) // Homing speeds (mm/m)
@ -1035,7 +1033,7 @@
// //
// M100 Free Memory Watcher // M100 Free Memory Watcher
// //
#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
// //
// G20/G21 Inch mode support // G20/G21 Inch mode support
@ -1619,7 +1617,7 @@
*/ */
//#define FILAMENT_WIDTH_SENSOR //#define FILAMENT_WIDTH_SENSOR
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3) #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
@ -1633,6 +1631,6 @@
// Display filament width on the LCD status line. Status messages will expire after 5 seconds. // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
//#define FILAMENT_LCD_DISPLAY //#define FILAMENT_LCD_DISPLAY
#endif //FILAMENT_WIDTH_SENSOR #endif
#endif // CONFIGURATION_H #endif // CONFIGURATION_H

@ -361,7 +361,7 @@
// Default stepper release if idle. Set to 0 to deactivate. // 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. // 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. // Time can be set by M18 and M84.
#define DEFAULT_STEPPER_DEACTIVE_TIME 0 // usually is set to 120 seconds #define DEFAULT_STEPPER_DEACTIVE_TIME 0 // usually set to 120 seconds
#define DISABLE_INACTIVE_X true #define DISABLE_INACTIVE_X true
#define DISABLE_INACTIVE_Y 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_Z true // set to false if the nozzle will fall down on your printed part when print has finished.

@ -39,72 +39,70 @@
// Width: 112, Height: 64 // Width: 112, Height: 64
const unsigned char custom_start_bmp[896] PROGMEM = { const unsigned char custom_start_bmp[896] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x01, 0xf9, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x01, 0xf9, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0x01,
0x80, 0x00, 0x00, 0x06, 0x4d, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x01, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x06, 0x4d, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x01, 0xc0, 0x01,
0x80, 0x00, 0x00, 0x0c, 0x26, 0x00, 0x0e, 0xe7, 0x39, 0xd3, 0xe1, 0xf3, 0xe7, 0xc1, 0x80, 0x00, 0x00, 0x0c, 0x26, 0x00, 0x0e, 0xe7, 0x39, 0xd3, 0xe1, 0xf3, 0xe7, 0xc1,
0x80, 0x00, 0x00, 0x19, 0x12, 0x00, 0x0f, 0xe7, 0x39, 0xf7, 0xf3, 0xfb, 0xef, 0xe1, 0x80, 0x00, 0x00, 0x19, 0x12, 0x00, 0x0f, 0xe7, 0x39, 0xf7, 0xf3, 0xfb, 0xef, 0xe1,
0x80, 0x00, 0x00, 0x37, 0xce, 0x00, 0x0e, 0xe7, 0x01, 0xf7, 0x73, 0xb9, 0xce, 0xe1, 0x80, 0x00, 0x00, 0x37, 0xce, 0x00, 0x0e, 0xe7, 0x01, 0xf7, 0x73, 0xb9, 0xce, 0xe1,
0x80, 0x00, 0x00, 0x64, 0x66, 0x00, 0x0e, 0xe7, 0x01, 0xc7, 0xf3, 0xb9, 0xcf, 0xe1, 0x80, 0x00, 0x00, 0x64, 0x66, 0x00, 0x0e, 0xe7, 0x01, 0xc7, 0xf3, 0xb9, 0xcf, 0xe1,
0x80, 0x00, 0x00, 0x4b, 0xa6, 0x00, 0x0e, 0xe7, 0x39, 0xc7, 0xf0, 0xf9, 0xcf, 0xe1, 0x80, 0x00, 0x00, 0x4b, 0xa6, 0x00, 0x0e, 0xe7, 0x39, 0xc7, 0xf0, 0xf9, 0xcf, 0xe1,
0x80, 0x00, 0x00, 0xca, 0xb4, 0x00, 0x0f, 0xe7, 0x39, 0xc7, 0x03, 0xf9, 0xce, 0x01, 0x80, 0x00, 0x00, 0xca, 0xb4, 0x00, 0x0f, 0xe7, 0x39, 0xc7, 0x03, 0xf9, 0xce, 0x01,
0x80, 0x00, 0x00, 0xcd, 0xa4, 0x00, 0x06, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1, 0x80, 0x00, 0x00, 0xcd, 0xa4, 0x00, 0x06, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1,
0x80, 0x00, 0x03, 0xa6, 0x6c, 0x00, 0x00, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1, 0x80, 0x00, 0x03, 0xa6, 0x6c, 0x00, 0x00, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1,
0x80, 0x00, 0xff, 0x13, 0xd8, 0x00, 0x0e, 0xe3, 0xf1, 0xc7, 0xf3, 0xf9, 0xef, 0xe1, 0x80, 0x00, 0xff, 0x13, 0xd8, 0x00, 0x0e, 0xe3, 0xf1, 0xc7, 0xf3, 0xf9, 0xef, 0xe1,
0x80, 0x01, 0x21, 0x88, 0x18, 0x00, 0x0f, 0xe1, 0xe1, 0xc3, 0xe1, 0xb9, 0xe7, 0xc1, 0x80, 0x01, 0x21, 0x88, 0x18, 0x00, 0x0f, 0xe1, 0xe1, 0xc3, 0xe1, 0xb9, 0xe7, 0xc1,
0x80, 0x06, 0x61, 0x16, 0x30, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x06, 0x61, 0x16, 0x30, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x04, 0x41, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x04, 0x41, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x04, 0xfe, 0x41, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x04, 0xfe, 0x41, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x0b, 0x86, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01, 0x80, 0x0b, 0x86, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01,
0x80, 0x1e, 0x01, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01, 0x80, 0x1e, 0x01, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01,
0x80, 0x1c, 0x07, 0x22, 0x00, 0x00, 0x07, 0xbc, 0x3f, 0x9f, 0x81, 0xf8, 0xf1, 0xe1, 0x80, 0x1c, 0x07, 0x22, 0x00, 0x00, 0x07, 0xbc, 0x3f, 0x9f, 0x81, 0xf8, 0xf1, 0xe1,
0x80, 0x08, 0x1f, 0xe2, 0x00, 0x00, 0x0f, 0xfc, 0x3f, 0xbf, 0x87, 0xfe, 0x71, 0xc1, 0x80, 0x08, 0x1f, 0xe2, 0x00, 0x00, 0x0f, 0xfc, 0x3f, 0xbf, 0x87, 0xfe, 0x71, 0xc1,
0x80, 0x00, 0x33, 0x62, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1, 0x80, 0x00, 0x33, 0x62, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1,
0x80, 0x00, 0xc2, 0x22, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1, 0x80, 0x00, 0xc2, 0x22, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1,
0x80, 0x00, 0xc2, 0x3e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x80, 0x7e, 0x3b, 0x81, 0x80, 0x00, 0xc2, 0x3e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x80, 0x7e, 0x3b, 0x81,
0x80, 0x01, 0xe6, 0x1e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x83, 0xfe, 0x3f, 0x81, 0x80, 0x01, 0xe6, 0x1e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x83, 0xfe, 0x3f, 0x81,
0x80, 0x01, 0x3c, 0x12, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x87, 0x9e, 0x3b, 0x81, 0x80, 0x01, 0x3c, 0x12, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x87, 0x9e, 0x3b, 0x81,
0x80, 0x01, 0x1c, 0x26, 0x00, 0x00, 0x0f, 0xfc, 0x3d, 0xf7, 0x87, 0x9e, 0x7b, 0xc1, 0x80, 0x01, 0x1c, 0x26, 0x00, 0x00, 0x0f, 0xfc, 0x3d, 0xf7, 0x87, 0x9e, 0x7b, 0xc1,
0x80, 0x01, 0x70, 0x64, 0x00, 0x00, 0x07, 0xbc, 0x3c, 0xe7, 0x87, 0x9e, 0x7b, 0xc1, 0x80, 0x01, 0x70, 0x64, 0x00, 0x00, 0x07, 0xbc, 0x3c, 0xe7, 0x87, 0x9e, 0x7b, 0xc1,
0x80, 0x03, 0xc0, 0x58, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0xe7, 0x87, 0xfe, 0x71, 0xc1, 0x80, 0x03, 0xc0, 0x58, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0xe7, 0x87, 0xfe, 0x71, 0xc1,
0x80, 0x0d, 0x80, 0xf0, 0x00, 0x00, 0x0f, 0x3c, 0x3c, 0xe7, 0x83, 0xde, 0xf1, 0xe1, 0x80, 0x0d, 0x80, 0xf0, 0x00, 0x00, 0x0f, 0x3c, 0x3c, 0xe7, 0x83, 0xde, 0xf1, 0xe1,
0x80, 0x1a, 0x00, 0xe0, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x1a, 0x00, 0xe0, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x26, 0x00, 0x40, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x26, 0x00, 0x40, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x03, 0xc0, 0x20, 0x10, 0x00, 0x01, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x03, 0xc0, 0x20, 0x10, 0x00, 0x01,
0x83, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x20, 0x00, 0x10, 0x00, 0x01, 0x83, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x20, 0x00, 0x10, 0x00, 0x01,
0x02, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x23, 0x27, 0x39, 0x8c, 0xe1, 0x02, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x23, 0x27, 0x39, 0x8c, 0xe1,
0x06, 0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x11, 0x03, 0xc2, 0x24, 0x92, 0x49, 0x01, 0x06, 0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x11, 0x03, 0xc2, 0x24, 0x92, 0x49, 0x01,
0x04, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x02, 0x24, 0x93, 0xc8, 0xc1, 0x04, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x02, 0x24, 0x93, 0xc8, 0xc1,
0x0d, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x02, 0x24, 0x92, 0x08, 0x21, 0x0d, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x02, 0x24, 0x92, 0x08, 0x21,
0x08, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x02, 0x02, 0x24, 0x99, 0xc9, 0xc1, 0x08, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x02, 0x02, 0x24, 0x99, 0xc9, 0xc1,
0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x10, 0x30, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x0f, 0xe0, 0x0f, 0x00, 0x01, 0x10, 0x30, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x0f, 0xe0, 0x0f, 0x00, 0x01,
0x30, 0x20, 0x00, 0x37, 0x00, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01, 0x30, 0x20, 0x00, 0x37, 0x00, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01,
0x20, 0x30, 0x00, 0x6d, 0x80, 0x00, 0x00, 0x12, 0x24, 0x09, 0x88, 0x09, 0x00, 0x01, 0x20, 0x30, 0x00, 0x6d, 0x80, 0x00, 0x00, 0x12, 0x24, 0x09, 0x88, 0x09, 0x00, 0x01,
0x10, 0x18, 0x1f, 0x60, 0xc0, 0x00, 0x00, 0x12, 0x24, 0x09, 0x48, 0x09, 0x00, 0x01, 0x10, 0x18, 0x1f, 0x60, 0xc0, 0x00, 0x00, 0x12, 0x24, 0x09, 0x48, 0x09, 0x00, 0x01,
0x30, 0x0c, 0x39, 0xe0, 0x60, 0x00, 0x00, 0x12, 0x24, 0x09, 0x90, 0x09, 0x00, 0x01, 0x30, 0x0c, 0x39, 0xe0, 0x60, 0x00, 0x00, 0x12, 0x24, 0x09, 0x90, 0x09, 0x00, 0x01,
0x30, 0x07, 0x90, 0x70, 0x60, 0x00, 0x00, 0x12, 0x24, 0x08, 0x60, 0x09, 0x00, 0x01, 0x30, 0x07, 0x90, 0x70, 0x60, 0x00, 0x00, 0x12, 0x24, 0x08, 0x60, 0x09, 0x00, 0x01,
0x10, 0x16, 0xf0, 0x18, 0x20, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01, 0x10, 0x16, 0xf0, 0x18, 0x20, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01,
0x1a, 0x10, 0x60, 0x08, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0xc8, 0x09, 0x00, 0x01, 0x1a, 0x10, 0x60, 0x08, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0xc8, 0x09, 0x00, 0x01,
0x0b, 0x09, 0x80, 0x00, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0x24, 0x09, 0x00, 0x01, 0x0b, 0x09, 0x80, 0x00, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0x24, 0x09, 0x00, 0x01,
0x0e, 0x07, 0x80, 0x00, 0x10, 0x00, 0x00, 0x13, 0xe4, 0x89, 0xc4, 0x89, 0xf9, 0x01, 0x0e, 0x07, 0x80, 0x00, 0x10, 0x00, 0x00, 0x13, 0xe4, 0x89, 0xc4, 0x89, 0xf9, 0x01,
0x06, 0x1e, 0x40, 0x10, 0x10, 0x00, 0x00, 0x10, 0x05, 0xc8, 0x09, 0xc8, 0x0b, 0x81, 0x06, 0x1e, 0x40, 0x10, 0x10, 0x00, 0x00, 0x10, 0x05, 0xc8, 0x09, 0xc8, 0x0b, 0x81,
0x06, 0x00, 0x40, 0x20, 0x10, 0x00, 0x00, 0x0f, 0xf8, 0x8f, 0xf0, 0x8f, 0xf9, 0x01, 0x06, 0x00, 0x40, 0x20, 0x10, 0x00, 0x00, 0x0f, 0xf8, 0x8f, 0xf0, 0x8f, 0xf9, 0x01,
0x03, 0x80, 0x00, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x80, 0x00, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x01, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
}; };

@ -408,6 +408,9 @@
#ifndef MSG_ZPROBE_OUT #ifndef MSG_ZPROBE_OUT
#define MSG_ZPROBE_OUT _UxGT("Z probe out. bed") #define MSG_ZPROBE_OUT _UxGT("Z probe out. bed")
#endif #endif
#ifndef MSG_BLTOUCH
#define MSG_BLTOUCH _UxGT("BLTouch")
#endif
#ifndef MSG_BLTOUCH_SELFTEST #ifndef MSG_BLTOUCH_SELFTEST
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#endif #endif

@ -21,13 +21,13 @@
*/ */
/** /**
* Least Squares Best Fit By Roxy and Ed Williams * Least Squares Best Fit by Roxy and Ed Williams
* *
* This algorithm is high speed and has a very small code footprint. * This algorithm is high speed and has a very small code footprint.
* Its results are identical to both the Iterative Least-Squares published * Its results are identical to both the Iterative Least-Squares published
* earlier by Roxy and the QR_SOLVE solution. If used in place of QR_SOLVE * earlier by Roxy and the QR_SOLVE solution. If used in place of QR_SOLVE
* it saves roughly 10K of program memory. It also does not require all of * it saves roughly 10K of program memory. It also does not require all of
* coordinates to be present during the calculations. Each point can be * coordinates to be present during the calculations. Each point can be
* probed and then discarded. * probed and then discarded.
* *
*/ */
@ -41,56 +41,44 @@
#include "least_squares_fit.h" #include "least_squares_fit.h"
void incremental_LSF_reset(struct linear_fit_data *lsf) { void incremental_LSF_reset(struct linear_fit_data *lsf) { ZERO(lsf); }
lsf->n = 0;
lsf->A = 0.0; // probably a memset() can be done to zero
lsf->B = 0.0; // this whole structure
lsf->D = 0.0;
lsf->xbar = lsf->ybar = lsf->zbar = 0.0;
lsf->x2bar = lsf->y2bar = lsf->z2bar = 0.0;
lsf->xybar = lsf->xzbar = lsf->yzbar = 0.0;
lsf->max_absx = lsf->max_absy = 0.0;
}
void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) { void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
lsf->xbar += x; lsf->xbar += x;
lsf->ybar += y; lsf->ybar += y;
lsf->zbar += z; lsf->zbar += z;
lsf->x2bar += x*x; lsf->x2bar += sq(x);
lsf->y2bar += y*y; lsf->y2bar += sq(y);
lsf->z2bar += z*z; lsf->z2bar += sq(z);
lsf->xybar += x*y; lsf->xybar += sq(x);
lsf->xzbar += x*z; lsf->xzbar += sq(x);
lsf->yzbar += y*z; lsf->yzbar += sq(y);
lsf->max_absx = (fabs(x) > lsf->max_absx) ? fabs(x) : lsf->max_absx; lsf->max_absx = max(fabs(x), lsf->max_absx);
lsf->max_absy = (fabs(y) > lsf->max_absy) ? fabs(y) : lsf->max_absy; lsf->max_absy = max(fabs(y), lsf->max_absy);
lsf->n++; lsf->n++;
return; }
}
int finish_incremental_LSF(struct linear_fit_data *lsf) { int finish_incremental_LSF(struct linear_fit_data *lsf) {
float DD, N; const float N = (float)lsf->n;
N = (float) lsf->n; lsf->xbar /= N;
lsf->xbar /= N; lsf->ybar /= N;
lsf->ybar /= N; lsf->zbar /= N;
lsf->zbar /= N; lsf->x2bar = lsf->x2bar / N - lsf->xbar * lsf->xbar;
lsf->x2bar = lsf->x2bar/N - lsf->xbar*lsf->xbar; lsf->y2bar = lsf->y2bar / N - lsf->ybar * lsf->ybar;
lsf->y2bar = lsf->y2bar/N - lsf->ybar*lsf->ybar; lsf->z2bar = lsf->z2bar / N - lsf->zbar * lsf->zbar;
lsf->z2bar = lsf->z2bar/N - lsf->zbar*lsf->zbar; lsf->xybar = lsf->xybar / N - lsf->xbar * lsf->ybar;
lsf->xybar = lsf->xybar/N - lsf->xbar*lsf->ybar; lsf->yzbar = lsf->yzbar / N - lsf->ybar * lsf->zbar;
lsf->yzbar = lsf->yzbar/N - lsf->ybar*lsf->zbar; lsf->xzbar = lsf->xzbar / N - lsf->xbar * lsf->zbar;
lsf->xzbar = lsf->xzbar/N - lsf->xbar*lsf->zbar;
DD = lsf->x2bar*lsf->y2bar - lsf->xybar*lsf->xybar; const float DD = lsf->x2bar * lsf->y2bar - sq(lsf->xybar);
if (fabs(DD) <= 1e-10*(lsf->max_absx+lsf->max_absy)) if (fabs(DD) <= 1e-10 * (lsf->max_absx + lsf->max_absy))
return -1; return -1;
lsf->A = (lsf->yzbar*lsf->xybar - lsf->xzbar*lsf->y2bar) / DD; lsf->A = (lsf->yzbar * lsf->xybar - lsf->xzbar * lsf->y2bar) / DD;
lsf->B = (lsf->xzbar*lsf->xybar - lsf->yzbar*lsf->x2bar) / DD; lsf->B = (lsf->xzbar * lsf->xybar - lsf->yzbar * lsf->x2bar) / DD;
lsf->D = -(lsf->zbar + lsf->A*lsf->xbar + lsf->B*lsf->ybar); lsf->D = -(lsf->zbar + lsf->A * lsf->xbar + lsf->B * lsf->ybar);
return 0; return 0;
} }
#endif
#endif // AUTO_BED_LEVELING_UBL

@ -42,11 +42,11 @@
struct linear_fit_data { struct linear_fit_data {
int n; int n;
float xbar, ybar, zbar; float xbar, ybar, zbar,
float x2bar, y2bar, z2bar; x2bar, y2bar, z2bar,
float xybar, xzbar, yzbar; xybar, xzbar, yzbar,
float max_absx, max_absy; max_absx, max_absy,
float A, B, D; A, B, D;
}; };
void incremental_LSF_reset(struct linear_fit_data *); void incremental_LSF_reset(struct linear_fit_data *);

@ -19,11 +19,11 @@ bool fastDigitalRead(uint8_t pin) {
*/ */
static inline __attribute__((always_inline)) static inline __attribute__((always_inline))
void fastDigitalWrite(uint8_t pin, bool value) { void fastDigitalWrite(uint8_t pin, bool value) {
if (value) { if (value) {
*portSetRegister(pin) = 1; *portSetRegister(pin) = 1;
} else { } else {
*portClearRegister(pin) = 1; *portClearRegister(pin) = 1;
} }
} }
#else // CORE_TEENSY #else // CORE_TEENSY
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -574,7 +574,7 @@ class DigitalPin {
/** Parenthesis operator /** Parenthesis operator
* @return Pin's level * @return Pin's level
*/ */
inline operator bool () const __attribute__((always_inline)) { inline operator bool () const __attribute__((always_inline)) {
return read(); return read();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

@ -91,11 +91,6 @@
public: public:
//
// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
// functions that call STATIC functions.
//
void find_mean_mesh_height(); void find_mean_mesh_height();
void shift_mesh_height(); void shift_mesh_height();
void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest); void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest);
@ -105,22 +100,12 @@
void save_ubl_active_state_and_disable(); void save_ubl_active_state_and_disable();
void restore_ubl_active_state_and_leave(); void restore_ubl_active_state_and_leave();
void g29_what_command(); void g29_what_command();
//
// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
// functions that call STATIC functions.
//
void g29_eeprom_dump() ; void g29_eeprom_dump() ;
void g29_compare_current_mesh_to_stored_mesh(); void g29_compare_current_mesh_to_stored_mesh();
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map); void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map);
void smart_fill_mesh(); void smart_fill_mesh();
void display_map(const int); void display_map(const int);
void reset(); void reset();
//
// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
// functions that call STATIC functions.
//
void invalidate(); void invalidate();
void store_state(); void store_state();
void load_state(); void load_state();
@ -134,25 +119,27 @@
// 15 is the maximum nubmer of grid points supported + 1 safety margin for now, // 15 is the maximum nubmer of grid points supported + 1 safety margin for now,
// until determinism prevails // until determinism prevails
constexpr static float mesh_index_to_xpos[16] PROGMEM = { UBL_MESH_MIN_X+0*(MESH_X_DIST), constexpr static float mesh_index_to_xpos[16] PROGMEM = {
UBL_MESH_MIN_X+1*(MESH_X_DIST), UBL_MESH_MIN_X+2*(MESH_X_DIST), UBL_MESH_MIN_X + 0 * (MESH_X_DIST), UBL_MESH_MIN_X + 1 * (MESH_X_DIST),
UBL_MESH_MIN_X+3*(MESH_X_DIST), UBL_MESH_MIN_X+4*(MESH_X_DIST), UBL_MESH_MIN_X + 2 * (MESH_X_DIST), UBL_MESH_MIN_X + 3 * (MESH_X_DIST),
UBL_MESH_MIN_X+5*(MESH_X_DIST), UBL_MESH_MIN_X+6*(MESH_X_DIST), UBL_MESH_MIN_X + 4 * (MESH_X_DIST), UBL_MESH_MIN_X + 5 * (MESH_X_DIST),
UBL_MESH_MIN_X+7*(MESH_X_DIST), UBL_MESH_MIN_X+8*(MESH_X_DIST), UBL_MESH_MIN_X + 6 * (MESH_X_DIST), UBL_MESH_MIN_X + 7 * (MESH_X_DIST),
UBL_MESH_MIN_X+9*(MESH_X_DIST), UBL_MESH_MIN_X+10*(MESH_X_DIST), UBL_MESH_MIN_X + 8 * (MESH_X_DIST), UBL_MESH_MIN_X + 9 * (MESH_X_DIST),
UBL_MESH_MIN_X+11*(MESH_X_DIST), UBL_MESH_MIN_X+12*(MESH_X_DIST), UBL_MESH_MIN_X + 10 * (MESH_X_DIST), UBL_MESH_MIN_X + 11 * (MESH_X_DIST),
UBL_MESH_MIN_X+13*(MESH_X_DIST), UBL_MESH_MIN_X+14*(MESH_X_DIST), UBL_MESH_MIN_X + 12 * (MESH_X_DIST), UBL_MESH_MIN_X + 13 * (MESH_X_DIST),
UBL_MESH_MIN_X+15*(MESH_X_DIST) }; UBL_MESH_MIN_X + 14 * (MESH_X_DIST), UBL_MESH_MIN_X + 15 * (MESH_X_DIST)
};
constexpr static float mesh_index_to_ypos[16] PROGMEM = { UBL_MESH_MIN_Y+0*(MESH_Y_DIST),
UBL_MESH_MIN_Y+1*(MESH_Y_DIST), UBL_MESH_MIN_Y+2*(MESH_Y_DIST), constexpr static float mesh_index_to_ypos[16] PROGMEM = {
UBL_MESH_MIN_Y+3*(MESH_Y_DIST), UBL_MESH_MIN_Y+4*(MESH_Y_DIST), UBL_MESH_MIN_Y + 0 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 1 * (MESH_Y_DIST),
UBL_MESH_MIN_Y+5*(MESH_Y_DIST), UBL_MESH_MIN_Y+6*(MESH_Y_DIST), UBL_MESH_MIN_Y + 2 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 3 * (MESH_Y_DIST),
UBL_MESH_MIN_Y+7*(MESH_Y_DIST), UBL_MESH_MIN_Y+8*(MESH_Y_DIST), UBL_MESH_MIN_Y + 4 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 5 * (MESH_Y_DIST),
UBL_MESH_MIN_Y+9*(MESH_Y_DIST), UBL_MESH_MIN_Y+10*(MESH_Y_DIST), UBL_MESH_MIN_Y + 6 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 7 * (MESH_Y_DIST),
UBL_MESH_MIN_Y+11*(MESH_Y_DIST), UBL_MESH_MIN_Y+12*(MESH_Y_DIST), UBL_MESH_MIN_Y + 8 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 9 * (MESH_Y_DIST),
UBL_MESH_MIN_Y+13*(MESH_Y_DIST), UBL_MESH_MIN_Y+14*(MESH_Y_DIST), UBL_MESH_MIN_Y + 10 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 11 * (MESH_Y_DIST),
UBL_MESH_MIN_Y+15*(MESH_Y_DIST) }; UBL_MESH_MIN_Y + 12 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 13 * (MESH_Y_DIST),
UBL_MESH_MIN_Y + 14 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 15 * (MESH_Y_DIST)
};
static bool g26_debug_flag, has_control_of_lcd_panel; static bool g26_debug_flag, has_control_of_lcd_panel;
@ -163,11 +150,6 @@
unified_bed_leveling(); unified_bed_leveling();
//
// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
// functions that call STATIC functions.
//
FORCE_INLINE void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; } FORCE_INLINE void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
int8_t get_cell_index_x(const float &x) { int8_t get_cell_index_x(const float &x) {
const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST)); const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
@ -184,11 +166,6 @@
// that is OK because something else should be keeping that from // that is OK because something else should be keeping that from
// happening and should not be worried about at this level. // happening and should not be worried about at this level.
//
// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
// functions that call STATIC functions.
//
int8_t find_closest_x_index(const float &x) { int8_t find_closest_x_index(const float &x) {
const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST)); const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1; return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
@ -217,11 +194,6 @@
FORCE_INLINE float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) { FORCE_INLINE float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1); return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1);
} }
//
// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
// functions that call STATIC functions.
//
/** /**
* z_correction_for_x_on_horizontal_mesh_line is an optimization for * z_correction_for_x_on_horizontal_mesh_line is an optimization for

@ -54,7 +54,6 @@
bool ProbeStay = true; bool ProbeStay = true;
#define SIZE_OF_LITTLE_RAISE 0 #define SIZE_OF_LITTLE_RAISE 0
#define BIG_RAISE_NOT_NEEDED 0 #define BIG_RAISE_NOT_NEEDED 0
extern void lcd_quick_feedback(); extern void lcd_quick_feedback();

@ -34,10 +34,6 @@
#include "buzzer.h" #include "buzzer.h"
#endif #endif
#if ENABLED(BLTOUCH)
#include "endstops.h"
#endif
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
#include "printcounter.h" #include "printcounter.h"
#include "duration_t.h" #include "duration_t.h"
@ -723,6 +719,28 @@ void kill_screen(const char* lcd_msg) {
#endif // MENU_ITEM_CASE_LIGHT #endif // MENU_ITEM_CASE_LIGHT
#if ENABLED(BLTOUCH)
/**
*
* "BLTouch" submenu
*
*/
static void bltouch_menu() {
START_MENU();
//
// ^ Main
//
MENU_BACK(MSG_MAIN);
MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY)));
MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW)));
END_MENU();
}
#endif // BLTOUCH
#if ENABLED(LCD_PROGRESS_BAR_TEST) #if ENABLED(LCD_PROGRESS_BAR_TEST)
static void progress_bar_test() { static void progress_bar_test() {
@ -792,8 +810,7 @@ void kill_screen(const char* lcd_msg) {
#endif #endif
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
if (!endstops.z_probe_enabled && TEST_BLTOUCH()) MENU_ITEM(submenu, MSG_BLTOUCH, bltouch_menu);
MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
#endif #endif
if (planner.movesplanned() || IS_SD_PRINTING) { if (planner.movesplanned() || IS_SD_PRINTING) {

@ -31,7 +31,7 @@ void safe_delay(millis_t ms) {
thermalManager.manage_heater(); thermalManager.manage_heater();
} }
delay(ms); delay(ms);
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
} }
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)

Loading…
Cancel
Save