Pin status from 0 - 255
- * I Flag to ignore Marlin's pin protection
*/
inline void gcode_M42() {
if (!parser.seenval('S')) return;
const byte pin_status = parser.value_byte();
- const pin_t pin_number = parser.byteval('P', LED_PIN);
+ const int pin_number = parser.intval('P', LED_PIN);
if (pin_number < 0) return;
- if (!parser.boolval('I') && pin_is_protected(pin_number)) return protected_pin_err();
+ if (pin_is_protected(pin_number)) {
+ SERIAL_ERROR_START();
+ SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN);
+ return;
+ }
pinMode(pin_number, OUTPUT);
digitalWrite(pin_number, pin_status);
@@ -7671,21 +6969,21 @@ inline void gcode_M42() {
#include "pinsDebug.h"
inline void toggle_pins() {
- const bool ignore_protection = parser.boolval('I');
+ const bool I_flag = parser.boolval('I');
const int repeat = parser.intval('R', 1),
start = parser.intval('S'),
end = parser.intval('L', NUM_DIGITAL_PINS - 1),
wait = parser.intval('W', 500);
for (uint8_t pin = start; pin <= end; pin++) {
- //report_pin_state_extended(pin, ignore_protection, false);
+ //report_pin_state_extended(pin, I_flag, false);
- if (!ignore_protection && pin_is_protected(pin)) {
- report_pin_state_extended(pin, ignore_protection, true, "Untouched ");
+ if (!I_flag && pin_is_protected(pin)) {
+ report_pin_state_extended(pin, I_flag, true, "Untouched ");
SERIAL_EOL();
}
else {
- report_pin_state_extended(pin, ignore_protection, true, "Pulsing ");
+ report_pin_state_extended(pin, I_flag, true, "Pulsing ");
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
if (pin == TEENSY_E2) {
SET_OUTPUT(TEENSY_E2);
@@ -7727,14 +7025,14 @@ inline void gcode_M42() {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM("SERVO not setup");
- #elif !HAS_Z_SERVO_PROBE
+ #elif !HAS_Z_SERVO_ENDSTOP
SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM("Z_PROBE_SERVO_NR not setup");
+ SERIAL_ERRORLNPGM("Z_ENDSTOP_SERVO_NR not setup");
- #else // HAS_Z_SERVO_PROBE
+ #else // HAS_Z_SERVO_ENDSTOP
- const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR);
+ const uint8_t probe_index = parser.byteval('P', Z_ENDSTOP_SERVO_NR);
SERIAL_PROTOCOLLNPGM("Servo probe test");
SERIAL_PROTOCOLLNPAIR(". using index: ", probe_index);
@@ -7789,6 +7087,8 @@ inline void gcode_M42() {
}
if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
+ refresh_cmd_timeout();
+
if (deploy_state != stow_state) {
SERIAL_PROTOCOLLNPGM("BLTouch clone detected");
if (deploy_state) {
@@ -7815,7 +7115,8 @@ inline void gcode_M42() {
safe_delay(2);
- if (0 == j % (500 * 1)) reset_stepper_timeout(); // Keep steppers powered
+ if (0 == j % (500 * 1)) // keep cmd_timeout happy
+ refresh_cmd_timeout();
if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered
@@ -7879,9 +7180,9 @@ inline void gcode_M42() {
// Enable or disable endstop monitoring
if (parser.seen('E')) {
- endstops.monitor_flag = parser.value_bool();
+ endstop_monitor_flag = parser.value_bool();
SERIAL_PROTOCOLPGM("endstop monitor ");
- serialprintPGM(endstops.monitor_flag ? PSTR("en") : PSTR("dis"));
+ serialprintPGM(endstop_monitor_flag ? PSTR("en") : PSTR("dis"));
SERIAL_PROTOCOLLNPGM("abled");
return;
}
@@ -7892,8 +7193,8 @@ inline void gcode_M42() {
}
// Get the range of pins to test or watch
- const pin_t first_pin = parser.byteval('P'),
- last_pin = parser.seenval('P') ? first_pin : NUM_DIGITAL_PINS - 1;
+ const uint8_t first_pin = parser.byteval('P'),
+ last_pin = parser.seenval('P') ? first_pin : NUM_DIGITAL_PINS - 1;
if (first_pin > last_pin) return;
@@ -7903,8 +7204,8 @@ inline void gcode_M42() {
if (parser.boolval('W')) {
SERIAL_PROTOCOLLNPGM("Watching pins");
byte pin_state[last_pin - first_pin + 1];
- for (pin_t pin = first_pin; pin <= last_pin; pin++) {
- if (!ignore_protection && pin_is_protected(pin)) continue;
+ for (int8_t pin = first_pin; pin <= last_pin; pin++) {
+ if (pin_is_protected(pin) && !ignore_protection) continue;
pinMode(pin, INPUT_PULLUP);
delay(1);
/*
@@ -7921,8 +7222,8 @@ inline void gcode_M42() {
#endif
for (;;) {
- for (pin_t pin = first_pin; pin <= last_pin; pin++) {
- if (!ignore_protection && pin_is_protected(pin)) continue;
+ for (int8_t pin = first_pin; pin <= last_pin; pin++) {
+ if (pin_is_protected(pin) && !ignore_protection) continue;
const byte val =
/*
IS_ANALOG(pin)
@@ -7949,7 +7250,7 @@ inline void gcode_M42() {
}
// Report current state of selected pin(s)
- for (pin_t pin = first_pin; pin <= last_pin; pin++)
+ for (uint8_t pin = first_pin; pin <= last_pin; pin++)
report_pin_state_extended(pin, ignore_protection, true);
}
@@ -7961,7 +7262,7 @@ inline void gcode_M42() {
* M48: Z probe repeatability measurement function.
*
* Usage:
- * M48
+ * M48
* P = Number of sampled points (4-50, default 10)
* X = Sample X position
* Y = Sample Y position
@@ -7991,7 +7292,7 @@ inline void gcode_M42() {
return;
}
- const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE;
+ const bool stow_probe_after_each = parser.boolval('E');
float X_current = current_position[X_AXIS],
Y_current = current_position[Y_AXIS];
@@ -7999,10 +7300,21 @@ inline void gcode_M42() {
const float X_probe_location = parser.linearval('X', X_current + X_PROBE_OFFSET_FROM_EXTRUDER),
Y_probe_location = parser.linearval('Y', Y_current + Y_PROBE_OFFSET_FROM_EXTRUDER);
- if (!position_is_reachable_by_probe(X_probe_location, Y_probe_location)) {
- SERIAL_PROTOCOLLNPGM("? (X,Y) out of bounds.");
- return;
- }
+ #if DISABLED(DELTA)
+ if (!WITHIN(X_probe_location, MIN_PROBE_X, MAX_PROBE_X)) {
+ out_of_range_error(PSTR("X"));
+ return;
+ }
+ if (!WITHIN(Y_probe_location, MIN_PROBE_Y, MAX_PROBE_Y)) {
+ out_of_range_error(PSTR("Y"));
+ return;
+ }
+ #else
+ if (!position_is_reachable_by_probe(X_probe_location, Y_probe_location)) {
+ SERIAL_PROTOCOLLNPGM("? (X,Y) location outside of probeable radius.");
+ return;
+ }
+ #endif
bool seen_L = parser.seen('L');
uint8_t n_legs = seen_L ? parser.value_byte() : 0;
@@ -8032,10 +7344,10 @@ inline void gcode_M42() {
setup_for_endstop_or_probe_move();
- float mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples];
+ double mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples];
// Move to the first point, deploy, and probe
- const float t = probe_pt(X_probe_location, Y_probe_location, raise_after, verbose_level);
+ const float t = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level);
bool probing_good = !isnan(t);
if (probing_good) {
@@ -8047,10 +7359,10 @@ inline void gcode_M42() {
float angle = random(0.0, 360.0);
const float radius = random(
#if ENABLED(DELTA)
- 0.1250000000 * (DELTA_PRINTABLE_RADIUS),
- 0.3333333333 * (DELTA_PRINTABLE_RADIUS)
+ 0.1250000000 * (DELTA_PROBEABLE_RADIUS),
+ 0.3333333333 * (DELTA_PROBEABLE_RADIUS)
#else
- 5.0, 0.125 * MIN(X_BED_SIZE, Y_BED_SIZE)
+ 5.0, 0.125 * min(X_BED_SIZE, Y_BED_SIZE)
#endif
);
@@ -8063,7 +7375,7 @@ inline void gcode_M42() {
}
for (uint8_t l = 0; l < n_legs - 1; l++) {
- float delta_angle;
+ double delta_angle;
if (schizoid_flag)
// The points of a 5 point star are 72 degrees apart. We need to
@@ -8111,7 +7423,7 @@ inline void gcode_M42() {
} // n_legs
// Probe a single point
- sample_set[n] = probe_pt(X_probe_location, Y_probe_location, raise_after);
+ sample_set[n] = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, 0);
// Break the loop if the probe fails
probing_good = !isnan(sample_set[n]);
@@ -8120,7 +7432,7 @@ inline void gcode_M42() {
/**
* Get the current mean for the data points we have so far
*/
- float sum = 0.0;
+ double sum = 0.0;
for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
mean = sum / (n + 1);
@@ -8140,7 +7452,7 @@ inline void gcode_M42() {
if (verbose_level > 1) {
SERIAL_PROTOCOL(n + 1);
SERIAL_PROTOCOLPGM(" of ");
- SERIAL_PROTOCOL(int(n_samples));
+ SERIAL_PROTOCOL((int)n_samples);
SERIAL_PROTOCOLPGM(": z: ");
SERIAL_PROTOCOL_F(sample_set[n], 3);
if (verbose_level > 2) {
@@ -8192,10 +7504,6 @@ inline void gcode_M42() {
set_bed_leveling_enabled(was_enabled);
#endif
- #ifdef Z_AFTER_PROBING
- move_z_after_probing();
- #endif
-
report_current_position();
}
@@ -8222,7 +7530,7 @@ inline void gcode_M42() {
* This has no effect during an SD print job
*/
inline void gcode_M73() {
- if (!IS_SD_PRINTING() && parser.seen('P')) {
+ if (!IS_SD_PRINTING && parser.seen('P')) {
progress_bar_percent = parser.value_byte();
NOMORE(progress_bar_percent, 100);
}
@@ -8286,9 +7594,12 @@ inline void gcode_M104() {
*/
if (parser.value_celsius() <= (EXTRUDE_MINTEMP) / 2) {
print_job_timer.stop();
- lcd_reset_status();
+ LCD_MESSAGEPGM(WELCOME_MSG);
}
#endif
+
+ if (parser.value_celsius() > thermalManager.degHotend(target_extruder))
+ lcd_status_printf_P(0, PSTR("E%i %s"), target_extruder + 1, MSG_HEATING);
}
#if ENABLED(AUTOTEMP)
@@ -8302,10 +7613,10 @@ inline void gcode_M104() {
inline void gcode_M105() {
if (get_target_extruder_from_command(105)) return;
- #if HAS_TEMP_SENSOR
+ #if HAS_TEMP_HOTEND || HAS_TEMP_BED
SERIAL_PROTOCOLPGM(MSG_OK);
thermalManager.print_heaterstates();
- #else // !HAS_TEMP_SENSOR
+ #else // !HAS_TEMP_HOTEND && !HAS_TEMP_BED
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS);
#endif
@@ -8313,7 +7624,7 @@ inline void gcode_M105() {
SERIAL_EOL();
}
-#if ENABLED(AUTO_REPORT_TEMPERATURES)
+#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
/**
* M155: Set temperature auto-report interval. M155 S
@@ -8355,14 +7666,14 @@ inline void gcode_M105() {
fanSpeeds[p] = new_fanSpeeds[p];
break;
default:
- new_fanSpeeds[p] = MIN(t, 255);
+ new_fanSpeeds[p] = min(t, 255);
break;
}
return;
}
#endif // EXTRA_FAN_SPEED
const uint16_t s = parser.ushortval('S', 255);
- fanSpeeds[p] = MIN(s, 255U);
+ fanSpeeds[p] = min(s, 255);
}
}
@@ -8421,9 +7732,8 @@ inline void gcode_M109() {
if (target_extruder != active_extruder) return;
#endif
- const bool no_wait_for_cooling = parser.seenval('S'),
- set_temp = no_wait_for_cooling || parser.seenval('R');
- if (set_temp) {
+ const bool no_wait_for_cooling = parser.seenval('S');
+ if (no_wait_for_cooling || parser.seenval('R')) {
const int16_t temp = parser.value_celsius();
thermalManager.setTargetHotend(temp, target_extruder);
@@ -8440,22 +7750,15 @@ inline void gcode_M109() {
*/
if (parser.value_celsius() <= (EXTRUDE_MINTEMP) / 2) {
print_job_timer.stop();
- lcd_reset_status();
+ LCD_MESSAGEPGM(WELCOME_MSG);
}
else
print_job_timer.start();
#endif
- #if ENABLED(ULTRA_LCD)
- const bool heating = thermalManager.isHeatingHotend(target_extruder);
- if (heating || !no_wait_for_cooling)
- #if HOTENDS > 1
- lcd_status_printf_P(0, heating ? PSTR("E%i " MSG_HEATING) : PSTR("E%i " MSG_COOLING), target_extruder + 1);
- #else
- lcd_setstatusPGM(heating ? PSTR("E " MSG_HEATING) : PSTR("E " MSG_COOLING));
- #endif
- #endif
+ if (thermalManager.isHeatingHotend(target_extruder)) lcd_status_printf_P(0, PSTR("E%i %s"), target_extruder + 1, MSG_HEATING);
}
+ else return;
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.HeatingStart();
@@ -8465,8 +7768,6 @@ inline void gcode_M109() {
planner.autotemp_M104_M109();
#endif
- if (!set_temp) return;
-
#if TEMP_RESIDENCY_TIME > 0
millis_t residency_start_ms = 0;
// Loop until the temperature has stabilized
@@ -8476,7 +7777,7 @@ inline void gcode_M109() {
#define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder))
#endif
- float target_temp = -1, old_temp = 9999;
+ float target_temp = -1.0, old_temp = 9999.0;
bool wants_to_cool = false;
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
@@ -8515,7 +7816,7 @@ inline void gcode_M109() {
}
idle();
- reset_stepper_timeout(); // Keep steppers powered
+ refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
const float temp = thermalManager.degHotend(target_extruder);
@@ -8541,7 +7842,7 @@ inline void gcode_M109() {
#if TEMP_RESIDENCY_TIME > 0
- const float temp_diff = ABS(target_temp - temp);
+ const float temp_diff = FABS(target_temp - temp);
if (!residency_start_ms) {
// Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time.
@@ -8559,7 +7860,7 @@ inline void gcode_M109() {
// break after MIN_COOLING_SLOPE_TIME seconds
// if the temperature did not drop at least MIN_COOLING_SLOPE_DEG
if (!next_cool_check_ms || ELAPSED(now, next_cool_check_ms)) {
- if (old_temp - temp < float(MIN_COOLING_SLOPE_DEG)) break;
+ if (old_temp - temp < MIN_COOLING_SLOPE_DEG) break;
next_cool_check_ms = now + 1000UL * MIN_COOLING_SLOPE_TIME;
old_temp = temp;
}
@@ -8568,7 +7869,7 @@ inline void gcode_M109() {
} while (wait_for_heatup && TEMP_CONDITIONS);
if (wait_for_heatup) {
- lcd_reset_status();
+ LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
#if ENABLED(PRINTER_EVENT_LEDS)
leds.set_white();
#endif
@@ -8583,15 +7884,7 @@ inline void gcode_M109() {
#endif
}
-#if HAS_HEATED_BED
-
- /**
- * M140: Set bed temperature
- */
- inline void gcode_M140() {
- if (DEBUGGING(DRYRUN)) return;
- if (parser.seenval('S')) thermalManager.setTargetBed(parser.value_celsius());
- }
+#if HAS_TEMP_BED
#ifndef MIN_COOLING_SLOPE_DEG_BED
#define MIN_COOLING_SLOPE_DEG_BED 1.50
@@ -8607,6 +7900,7 @@ inline void gcode_M109() {
inline void gcode_M190() {
if (DEBUGGING(DRYRUN)) return;
+ LCD_MESSAGEPGM(MSG_BED_HEATING);
const bool no_wait_for_cooling = parser.seenval('S');
if (no_wait_for_cooling || parser.seenval('R')) {
thermalManager.setTargetBed(parser.value_celsius());
@@ -8620,7 +7914,6 @@ inline void gcode_M109() {
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.BedHeatingStart();
#endif
- lcd_setstatusPGM(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING));
#if TEMP_BED_RESIDENCY_TIME > 0
millis_t residency_start_ms = 0;
@@ -8644,7 +7937,7 @@ inline void gcode_M109() {
#if ENABLED(PRINTER_EVENT_LEDS)
const float start_temp = thermalManager.degBed();
- uint8_t old_red = 127;
+ uint8_t old_red = 255;
#endif
do {
@@ -8672,7 +7965,7 @@ inline void gcode_M109() {
}
idle();
- reset_stepper_timeout(); // Keep steppers powered
+ refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
const float temp = thermalManager.degBed();
@@ -8698,7 +7991,7 @@ inline void gcode_M109() {
#if TEMP_BED_RESIDENCY_TIME > 0
- const float temp_diff = ABS(target_temp - temp);
+ const float temp_diff = FABS(target_temp - temp);
if (!residency_start_ms) {
// Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.
@@ -8716,25 +8009,25 @@ inline void gcode_M109() {
// Break after MIN_COOLING_SLOPE_TIME_BED seconds
// if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_BED
if (!next_cool_check_ms || ELAPSED(now, next_cool_check_ms)) {
- if (old_temp - temp < float(MIN_COOLING_SLOPE_DEG_BED)) break;
+ if (old_temp - temp < MIN_COOLING_SLOPE_DEG_BED) break;
next_cool_check_ms = now + 1000UL * MIN_COOLING_SLOPE_TIME_BED;
old_temp = temp;
}
}
} while (wait_for_heatup && TEMP_BED_CONDITIONS);
-
+
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.BedHeatingDone();
#endif
- if (wait_for_heatup) lcd_reset_status();
+ if (wait_for_heatup) LCD_MESSAGEPGM(MSG_BED_DONE);
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
}
-#endif // HAS_HEATED_BED
+#endif // HAS_TEMP_BED
/**
* M110: Set Current Line Number
@@ -8749,7 +8042,7 @@ inline void gcode_M110() {
inline void gcode_M111() {
if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
- static const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
+ 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,
@@ -8759,7 +8052,7 @@ inline void gcode_M111() {
#endif
;
- static const char* const debug_strings[] PROGMEM = {
+ const static char* const debug_strings[] PROGMEM = {
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16
#if ENABLED(DEBUG_LEVELING_FEATURE)
, str_debug_32
@@ -8773,29 +8066,12 @@ inline void gcode_M111() {
for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
if (TEST(marlin_debug_flags, i)) {
if (comma++) SERIAL_CHAR(',');
- serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
+ serialprintPGM((char*)pgm_read_word(&debug_strings[i]));
}
}
}
else {
SERIAL_ECHOPGM(MSG_DEBUG_OFF);
- #if !defined(__AVR__) || !defined(USBCON)
- #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
- SERIAL_ECHOPAIR("\nBuffer Overruns: ", customizedSerial.buffer_overruns());
- #endif
-
- #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
- SERIAL_ECHOPAIR("\nFraming Errors: ", customizedSerial.framing_errors());
- #endif
-
- #if ENABLED(SERIAL_STATS_DROPPED_RX)
- SERIAL_ECHOPAIR("\nDropped bytes: ", customizedSerial.dropped());
- #endif
-
- #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
- SERIAL_ECHOPAIR("\nMax RX Queue Size: ", customizedSerial.rxMaxEnqueued());
- #endif
- #endif // !__AVR__ || !USBCON
}
SERIAL_EOL();
}
@@ -8846,6 +8122,14 @@ inline void gcode_M111() {
#endif // BARICUDA
+/**
+ * M140: Set bed temperature
+ */
+inline void gcode_M140() {
+ if (DEBUGGING(DRYRUN)) return;
+ if (parser.seenval('S')) thermalManager.setTargetBed(parser.value_celsius());
+}
+
#if ENABLED(ULTIPANEL)
/**
@@ -8908,7 +8192,7 @@ inline void gcode_M111() {
return;
}
- PSU_ON();
+ OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE); // GND
/**
* If you have a switch on suicide pin, this is useful
@@ -8919,18 +8203,25 @@ inline void gcode_M111() {
OUT_WRITE(SUICIDE_PIN, HIGH);
#endif
- #if DISABLED(AUTO_POWER_CONTROL)
- delay(100); // Wait for power to settle
- restore_stepper_drivers();
+ #if ENABLED(HAVE_TMC2130)
+ delay(100);
+ tmc2130_init(); // Settings only stick when the driver has power
#endif
+ powersupply_on = true;
+
#if ENABLED(ULTIPANEL)
- lcd_reset_status();
+ LCD_MESSAGEPGM(WELCOME_MSG);
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
#endif
+
+ #if ENABLED(HAVE_TMC2208)
+ delay(100);
+ tmc2208_init();
+ #endif
}
#endif // HAS_POWER_SWITCH
@@ -8942,7 +8233,7 @@ inline void gcode_M111() {
*/
inline void gcode_M81() {
thermalManager.disable_all_heaters();
- planner.finish_and_disable();
+ stepper.finish_and_disable();
#if FAN_COUNT > 0
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
@@ -8955,9 +8246,11 @@ inline void gcode_M81() {
safe_delay(1000); // Wait 1 second before switching off
#if HAS_SUICIDE
+ stepper.synchronize();
suicide();
#elif HAS_POWER_SWITCH
- PSU_OFF();
+ OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
+ powersupply_on = false;
#endif
#if ENABLED(ULTIPANEL)
@@ -8972,12 +8265,12 @@ inline void gcode_M81() {
/**
* M82: Set E codes absolute (default)
*/
-inline void gcode_M82() { axis_relative_modes[E_CART] = false; }
+inline void gcode_M82() { axis_relative_modes[E_AXIS] = false; }
/**
* M83: Set E codes relative while in Absolute Coordinates (G90) mode
*/
-inline void gcode_M83() { axis_relative_modes[E_CART] = true; }
+inline void gcode_M83() { axis_relative_modes[E_AXIS] = true; }
/**
* M18, M84: Disable stepper motors
@@ -8987,22 +8280,22 @@ inline void gcode_M18_M84() {
stepper_inactive_time = parser.value_millis_from_seconds();
}
else {
- bool all_axis = !(parser.seen('X') || parser.seen('Y') || parser.seen('Z') || parser.seen('E'));
+ bool all_axis = !((parser.seen('X')) || (parser.seen('Y')) || (parser.seen('Z')) || (parser.seen('E')));
if (all_axis) {
- planner.finish_and_disable();
+ stepper.finish_and_disable();
}
else {
- planner.synchronize();
+ stepper.synchronize();
if (parser.seen('X')) disable_X();
if (parser.seen('Y')) disable_Y();
if (parser.seen('Z')) disable_Z();
- #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN // Only disable on boards that have separate ENABLE_PINS
+ #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN // Only enable on boards that have separate ENABLE_PINS
if (parser.seen('E')) disable_e_steppers();
#endif
}
#if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD
- if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
+ ubl.lcd_map_control = defer_return_to_status = false;
#endif
}
}
@@ -9027,34 +8320,27 @@ inline void gcode_M85() {
/**
* M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E.
- * (for Hangprinter: A, B, C, D, and E)
* (Follows the same syntax as G92)
*
* With multiple extruders use T to specify which one.
*/
inline void gcode_M92() {
+
GET_TARGET_EXTRUDER(92);
- LOOP_NUM_AXIS(i) {
- if (parser.seen(RAW_AXIS_CODES(i))) {
+ LOOP_XYZE(i) {
+ if (parser.seen(axis_codes[i])) {
if (i == E_AXIS) {
const float value = parser.value_per_axis_unit((AxisEnum)(E_AXIS + TARGET_EXTRUDER));
- if (value < 20) {
- const float factor = planner.axis_steps_per_mm[E_AXIS + TARGET_EXTRUDER] / value; // increase e constants if M92 E14 is given for netfab.
- #if DISABLED(JUNCTION_DEVIATION)
- planner.max_jerk[E_AXIS] *= factor;
- #endif
+ if (value < 20.0) {
+ float factor = planner.axis_steps_per_mm[E_AXIS + TARGET_EXTRUDER] / value; // increase e constants if M92 E14 is given for netfab.
+ planner.max_jerk[E_AXIS] *= factor;
planner.max_feedrate_mm_s[E_AXIS + TARGET_EXTRUDER] *= factor;
planner.max_acceleration_steps_per_s2[E_AXIS + TARGET_EXTRUDER] *= factor;
}
planner.axis_steps_per_mm[E_AXIS + TARGET_EXTRUDER] = value;
}
else {
- #if ENABLED(LINE_BUILDUP_COMPENSATION_FEATURE)
- SERIAL_ECHOLNPGM("Warning: "
- "M92 A, B, C, and D only affect acceleration planning "
- "when BUILDUP_COMPENSATION_FEATURE is enabled.");
- #endif
planner.axis_steps_per_mm[i] = parser.value_per_axis_unit((AxisEnum)i);
}
}
@@ -9066,24 +8352,20 @@ inline void gcode_M92() {
* Output the current position to serial
*/
void report_current_position() {
- SERIAL_PROTOCOLPAIR("X:", LOGICAL_X_POSITION(current_position[X_AXIS]));
- SERIAL_PROTOCOLPAIR(" Y:", LOGICAL_Y_POSITION(current_position[Y_AXIS]));
- SERIAL_PROTOCOLPAIR(" Z:", LOGICAL_Z_POSITION(current_position[Z_AXIS]));
- SERIAL_PROTOCOLPAIR(" E:", current_position[E_CART]);
-
- #if ENABLED(HANGPRINTER)
- SERIAL_EOL();
- SERIAL_PROTOCOLPAIR("A:", line_lengths[A_AXIS]);
- SERIAL_PROTOCOLPAIR(" B:", line_lengths[B_AXIS]);
- SERIAL_PROTOCOLPAIR(" C:", line_lengths[C_AXIS]);
- SERIAL_PROTOCOLLNPAIR(" D:", line_lengths[D_AXIS]);
- #endif
+ SERIAL_PROTOCOLPGM("X:");
+ SERIAL_PROTOCOL(LOGICAL_X_POSITION(current_position[X_AXIS]));
+ SERIAL_PROTOCOLPGM(" Y:");
+ SERIAL_PROTOCOL(LOGICAL_Y_POSITION(current_position[Y_AXIS]));
+ SERIAL_PROTOCOLPGM(" Z:");
+ SERIAL_PROTOCOL(LOGICAL_Z_POSITION(current_position[Z_AXIS]));
+ SERIAL_PROTOCOLPGM(" E:");
+ SERIAL_PROTOCOL(current_position[E_AXIS]);
stepper.report_positions();
#if IS_SCARA
- SERIAL_PROTOCOLPAIR("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS));
- SERIAL_PROTOCOLLNPAIR(" Psi+Theta:", planner.get_axis_position_degrees(B_AXIS));
+ SERIAL_PROTOCOLPAIR("SCARA Theta:", stepper.get_axis_position_degrees(A_AXIS));
+ SERIAL_PROTOCOLLNPAIR(" Psi+Theta:", stepper.get_axis_position_degrees(B_AXIS));
SERIAL_EOL();
#endif
}
@@ -9105,13 +8387,15 @@ void report_current_position() {
void report_current_position_detail() {
+ stepper.synchronize();
+
SERIAL_PROTOCOLPGM("\nLogical:");
const float logical[XYZ] = {
LOGICAL_X_POSITION(current_position[X_AXIS]),
LOGICAL_Y_POSITION(current_position[Y_AXIS]),
LOGICAL_Z_POSITION(current_position[Z_AXIS])
};
- report_xyz(logical);
+ report_xyze(logical);
SERIAL_PROTOCOLPGM("Raw: ");
report_xyz(current_position);
@@ -9139,12 +8423,10 @@ void report_current_position() {
report_xyz(delta);
#endif
- planner.synchronize();
-
SERIAL_PROTOCOLPGM("Stepper:");
- LOOP_NUM_AXIS(i) {
+ LOOP_XYZE(i) {
SERIAL_CHAR(' ');
- SERIAL_CHAR(RAW_AXIS_CODES(i));
+ SERIAL_CHAR(axis_codes[i]);
SERIAL_CHAR(':');
SERIAL_PROTOCOL(stepper.position((AxisEnum)i));
}
@@ -9152,8 +8434,8 @@ void report_current_position() {
#if IS_SCARA
const float deg[XYZ] = {
- planner.get_axis_position_degrees(A_AXIS),
- planner.get_axis_position_degrees(B_AXIS)
+ stepper.get_axis_position_degrees(A_AXIS),
+ stepper.get_axis_position_degrees(B_AXIS)
};
SERIAL_PROTOCOLPGM("Degrees:");
report_xyze(deg, 2);
@@ -9161,14 +8443,14 @@ void report_current_position() {
SERIAL_PROTOCOLPGM("FromStp:");
get_cartesian_from_steppers(); // writes cartes[XYZ] (with forward kinematics)
- const float from_steppers[XYZE] = { cartes[X_AXIS], cartes[Y_AXIS], cartes[Z_AXIS], planner.get_axis_position_mm(E_AXIS) };
+ const float from_steppers[XYZE] = { cartes[X_AXIS], cartes[Y_AXIS], cartes[Z_AXIS], stepper.get_axis_position_mm(E_AXIS) };
report_xyze(from_steppers);
const float diff[XYZE] = {
from_steppers[X_AXIS] - leveled[X_AXIS],
from_steppers[Y_AXIS] - leveled[Y_AXIS],
from_steppers[Z_AXIS] - leveled[Z_AXIS],
- from_steppers[E_CART] - current_position[E_CART]
+ from_steppers[E_AXIS] - current_position[E_AXIS]
};
SERIAL_PROTOCOLPGM("Differ: ");
report_xyze(diff);
@@ -9181,19 +8463,13 @@ void report_current_position() {
inline void gcode_M114() {
#ifdef M114_DETAIL
- if (parser.seen('D')) return report_current_position_detail();
+ if (parser.seen('D')) {
+ report_current_position_detail();
+ return;
+ }
#endif
- planner.synchronize();
-
- const uint16_t sval = parser.ushortval('S');
-
- #if ENABLED(MECHADUINO_I2C_COMMANDS)
- if (sval == 1) return report_axis_position_from_encoder_data();
- #endif
-
- if (sval == 2) return report_xyz_from_stepper_position();
-
+ stepper.synchronize();
report_current_position();
}
@@ -9205,7 +8481,6 @@ inline void gcode_M114() {
static void cap_line(const char * const name, bool ena=false) {
SERIAL_PROTOCOLPGM("Cap:");
serialprintPGM(name);
- SERIAL_PROTOCOLPGM(":");
SERIAL_PROTOCOLLN(int(ena ? 1 : 0));
}
#endif
@@ -9303,52 +8578,24 @@ inline void gcode_M115() {
#endif
);
- // AUTOREPORT_SD_STATUS (M27 extension)
- cap_line(PSTR("AUTOREPORT_SD_STATUS")
- #if ENABLED(AUTO_REPORT_SD_STATUS)
- , true
- #endif
- );
-
- // THERMAL_PROTECTION
- cap_line(PSTR("THERMAL_PROTECTION")
- #if ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(THERMAL_PROTECTION_BED)
- , true
- #endif
- );
-
#endif // EXTENDED_CAPABILITIES_REPORT
}
/**
* M117: Set LCD Status Message
*/
-inline void gcode_M117() {
- if (parser.string_arg[0])
- lcd_setstatus(parser.string_arg);
- else
- lcd_reset_status();
-}
+inline void gcode_M117() { lcd_setstatus(parser.string_arg); }
/**
* M118: Display a message in the host console.
*
- * A1 Prepend '// ' for an action command, as in OctoPrint
+ * A1 Append '// ' for an action command, as in OctoPrint
* E1 Have the host 'echo:' the text
*/
inline void gcode_M118() {
- bool hasE = false, hasA = false;
- char *p = parser.string_arg;
- for (uint8_t i = 2; i--;)
- if ((p[0] == 'A' || p[0] == 'E') && p[1] == '1') {
- if (p[0] == 'A') hasA = true;
- if (p[0] == 'E') hasE = true;
- p += 2;
- while (*p == ' ') ++p;
- }
- if (hasE) SERIAL_ECHO_START();
- if (hasA) SERIAL_ECHOPGM("// ");
- SERIAL_ECHOLN(p);
+ if (parser.boolval('E')) SERIAL_ECHO_START();
+ if (parser.boolval('A')) SERIAL_ECHOPGM("// ");
+ SERIAL_ECHOLN(parser.string_arg);
}
/**
@@ -9386,11 +8633,11 @@ inline void gcode_M121() { endstops.enable_globally(false); }
inline void gcode_M125() {
// Initial retract before move to filament change position
- const float retract = -ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
+ const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
#ifdef PAUSE_PARK_RETRACT_LENGTH
- + (PAUSE_PARK_RETRACT_LENGTH)
+ - (PAUSE_PARK_RETRACT_LENGTH)
#endif
- );
+ ;
point_t park_point = NOZZLE_PARK_POINT;
@@ -9401,7 +8648,7 @@ inline void gcode_M121() { endstops.enable_globally(false); }
// Lift Z axis
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
- #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
+ #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
#endif
@@ -9472,7 +8719,7 @@ inline void gcode_M121() { endstops.enable_globally(false); }
// setting any extruder filament size disables volumetric on the assumption that
// slicers either generate in extruder values as cubic mm or as as filament feeds
// for all extruders
- if ( (parser.volumetric_enabled = (parser.value_linear_units() != 0)) )
+ if ( (parser.volumetric_enabled = (parser.value_linear_units() != 0.0)) )
planner.set_filament_size(target_extruder, parser.value_linear_units());
}
planner.calculate_volumetric_multipliers();
@@ -9489,8 +8736,8 @@ inline void gcode_M201() {
GET_TARGET_EXTRUDER(201);
- LOOP_NUM_AXIS(i) {
- if (parser.seen(RAW_AXIS_CODES(i))) {
+ LOOP_XYZE(i) {
+ if (parser.seen(axis_codes[i])) {
const uint8_t a = i + (i == E_AXIS ? TARGET_EXTRUDER : 0);
planner.max_acceleration_mm_per_s2[a] = parser.value_axis_units((AxisEnum)a);
}
@@ -9517,8 +8764,8 @@ inline void gcode_M203() {
GET_TARGET_EXTRUDER(203);
- LOOP_NUM_AXIS(i)
- if (parser.seen(RAW_AXIS_CODES(i))) {
+ LOOP_XYZE(i)
+ if (parser.seen(axis_codes[i])) {
const uint8_t a = i + (i == E_AXIS ? TARGET_EXTRUDER : 0);
planner.max_feedrate_mm_s[a] = parser.value_axis_units((AxisEnum)a);
}
@@ -9530,79 +8777,47 @@ inline void gcode_M203() {
* P = Printing moves
* R = Retract only (no X, Y, Z) moves
* T = Travel (non printing) moves
+ *
+ * Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
*/
inline void gcode_M204() {
- bool report = true;
- if (parser.seenval('S')) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
+ if (parser.seen('S')) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
planner.travel_acceleration = planner.acceleration = parser.value_linear_units();
- report = false;
+ SERIAL_ECHOLNPAIR("Setting Print and Travel Acceleration: ", planner.acceleration);
}
- if (parser.seenval('P')) {
+ if (parser.seen('P')) {
planner.acceleration = parser.value_linear_units();
- report = false;
+ SERIAL_ECHOLNPAIR("Setting Print Acceleration: ", planner.acceleration);
}
- if (parser.seenval('R')) {
+ if (parser.seen('R')) {
planner.retract_acceleration = parser.value_linear_units();
- report = false;
+ SERIAL_ECHOLNPAIR("Setting Retract Acceleration: ", planner.retract_acceleration);
}
- if (parser.seenval('T')) {
+ if (parser.seen('T')) {
planner.travel_acceleration = parser.value_linear_units();
- report = false;
- }
- if (report) {
- SERIAL_ECHOPAIR("Acceleration: P", planner.acceleration);
- SERIAL_ECHOPAIR(" R", planner.retract_acceleration);
- SERIAL_ECHOLNPAIR(" T", planner.travel_acceleration);
+ SERIAL_ECHOLNPAIR("Setting Travel Acceleration: ", planner.travel_acceleration);
}
}
/**
* M205: Set Advanced Settings
*
- * Q = Min Segment Time (µs)
* S = Min Feed Rate (units/s)
* T = Min Travel Feed Rate (units/s)
+ * B = Min Segment Time (µs)
* X = Max X Jerk (units/sec^2)
* Y = Max Y Jerk (units/sec^2)
* Z = Max Z Jerk (units/sec^2)
* E = Max E Jerk (units/sec^2)
- * J = Junction Deviation (mm) (Requires JUNCTION_DEVIATION)
*/
inline void gcode_M205() {
- if (parser.seen('Q')) planner.min_segment_time_us = parser.value_ulong();
if (parser.seen('S')) planner.min_feedrate_mm_s = parser.value_linear_units();
if (parser.seen('T')) planner.min_travel_feedrate_mm_s = parser.value_linear_units();
- #if ENABLED(JUNCTION_DEVIATION)
- if (parser.seen('J')) {
- const float junc_dev = parser.value_linear_units();
- if (WITHIN(junc_dev, 0.01f, 0.3f)) {
- planner.junction_deviation_mm = junc_dev;
- planner.recalculate_max_e_jerk();
- }
- else {
- SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM("?J out of range (0.01 to 0.3)");
- }
- }
- #else
- #if ENABLED(HANGPRINTER)
- if (parser.seen('A')) planner.max_jerk[A_AXIS] = parser.value_linear_units();
- if (parser.seen('B')) planner.max_jerk[B_AXIS] = parser.value_linear_units();
- if (parser.seen('C')) planner.max_jerk[C_AXIS] = parser.value_linear_units();
- if (parser.seen('D')) planner.max_jerk[D_AXIS] = parser.value_linear_units();
- #else
- if (parser.seen('X')) planner.max_jerk[X_AXIS] = parser.value_linear_units();
- if (parser.seen('Y')) planner.max_jerk[Y_AXIS] = parser.value_linear_units();
- if (parser.seen('Z')) {
- planner.max_jerk[Z_AXIS] = parser.value_linear_units();
- #if HAS_MESH
- if (planner.max_jerk[Z_AXIS] <= 0.1f)
- SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses.");
- #endif
- }
- #endif
- if (parser.seen('E')) planner.max_jerk[E_AXIS] = parser.value_linear_units();
- #endif
+ if (parser.seen('B')) planner.min_segment_time_us = parser.value_ulong();
+ if (parser.seen('X')) planner.max_jerk[X_AXIS] = parser.value_linear_units();
+ if (parser.seen('Y')) planner.max_jerk[Y_AXIS] = parser.value_linear_units();
+ if (parser.seen('Z')) planner.max_jerk[Z_AXIS] = parser.value_linear_units();
+ if (parser.seen('E')) planner.max_jerk[E_AXIS] = parser.value_linear_units();
}
#if HAS_M206_COMMAND
@@ -9640,7 +8855,7 @@ inline void gcode_M205() {
* B = delta calibration radius
* X = Alpha (Tower 1) angle trim
* Y = Beta (Tower 2) angle trim
- * Z = Gamma (Tower 3) angle trim
+ * Z = Rotate A and B by this angle
*/
inline void gcode_M665() {
if (parser.seen('H')) delta_height = parser.value_linear_units();
@@ -9719,84 +8934,31 @@ inline void gcode_M205() {
}
}
-#elif ENABLED(HANGPRINTER)
- /**
- * M665: Set HANGPRINTER settings
- *
- * Parameters:
- *
- * W[anchor_A_y] - A-anchor's y coordinate (see note)
- * E[anchor_A_z] - A-anchor's z coordinate (see note)
- * R[anchor_B_x] - B-anchor's x coordinate (see note)
- * T[anchor_B_y] - B-anchor's y coordinate (see note)
- * Y[anchor_B_z] - B-anchor's z coordinate (see note)
- * U[anchor_C_x] - C-anchor's x coordinate (see note)
- * I[anchor_C_y] - C-anchor's y coordinate (see note)
- * O[anchor_C_z] - C-anchor's z coordinate (see note)
- * P[anchor_D_z] - D-anchor's z coordinate (see note)
- * S[segments-per-second] - Segments-per-second
- *
- * Note: All xyz coordinates are measured relative to the line's pivot point in the mover,
- * when it is at its home position (nozzle in (0,0,0), and lines tight).
- * The y-axis is defined to be horizontal right above/below the A-lines when mover is at home.
- * The z-axis is along the vertical direction.
- */
- inline void gcode_M665() {
- if (parser.seen('W')) anchor_A_y = parser.value_float();
- if (parser.seen('E')) anchor_A_z = parser.value_float();
- if (parser.seen('R')) anchor_B_x = parser.value_float();
- if (parser.seen('T')) anchor_B_y = parser.value_float();
- if (parser.seen('Y')) anchor_B_z = parser.value_float();
- if (parser.seen('U')) anchor_C_x = parser.value_float();
- if (parser.seen('I')) anchor_C_y = parser.value_float();
- if (parser.seen('O')) anchor_C_z = parser.value_float();
- if (parser.seen('P')) anchor_D_z = parser.value_float();
- if (parser.seen('S')) delta_segments_per_second = parser.value_float();
- recalc_hangprinter_settings();
- }
+
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
/**
- * M666: Set Dual Endstops offsets for X, Y, and/or Z.
- * With no parameters report current offsets.
+ * M666: For Z Dual Endstop setup, set z axis offset to the z2 axis.
*/
inline void gcode_M666() {
- bool report = true;
+ SERIAL_ECHOPGM("Dual Endstop Adjustment (mm): ");
#if ENABLED(X_DUAL_ENDSTOPS)
- if (parser.seenval('X')) {
- endstops.x_endstop_adj = parser.value_linear_units();
- report = false;
- }
+ if (parser.seen('X')) x_endstop_adj = parser.value_linear_units();
+ SERIAL_ECHOPAIR(" X", x_endstop_adj);
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
- if (parser.seenval('Y')) {
- endstops.y_endstop_adj = parser.value_linear_units();
- report = false;
- }
+ if (parser.seen('Y')) y_endstop_adj = parser.value_linear_units();
+ SERIAL_ECHOPAIR(" Y", y_endstop_adj);
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
- if (parser.seenval('Z')) {
- endstops.z_endstop_adj = parser.value_linear_units();
- report = false;
- }
+ if (parser.seen('Z')) z_endstop_adj = parser.value_linear_units();
+ SERIAL_ECHOPAIR(" Z", z_endstop_adj);
#endif
- if (report) {
- SERIAL_ECHOPGM("Dual Endstop Adjustment (mm): ");
- #if ENABLED(X_DUAL_ENDSTOPS)
- SERIAL_ECHOPAIR(" X", endstops.x_endstop_adj);
- #endif
- #if ENABLED(Y_DUAL_ENDSTOPS)
- SERIAL_ECHOPAIR(" Y", endstops.y_endstop_adj);
- #endif
- #if ENABLED(Z_DUAL_ENDSTOPS)
- SERIAL_ECHOPAIR(" Z", endstops.z_endstop_adj);
- #endif
- SERIAL_EOL();
- }
+ SERIAL_EOL();
}
-#endif // X_DUAL_ENDSTOPS || Y_DUAL_ENDSTOPS || Z_DUAL_ENDSTOPS
+#endif // !DELTA && Z_DUAL_ENDSTOPS
#if ENABLED(FWRETRACT)
@@ -9809,10 +8971,10 @@ inline void gcode_M205() {
* Z[units] retract_zlift
*/
inline void gcode_M207() {
- if (parser.seen('S')) fwretract.retract_length = parser.value_axis_units(E_AXIS);
- if (parser.seen('F')) fwretract.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
- if (parser.seen('Z')) fwretract.retract_zlift = parser.value_linear_units();
- if (parser.seen('W')) fwretract.swap_retract_length = parser.value_axis_units(E_AXIS);
+ if (parser.seen('S')) retract_length = parser.value_axis_units(E_AXIS);
+ if (parser.seen('F')) retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
+ if (parser.seen('Z')) retract_zlift = parser.value_linear_units();
+ if (parser.seen('W')) swap_retract_length = parser.value_axis_units(E_AXIS);
}
/**
@@ -9824,10 +8986,10 @@ inline void gcode_M205() {
* R[units/min] swap_retract_recover_feedrate_mm_s
*/
inline void gcode_M208() {
- if (parser.seen('S')) fwretract.retract_recover_length = parser.value_axis_units(E_AXIS);
- if (parser.seen('F')) fwretract.retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
- if (parser.seen('R')) fwretract.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
- if (parser.seen('W')) fwretract.swap_retract_recover_length = parser.value_axis_units(E_AXIS);
+ if (parser.seen('S')) retract_recover_length = parser.value_axis_units(E_AXIS);
+ if (parser.seen('F')) retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
+ if (parser.seen('R')) swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
+ if (parser.seen('W')) swap_retract_recover_length = parser.value_axis_units(E_AXIS);
}
/**
@@ -9838,8 +9000,8 @@ inline void gcode_M205() {
inline void gcode_M209() {
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) {
if (parser.seen('S')) {
- fwretract.autoretract_enabled = parser.value_bool();
- for (uint8_t i = 0; i < EXTRUDERS; i++) fwretract.retracted[i] = false;
+ autoretract_enabled = parser.value_bool();
+ for (uint8_t i = 0; i < EXTRUDERS; i++) retracted[i] = false;
}
}
}
@@ -9874,53 +9036,36 @@ inline void gcode_M211() {
#if HOTENDS > 1
/**
- * M218 - Set/get hotend offset (in linear units)
+ * M218 - set hotend offset (in linear units)
*
* T
* X
* Y
- * Z - Available with DUAL_X_CARRIAGE, SWITCHING_NOZZLE, and PARKING_EXTRUDER
+ * Z - Available with DUAL_X_CARRIAGE and SWITCHING_NOZZLE
*/
inline void gcode_M218() {
if (get_target_extruder_from_command(218) || target_extruder == 0) return;
- bool report = true;
- if (parser.seenval('X')) {
- hotend_offset[X_AXIS][target_extruder] = parser.value_linear_units();
- report = false;
- }
- if (parser.seenval('Y')) {
- hotend_offset[Y_AXIS][target_extruder] = parser.value_linear_units();
- report = false;
- }
+ if (parser.seenval('X')) hotend_offset[X_AXIS][target_extruder] = parser.value_linear_units();
+ if (parser.seenval('Y')) hotend_offset[Y_AXIS][target_extruder] = parser.value_linear_units();
- #if HAS_HOTEND_OFFSET_Z
- if (parser.seenval('Z')) {
- hotend_offset[Z_AXIS][target_extruder] = parser.value_linear_units();
- report = false;
- }
+ #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
+ if (parser.seenval('Z')) hotend_offset[Z_AXIS][target_extruder] = parser.value_linear_units();
#endif
- if (report) {
- SERIAL_ECHO_START();
- SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
- HOTEND_LOOP() {
- SERIAL_CHAR(' ');
- SERIAL_ECHO(hotend_offset[X_AXIS][e]);
+ SERIAL_ECHO_START();
+ SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
+ HOTEND_LOOP() {
+ SERIAL_CHAR(' ');
+ SERIAL_ECHO(hotend_offset[X_AXIS][e]);
+ SERIAL_CHAR(',');
+ SERIAL_ECHO(hotend_offset[Y_AXIS][e]);
+ #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
SERIAL_CHAR(',');
- SERIAL_ECHO(hotend_offset[Y_AXIS][e]);
- #if HAS_HOTEND_OFFSET_Z
- SERIAL_CHAR(',');
- SERIAL_ECHO(hotend_offset[Z_AXIS][e]);
- #endif
- }
- SERIAL_EOL();
+ SERIAL_ECHO(hotend_offset[Z_AXIS][e]);
+ #endif
}
-
- #if ENABLED(DELTA)
- if (target_extruder == active_extruder)
- do_blocking_move_to_xy(current_position[X_AXIS], current_position[Y_AXIS], planner.max_feedrate_mm_s[X_AXIS]);
- #endif
+ SERIAL_EOL();
}
#endif // HOTENDS > 1
@@ -9941,14 +9086,6 @@ inline void gcode_M221() {
planner.flow_percentage[target_extruder] = parser.value_int();
planner.refresh_e_factor(target_extruder);
}
- else {
- SERIAL_ECHO_START();
- SERIAL_CHAR('E');
- SERIAL_CHAR('0' + target_extruder);
- SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
- SERIAL_CHAR('%');
- SERIAL_EOL();
- }
}
/**
@@ -9956,22 +9093,31 @@ inline void gcode_M221() {
*/
inline void gcode_M226() {
if (parser.seen('P')) {
- const int pin = parser.value_int(), pin_state = parser.intval('S', -1);
- if (WITHIN(pin_state, -1, 1) && pin > -1) {
- if (pin_is_protected(pin))
- protected_pin_err();
- else {
- int target = LOW;
- planner.synchronize();
- pinMode(pin, INPUT);
- switch (pin_state) {
- case 1: target = HIGH; break;
- case 0: target = LOW; break;
- case -1: target = !digitalRead(pin); break;
- }
- while (digitalRead(pin) != target) idle();
+ const int pin_number = parser.value_int(),
+ pin_state = parser.intval('S', -1); // required pin state - default is inverted
+
+ if (WITHIN(pin_state, -1, 1) && pin_number > -1 && !pin_is_protected(pin_number)) {
+
+ int target = LOW;
+
+ stepper.synchronize();
+
+ pinMode(pin_number, INPUT);
+ switch (pin_state) {
+ case 1:
+ target = HIGH;
+ break;
+ case 0:
+ target = LOW;
+ break;
+ case -1:
+ target = !digitalRead(pin_number);
+ break;
}
- } // pin_state -1 0 1 && pin > -1
+
+ while (digitalRead(pin_number) != target) idle();
+
+ } // pin_state -1 0 1 && pin_number > -1
} // parser.seen('P')
}
@@ -10022,7 +9168,7 @@ inline void gcode_M226() {
}
else {
SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM("Bad i2c request");
+ SERIAL_ERRORLN("Bad i2c request");
}
}
@@ -10119,7 +9265,7 @@ inline void gcode_M226() {
* With PID_EXTRUSION_SCALING:
*
* C[float] Kc term
- * L[int] LPQ length
+ * L[float] LPQ length
*/
inline void gcode_M301() {
@@ -10133,9 +9279,8 @@ inline void gcode_M226() {
if (parser.seen('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float());
#if ENABLED(PID_EXTRUSION_SCALING)
if (parser.seen('C')) PID_PARAM(Kc, e) = parser.value_float();
- if (parser.seen('L')) thermalManager.lpq_len = parser.value_float();
- NOMORE(thermalManager.lpq_len, LPQ_MAX_LEN);
- NOLESS(thermalManager.lpq_len, 0);
+ if (parser.seen('L')) lpq_len = parser.value_float();
+ NOMORE(lpq_len, LPQ_MAX_LEN);
#endif
thermalManager.updatePID();
@@ -10154,7 +9299,7 @@ inline void gcode_M226() {
}
else {
SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER);
+ SERIAL_ERRORLN(MSG_INVALID_EXTRUDER);
}
}
@@ -10265,7 +9410,7 @@ inline void gcode_M226() {
/**
* M303: PID relay autotune
*
- * S sets the target temperature. (default 150C / 70C)
+ * S sets the target temperature. (default 150C)
* E (-1 for the bed) (default 0)
* C
* U with a non-zero value will apply the result to current settings
@@ -10418,28 +9563,19 @@ inline void gcode_M303() {
/**
* M400: Finish all moves
*/
-inline void gcode_M400() { planner.synchronize(); }
+inline void gcode_M400() { stepper.synchronize(); }
#if HAS_BED_PROBE
/**
- * M401: Deploy and activate the Z probe
+ * M401: Engage Z Servo endstop if available
*/
- inline void gcode_M401() {
- DEPLOY_PROBE();
- report_current_position();
- }
+ inline void gcode_M401() { DEPLOY_PROBE(); }
/**
- * M402: Deactivate and stow the Z probe
+ * M402: Retract Z Servo endstop if enabled
*/
- inline void gcode_M402() {
- STOW_PROBE();
- #ifdef Z_AFTER_PROBING
- move_z_after_probing();
- #endif
- report_current_position();
- }
+ inline void gcode_M402() { STOW_PROBE(); }
#endif // HAS_BED_PROBE
@@ -10501,16 +9637,13 @@ inline void gcode_M400() { planner.synchronize(); }
#endif // FILAMENT_WIDTH_SENSOR
void quickstop_stepper() {
- planner.quick_stop();
- planner.synchronize();
+ stepper.quick_stop();
+ stepper.synchronize();
set_current_from_steppers_for_axis(ALL_AXES);
SYNC_PLAN_POSITION_KINEMATIC();
}
#if HAS_LEVELING
-
- //#define M420_C_USE_MEAN
-
/**
* M420: Enable/Disable Bed Leveling and/or set the Z fade height.
*
@@ -10521,19 +9654,8 @@ void quickstop_stepper() {
* With AUTO_BED_LEVELING_UBL only:
*
* L[index] Load UBL mesh from index (0 is default)
- * T[map] 0:Human-readable 1:CSV 2:"LCD" 4:Compact
- *
- * With mesh-based leveling only:
- *
- * C Center mesh on the mean of the lowest and highest
*/
inline void gcode_M420() {
- const bool seen_S = parser.seen('S');
- bool to_enable = seen_S ? parser.value_bool() : planner.leveling_active;
-
- // If disabling leveling do it right away
- // (Don't disable for just M420 or M420 V)
- if (seen_S && !to_enable) set_bed_leveling_enabled(false);
const float oldpos[] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
@@ -10542,8 +9664,6 @@ void quickstop_stepper() {
// L to load a mesh from the EEPROM
if (parser.seen('L')) {
- set_bed_leveling_enabled(false);
-
#if ENABLED(EEPROM_SETTINGS)
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.storage_slot;
const int16_t a = settings.calc_num_meshes();
@@ -10570,75 +9690,15 @@ void quickstop_stepper() {
#endif
}
- // L or V display the map info
+ // L to load a mesh from the EEPROM
if (parser.seen('L') || parser.seen('V')) {
- ubl.display_map(parser.byteval('T'));
- SERIAL_ECHOPGM("Mesh is ");
- if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in");
- SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot);
+ ubl.display_map(0); // Currently only supports one map type
+ SERIAL_ECHOLNPAIR("ubl.mesh_is_valid = ", ubl.mesh_is_valid());
+ SERIAL_ECHOLNPAIR("ubl.storage_slot = ", ubl.storage_slot);
}
#endif // AUTO_BED_LEVELING_UBL
- #if HAS_MESH
-
- #if ENABLED(MESH_BED_LEVELING)
- #define Z_VALUES(X,Y) mbl.z_values[X][Y]
- #else
- #define Z_VALUES(X,Y) z_values[X][Y]
- #endif
-
- // Subtract the given value or the mean from all mesh values
- if (leveling_is_valid() && parser.seen('C')) {
- const float cval = parser.value_float();
- #if ENABLED(AUTO_BED_LEVELING_UBL)
-
- set_bed_leveling_enabled(false);
- ubl.adjust_mesh_to_mean(true, cval);
-
- #else
-
- #if ENABLED(M420_C_USE_MEAN)
-
- // Get the sum and average of all mesh values
- float mesh_sum = 0;
- for (uint8_t x = GRID_MAX_POINTS_X; x--;)
- for (uint8_t y = GRID_MAX_POINTS_Y; y--;)
- mesh_sum += Z_VALUES(x, y);
- const float zmean = mesh_sum / float(GRID_MAX_POINTS);
-
- #else
-
- // Find the low and high mesh values
- float lo_val = 100, hi_val = -100;
- for (uint8_t x = GRID_MAX_POINTS_X; x--;)
- for (uint8_t y = GRID_MAX_POINTS_Y; y--;) {
- const float z = Z_VALUES(x, y);
- NOMORE(lo_val, z);
- NOLESS(hi_val, z);
- }
- // Take the mean of the lowest and highest
- const float zmean = (lo_val + hi_val) / 2.0 + cval;
-
- #endif
-
- // If not very close to 0, adjust the mesh
- if (!NEAR_ZERO(zmean)) {
- set_bed_leveling_enabled(false);
- // Subtract the mean from all values
- for (uint8_t x = GRID_MAX_POINTS_X; x--;)
- for (uint8_t y = GRID_MAX_POINTS_Y; y--;)
- Z_VALUES(x, y) -= zmean;
- #if ENABLED(ABL_BILINEAR_SUBDIVISION)
- bed_level_virt_interpolate();
- #endif
- }
-
- #endif
- }
-
- #endif // HAS_MESH
-
// V to print the matrix or mesh
if (parser.seen('V')) {
#if ABL_PLANAR
@@ -10652,7 +9712,7 @@ void quickstop_stepper() {
#endif
#elif ENABLED(MESH_BED_LEVELING)
SERIAL_ECHOLNPGM("Mesh Bed Level data:");
- mbl.report_mesh();
+ mbl_mesh_report();
#endif
}
#endif
@@ -10662,17 +9722,21 @@ void quickstop_stepper() {
if (parser.seen('Z')) set_z_fade_height(parser.value_linear_units(), false);
#endif
- // Enable leveling if specified, or if previously active
- set_bed_leveling_enabled(to_enable);
+ bool to_enable = false;
+ if (parser.seen('S')) {
+ to_enable = parser.value_bool();
+ set_bed_leveling_enabled(to_enable);
+ }
- // Error if leveling failed to enable or reenable
- if (to_enable && !planner.leveling_active) {
+ const bool new_status = planner.leveling_active;
+
+ if (to_enable && !new_status) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_M420_FAILED);
}
SERIAL_ECHO_START();
- SERIAL_ECHOLNPAIR("Bed Leveling ", planner.leveling_active ? MSG_ON : MSG_OFF);
+ SERIAL_ECHOLNPAIR("Bed Leveling ", new_status ? MSG_ON : MSG_OFF);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHO_START();
@@ -10687,8 +9751,7 @@ void quickstop_stepper() {
if (memcmp(oldpos, current_position, sizeof(oldpos)))
report_current_position();
}
-
-#endif // HAS_LEVELING
+#endif
#if ENABLED(MESH_BED_LEVELING)
@@ -10760,7 +9823,6 @@ void quickstop_stepper() {
* Usage:
* M421 I J Z
* M421 I J Q
- * M421 I J N
* M421 C Z
* M421 C Q
*/
@@ -10769,7 +9831,6 @@ void quickstop_stepper() {
const bool hasI = ix >= 0,
hasJ = iy >= 0,
hasC = parser.seen('C'),
- hasN = parser.seen('N'),
hasZ = parser.seen('Z'),
hasQ = !hasZ && parser.seen('Q');
@@ -10779,7 +9840,7 @@ void quickstop_stepper() {
iy = location.y_index;
}
- if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN)) {
+ if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS);
}
@@ -10788,7 +9849,7 @@ void quickstop_stepper() {
SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY);
}
else
- ubl.z_values[ix][iy] = hasN ? NAN : parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0);
+ ubl.z_values[ix][iy] = parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0);
}
#endif // AUTO_BED_LEVELING_UBL
@@ -10862,36 +9923,13 @@ inline void gcode_M502() {
}
#endif
-#if ENABLED(EEPROM_SETTINGS)
- /**
- * M504: Validate EEPROM Contents
- */
- inline void gcode_M504() {
- if (settings.validate()) {
- SERIAL_ECHO_START();
- SERIAL_ECHOLNPGM("EEPROM OK");
- }
- }
-#endif
-
-#if ENABLED(SDSUPPORT)
-
- /**
- * M524: Abort the current SD print job (started with M24)
- */
- inline void gcode_M524() {
- if (IS_SD_PRINTING()) card.abort_sd_printing = true;
- }
-
-#endif // SDSUPPORT
-
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
/**
* M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>)
*/
inline void gcode_M540() {
- if (parser.seen('S')) planner.abort_on_endstop_hit = parser.value_bool();
+ if (parser.seen('S')) stepper.abort_on_endstop_hit = parser.value_bool();
}
#endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
@@ -10899,18 +9937,16 @@ inline void gcode_M502() {
#if HAS_BED_PROBE
inline void gcode_M851() {
- if (parser.seenval('Z')) {
- const float value = parser.value_linear_units();
- if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
- zprobe_zoffset = value;
- else {
- SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");
- }
- return;
- }
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_PROBE_Z_OFFSET);
+ if (parser.seen('Z')) {
+ const float value = parser.value_linear_units();
+ if (!WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
+ SERIAL_ECHOLNPGM(" " MSG_Z_MIN " " STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " " MSG_Z_MAX " " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX));
+ return;
+ }
+ zprobe_zoffset = value;
+ }
SERIAL_ECHOLNPAIR(": ", zprobe_zoffset);
}
@@ -10984,9 +10020,7 @@ inline void gcode_M502() {
if (!ijk) {
SERIAL_ECHO_START();
- SERIAL_ECHOPGM(MSG_SKEW_FACTOR " XY: ");
- SERIAL_ECHO_F(planner.xy_skew_factor, 6);
- SERIAL_EOL();
+ SERIAL_ECHOPAIR(MSG_SKEW_FACTOR " XY: ", planner.xy_skew_factor);
#if ENABLED(SKEW_CORRECTION_FOR_Z)
SERIAL_ECHOPAIR(" XZ: ", planner.xz_skew_factor);
SERIAL_ECHOLNPAIR(" YZ: ", planner.yz_skew_factor);
@@ -11003,72 +10037,65 @@ inline void gcode_M502() {
/**
* M600: Pause for filament change
*
- * E[distance] - Retract the filament this far
+ * E[distance] - Retract the filament this far (negative value)
* Z[distance] - Move the Z axis by this distance
* X[position] - Move to this X position, with Y
* Y[position] - Move to this Y position, with X
- * U[distance] - Retract distance for removal (manual reload)
- * L[distance] - Extrude distance for insertion (manual reload)
+ * U[distance] - Retract distance for removal (negative value) (manual reload)
+ * L[distance] - Extrude distance for insertion (positive value) (manual reload)
* B[count] - Number of times to beep, -1 for indefinite (if equipped with a buzzer)
- * T[toolhead] - Select extruder for filament change
*
* Default values are used for omitted arguments.
+ *
*/
inline void gcode_M600() {
point_t park_point = NOZZLE_PARK_POINT;
- if (get_target_extruder_from_command(600)) return;
-
- // Show initial message
- #if ENABLED(ULTIPANEL)
- lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, target_extruder);
- #endif
-
#if ENABLED(HOME_BEFORE_FILAMENT_CHANGE)
// Don't allow filament change without homing first
if (axis_unhomed_error()) home_all_axes();
#endif
- #if EXTRUDERS > 1
- // Change toolhead if specified
- uint8_t active_extruder_before_filament_change = active_extruder;
- if (active_extruder != target_extruder)
- tool_change(target_extruder, 0, true);
- #endif
-
// Initial retract before move to filament change position
- const float retract = -ABS(parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0
+ const float retract = parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0
#ifdef PAUSE_PARK_RETRACT_LENGTH
- + (PAUSE_PARK_RETRACT_LENGTH)
+ - (PAUSE_PARK_RETRACT_LENGTH)
#endif
- );
+ ;
// Lift Z axis
- if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
+ if (parser.seenval('Z'))
+ park_point.z = parser.linearval('Z');
// Move XY axes to filament change position or given position
- if (parser.seenval('X')) park_point.x = parser.linearval('X');
- if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
+ if (parser.seenval('X'))
+ park_point.x = parser.linearval('X');
- #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
+ if (parser.seenval('Y'))
+ park_point.y = parser.linearval('Y');
+
+ #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
#endif
// Unload filament
- const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) :
- filament_change_unload_length[active_extruder]);
+ const float unload_length = parser.seen('U') ? parser.value_axis_units(E_AXIS) : 0
+ #if defined(FILAMENT_CHANGE_UNLOAD_LENGTH) && FILAMENT_CHANGE_UNLOAD_LENGTH > 0
+ - (FILAMENT_CHANGE_UNLOAD_LENGTH)
+ #endif
+ ;
- // Slow load filament
- constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
-
- // Fast load filament
- const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) :
- filament_change_load_length[active_extruder]);
+ // Load filament
+ const float load_length = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
+ #ifdef FILAMENT_CHANGE_LOAD_LENGTH
+ + FILAMENT_CHANGE_LOAD_LENGTH
+ #endif
+ ;
const int beep_count = parser.intval('B',
- #ifdef FILAMENT_CHANGE_ALERT_BEEPS
- FILAMENT_CHANGE_ALERT_BEEPS
+ #ifdef FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS
+ FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS
#else
-1
#endif
@@ -11076,56 +10103,21 @@ inline void gcode_M502() {
const bool job_running = print_job_timer.isRunning();
- if (pause_print(retract, park_point, unload_length, true)) {
+ if (pause_print(retract, park_point, unload_length, beep_count, true)) {
wait_for_filament_reload(beep_count);
- resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count);
+ resume_print(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, beep_count);
}
- #if EXTRUDERS > 1
- // Restore toolhead if it was changed
- if (active_extruder_before_filament_change != active_extruder)
- tool_change(active_extruder_before_filament_change, 0, true);
- #endif
-
// Resume the print job timer if it was running
if (job_running) print_job_timer.start();
}
- /**
- * M603: Configure filament change
- *
- * T[toolhead] - Select extruder to configure, active extruder if not specified
- * U[distance] - Retract distance for removal, for the specified extruder
- * L[distance] - Extrude distance for insertion, for the specified extruder
- *
- */
- inline void gcode_M603() {
-
- if (get_target_extruder_from_command(603)) return;
-
- // Unload length
- if (parser.seen('U')) {
- filament_change_unload_length[target_extruder] = ABS(parser.value_axis_units(E_AXIS));
- #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
- NOMORE(filament_change_unload_length[target_extruder], EXTRUDE_MAXLENGTH);
- #endif
- }
-
- // Load length
- if (parser.seen('L')) {
- filament_change_load_length[target_extruder] = ABS(parser.value_axis_units(E_AXIS));
- #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
- NOMORE(filament_change_load_length[target_extruder], EXTRUDE_MAXLENGTH);
- #endif
- }
- }
-
#endif // ADVANCED_PAUSE_FEATURE
#if ENABLED(MK2_MULTIPLEXER)
inline void select_multiplexed_stepper(const uint8_t e) {
- planner.synchronize();
+ stepper.synchronize();
disable_e_steppers();
WRITE(E_MUX0_PIN, TEST(e, 0) ? HIGH : LOW);
WRITE(E_MUX1_PIN, TEST(e, 1) ? HIGH : LOW);
@@ -11133,6 +10125,26 @@ inline void gcode_M502() {
safe_delay(100);
}
+ /**
+ * M702: Unload all extruders
+ */
+ inline void gcode_M702() {
+ for (uint8_t s = 0; s < E_STEPPERS; s++) {
+ select_multiplexed_stepper(e);
+ // TODO: standard unload filament function
+ // MK2 firmware behavior:
+ // - Make sure temperature is high enough
+ // - Raise Z to at least 15 to make room
+ // - Extrude 1cm of filament in 1 second
+ // - Under 230C quickly purge ~12mm, over 230C purge ~10mm
+ // - Change E max feedrate to 80, eject the filament from the tube. Sync.
+ // - Restore E max feedrate to 50
+ }
+ // Go back to the last active extruder
+ select_multiplexed_stepper(active_extruder);
+ disable_e_steppers();
+ }
+
#endif // MK2_MULTIPLEXER
#if ENABLED(DUAL_X_CARRIAGE)
@@ -11150,14 +10162,14 @@ inline void gcode_M502() {
* Note: the X axis should be homed after changing dual x-carriage mode.
*/
inline void gcode_M605() {
- planner.synchronize();
+ stepper.synchronize();
if (parser.seen('S')) dual_x_carriage_mode = (DualXMode)parser.value_byte();
switch (dual_x_carriage_mode) {
case DXC_FULL_CONTROL_MODE:
case DXC_AUTO_PARK_MODE:
break;
case DXC_DUPLICATION_MODE:
- if (parser.seen('X')) duplicate_extruder_x_offset = MAX(parser.value_linear_units(), X2_MIN_POS - x_home_pos(0));
+ if (parser.seen('X')) duplicate_extruder_x_offset = max(parser.value_linear_units(), X2_MIN_POS - x_home_pos(0));
if (parser.seen('R')) duplicate_extruder_temp_offset = parser.value_celsius_diff();
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
@@ -11182,502 +10194,520 @@ inline void gcode_M502() {
#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
inline void gcode_M605() {
- planner.synchronize();
- extruder_duplication_enabled = parser.intval('S') == int(DXC_DUPLICATION_MODE);
+ stepper.synchronize();
+ extruder_duplication_enabled = parser.intval('S') == (int)DXC_DUPLICATION_MODE;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
}
#endif // DUAL_NOZZLE_DUPLICATION_MODE
-#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
-
- /**
- * M701: Load filament
- *
- * T - Optional extruder number. Current extruder if omitted.
- * Z - Move the Z axis by this distance
- * L - Extrude distance for insertion (positive value) (manual reload)
- *
- * Default values are used for omitted arguments.
- */
- inline void gcode_M701() {
- point_t park_point = NOZZLE_PARK_POINT;
-
- #if ENABLED(NO_MOTION_BEFORE_HOMING)
- // Only raise Z if the machine is homed
- if (axis_unhomed_error()) park_point.z = 0;
- #endif
-
- if (get_target_extruder_from_command(701)) return;
-
- // Z axis lift
- if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
-
- // Show initial "wait for load" message
- #if ENABLED(ULTIPANEL)
- lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
- #endif
-
- #if EXTRUDERS > 1
- // Change toolhead if specified
- uint8_t active_extruder_before_filament_change = active_extruder;
- if (active_extruder != target_extruder)
- tool_change(target_extruder, 0, true);
- #endif
-
- // Lift Z axis
- if (park_point.z > 0)
- do_blocking_move_to_z(MIN(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
-
- constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
- const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : filament_change_load_length[active_extruder]);
- load_filament(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS,
- true, thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
-
- // Restore Z axis
- if (park_point.z > 0)
- do_blocking_move_to_z(MAX(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE);
-
- #if EXTRUDERS > 1
- // Restore toolhead if it was changed
- if (active_extruder_before_filament_change != active_extruder)
- tool_change(active_extruder_before_filament_change, 0, true);
- #endif
-
- // Show status screen
- #if ENABLED(ULTIPANEL)
- lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
- #endif
- }
-
- /**
- * M702: Unload filament
- *
- * T - Optional extruder number. If omitted, current extruder
- * (or ALL extruders with FILAMENT_UNLOAD_ALL_EXTRUDERS).
- * Z - Move the Z axis by this distance
- * U - Retract distance for removal (manual reload)
- *
- * Default values are used for omitted arguments.
- */
- inline void gcode_M702() {
- point_t park_point = NOZZLE_PARK_POINT;
-
- #if ENABLED(NO_MOTION_BEFORE_HOMING)
- // Only raise Z if the machine is homed
- if (axis_unhomed_error()) park_point.z = 0;
- #endif
-
- if (get_target_extruder_from_command(702)) return;
-
- // Z axis lift
- if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
-
- // Show initial message
- #if ENABLED(ULTIPANEL)
- lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, target_extruder);
- #endif
-
- #if EXTRUDERS > 1
- // Change toolhead if specified
- uint8_t active_extruder_before_filament_change = active_extruder;
- if (active_extruder != target_extruder)
- tool_change(target_extruder, 0, true);
- #endif
-
- // Lift Z axis
- if (park_point.z > 0)
- do_blocking_move_to_z(MIN(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
-
- // Unload filament
- #if EXTRUDERS > 1 && ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
- if (!parser.seenval('T')) {
- HOTEND_LOOP() {
- if (e != active_extruder) tool_change(e, 0, true);
- unload_filament(-filament_change_unload_length[e], true, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT);
- }
- }
- else
- #endif
- {
- // Unload length
- const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) :
- filament_change_unload_length[target_extruder]);
-
- unload_filament(unload_length, true, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT);
- }
-
- // Restore Z axis
- if (park_point.z > 0)
- do_blocking_move_to_z(MAX(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE);
-
- #if EXTRUDERS > 1
- // Restore toolhead if it was changed
- if (active_extruder_before_filament_change != active_extruder)
- tool_change(active_extruder_before_filament_change, 0, true);
- #endif
-
- // Show status screen
- #if ENABLED(ULTIPANEL)
- lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
- #endif
- }
-
-#endif // FILAMENT_LOAD_UNLOAD_GCODES
-
-#if ENABLED(MAX7219_GCODE)
- /**
- * M7219: Control the Max7219 LED matrix
- *
- * I - Initialize (clear) the matrix
- * F - Fill the matrix (set all bits)
- * P - Dump the LEDs[] array values
- * C - Set a column to the 8-bit value V
- * R - Set a row to the 8-bit value V
- * X - X position of an LED to set or toggle
- * Y - Y position of an LED to set or toggle
- * V - The potentially 32-bit value or on/off state to set
- * (for example: a chain of 4 Max7219 devices can have 32 bit
- * rows or columns depending upon rotation)
- */
- inline void gcode_M7219() {
- if (parser.seen('I')) {
- max7219.register_setup();
- max7219.clear();
- }
-
- if (parser.seen('F')) max7219.fill();
-
- const uint32_t v = parser.ulongval('V');
-
- if (parser.seenval('R')) {
- const uint8_t r = parser.value_byte();
- max7219.set_row(r, v);
- }
- else if (parser.seenval('C')) {
- const uint8_t c = parser.value_byte();
- max7219.set_column(c, v);
- }
- else if (parser.seenval('X') || parser.seenval('Y')) {
- const uint8_t x = parser.byteval('X'), y = parser.byteval('Y');
- if (parser.seenval('V'))
- max7219.led_set(x, y, parser.boolval('V'));
- else
- max7219.led_toggle(x, y);
- }
- else if (parser.seen('D')) {
- const uint8_t line = parser.byteval('D') + (parser.byteval('U') << 3);
- if (line < MAX7219_LINES) {
- max7219.led_line[line] = v;
- return max7219.refresh_line(line);
- }
- }
-
- if (parser.seen('P')) {
- for (uint8_t r = 0; r < MAX7219_LINES; r++) {
- SERIAL_ECHOPGM("led_line[");
- if (r < 10) SERIAL_CHAR(' ');
- SERIAL_ECHO(int(r));
- SERIAL_ECHOPGM("]=");
- for (uint8_t b = 8; b--;) SERIAL_CHAR('0' + TEST(max7219.led_line[r], b));
- SERIAL_EOL();
- }
- }
- }
-#endif // MAX7219_GCODE
-
#if ENABLED(LIN_ADVANCE)
/**
- * M900: Get or Set Linear Advance K-factor
+ * M900: Set and/or Get advance K factor and WH/D ratio
*
- * K Set advance K factor
+ * K Set advance K factor
+ * R Set ratio directly (overrides WH/D)
+ * W H D Set ratio from WH/D
*/
inline void gcode_M900() {
- if (parser.seenval('K')) {
- const float newK = parser.floatval('K');
- if (WITHIN(newK, 0, 10)) {
- planner.synchronize();
- planner.extruder_advance_K = newK;
- }
- else
- SERIAL_PROTOCOLLNPGM("?K value out of range (0-10).");
- }
- else {
- SERIAL_ECHO_START();
- SERIAL_ECHOLNPAIR("Advance K=", planner.extruder_advance_K);
+ stepper.synchronize();
+
+ const float newK = parser.floatval('K', -1);
+ if (newK >= 0) planner.extruder_advance_k = newK;
+
+ float newR = parser.floatval('R', -1);
+ if (newR < 0) {
+ const float newD = parser.floatval('D', -1),
+ newW = parser.floatval('W', -1),
+ newH = parser.floatval('H', -1);
+ if (newD >= 0 && newW >= 0 && newH >= 0)
+ newR = newD ? (newW * newH) / (sq(newD * 0.5) * M_PI) : 0;
}
+ if (newR >= 0) planner.advance_ed_ratio = newR;
+
+ SERIAL_ECHO_START();
+ SERIAL_ECHOPAIR("Advance K=", planner.extruder_advance_k);
+ SERIAL_ECHOPGM(" E/D=");
+ const float ratio = planner.advance_ed_ratio;
+ if (ratio) SERIAL_ECHO(ratio); else SERIAL_ECHOPGM("Auto");
+ SERIAL_EOL();
}
#endif // LIN_ADVANCE
#if HAS_TRINAMIC
+ static bool report_tmc_status = false;
+ const char extended_axis_codes[11][3] = { "X", "X2", "Y", "Y2", "Z", "Z2", "E0", "E1", "E2", "E3", "E4" };
+ enum TMC_AxisEnum {
+ TMC_X,
+ TMC_X2,
+ TMC_Y,
+ TMC_Y2,
+ TMC_Z,
+ TMC_Z2,
+ TMC_E0,
+ TMC_E1,
+ TMC_E2,
+ TMC_E3,
+ TMC_E4
+ };
#if ENABLED(TMC_DEBUG)
- inline void gcode_M122() {
- if (parser.seen('S'))
- tmc_set_report_status(parser.value_bool());
- else
- tmc_report_all();
+ enum TMC_debug_enum {
+ TMC_CODES,
+ TMC_ENABLED,
+ TMC_CURRENT,
+ TMC_RMS_CURRENT,
+ TMC_MAX_CURRENT,
+ TMC_IRUN,
+ TMC_IHOLD,
+ TMC_CS_ACTUAL,
+ TMC_PWM_SCALE,
+ TMC_VSENSE,
+ TMC_STEALTHCHOP,
+ TMC_MICROSTEPS,
+ TMC_TSTEP,
+ TMC_TPWMTHRS,
+ TMC_TPWMTHRS_MMS,
+ TMC_OTPW,
+ TMC_OTPW_TRIGGERED,
+ TMC_TOFF,
+ TMC_TBL,
+ TMC_HEND,
+ TMC_HSTRT,
+ TMC_SGT
+ };
+ enum TMC_drv_status_enum {
+ TMC_DRV_CODES,
+ TMC_STST,
+ TMC_OLB,
+ TMC_OLA,
+ TMC_S2GB,
+ TMC_S2GA,
+ TMC_DRV_OTPW,
+ TMC_OT,
+ TMC_STALLGUARD,
+ TMC_DRV_CS_ACTUAL,
+ TMC_FSACTIVE,
+ TMC_SG_RESULT,
+ TMC_DRV_STATUS_HEX,
+ TMC_T157,
+ TMC_T150,
+ TMC_T143,
+ TMC_T120,
+ TMC_STEALTH,
+ TMC_S2VSB,
+ TMC_S2VSA
+ };
+ static void drv_status_print_hex(const char name[], const uint32_t drv_status) {
+ SERIAL_ECHO(name);
+ SERIAL_ECHOPGM(" = 0x");
+ for(int B=24; B>=8; B-=8){
+ MYSERIAL.print((drv_status>>(B+4))&0xF, HEX);
+ MYSERIAL.print((drv_status>>B)&0xF, HEX);
+ MYSERIAL.print(':');
+ }
+ MYSERIAL.print((drv_status>>4)&0xF, HEX);
+ MYSERIAL.print((drv_status)&0xF, HEX);
+ SERIAL_EOL();
}
- #endif // TMC_DEBUG
- /**
- * M906: Set motor current in milliamps using axis codes X, Y, Z, E
- * Uses axis codes A, B, C, D, E for Hangprinter
- * Report driver currents when no axis specified
- */
- inline void gcode_M906() {
- #define TMC_SAY_CURRENT(Q) tmc_get_current(stepper##Q, TMC_##Q)
- #define TMC_SET_CURRENT(Q) tmc_set_current(stepper##Q, value)
+ #if ENABLED(HAVE_TMC2130)
+ static void tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) {
+ switch(i) {
+ case TMC_PWM_SCALE: MYSERIAL.print(st.PWM_SCALE(), DEC); break;
+ case TMC_TSTEP: SERIAL_ECHO(st.TSTEP()); break;
+ case TMC_SGT: MYSERIAL.print(st.sgt(), DEC); break;
+ case TMC_STEALTHCHOP: serialprintPGM(st.stealthChop() ? PSTR("true") : PSTR("false")); break;
+ default: break;
+ }
+ }
+ static void tmc_parse_drv_status(TMC2130Stepper &st, const TMC_drv_status_enum i) {
+ switch(i) {
+ case TMC_STALLGUARD: if (st.stallguard()) SERIAL_ECHOPGM("X"); break;
+ case TMC_SG_RESULT: MYSERIAL.print(st.sg_result(), DEC); break;
+ case TMC_FSACTIVE: if (st.fsactive()) SERIAL_ECHOPGM("X"); break;
+ default: break;
+ }
+ }
+ #endif
+ #if ENABLED(HAVE_TMC2208)
+ static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) {
+ switch(i) {
+ case TMC_TSTEP:
+ {
+ uint32_t data = 0;
+ st.TSTEP(&data);
+ MYSERIAL.print(data);
+ break;
+ }
+ case TMC_PWM_SCALE: MYSERIAL.print(st.pwm_scale_sum(), DEC); break;
+ case TMC_STEALTHCHOP: serialprintPGM(st.stealth() ? PSTR("true") : PSTR("false")); break;
+ case TMC_S2VSA: if (st.s2vsa()) SERIAL_ECHOPGM("X"); break;
+ case TMC_S2VSB: if (st.s2vsb()) SERIAL_ECHOPGM("X"); break;
+ default: break;
+ }
+ }
+ static void tmc_parse_drv_status(TMC2208Stepper &st, const TMC_drv_status_enum i) {
+ switch(i) {
+ case TMC_T157: if (st.t157()) SERIAL_ECHOPGM("X"); break;
+ case TMC_T150: if (st.t150()) SERIAL_ECHOPGM("X"); break;
+ case TMC_T143: if (st.t143()) SERIAL_ECHOPGM("X"); break;
+ case TMC_T120: if (st.t120()) SERIAL_ECHOPGM("X"); break;
+ default: break;
+ }
+ }
+ #endif
+ template
+ static void tmc_status(TMC &st, TMC_AxisEnum axis, const TMC_debug_enum i, const float spmm) {
+ SERIAL_ECHO('\t');
+ switch(i) {
+ case TMC_CODES: SERIAL_ECHO(extended_axis_codes[axis]); break;
+ case TMC_ENABLED: serialprintPGM(st.isEnabled() ? PSTR("true") : PSTR("false")); break;
+ case TMC_CURRENT: SERIAL_ECHO(st.getCurrent()); break;
+ case TMC_RMS_CURRENT: MYSERIAL.print(st.rms_current()); break;
+ case TMC_MAX_CURRENT: MYSERIAL.print((float)st.rms_current()*1.41, 0); break;
+ case TMC_IRUN:
+ MYSERIAL.print(st.irun(), DEC);
+ SERIAL_ECHOPGM("/31");
+ break;
+ case TMC_IHOLD:
+ MYSERIAL.print(st.ihold(), DEC);
+ SERIAL_ECHOPGM("/31");
+ break;
+ case TMC_CS_ACTUAL:
+ MYSERIAL.print(st.cs_actual(), DEC);
+ SERIAL_ECHOPGM("/31");
+ break;
- bool report = true;
- const uint8_t index = parser.byteval('I');
- LOOP_NUM_AXIS(i) if (uint16_t value = parser.intval(RAW_AXIS_CODES(i))) {
+ case TMC_VSENSE: serialprintPGM(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); break;
- report = false;
- switch (i) {
- // Assumes {A_AXIS, B_AXIS, C_AXIS} == {X_AXIS, Y_AXIS, Z_AXIS}
- case X_AXIS:
- #if AXIS_IS_TMC(X)
- if (index < 2) TMC_SET_CURRENT(X);
- #endif
- #if AXIS_IS_TMC(X2)
- if (!(index & 1)) TMC_SET_CURRENT(X2);
- #endif
- break;
- case Y_AXIS:
- #if AXIS_IS_TMC(Y)
- if (index < 2) TMC_SET_CURRENT(Y);
- #endif
- #if AXIS_IS_TMC(Y2)
- if (!(index & 1)) TMC_SET_CURRENT(Y2);
- #endif
- break;
- case Z_AXIS:
- #if AXIS_IS_TMC(Z)
- if (index < 2) TMC_SET_CURRENT(Z);
- #endif
- #if AXIS_IS_TMC(Z2)
- if (!(index & 1)) TMC_SET_CURRENT(Z2);
- #endif
- break;
- case E_AXIS: {
- if (get_target_extruder_from_command(906)) return;
- switch (target_extruder) {
- #if AXIS_IS_TMC(E0)
- case 0: TMC_SET_CURRENT(E0); break;
- #endif
- #if ENABLED(HANGPRINTER)
- // Avoid setting the D-current
- #if AXIS_IS_TMC(E1) && EXTRUDERS > 1
- case 1: TMC_SET_CURRENT(E1); break;
- #endif
- #if AXIS_IS_TMC(E2) && EXTRUDERS > 2
- case 2: TMC_SET_CURRENT(E2); break;
- #endif
- #if AXIS_IS_TMC(E3) && EXTRUDERS > 3
- case 3: TMC_SET_CURRENT(E3); break;
- #endif
- #if AXIS_IS_TMC(E4) && EXTRUDERS > 4
- case 4: TMC_SET_CURRENT(E4); break;
- #endif
- #else
- #if AXIS_IS_TMC(E1)
- case 1: TMC_SET_CURRENT(E1); break;
- #endif
- #if AXIS_IS_TMC(E2)
- case 2: TMC_SET_CURRENT(E2); break;
- #endif
- #if AXIS_IS_TMC(E3)
- case 3: TMC_SET_CURRENT(E3); break;
- #endif
- #if AXIS_IS_TMC(E4)
- case 4: TMC_SET_CURRENT(E4); break;
- #endif
- #endif
+ case TMC_MICROSTEPS: SERIAL_ECHO(st.microsteps()); break;
+ case TMC_TPWMTHRS:
+ {
+ uint32_t tpwmthrs_val = st.TPWMTHRS();
+ SERIAL_ECHO(tpwmthrs_val);
}
- } break;
- #if ENABLED(HANGPRINTER)
- case D_AXIS:
- // D is connected on the first of E1, E2, E3, E4 output that is not an extruder
- #if AXIS_IS_TMC(E1) && EXTRUDERS == 1
- TMC_SET_CURRENT(E1); break;
- #endif
- #if AXIS_IS_TMC(E2) && EXTRUDERS == 2
- TMC_SET_CURRENT(E2); break;
- #endif
- #if AXIS_IS_TMC(E3) && EXTRUDERS == 3
- TMC_SET_CURRENT(E3); break;
- #endif
- #if AXIS_IS_TMC(E4) && EXTRUDERS == 4
- TMC_SET_CURRENT(E4); break;
- #endif
- #endif
+ break;
+ case TMC_TPWMTHRS_MMS:
+ {
+ uint32_t tpwmthrs_val = st.TPWMTHRS();
+ tpwmthrs_val ? SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)) : SERIAL_ECHO('-');
+ }
+ break;
+ case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break;
+ case TMC_OTPW_TRIGGERED: serialprintPGM(st.getOTPW() ? PSTR("true") : PSTR("false")); break;
+ case TMC_TOFF: MYSERIAL.print(st.toff(), DEC); break;
+ case TMC_TBL: MYSERIAL.print(st.blank_time(), DEC); break;
+ case TMC_HEND: MYSERIAL.print(st.hysterisis_end(), DEC); break;
+ case TMC_HSTRT: MYSERIAL.print(st.hysterisis_start(), DEC); break;
+ default: tmc_status(st, i); break;
+ }
+ }
+ template
+ static void tmc_parse_drv_status(TMC &st, TMC_AxisEnum axis, const TMC_drv_status_enum i) {
+ SERIAL_ECHOPGM("\t");
+ switch(i) {
+ case TMC_DRV_CODES: SERIAL_ECHO(extended_axis_codes[axis]); break;
+ case TMC_STST: if (st.stst()) SERIAL_ECHOPGM("X"); break;
+ case TMC_OLB: if (st.olb()) SERIAL_ECHOPGM("X"); break;
+ case TMC_OLA: if (st.ola()) SERIAL_ECHOPGM("X"); break;
+ case TMC_S2GB: if (st.s2gb()) SERIAL_ECHOPGM("X"); break;
+ case TMC_S2GA: if (st.s2ga()) SERIAL_ECHOPGM("X"); break;
+ case TMC_DRV_OTPW: if (st.otpw()) SERIAL_ECHOPGM("X"); break;
+ case TMC_OT: if (st.ot()) SERIAL_ECHOPGM("X"); break;
+ case TMC_DRV_CS_ACTUAL: MYSERIAL.print(st.cs_actual(), DEC); break;
+ case TMC_DRV_STATUS_HEX:drv_status_print_hex(extended_axis_codes[axis], st.DRV_STATUS()); break;
+ default: tmc_parse_drv_status(st, i); break;
}
}
- if (report) {
- #if AXIS_IS_TMC(X)
- TMC_SAY_CURRENT(X);
+ static void tmc_debug_loop(const TMC_debug_enum i) {
+ #if X_IS_TRINAMIC
+ tmc_status(stepperX, TMC_X, i, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if AXIS_IS_TMC(X2)
- TMC_SAY_CURRENT(X2);
+ #if X2_IS_TRINAMIC
+ tmc_status(stepperX2, TMC_X2, i, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if AXIS_IS_TMC(Y)
- TMC_SAY_CURRENT(Y);
+
+ #if Y_IS_TRINAMIC
+ tmc_status(stepperY, TMC_Y, i, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if AXIS_IS_TMC(Y2)
- TMC_SAY_CURRENT(Y2);
+ #if Y2_IS_TRINAMIC
+ tmc_status(stepperY2, TMC_Y2, i, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if AXIS_IS_TMC(Z)
- TMC_SAY_CURRENT(Z);
+
+ #if Z_IS_TRINAMIC
+ tmc_status(stepperZ, TMC_Z, i, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if AXIS_IS_TMC(Z2)
- TMC_SAY_CURRENT(Z2);
+ #if Z2_IS_TRINAMIC
+ tmc_status(stepperZ2, TMC_Z2, i, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if AXIS_IS_TMC(E0)
- TMC_SAY_CURRENT(E0);
+
+ #if E0_IS_TRINAMIC
+ tmc_status(stepperE0, TMC_E0, i, planner.axis_steps_per_mm[E_AXIS]);
#endif
- #if ENABLED(HANGPRINTER)
- // D is connected on the first of E1, E2, E3, E4 output that is not an extruder
- #if AXIS_IS_TMC(E1) && EXTRUDERS == 1
- TMC_SAY_CURRENT(E1);
- #endif
- #if AXIS_IS_TMC(E2) && EXTRUDERS == 2
- TMC_SAY_CURRENT(E2);
- #endif
- #if AXIS_IS_TMC(E3) && EXTRUDERS == 3
- TMC_SAY_CURRENT(E3);
- #endif
- #if AXIS_IS_TMC(E4) && EXTRUDERS == 4
- TMC_SAY_CURRENT(E4);
- #endif
- #else
- #if AXIS_IS_TMC(E1)
- TMC_SAY_CURRENT(E1);
- #endif
- #if AXIS_IS_TMC(E2)
- TMC_SAY_CURRENT(E2);
- #endif
- #if AXIS_IS_TMC(E3)
- TMC_SAY_CURRENT(E3);
- #endif
- #if AXIS_IS_TMC(E4)
- TMC_SAY_CURRENT(E4);
- #endif
+ #if E1_IS_TRINAMIC
+ tmc_status(stepperE1, TMC_E1, i, planner.axis_steps_per_mm[E_AXIS+1]);
#endif
+ #if E2_IS_TRINAMIC
+ tmc_status(stepperE2, TMC_E2, i, planner.axis_steps_per_mm[E_AXIS+2]);
+ #endif
+ #if E3_IS_TRINAMIC
+ tmc_status(stepperE3, TMC_E3, i, planner.axis_steps_per_mm[E_AXIS+3]);
+ #endif
+ #if E4_IS_TRINAMIC
+ tmc_status(stepperE4, TMC_E4, i, planner.axis_steps_per_mm[E_AXIS+4]);
+ #endif
+
+ SERIAL_EOL();
}
+
+ static void drv_status_loop(const TMC_drv_status_enum i) {
+ #if X_IS_TRINAMIC
+ tmc_parse_drv_status(stepperX, TMC_X, i);
+ #endif
+ #if X2_IS_TRINAMIC
+ tmc_parse_drv_status(stepperX2, TMC_X2, i);
+ #endif
+
+ #if Y_IS_TRINAMIC
+ tmc_parse_drv_status(stepperY, TMC_Y, i);
+ #endif
+ #if Y2_IS_TRINAMIC
+ tmc_parse_drv_status(stepperY2, TMC_Y2, i);
+ #endif
+
+ #if Z_IS_TRINAMIC
+ tmc_parse_drv_status(stepperZ, TMC_Z, i);
+ #endif
+ #if Z2_IS_TRINAMIC
+ tmc_parse_drv_status(stepperZ2, TMC_Z2, i);
+ #endif
+
+ #if E0_IS_TRINAMIC
+ tmc_parse_drv_status(stepperE0, TMC_E0, i);
+ #endif
+ #if E1_IS_TRINAMIC
+ tmc_parse_drv_status(stepperE1, TMC_E1, i);
+ #endif
+ #if E2_IS_TRINAMIC
+ tmc_parse_drv_status(stepperE2, TMC_E2, i);
+ #endif
+ #if E3_IS_TRINAMIC
+ tmc_parse_drv_status(stepperE3, TMC_E3, i);
+ #endif
+ #if E4_IS_TRINAMIC
+ tmc_parse_drv_status(stepperE4, TMC_E4, i);
+ #endif
+
+ SERIAL_EOL();
+ }
+
+ inline void gcode_M122() {
+ if (parser.seen('S')) {
+ if (parser.value_bool()) {
+ SERIAL_ECHOLNPGM("axis:pwm_scale |status_response|");
+ report_tmc_status = true;
+ } else
+ report_tmc_status = false;
+ } else {
+ SERIAL_ECHOPGM("\t"); tmc_debug_loop(TMC_CODES);
+ SERIAL_ECHOPGM("Enabled\t"); tmc_debug_loop(TMC_ENABLED);
+ SERIAL_ECHOPGM("Set current"); tmc_debug_loop(TMC_CURRENT);
+ SERIAL_ECHOPGM("RMS current"); tmc_debug_loop(TMC_RMS_CURRENT);
+ SERIAL_ECHOPGM("MAX current"); tmc_debug_loop(TMC_MAX_CURRENT);
+ SERIAL_ECHOPGM("Run current"); tmc_debug_loop(TMC_IRUN);
+ SERIAL_ECHOPGM("Hold current"); tmc_debug_loop(TMC_IHOLD);
+ SERIAL_ECHOPGM("CS actual\t"); tmc_debug_loop(TMC_CS_ACTUAL);
+ SERIAL_ECHOPGM("PWM scale"); tmc_debug_loop(TMC_PWM_SCALE);
+ SERIAL_ECHOPGM("vsense\t"); tmc_debug_loop(TMC_VSENSE);
+ SERIAL_ECHOPGM("stealthChop"); tmc_debug_loop(TMC_STEALTHCHOP);
+ SERIAL_ECHOPGM("msteps\t"); tmc_debug_loop(TMC_MICROSTEPS);
+ SERIAL_ECHOPGM("tstep\t"); tmc_debug_loop(TMC_TSTEP);
+ SERIAL_ECHOPGM("pwm\nthreshold\t"); tmc_debug_loop(TMC_TPWMTHRS);
+ SERIAL_ECHOPGM("[mm/s]\t"); tmc_debug_loop(TMC_TPWMTHRS_MMS);
+ SERIAL_ECHOPGM("OT prewarn"); tmc_debug_loop(TMC_OTPW);
+ SERIAL_ECHOPGM("OT prewarn has\nbeen triggered"); tmc_debug_loop(TMC_OTPW_TRIGGERED);
+ SERIAL_ECHOPGM("off time\t"); tmc_debug_loop(TMC_TOFF);
+ SERIAL_ECHOPGM("blank time"); tmc_debug_loop(TMC_TBL);
+ SERIAL_ECHOPGM("hysterisis\n-end\t"); tmc_debug_loop(TMC_HEND);
+ SERIAL_ECHOPGM("-start\t"); tmc_debug_loop(TMC_HSTRT);
+ SERIAL_ECHOPGM("Stallguard thrs"); tmc_debug_loop(TMC_SGT);
+
+ SERIAL_ECHOPGM("DRVSTATUS"); drv_status_loop(TMC_DRV_CODES);
+ #if ENABLED(HAVE_TMC2130)
+ SERIAL_ECHOPGM("stallguard\t"); drv_status_loop(TMC_STALLGUARD);
+ SERIAL_ECHOPGM("sg_result\t"); drv_status_loop(TMC_SG_RESULT);
+ SERIAL_ECHOPGM("fsactive\t"); drv_status_loop(TMC_FSACTIVE);
+ #endif
+ SERIAL_ECHOPGM("stst\t"); drv_status_loop(TMC_STST);
+ SERIAL_ECHOPGM("olb\t"); drv_status_loop(TMC_OLB);
+ SERIAL_ECHOPGM("ola\t"); drv_status_loop(TMC_OLA);
+ SERIAL_ECHOPGM("s2gb\t"); drv_status_loop(TMC_S2GB);
+ SERIAL_ECHOPGM("s2ga\t"); drv_status_loop(TMC_S2GA);
+ SERIAL_ECHOPGM("otpw\t"); drv_status_loop(TMC_DRV_OTPW);
+ SERIAL_ECHOPGM("ot\t"); drv_status_loop(TMC_OT);
+ #if ENABLED(HAVE_TMC2208)
+ SERIAL_ECHOPGM("157C\t"); drv_status_loop(TMC_T157);
+ SERIAL_ECHOPGM("150C\t"); drv_status_loop(TMC_T150);
+ SERIAL_ECHOPGM("143C\t"); drv_status_loop(TMC_T143);
+ SERIAL_ECHOPGM("120C\t"); drv_status_loop(TMC_T120);
+ SERIAL_ECHOPGM("s2vsa\t"); drv_status_loop(TMC_S2VSA);
+ SERIAL_ECHOPGM("s2vsb\t"); drv_status_loop(TMC_S2VSB);
+ #endif
+ SERIAL_ECHOLNPGM("Driver registers:");drv_status_loop(TMC_DRV_STATUS_HEX);
+ }
+ }
+ #endif
+
+ template
+ static void tmc_get_current(TMC &st, const char name[]) {
+ SERIAL_ECHO(name);
+ SERIAL_ECHOPGM(" axis driver current: ");
+ SERIAL_ECHOLN(st.getCurrent());
+ }
+ template
+ static void tmc_set_current(TMC &st, const char name[], const int mA) {
+ st.setCurrent(mA, R_SENSE, HOLD_MULTIPLIER);
+ tmc_get_current(st, name);
}
- #define M91x_USE(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || (AXIS_DRIVER_TYPE(ST, TMC2208) && PIN_EXISTS(ST##_SERIAL_RX)))
- #define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N))
+ template
+ static void tmc_report_otpw(TMC &st, const char name[]) {
+ SERIAL_ECHO(name);
+ SERIAL_ECHOPGM(" axis temperature prewarn triggered: ");
+ serialprintPGM(st.getOTPW() ? PSTR("true") : PSTR("false"));
+ SERIAL_EOL();
+ }
+ template
+ static void tmc_clear_otpw(TMC &st, const char name[]) {
+ st.clear_otpw();
+ SERIAL_ECHO(name);
+ SERIAL_ECHOLNPGM(" prewarn flag cleared");
+ }
+
+ template
+ static void tmc_get_pwmthrs(TMC &st, const char name[], const uint16_t spmm) {
+ SERIAL_ECHO(name);
+ SERIAL_ECHOPGM(" stealthChop max speed set to ");
+ SERIAL_ECHOLN(12650000UL * st.microsteps() / (256 * st.TPWMTHRS() * spmm));
+ }
+ template
+ static void tmc_set_pwmthrs(TMC &st, const char name[], const int32_t thrs, const uint32_t spmm) {
+ st.TPWMTHRS(12650000UL * st.microsteps() / (256 * thrs * spmm));
+ tmc_get_pwmthrs(st, name, spmm);
+ }
+
+ template
+ static void tmc_get_sgt(TMC &st, const char name[]) {
+ SERIAL_ECHO(name);
+ SERIAL_ECHOPGM(" driver homing sensitivity set to ");
+ MYSERIAL.println(st.sgt(), DEC);
+ }
+ template
+ static void tmc_set_sgt(TMC &st, const char name[], const int8_t sgt_val) {
+ st.sgt(sgt_val);
+ tmc_get_sgt(st, name);
+ }
+
+ /**
+ * M906: Set motor current in milliamps using axis codes X, Y, Z, E
+ * Report driver currents when no axis specified
+ */
+ inline void gcode_M906() {
+ uint16_t values[XYZE];
+ LOOP_XYZE(i)
+ values[i] = parser.intval(axis_codes[i]);
+
+ #if X_IS_TRINAMIC
+ if (values[X_AXIS]) tmc_set_current(stepperX, extended_axis_codes[TMC_X], values[X_AXIS]);
+ else tmc_get_current(stepperX, extended_axis_codes[TMC_X]);
+ #endif
+ #if X2_IS_TRINAMIC
+ if (values[X_AXIS]) tmc_set_current(stepperX2, extended_axis_codes[TMC_X2], values[X_AXIS]);
+ else tmc_get_current(stepperX2, extended_axis_codes[TMC_X2]);
+ #endif
+ #if Y_IS_TRINAMIC
+ if (values[Y_AXIS]) tmc_set_current(stepperY, extended_axis_codes[TMC_Y], values[Y_AXIS]);
+ else tmc_get_current(stepperY, extended_axis_codes[TMC_Y]);
+ #endif
+ #if Y2_IS_TRINAMIC
+ if (values[Y_AXIS]) tmc_set_current(stepperY2, extended_axis_codes[TMC_Y2], values[Y_AXIS]);
+ else tmc_get_current(stepperY2, extended_axis_codes[TMC_Y2]);
+ #endif
+ #if Z_IS_TRINAMIC
+ if (values[Z_AXIS]) tmc_set_current(stepperZ, extended_axis_codes[TMC_Z], values[Z_AXIS]);
+ else tmc_get_current(stepperZ, extended_axis_codes[TMC_Z]);
+ #endif
+ #if Z2_IS_TRINAMIC
+ if (values[Z_AXIS]) tmc_set_current(stepperZ2, extended_axis_codes[TMC_Z2], values[Z_AXIS]);
+ else tmc_get_current(stepperZ2, extended_axis_codes[TMC_Z2]);
+ #endif
+ #if E0_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_current(stepperE0, extended_axis_codes[TMC_E0], values[E_AXIS]);
+ else tmc_get_current(stepperE0, extended_axis_codes[TMC_E0]);
+ #endif
+ #if E1_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_current(stepperE1, extended_axis_codes[TMC_E1], values[E_AXIS]);
+ else tmc_get_current(stepperE1, extended_axis_codes[TMC_E1]);
+ #endif
+ #if E2_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_current(stepperE2, extended_axis_codes[TMC_E2], values[E_AXIS]);
+ else tmc_get_current(stepperE2, extended_axis_codes[TMC_E2]);
+ #endif
+ #if E3_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_current(stepperE3, extended_axis_codes[TMC_E3], values[E_AXIS]);
+ else tmc_get_current(stepperE3, extended_axis_codes[TMC_E3]);
+ #endif
+ #if E4_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_current(stepperE4, extended_axis_codes[TMC_E4], values[E_AXIS]);
+ else tmc_get_current(stepperE4, extended_axis_codes[TMC_E4]);
+ #endif
+
+ }
/**
* M911: Report TMC stepper driver overtemperature pre-warn flag
- * This flag is held by the library, persisting until cleared by M912
+ * The flag is held by the library and persist until manually cleared by M912
*/
inline void gcode_M911() {
- #if M91x_USE(X)
- tmc_report_otpw(stepperX, TMC_X);
+ #if ENABLED(X_IS_TMC2130) || (ENABLED(X_IS_TMC2208) && PIN_EXISTS(X_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ tmc_report_otpw(stepperX, extended_axis_codes[TMC_X]);
#endif
- #if M91x_USE(X2)
- tmc_report_otpw(stepperX2, TMC_X2);
+ #if ENABLED(Y_IS_TMC2130) || (ENABLED(Y_IS_TMC2208) && PIN_EXISTS(Y_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ tmc_report_otpw(stepperY, extended_axis_codes[TMC_Y]);
#endif
- #if M91x_USE(Y)
- tmc_report_otpw(stepperY, TMC_Y);
+ #if ENABLED(Z_IS_TMC2130) || (ENABLED(Z_IS_TMC2208) && PIN_EXISTS(Z_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ tmc_report_otpw(stepperZ, extended_axis_codes[TMC_Z]);
#endif
- #if M91x_USE(Y2)
- tmc_report_otpw(stepperY2, TMC_Y2);
- #endif
- #if M91x_USE(Z)
- tmc_report_otpw(stepperZ, TMC_Z);
- #endif
- #if M91x_USE(Z2)
- tmc_report_otpw(stepperZ2, TMC_Z2);
- #endif
- #if M91x_USE_E(0)
- tmc_report_otpw(stepperE0, TMC_E0);
- #endif
- #if M91x_USE_E(1)
- tmc_report_otpw(stepperE1, TMC_E1);
- #endif
- #if M91x_USE_E(2)
- tmc_report_otpw(stepperE2, TMC_E2);
- #endif
- #if M91x_USE_E(3)
- tmc_report_otpw(stepperE3, TMC_E3);
- #endif
- #if M91x_USE_E(4)
- tmc_report_otpw(stepperE4, TMC_E4);
+ #if ENABLED(E0_IS_TMC2130) || (ENABLED(E0_IS_TMC2208) && PIN_EXISTS(E0_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ tmc_report_otpw(stepperE0, extended_axis_codes[TMC_E0]);
#endif
}
/**
* M912: Clear TMC stepper driver overtemperature pre-warn flag held by the library
- * Specify one or more axes with X, Y, Z, X1, Y1, Z1, X2, Y2, Z2, and E[index].
- * If no axes are given, clear all.
- *
- * Examples:
- * M912 X ; clear X and X2
- * M912 X1 ; clear X1 only
- * M912 X2 ; clear X2 only
- * M912 X E ; clear X, X2, and all E
- * M912 E1 ; clear E1 only
*/
inline void gcode_M912() {
- const bool hasX = parser.seen(axis_codes[X_AXIS]),
- hasY = parser.seen(axis_codes[Y_AXIS]),
- hasZ = parser.seen(axis_codes[Z_AXIS]),
- hasE = parser.seen(axis_codes[E_CART]),
- hasNone = !hasX && !hasY && !hasZ && !hasE;
-
- #if M91x_USE(X) || M91x_USE(X2)
- const uint8_t xval = parser.byteval(axis_codes[X_AXIS], 10);
- #if M91x_USE(X)
- if (hasNone || xval == 1 || (hasX && xval == 10)) tmc_clear_otpw(stepperX, TMC_X);
- #endif
- #if M91x_USE(X2)
- if (hasNone || xval == 2 || (hasX && xval == 10)) tmc_clear_otpw(stepperX2, TMC_X2);
- #endif
+ const bool clearX = parser.seen(axis_codes[X_AXIS]), clearY = parser.seen(axis_codes[Y_AXIS]), clearZ = parser.seen(axis_codes[Z_AXIS]), clearE = parser.seen(axis_codes[E_AXIS]),
+ clearAll = (!clearX && !clearY && !clearZ && !clearE) || (clearX && clearY && clearZ && clearE);
+ #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) || (ENABLED(X_IS_TMC2208) && PIN_EXISTS(X_SERIAL_RX))
+ if (clearX || clearAll) tmc_clear_otpw(stepperX, extended_axis_codes[TMC_X]);
+ #endif
+ #if ENABLED(X2_IS_TMC2130) || (ENABLED(X2_IS_TMC2208) && PIN_EXISTS(X_SERIAL_RX))
+ if (clearX || clearAll) tmc_clear_otpw(stepperX, extended_axis_codes[TMC_X]);
#endif
- #if M91x_USE(Y) || M91x_USE(Y2)
- const uint8_t yval = parser.byteval(axis_codes[Y_AXIS], 10);
- #if M91x_USE(Y)
- if (hasNone || yval == 1 || (hasY && yval == 10)) tmc_clear_otpw(stepperY, TMC_Y);
- #endif
- #if M91x_USE(Y2)
- if (hasNone || yval == 2 || (hasY && yval == 10)) tmc_clear_otpw(stepperY2, TMC_Y2);
- #endif
+ #if ENABLED(Y_IS_TMC2130) || (ENABLED(Y_IS_TMC2208) && PIN_EXISTS(Y_SERIAL_RX))
+ if (clearY || clearAll) tmc_clear_otpw(stepperY, extended_axis_codes[TMC_Y]);
#endif
- #if M91x_USE(Z) || M91x_USE(Z2)
- const uint8_t zval = parser.byteval(axis_codes[Z_AXIS], 10);
- #if M91x_USE(Z)
- if (hasNone || zval == 1 || (hasZ && zval == 10)) tmc_clear_otpw(stepperZ, TMC_Z);
- #endif
- #if M91x_USE(Z2)
- if (hasNone || zval == 2 || (hasZ && zval == 10)) tmc_clear_otpw(stepperZ2, TMC_Z2);
- #endif
+ #if ENABLED(Z_IS_TMC2130) || (ENABLED(Z_IS_TMC2208) && PIN_EXISTS(Z_SERIAL_RX))
+ if (clearZ || clearAll) tmc_clear_otpw(stepperZ, extended_axis_codes[TMC_Z]);
#endif
- // TODO: If this is a Hangprinter, E_AXIS will not correspond to E0, E1, etc in this way
- #if M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4)
- const uint8_t eval = parser.byteval(axis_codes[E_AXIS], 10);
- #if M91x_USE_E(0)
- if (hasNone || eval == 0 || (hasE && eval == 10)) tmc_clear_otpw(stepperE0, TMC_E0);
- #endif
- #if M91x_USE_E(1)
- if (hasNone || eval == 1 || (hasE && eval == 10)) tmc_clear_otpw(stepperE1, TMC_E1);
- #endif
- #if M91x_USE_E(2)
- if (hasNone || eval == 2 || (hasE && eval == 10)) tmc_clear_otpw(stepperE2, TMC_E2);
- #endif
- #if M91x_USE_E(3)
- if (hasNone || eval == 3 || (hasE && eval == 10)) tmc_clear_otpw(stepperE3, TMC_E3);
- #endif
- #if M91x_USE_E(4)
- if (hasNone || eval == 4 || (hasE && eval == 10)) tmc_clear_otpw(stepperE4, TMC_E4);
- #endif
+ #if ENABLED(E0_IS_TMC2130) || (ENABLED(E0_IS_TMC2208) && PIN_EXISTS(E0_SERIAL_RX))
+ if (clearE || clearAll) tmc_clear_otpw(stepperE0, extended_axis_codes[TMC_E0]);
#endif
}
@@ -11686,98 +10716,57 @@ inline void gcode_M502() {
*/
#if ENABLED(HYBRID_THRESHOLD)
inline void gcode_M913() {
- #define TMC_SAY_PWMTHRS(A,Q) tmc_get_pwmthrs(stepper##Q, TMC_##Q, planner.axis_steps_per_mm[_AXIS(A)])
- #define TMC_SET_PWMTHRS(A,Q) tmc_set_pwmthrs(stepper##Q, value, planner.axis_steps_per_mm[_AXIS(A)])
- #define TMC_SAY_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_get_pwmthrs(stepperE##E, TMC_E##E, planner.axis_steps_per_mm[E_AXIS_N]); }while(0)
- #define TMC_SET_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_set_pwmthrs(stepperE##E, value, planner.axis_steps_per_mm[E_AXIS_N]); }while(0)
+ uint16_t values[XYZE];
+ LOOP_XYZE(i)
+ values[i] = parser.intval(axis_codes[i]);
- bool report = true;
- const uint8_t index = parser.byteval('I');
- LOOP_XYZE(i) if (int32_t value = parser.longval(axis_codes[i])) {
- report = false;
- switch (i) {
- case X_AXIS:
- #if AXIS_HAS_STEALTHCHOP(X)
- if (index < 2) TMC_SET_PWMTHRS(X,X);
- #endif
- #if AXIS_HAS_STEALTHCHOP(X2)
- if (!(index & 1)) TMC_SET_PWMTHRS(X,X2);
- #endif
- break;
- case Y_AXIS:
- #if AXIS_HAS_STEALTHCHOP(Y)
- if (index < 2) TMC_SET_PWMTHRS(Y,Y);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y2)
- if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2);
- #endif
- break;
- case Z_AXIS:
- #if AXIS_HAS_STEALTHCHOP(Z)
- if (index < 2) TMC_SET_PWMTHRS(Z,Z);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z2)
- if (!(index & 1)) TMC_SET_PWMTHRS(Z,Z2);
- #endif
- break;
- case E_CART: {
- if (get_target_extruder_from_command(913)) return;
- switch (target_extruder) {
- #if AXIS_HAS_STEALTHCHOP(E0)
- case 0: TMC_SET_PWMTHRS_E(0); break;
- #endif
- #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
- case 1: TMC_SET_PWMTHRS_E(1); break;
- #endif
- #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2)
- case 2: TMC_SET_PWMTHRS_E(2); break;
- #endif
- #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3)
- case 3: TMC_SET_PWMTHRS_E(3); break;
- #endif
- #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4)
- case 4: TMC_SET_PWMTHRS_E(4); break;
- #endif
- }
- } break;
- }
- }
+ #if X_IS_TRINAMIC
+ if (values[X_AXIS]) tmc_set_pwmthrs(stepperX, extended_axis_codes[TMC_X], values[X_AXIS], planner.axis_steps_per_mm[X_AXIS]);
+ else tmc_get_pwmthrs(stepperX, extended_axis_codes[TMC_X], planner.axis_steps_per_mm[X_AXIS]);
+ #endif
+ #if X2_IS_TRINAMIC
+ if (values[X_AXIS]) tmc_set_pwmthrs(stepperX2, extended_axis_codes[TMC_X2], values[X_AXIS], planner.axis_steps_per_mm[X_AXIS]);
+ else tmc_get_pwmthrs(stepperX, extended_axis_codes[TMC_X2], planner.axis_steps_per_mm[X_AXIS]);
+ #endif
- if (report) {
- #if AXIS_HAS_STEALTHCHOP(X)
- TMC_SAY_PWMTHRS(X,X);
- #endif
- #if AXIS_HAS_STEALTHCHOP(X2)
- TMC_SAY_PWMTHRS(X,X2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y)
- TMC_SAY_PWMTHRS(Y,Y);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y2)
- TMC_SAY_PWMTHRS(Y,Y2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z)
- TMC_SAY_PWMTHRS(Z,Z);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z2)
- TMC_SAY_PWMTHRS(Z,Z2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(E0)
- TMC_SAY_PWMTHRS_E(0);
- #endif
- #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
- TMC_SAY_PWMTHRS_E(1);
- #endif
- #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2)
- TMC_SAY_PWMTHRS_E(2);
- #endif
- #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3)
- TMC_SAY_PWMTHRS_E(3);
- #endif
- #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4)
- TMC_SAY_PWMTHRS_E(4);
- #endif
- }
+ #if Y_IS_TRINAMIC
+ if (values[Y_AXIS]) tmc_set_pwmthrs(stepperY, extended_axis_codes[TMC_Y], values[Y_AXIS], planner.axis_steps_per_mm[Y_AXIS]);
+ else tmc_get_pwmthrs(stepperY, extended_axis_codes[TMC_Y], planner.axis_steps_per_mm[Y_AXIS]);
+ #endif
+ #if Y2_IS_TRINAMIC
+ if (values[Y_AXIS]) tmc_set_pwmthrs(stepperY2, extended_axis_codes[TMC_Y2], values[Y_AXIS], planner.axis_steps_per_mm[Y_AXIS]);
+ else tmc_get_pwmthrs(stepperY, extended_axis_codes[TMC_Y2], planner.axis_steps_per_mm[Y_AXIS]);
+ #endif
+
+ #if Z_IS_TRINAMIC
+ if (values[Z_AXIS]) tmc_set_pwmthrs(stepperZ, extended_axis_codes[TMC_Z], values[Z_AXIS], planner.axis_steps_per_mm[Z_AXIS]);
+ else tmc_get_pwmthrs(stepperZ, extended_axis_codes[TMC_Z], planner.axis_steps_per_mm[Z_AXIS]);
+ #endif
+ #if Z2_IS_TRINAMIC
+ if (values[Z_AXIS]) tmc_set_pwmthrs(stepperZ2, extended_axis_codes[TMC_Z2], values[Z_AXIS], planner.axis_steps_per_mm[Z_AXIS]);
+ else tmc_get_pwmthrs(stepperZ, extended_axis_codes[TMC_Z2], planner.axis_steps_per_mm[Z_AXIS]);
+ #endif
+
+ #if E0_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_pwmthrs(stepperE0, extended_axis_codes[TMC_E0], values[E_AXIS], planner.axis_steps_per_mm[E_AXIS]);
+ else tmc_get_pwmthrs(stepperE0, extended_axis_codes[TMC_E0], planner.axis_steps_per_mm[E_AXIS]);
+ #endif
+ #if E1_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_pwmthrs(stepperE1, extended_axis_codes[TMC_E1], values[E_AXIS], planner.axis_steps_per_mm[E_AXIS]);
+ else tmc_get_pwmthrs(stepperE1, extended_axis_codes[TMC_E1], planner.axis_steps_per_mm[E_AXIS]);
+ #endif
+ #if E2_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_pwmthrs(stepperE2, extended_axis_codes[TMC_E2], values[E_AXIS], planner.axis_steps_per_mm[E_AXIS]);
+ else tmc_get_pwmthrs(stepperE2, extended_axis_codes[TMC_E2], planner.axis_steps_per_mm[E_AXIS]);
+ #endif
+ #if E3_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_pwmthrs(stepperE3, extended_axis_codes[TMC_E3], values[E_AXIS], planner.axis_steps_per_mm[E_AXIS]);
+ else tmc_get_pwmthrs(stepperE3, extended_axis_codes[TMC_E3], planner.axis_steps_per_mm[E_AXIS]);
+ #endif
+ #if E4_IS_TRINAMIC
+ if (values[E_AXIS]) tmc_set_pwmthrs(stepperE4, extended_axis_codes[TMC_E4], values[E_AXIS], planner.axis_steps_per_mm[E_AXIS]);
+ else tmc_get_pwmthrs(stepperE4, extended_axis_codes[TMC_E4], planner.axis_steps_per_mm[E_AXIS]);
+ #endif
}
#endif // HYBRID_THRESHOLD
@@ -11786,117 +10775,57 @@ inline void gcode_M502() {
*/
#if ENABLED(SENSORLESS_HOMING)
inline void gcode_M914() {
- #define TMC_SAY_SGT(Q) tmc_get_sgt(stepper##Q, TMC_##Q)
- #define TMC_SET_SGT(Q) tmc_set_sgt(stepper##Q, value)
-
- bool report = true;
- const uint8_t index = parser.byteval('I');
- LOOP_XYZ(i) if (parser.seen(axis_codes[i])) {
- const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63);
- report = false;
- switch (i) {
- #if X_SENSORLESS
- case X_AXIS:
- #if AXIS_HAS_STALLGUARD(X)
- if (index < 2) TMC_SET_SGT(X);
- #endif
- #if AXIS_HAS_STALLGUARD(X2)
- if (!(index & 1)) TMC_SET_SGT(X2);
- #endif
- break;
- #endif
- #if Y_SENSORLESS
- case Y_AXIS:
- #if AXIS_HAS_STALLGUARD(Y)
- if (index < 2) TMC_SET_SGT(Y);
- #endif
- #if AXIS_HAS_STALLGUARD(Y2)
- if (!(index & 1)) TMC_SET_SGT(Y2);
- #endif
- break;
- #endif
- #if Z_SENSORLESS
- case Z_AXIS:
- #if AXIS_HAS_STALLGUARD(Z)
- if (index < 2) TMC_SET_SGT(Z);
- #endif
- #if AXIS_HAS_STALLGUARD(Z2)
- if (!(index & 1)) TMC_SET_SGT(Z2);
- #endif
- break;
- #endif
- }
- }
-
- if (report) {
- #if X_SENSORLESS
- #if AXIS_HAS_STALLGUARD(X)
- TMC_SAY_SGT(X);
- #endif
- #if AXIS_HAS_STALLGUARD(X2)
- TMC_SAY_SGT(X2);
- #endif
- #endif
- #if Y_SENSORLESS
- #if AXIS_HAS_STALLGUARD(Y)
- TMC_SAY_SGT(Y);
- #endif
- #if AXIS_HAS_STALLGUARD(Y2)
- TMC_SAY_SGT(Y2);
- #endif
- #endif
- #if Z_SENSORLESS
- #if AXIS_HAS_STALLGUARD(Z)
- TMC_SAY_SGT(Z);
- #endif
- #if AXIS_HAS_STALLGUARD(Z2)
- TMC_SAY_SGT(Z2);
- #endif
- #endif
- }
+ #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
+ if (parser.seen(axis_codes[X_AXIS])) tmc_set_sgt(stepperX, extended_axis_codes[TMC_X], parser.value_int());
+ else tmc_get_sgt(stepperX, extended_axis_codes[TMC_X]);
+ #endif
+ #if ENABLED(X2_IS_TMC2130)
+ if (parser.seen(axis_codes[X_AXIS])) tmc_set_sgt(stepperX2, extended_axis_codes[TMC_X2], parser.value_int());
+ else tmc_get_sgt(stepperX2, extended_axis_codes[TMC_X2]);
+ #endif
+ #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
+ if (parser.seen(axis_codes[Y_AXIS])) tmc_set_sgt(stepperY, extended_axis_codes[TMC_Y], parser.value_int());
+ else tmc_get_sgt(stepperY, extended_axis_codes[TMC_Y]);
+ #endif
+ #if ENABLED(Y2_IS_TMC2130)
+ if (parser.seen(axis_codes[Y_AXIS])) tmc_set_sgt(stepperY2, extended_axis_codes[TMC_Y2], parser.value_int());
+ else tmc_get_sgt(stepperY2, extended_axis_codes[TMC_Y2]);
+ #endif
}
#endif // SENSORLESS_HOMING
/**
* TMC Z axis calibration routine
*/
- #if ENABLED(TMC_Z_CALIBRATION)
+ #if ENABLED(TMC_Z_CALIBRATION) && (Z_IS_TRINAMIC || Z2_IS_TRINAMIC)
inline void gcode_M915() {
- const uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT,
- _z = parser.seenval('Z') ? parser.value_linear_units() : CALIBRATION_EXTRA_HEIGHT;
+ uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT;
+ uint16_t _z = parser.seenval('Z') ? parser.value_int() : CALIBRATION_EXTRA_HEIGHT;
- if (!TEST(axis_known_position, Z_AXIS)) {
+ if (!axis_known_position[Z_AXIS]) {
SERIAL_ECHOLNPGM("\nPlease home Z axis first");
return;
}
- #if AXIS_IS_TMC(Z)
- const uint16_t Z_current_1 = stepperZ.getCurrent();
- stepperZ.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
- #endif
- #if AXIS_IS_TMC(Z2)
- const uint16_t Z2_current_1 = stepperZ2.getCurrent();
- stepperZ2.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
- #endif
+ uint16_t Z_current_1 = stepperZ.getCurrent();
+ uint16_t Z2_current_1 = stepperZ.getCurrent();
+ stepperZ.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
+ stepperZ2.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
SERIAL_ECHOPAIR("\nCalibration current: Z", _rms);
soft_endstops_enabled = false;
do_blocking_move_to_z(Z_MAX_POS+_z);
- #if AXIS_IS_TMC(Z)
- stepperZ.setCurrent(Z_current_1, R_SENSE, HOLD_MULTIPLIER);
- #endif
- #if AXIS_IS_TMC(Z2)
- stepperZ2.setCurrent(Z2_current_1, R_SENSE, HOLD_MULTIPLIER);
- #endif
+ stepperZ.setCurrent(Z_current_1, R_SENSE, HOLD_MULTIPLIER);
+ stepperZ2.setCurrent(Z2_current_1, R_SENSE, HOLD_MULTIPLIER);
do_blocking_move_to_z(Z_MAX_POS);
soft_endstops_enabled = true;
- SERIAL_ECHOLNPGM("\nHoming Z due to lost steps");
- enqueue_and_echo_commands_P(PSTR("G28 Z"));
+ SERIAL_ECHOLNPGM("\nHoming Z because we lost steps");
+ home_z_safely();
}
#endif
@@ -12003,44 +10932,26 @@ inline void gcode_M907() {
#endif // HAS_MICROSTEPS
#if HAS_CASE_LIGHT
-
#ifndef INVERT_CASE_LIGHT
#define INVERT_CASE_LIGHT false
#endif
uint8_t case_light_brightness; // LCD routine wants INT
bool case_light_on;
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- LEDColor case_light_color =
- #ifdef CASE_LIGHT_NEOPIXEL_COLOR
- CASE_LIGHT_NEOPIXEL_COLOR
- #else
- { 255, 255, 255, 255 }
- #endif
- ;
- #endif
-
void update_case_light() {
- const uint8_t i = case_light_on ? case_light_brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i;
-
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
-
- leds.set_color(
- MakeLEDColor(case_light_color.r, case_light_color.g, case_light_color.b, case_light_color.w, n10ct),
- false
- );
-
- #else // !CASE_LIGHT_USE_NEOPIXEL
-
- SET_OUTPUT(CASE_LIGHT_PIN);
+ pinMode(CASE_LIGHT_PIN, OUTPUT); // digitalWrite doesn't set the port mode
+ if (case_light_on) {
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN))
- analogWrite(CASE_LIGHT_PIN, n10ct);
- else {
- const bool s = case_light_on ? !INVERT_CASE_LIGHT : INVERT_CASE_LIGHT;
- WRITE(CASE_LIGHT_PIN, s ? HIGH : LOW);
- }
-
- #endif // !CASE_LIGHT_USE_NEOPIXEL
+ analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 - case_light_brightness : case_light_brightness);
+ else
+ WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? LOW : HIGH);
+ }
+ else {
+ if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN))
+ analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 : 0);
+ else
+ WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? HIGH : LOW);
+ }
}
#endif // HAS_CASE_LIGHT
@@ -12066,11 +10977,11 @@ inline void gcode_M355() {
// always report case light status
SERIAL_ECHO_START();
if (!case_light_on) {
- SERIAL_ECHOLNPGM("Case light: off");
+ SERIAL_ECHOLN("Case light: off");
}
else {
- if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLNPGM("Case light: on");
- else SERIAL_ECHOLNPAIR("Case light: ", int(case_light_brightness));
+ if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLN("Case light: on");
+ else SERIAL_ECHOLNPAIR("Case light: ", (int)case_light_brightness);
}
#else
@@ -12084,39 +10995,44 @@ inline void gcode_M355() {
/**
* M163: Set a single mix factor for a mixing extruder
* This is called "weight" by some systems.
- * The 'P' values must sum to 1.0 or must be followed by M164 to normalize them.
*
* S[index] The channel index to set
* P[float] The mix value
+ *
*/
inline void gcode_M163() {
const int mix_index = parser.intval('S');
- if (mix_index < MIXING_STEPPERS)
- mixing_factor[mix_index] = MAX(parser.floatval('P'), 0.0);
+ if (mix_index < MIXING_STEPPERS) {
+ float mix_value = parser.floatval('P');
+ NOLESS(mix_value, 0.0);
+ mixing_factor[mix_index] = RECIPROCAL(mix_value);
+ }
}
- /**
- * M164: Normalize and commit the mix.
- * If 'S' is given store as a virtual tool. (Requires MIXING_VIRTUAL_TOOLS > 1)
- *
- * S[index] The virtual tool to store
- */
- inline void gcode_M164() {
- normalize_mix();
- #if MIXING_VIRTUAL_TOOLS > 1
- const int tool_index = parser.intval('S', -1);
- if (WITHIN(tool_index, 0, MIXING_VIRTUAL_TOOLS - 1)) {
+ #if MIXING_VIRTUAL_TOOLS > 1
+
+ /**
+ * M164: Store the current mix factors as a virtual tool.
+ *
+ * S[index] The virtual tool to store
+ *
+ */
+ inline void gcode_M164() {
+ const int tool_index = parser.intval('S');
+ if (tool_index < MIXING_VIRTUAL_TOOLS) {
+ normalize_mix();
for (uint8_t i = 0; i < MIXING_STEPPERS; i++)
mixing_virtual_tool_mix[tool_index][i] = mixing_factor[i];
}
- #endif
- }
+ }
+
+ #endif
#if ENABLED(DIRECT_MIXING_IN_G1)
/**
* M165: Set multiple mix factors for a mixing extruder.
* Factors that are left out will be set to 0.
- * All factors should sum to 1.0, but they will be normalized regardless.
+ * All factors together must add up to 1.0.
*
* A[factor] Mix factor for extruder stepper 1
* B[factor] Mix factor for extruder stepper 2
@@ -12124,6 +11040,7 @@ inline void gcode_M355() {
* D[factor] Mix factor for extruder stepper 4
* H[factor] Mix factor for extruder stepper 5
* I[factor] Mix factor for extruder stepper 6
+ *
*/
inline void gcode_M165() { gcode_get_mix(); }
#endif
@@ -12147,10 +11064,10 @@ inline void gcode_M999() {
if (parser.boolval('S')) return;
// gcode_LastN = Stopped_gcode_LastN;
- flush_and_request_resend();
+ FlushSerialRequestResend();
}
-#if DO_SWITCH_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
#if EXTRUDERS > 3
#define REQ_ANGLES 4
#define _SERVO_NR (e < 2 ? SWITCHING_EXTRUDER_SERVO_NR : SWITCHING_EXTRUDER_E23_SERVO_NR)
@@ -12161,7 +11078,7 @@ inline void gcode_M999() {
inline void move_extruder_servo(const uint8_t e) {
constexpr int16_t angles[] = SWITCHING_EXTRUDER_SERVO_ANGLES;
static_assert(COUNT(angles) == REQ_ANGLES, "SWITCHING_EXTRUDER_SERVO_ANGLES needs " STRINGIFY(REQ_ANGLES) " angles.");
- planner.synchronize();
+ stepper.synchronize();
#if EXTRUDERS & 1
if (e < EXTRUDERS - 1)
#endif
@@ -12170,12 +11087,12 @@ inline void gcode_M999() {
safe_delay(500);
}
}
-#endif // DO_SWITCH_EXTRUDER
+#endif // SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_NOZZLE)
inline void move_nozzle_servo(const uint8_t e) {
const int16_t angles[2] = SWITCHING_NOZZLE_SERVO_ANGLES;
- planner.synchronize();
+ stepper.synchronize();
MOVE_SERVO(SWITCHING_NOZZLE_SERVO_NR, angles[e]);
safe_delay(500);
}
@@ -12186,7 +11103,7 @@ inline void invalid_extruder_error(const uint8_t e) {
SERIAL_CHAR('T');
SERIAL_ECHO_F(e, DEC);
SERIAL_CHAR(' ');
- SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER);
+ SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
}
#if ENABLED(PARKING_EXTRUDER)
@@ -12238,254 +11155,18 @@ inline void invalid_extruder_error(const uint8_t e) {
#endif // HAS_FANMUX
/**
- * Tool Change functions
+ * Perform a tool-change, which may result in moving the
+ * previous tool out of the way and the new tool into place.
*/
+void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool no_move/*=false*/) {
+ #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1
-#if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1
-
- inline void mixing_tool_change(const uint8_t tmp_extruder) {
if (tmp_extruder >= MIXING_VIRTUAL_TOOLS)
return invalid_extruder_error(tmp_extruder);
// T0-Tnnn: Switch virtual tool by changing the mix
for (uint8_t j = 0; j < MIXING_STEPPERS; j++)
mixing_factor[j] = mixing_virtual_tool_mix[tmp_extruder][j];
- }
-
-#endif // MIXING_EXTRUDER && MIXING_VIRTUAL_TOOLS > 1
-
-#if ENABLED(DUAL_X_CARRIAGE)
-
- inline void dualx_tool_change(const uint8_t tmp_extruder, bool &no_move) {
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) {
- SERIAL_ECHOPGM("Dual X Carriage Mode ");
- switch (dual_x_carriage_mode) {
- case DXC_FULL_CONTROL_MODE: SERIAL_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break;
- case DXC_AUTO_PARK_MODE: SERIAL_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break;
- case DXC_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_DUPLICATION_MODE"); break;
- }
- }
- #endif
-
- const float xhome = x_home_pos(active_extruder);
- if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE
- && IsRunning()
- && (delayed_move_time || current_position[X_AXIS] != xhome)
- ) {
- float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT;
- #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
- NOMORE(raised_z, soft_endstop_max[Z_AXIS]);
- #endif
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) {
- SERIAL_ECHOLNPAIR("Raise to ", raised_z);
- SERIAL_ECHOLNPAIR("MoveX to ", xhome);
- SERIAL_ECHOLNPAIR("Lower to ", current_position[Z_AXIS]);
- }
- #endif
- // Park old head: 1) raise 2) move to park position 3) lower
- for (uint8_t i = 0; i < 3; i++)
- planner.buffer_line(
- i == 0 ? current_position[X_AXIS] : xhome,
- current_position[Y_AXIS],
- i == 2 ? current_position[Z_AXIS] : raised_z,
- current_position[E_CART],
- planner.max_feedrate_mm_s[i == 1 ? X_AXIS : Z_AXIS],
- active_extruder
- );
- planner.synchronize();
- }
-
- // Apply Y & Z extruder offset (X offset is used as home pos with Dual X)
- current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder];
- current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
-
- // Activate the new extruder ahead of calling set_axis_is_at_home!
- active_extruder = tmp_extruder;
-
- // This function resets the max/min values - the current position may be overwritten below.
- set_axis_is_at_home(X_AXIS);
-
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position);
- #endif
-
- // Only when auto-parking are carriages safe to move
- if (dual_x_carriage_mode != DXC_AUTO_PARK_MODE) no_move = true;
-
- switch (dual_x_carriage_mode) {
- case DXC_FULL_CONTROL_MODE:
- // New current position is the position of the activated extruder
- current_position[X_AXIS] = inactive_extruder_x_pos;
- // Save the inactive extruder's position (from the old current_position)
- inactive_extruder_x_pos = destination[X_AXIS];
- break;
- case DXC_AUTO_PARK_MODE:
- // record raised toolhead position for use by unpark
- COPY(raised_parked_position, current_position);
- raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
- #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
- NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]);
- #endif
- active_extruder_parked = true;
- delayed_move_time = 0;
- break;
- case DXC_DUPLICATION_MODE:
- // If the new extruder is the left one, set it "parked"
- // This triggers the second extruder to move into the duplication position
- active_extruder_parked = (active_extruder == 0);
- current_position[X_AXIS] = active_extruder_parked ? inactive_extruder_x_pos : destination[X_AXIS] + duplicate_extruder_x_offset;
- inactive_extruder_x_pos = destination[X_AXIS];
- extruder_duplication_enabled = false;
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) {
- SERIAL_ECHOLNPAIR("Set inactive_extruder_x_pos=", inactive_extruder_x_pos);
- SERIAL_ECHOLNPGM("Clear extruder_duplication_enabled");
- }
- #endif
- break;
- }
-
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) {
- SERIAL_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
- DEBUG_POS("New extruder (parked)", current_position);
- }
- #endif
-
- // No extra case for HAS_ABL in DUAL_X_CARRIAGE. Does that mean they don't work together?
- }
-
-#endif // DUAL_X_CARRIAGE
-
-#if ENABLED(PARKING_EXTRUDER)
-
- inline void parking_extruder_tool_change(const uint8_t tmp_extruder, bool no_move) {
- constexpr float z_raise = PARKING_EXTRUDER_SECURITY_RAISE;
-
- if (!no_move) {
-
- const float parkingposx[] = PARKING_EXTRUDER_PARKING_X,
- midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + hotend_offset[X_AXIS][active_extruder],
- grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
- + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
- /**
- * Steps:
- * 1. Raise Z-Axis to give enough clearance
- * 2. Move to park position of old extruder
- * 3. Disengage magnetic field, wait for delay
- * 4. Move near new extruder
- * 5. Engage magnetic field for new extruder
- * 6. Move to parking incl. offset of new extruder
- * 7. Lower Z-Axis
- */
-
- // STEP 1
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("Starting Autopark");
- if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position);
- #endif
- current_position[Z_AXIS] += z_raise;
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("(1) Raise Z-Axis ");
- if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position);
- #endif
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
- planner.synchronize();
-
- // STEP 2
- current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder];
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder);
- if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position);
- #endif
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
- planner.synchronize();
-
- // STEP 3
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("(3) Disengage magnet ");
- #endif
- pe_deactivate_magnet(active_extruder);
-
- // STEP 4
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
- #endif
- current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder
-
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position);
- #endif
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
- planner.synchronize();
-
- // STEP 5
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("(5) Engage magnetic field");
- #endif
-
- #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
- pe_activate_magnet(active_extruder); //just save power for inverted magnets
- #endif
- pe_activate_magnet(tmp_extruder);
-
- // STEP 6
- current_position[X_AXIS] = grabpos + (tmp_extruder == 0 ? (+10) : (-10));
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
- current_position[X_AXIS] = grabpos;
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder);
- if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position);
- #endif
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder);
- planner.synchronize();
-
- // Step 7
- current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder];
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("(7) Move midway between hotends");
- if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position);
- #endif
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
- planner.synchronize();
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- SERIAL_ECHOLNPGM("Autopark done.");
- #endif
- }
- else { // nomove == true
- // Only engage magnetic field for new extruder
- pe_activate_magnet(tmp_extruder);
- #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
- pe_activate_magnet(active_extruder); // Just save power for inverted magnets
- #endif
- }
- current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
-
- #if ENABLED(DEBUG_LEVELING_FEATURE)
- if (DEBUGGING(LEVELING)) DEBUG_POS("Applying Z-offset", current_position);
- #endif
- }
-
-#endif // PARKING_EXTRUDER
-
-/**
- * Perform a tool-change, which may result in moving the
- * previous tool out of the way and the new tool into place.
- */
-void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool no_move/*=false*/) {
- planner.synchronize();
-
- #if HAS_LEVELING
- // Set current position to the physical position
- const bool leveling_was_active = planner.leveling_active;
- set_bed_leveling_enabled(false);
- #endif
-
- #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1
-
- mixing_tool_change(tmp_extruder);
#else // !MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
@@ -12506,88 +11187,350 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
#endif
}
+ // Save current position to destination, for use later
+ set_destination_from_current();
+
#if ENABLED(DUAL_X_CARRIAGE)
- #if HAS_SOFTWARE_ENDSTOPS
- // Update the X software endstops early
- active_extruder = tmp_extruder;
- update_software_endstops(X_AXIS);
- active_extruder = !tmp_extruder;
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ SERIAL_ECHOPGM("Dual X Carriage Mode ");
+ switch (dual_x_carriage_mode) {
+ case DXC_FULL_CONTROL_MODE: SERIAL_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break;
+ case DXC_AUTO_PARK_MODE: SERIAL_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break;
+ case DXC_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_DUPLICATION_MODE"); break;
+ }
+ }
#endif
- // Don't move the new extruder out of bounds
- if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
- no_move = true;
+ const float xhome = x_home_pos(active_extruder);
+ if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE
+ && IsRunning()
+ && (delayed_move_time || current_position[X_AXIS] != xhome)
+ ) {
+ float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT;
+ #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ NOMORE(raised_z, soft_endstop_max[Z_AXIS]);
+ #endif
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ SERIAL_ECHOLNPAIR("Raise to ", raised_z);
+ SERIAL_ECHOLNPAIR("MoveX to ", xhome);
+ SERIAL_ECHOLNPAIR("Lower to ", current_position[Z_AXIS]);
+ }
+ #endif
+ // Park old head: 1) raise 2) move to park position 3) lower
+ for (uint8_t i = 0; i < 3; i++)
+ planner.buffer_line(
+ i == 0 ? current_position[X_AXIS] : xhome,
+ current_position[Y_AXIS],
+ i == 2 ? current_position[Z_AXIS] : raised_z,
+ current_position[E_AXIS],
+ planner.max_feedrate_mm_s[i == 1 ? X_AXIS : Z_AXIS],
+ active_extruder
+ );
+ stepper.synchronize();
+ }
- if (!no_move) set_destination_from_current();
- dualx_tool_change(tmp_extruder, no_move); // Can modify no_move
+ // Apply Y & Z extruder offset (X offset is used as home pos with Dual X)
+ current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder];
+ current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
+
+ // Activate the new extruder ahead of calling set_axis_is_at_home!
+ active_extruder = tmp_extruder;
+
+ // This function resets the max/min values - the current position may be overwritten below.
+ set_axis_is_at_home(X_AXIS);
+
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position);
+ #endif
+
+ // Only when auto-parking are carriages safe to move
+ if (dual_x_carriage_mode != DXC_AUTO_PARK_MODE) no_move = true;
+
+ switch (dual_x_carriage_mode) {
+ case DXC_FULL_CONTROL_MODE:
+ // New current position is the position of the activated extruder
+ current_position[X_AXIS] = inactive_extruder_x_pos;
+ // Save the inactive extruder's position (from the old current_position)
+ inactive_extruder_x_pos = destination[X_AXIS];
+ break;
+ case DXC_AUTO_PARK_MODE:
+ // record raised toolhead position for use by unpark
+ COPY(raised_parked_position, current_position);
+ raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
+ #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]);
+ #endif
+ active_extruder_parked = true;
+ delayed_move_time = 0;
+ break;
+ case DXC_DUPLICATION_MODE:
+ // If the new extruder is the left one, set it "parked"
+ // This triggers the second extruder to move into the duplication position
+ active_extruder_parked = (active_extruder == 0);
+
+ if (active_extruder_parked)
+ current_position[X_AXIS] = inactive_extruder_x_pos;
+ else
+ current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
+ inactive_extruder_x_pos = destination[X_AXIS];
+ extruder_duplication_enabled = false;
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ SERIAL_ECHOLNPAIR("Set inactive_extruder_x_pos=", inactive_extruder_x_pos);
+ SERIAL_ECHOLNPGM("Clear extruder_duplication_enabled");
+ }
+ #endif
+ break;
+ }
+
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ SERIAL_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
+ DEBUG_POS("New extruder (parked)", current_position);
+ }
+ #endif
+
+ // No extra case for HAS_ABL in DUAL_X_CARRIAGE. Does that mean they don't work together?
#else // !DUAL_X_CARRIAGE
- set_destination_from_current();
+ #if ENABLED(PARKING_EXTRUDER) // Dual Parking extruder
+ const float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
+ float z_raise = PARKING_EXTRUDER_SECURITY_RAISE;
+ if (!no_move) {
- #if ENABLED(PARKING_EXTRUDER)
- parking_extruder_tool_change(tmp_extruder, no_move);
- #endif
+ const float parkingposx[] = PARKING_EXTRUDER_PARKING_X,
+ midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + hotend_offset[X_AXIS][active_extruder],
+ grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
+ + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
+ /**
+ * Steps:
+ * 1. Raise Z-Axis to give enough clearance
+ * 2. Move to park position of old extruder
+ * 3. Disengage magnetic field, wait for delay
+ * 4. Move near new extruder
+ * 5. Engage magnetic field for new extruder
+ * 6. Move to parking incl. offset of new extruder
+ * 7. Lower Z-Axis
+ */
+
+ // STEP 1
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("Starting Autopark");
+ if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position);
+ #endif
+ current_position[Z_AXIS] += z_raise;
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("(1) Raise Z-Axis ");
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position);
+ #endif
+ planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
+ stepper.synchronize();
+
+ // STEP 2
+ current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder];
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder);
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position);
+ #endif
+ planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
+ stepper.synchronize();
+
+ // STEP 3
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("(3) Disengage magnet ");
+ #endif
+ pe_deactivate_magnet(active_extruder);
+
+ // STEP 4
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
+ #endif
+ current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder
+
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position);
+ #endif
+ planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
+ stepper.synchronize();
+
+ // STEP 5
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("(5) Engage magnetic field");
+ #endif
+
+ #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
+ pe_activate_magnet(active_extruder); //just save power for inverted magnets
+ #endif
+ pe_activate_magnet(tmp_extruder);
+
+ // STEP 6
+ current_position[X_AXIS] = grabpos + (tmp_extruder == 0 ? (+10) : (-10));
+ planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
+ current_position[X_AXIS] = grabpos;
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder);
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position);
+ #endif
+ planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder);
+ stepper.synchronize();
+
+ // Step 7
+ current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder];
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("(7) Move midway between hotends");
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position);
+ #endif
+ planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
+ stepper.synchronize();
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ SERIAL_ECHOLNPGM("Autopark done.");
+ #endif
+ }
+ else { // nomove == true
+ // Only engage magnetic field for new extruder
+ pe_activate_magnet(tmp_extruder);
+ #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
+ pe_activate_magnet(active_extruder); // Just save power for inverted magnets
+ #endif
+ }
+ current_position[Z_AXIS] -= hotend_offset[Z_AXIS][tmp_extruder] - hotend_offset[Z_AXIS][active_extruder]; // Apply Zoffset
+
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Applying Z-offset", current_position);
+ #endif
+
+ #endif // dualParking extruder
#if ENABLED(SWITCHING_NOZZLE)
- // Always raise by at least 1 to avoid workpiece
- const float zdiff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
- current_position[Z_AXIS] += (zdiff > 0.0 ? zdiff : 0.0) + 1;
+ #define DONT_SWITCH (SWITCHING_EXTRUDER_SERVO_NR == SWITCHING_NOZZLE_SERVO_NR)
+ // <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower.
+ const float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder],
+ z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0);
+
+ // Always raise by some amount (destination copied from current_position earlier)
+ current_position[Z_AXIS] += z_raise;
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
move_nozzle_servo(tmp_extruder);
#endif
- const float xdiff = hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder],
- ydiff = hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder];
+ /**
+ * Set current_position to the position of the new nozzle.
+ * Offsets are based on linear distance, so we need to get
+ * the resulting position in coordinate space.
+ *
+ * - With grid or 3-point leveling, offset XYZ by a tilted vector
+ * - With mesh leveling, update Z for the new position
+ * - Otherwise, just use the raw linear distance
+ *
+ * Software endstops are altered here too. Consider a case where:
+ * E0 at X=0 ... E1 at X=10
+ * When we switch to E1 now X=10, but E1 can't move left.
+ * To express this we apply the change in XY to the software endstops.
+ * E1 can move farther right than E0, so the right limit is extended.
+ *
+ * Note that we don't adjust the Z software endstops. Why not?
+ * Consider a case where Z=0 (here) and switching to E1 makes Z=1
+ * because the bed is 1mm lower at the new position. As long as
+ * the first nozzle is out of the way, the carriage should be
+ * allowed to move 1mm lower. This technically "breaks" the
+ * Z software endstop. But this is technically correct (and
+ * there is no viable alternative).
+ */
+ #if ABL_PLANAR
+ // Offset extruder, make sure to apply the bed level rotation matrix
+ vector_3 tmp_offset_vec = vector_3(hotend_offset[X_AXIS][tmp_extruder],
+ hotend_offset[Y_AXIS][tmp_extruder],
+ 0),
+ act_offset_vec = vector_3(hotend_offset[X_AXIS][active_extruder],
+ hotend_offset[Y_AXIS][active_extruder],
+ 0),
+ offset_vec = tmp_offset_vec - act_offset_vec;
+
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ tmp_offset_vec.debug(PSTR("tmp_offset_vec"));
+ act_offset_vec.debug(PSTR("act_offset_vec"));
+ offset_vec.debug(PSTR("offset_vec (BEFORE)"));
+ }
+ #endif
+
+ offset_vec.apply_rotation(planner.bed_level_matrix.transpose(planner.bed_level_matrix));
+
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) offset_vec.debug(PSTR("offset_vec (AFTER)"));
+ #endif
+
+ // Adjustments to the current position
+ const float xydiff[2] = { offset_vec.x, offset_vec.y };
+ current_position[Z_AXIS] += offset_vec.z;
+
+ #else // !ABL_PLANAR
+
+ const float xydiff[2] = {
+ hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder],
+ hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder]
+ };
+
+ #if ENABLED(MESH_BED_LEVELING)
+
+ if (planner.leveling_active) {
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOPAIR("Z before MBL: ", current_position[Z_AXIS]);
+ #endif
+ float x2 = current_position[X_AXIS] + xydiff[X_AXIS],
+ y2 = current_position[Y_AXIS] + xydiff[Y_AXIS],
+ z1 = current_position[Z_AXIS], z2 = z1;
+ planner.apply_leveling(current_position[X_AXIS], current_position[Y_AXIS], z1);
+ planner.apply_leveling(x2, y2, z2);
+ current_position[Z_AXIS] += z2 - z1;
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING))
+ SERIAL_ECHOLNPAIR(" after: ", current_position[Z_AXIS]);
+ #endif
+ }
+
+ #endif // MESH_BED_LEVELING
+
+ #endif // !HAS_ABL
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
- SERIAL_ECHOPAIR("Offset Tool XY by { ", xdiff);
- SERIAL_ECHOPAIR(", ", ydiff);
+ SERIAL_ECHOPAIR("Offset Tool XY by { ", xydiff[X_AXIS]);
+ SERIAL_ECHOPAIR(", ", xydiff[Y_AXIS]);
SERIAL_ECHOLNPGM(" }");
}
#endif
// The newly-selected extruder XY is actually at...
- current_position[X_AXIS] += xdiff;
- current_position[Y_AXIS] += ydiff;
+ current_position[X_AXIS] += xydiff[X_AXIS];
+ current_position[Y_AXIS] += xydiff[Y_AXIS];
// Set the new active extruder
active_extruder = tmp_extruder;
#endif // !DUAL_X_CARRIAGE
- #if ENABLED(SWITCHING_NOZZLE)
- // The newly-selected extruder Z is actually at...
- current_position[Z_AXIS] -= zdiff;
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Sync After Toolchange", current_position);
#endif
// Tell the planner the new "current position"
SYNC_PLAN_POSITION_KINEMATIC();
- #if ENABLED(DELTA)
- //LOOP_XYZ(i) update_software_endstops(i); // or modify the constrain function
- const bool safe_to_move = current_position[Z_AXIS] < delta_clip_start_height - 1;
- #else
- constexpr bool safe_to_move = true;
+ // Move to the "old position" (move the extruder into place)
+ #if ENABLED(SWITCHING_NOZZLE)
+ destination[Z_AXIS] += z_diff; // Include the Z restore with the "move back"
#endif
-
- // Raise, move, and lower again
- if (safe_to_move && !no_move && IsRunning()) {
- #if DISABLED(SWITCHING_NOZZLE)
- // Do a small lift to avoid the workpiece in the move back (below)
- current_position[Z_AXIS] += 1.0;
- planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
- #endif
+ if (!no_move && IsRunning()) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
#endif
// Move back to the original (or tweaked) position
do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
- #if ENABLED(DUAL_X_CARRIAGE)
- active_extruder_parked = false;
- #endif
}
#if ENABLED(SWITCHING_NOZZLE)
else {
@@ -12597,19 +11540,15 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
#endif
} // (tmp_extruder != active_extruder)
- planner.synchronize();
+ stepper.synchronize();
#if ENABLED(EXT_SOLENOID) && !ENABLED(PARKING_EXTRUDER)
disable_all_solenoids();
enable_solenoid_on_active_extruder();
- #endif
+ #endif // EXT_SOLENOID
feedrate_mm_s = old_feedrate_mm_s;
- #if HAS_SOFTWARE_ENDSTOPS && ENABLED(DUAL_X_CARRIAGE)
- update_software_endstops(X_AXIS);
- #endif
-
#else // HOTENDS <= 1
UNUSED(fr_mm_s);
@@ -12627,8 +11566,8 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
#endif // HOTENDS <= 1
- #if DO_SWITCH_EXTRUDER
- planner.synchronize();
+ #if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH
+ stepper.synchronize();
move_extruder_servo(active_extruder);
#endif
@@ -12636,13 +11575,8 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
fanmux_switch(active_extruder);
#endif
- #if HAS_LEVELING
- // Restore leveling to re-establish the logical position
- set_bed_leveling_enabled(leveling_was_active);
- #endif
-
SERIAL_ECHO_START();
- SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(active_extruder));
+ SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, (int)active_extruder);
#endif // !MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
}
@@ -12696,476 +11630,853 @@ void process_parsed_command() {
switch (parser.command_letter) {
case 'G': switch (parser.codenum) {
- case 0: case 1: gcode_G0_G1( // G0: Fast Move, G1: Linear Move
- #if IS_SCARA
- parser.codenum == 0
- #endif
- ); break;
+ // G0, G1
+ case 0:
+ case 1:
+ #if IS_SCARA
+ gcode_G0_G1(parser.codenum == 0);
+ #else
+ gcode_G0_G1();
+ #endif
+ break;
+ // G2, G3
#if ENABLED(ARC_SUPPORT) && DISABLED(SCARA)
- case 2: case 3: gcode_G2_G3(parser.codenum == 2); break; // G2: CW ARC, G3: CCW ARC
- #endif
-
- case 4: gcode_G4(); break; // G4: Dwell
-
- #if ENABLED(BEZIER_CURVE_SUPPORT)
- case 5: gcode_G5(); break; // G5: Cubic B_spline
- #endif
-
- #if ENABLED(UNREGISTERED_MOVE_SUPPORT)
- case 6: gcode_G6(); break; // G6: Direct stepper move
- #endif
-
- #if ENABLED(FWRETRACT)
- case 10: gcode_G10(); break; // G10: Retract
- case 11: gcode_G11(); break; // G11: Prime
- #endif
-
- #if ENABLED(NOZZLE_CLEAN_FEATURE)
- case 12: gcode_G12(); break; // G12: Clean Nozzle
- #endif
-
- #if ENABLED(CNC_WORKSPACE_PLANES)
- case 17: gcode_G17(); break; // G17: Select Plane XY
- case 18: gcode_G18(); break; // G18: Select Plane ZX
- case 19: gcode_G19(); break; // G19: Select Plane YZ
- #endif
-
- #if ENABLED(INCH_MODE_SUPPORT)
- case 20: gcode_G20(); break; // G20: Inch Units
- case 21: gcode_G21(); break; // G21: Millimeter Units
- #endif
-
- #if ENABLED(G26_MESH_VALIDATION)
- case 26: gcode_G26(); break; // G26: Mesh Validation Pattern
- #endif
-
- #if ENABLED(NOZZLE_PARK_FEATURE)
- case 27: gcode_G27(); break; // G27: Park Nozzle
- #endif
-
- case 28: gcode_G28(false); break; // G28: Home one or more axes
-
- #if HAS_LEVELING
- case 29: gcode_G29(); break; // G29: Detailed Z probe
- #endif
-
- #if HAS_BED_PROBE
- case 30: gcode_G30(); break; // G30: Single Z probe
- #endif
-
- #if ENABLED(Z_PROBE_SLED)
- case 31: gcode_G31(); break; // G31: Dock sled
- case 32: gcode_G32(); break; // G32: Undock sled
- #endif
-
- #if ENABLED(DELTA_AUTO_CALIBRATION)
- case 33: gcode_G33(); break; // G33: Delta Auto-Calibration
- #endif
-
- #if ENABLED(G38_PROBE_TARGET)
- case 38:
- if (parser.subcode == 2 || parser.subcode == 3)
- gcode_G38(parser.subcode == 2); // G38.2, G38.3: Probe towards object
+ case 2: // G2: CW ARC
+ case 3: // G3: CCW ARC
+ gcode_G2_G3(parser.codenum == 2);
break;
#endif
- #if HAS_MESH
- case 42: gcode_G42(); break; // G42: Move to mesh point
+ // G4 Dwell
+ case 4:
+ gcode_G4();
+ break;
+
+ #if ENABLED(BEZIER_CURVE_SUPPORT)
+ case 5: // G5: Cubic B_spline
+ gcode_G5();
+ break;
+ #endif // BEZIER_CURVE_SUPPORT
+
+ #if ENABLED(FWRETRACT)
+ case 10: // G10: retract
+ gcode_G10();
+ break;
+ case 11: // G11: retract_recover
+ gcode_G11();
+ break;
+ #endif // FWRETRACT
+
+ #if ENABLED(NOZZLE_CLEAN_FEATURE)
+ case 12:
+ gcode_G12(); // G12: Nozzle Clean
+ break;
+ #endif // NOZZLE_CLEAN_FEATURE
+
+ #if ENABLED(CNC_WORKSPACE_PLANES)
+ case 17: // G17: Select Plane XY
+ gcode_G17();
+ break;
+ case 18: // G18: Select Plane ZX
+ gcode_G18();
+ break;
+ case 19: // G19: Select Plane YZ
+ gcode_G19();
+ break;
+ #endif // CNC_WORKSPACE_PLANES
+
+ #if ENABLED(INCH_MODE_SUPPORT)
+ case 20: // G20: Inch Mode
+ gcode_G20();
+ break;
+
+ case 21: // G21: MM Mode
+ gcode_G21();
+ break;
+ #endif // INCH_MODE_SUPPORT
+
+ #if ENABLED(G26_MESH_VALIDATION)
+ case 26: // G26: Mesh Validation Pattern generation
+ gcode_G26();
+ break;
+ #endif // G26_MESH_VALIDATION
+
+ #if ENABLED(NOZZLE_PARK_FEATURE)
+ case 27: // G27: Nozzle Park
+ gcode_G27();
+ break;
+ #endif // NOZZLE_PARK_FEATURE
+
+ case 28: // G28: Home all axes, one at a time
+ gcode_G28(false);
+ break;
+
+ #if HAS_LEVELING
+ case 29: // G29 Detailed Z probe, probes the bed at 3 or more points,
+ // or provides access to the UBL System if enabled.
+ gcode_G29();
+ break;
+ #endif // HAS_LEVELING
+
+ #if HAS_BED_PROBE
+
+ case 30: // G30 Single Z probe
+ gcode_G30();
+ break;
+
+ #if ENABLED(Z_PROBE_SLED)
+
+ case 31: // G31: dock the sled
+ gcode_G31();
+ break;
+
+ case 32: // G32: undock the sled
+ gcode_G32();
+ break;
+
+ #endif // Z_PROBE_SLED
+
+ #endif // HAS_BED_PROBE
+
+ #if ENABLED(DELTA_AUTO_CALIBRATION)
+
+ case 33: // G33: Delta Auto-Calibration
+ gcode_G33();
+ break;
+
+ #endif // DELTA_AUTO_CALIBRATION
+
+ #if ENABLED(G38_PROBE_TARGET)
+ case 38: // G38.2 & G38.3
+ if (parser.subcode == 2 || parser.subcode == 3)
+ gcode_G38(parser.subcode == 2);
+ break;
#endif
- case 90: relative_mode = false; break; // G90: Absolute coordinates
- case 91: relative_mode = true; break; // G91: Relative coordinates
+ case 90: // G90
+ relative_mode = false;
+ break;
+ case 91: // G91
+ relative_mode = true;
+ break;
- case 92: gcode_G92(); break; // G92: Set Position
- #if ENABLED(MECHADUINO_I2C_COMMANDS)
- case 95: gcode_G95(); break; // G95: Set torque mode
- case 96: gcode_G96(); break; // G96: Mark encoder reference point
+ case 92: // G92
+ gcode_G92();
+ break;
+
+ #if HAS_MESH
+ case 42:
+ gcode_G42();
+ break;
#endif
#if ENABLED(DEBUG_GCODE_PARSER)
- case 800: parser.debug(); break; // G800: GCode Parser Test for G
+ case 800:
+ parser.debug(); // GCode Parser Test for G
+ break;
#endif
-
- default: parser.unknown_command_error();
}
break;
case 'M': switch (parser.codenum) {
#if HAS_RESUME_CONTINUE
- case 0: case 1: gcode_M0_M1(); break; // M0: Unconditional stop, M1: Conditional stop
- #endif
+ case 0: // M0: Unconditional stop - Wait for user button press on LCD
+ case 1: // M1: Conditional stop - Wait for user button press on LCD
+ gcode_M0_M1();
+ break;
+ #endif // ULTIPANEL
#if ENABLED(SPINDLE_LASER_ENABLE)
- case 3: gcode_M3_M4(true); break; // M3: Laser/CW-Spindle Power
- case 4: gcode_M3_M4(false); break; // M4: Laser/CCW-Spindle Power
- case 5: gcode_M5(); break; // M5: Laser/Spindle OFF
+ case 3:
+ gcode_M3_M4(true); // M3: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CW
+ break; // synchronizes with movement commands
+ case 4:
+ gcode_M3_M4(false); // M4: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CCW
+ break; // synchronizes with movement commands
+ case 5:
+ gcode_M5(); // M5 - turn spindle/laser off
+ break; // synchronizes with movement commands
#endif
-
- case 17: gcode_M17(); break; // M17: Enable all steppers
+ case 17: // M17: Enable all stepper motors
+ gcode_M17();
+ break;
#if ENABLED(SDSUPPORT)
- case 20: gcode_M20(); break; // M20: List SD Card
- case 21: gcode_M21(); break; // M21: Init SD Card
- case 22: gcode_M22(); break; // M22: Release SD Card
- case 23: gcode_M23(); break; // M23: Select File
- case 24: gcode_M24(); break; // M24: Start SD Print
- case 25: gcode_M25(); break; // M25: Pause SD Print
- case 26: gcode_M26(); break; // M26: Set SD Index
- case 27: gcode_M27(); break; // M27: Get SD Status
- case 28: gcode_M28(); break; // M28: Start SD Write
- case 29: gcode_M29(); break; // M29: Stop SD Write
- case 30: gcode_M30(); break; // M30: Delete File
- case 32: gcode_M32(); break; // M32: Select file, Start SD Print
+ case 20: // M20: list SD card
+ gcode_M20(); break;
+ case 21: // M21: init SD card
+ gcode_M21(); break;
+ case 22: // M22: release SD card
+ gcode_M22(); break;
+ case 23: // M23: Select file
+ gcode_M23(); break;
+ case 24: // M24: Start SD print
+ gcode_M24(); break;
+ case 25: // M25: Pause SD print
+ gcode_M25(); break;
+ case 26: // M26: Set SD index
+ gcode_M26(); break;
+ case 27: // M27: Get SD status
+ gcode_M27(); break;
+ case 28: // M28: Start SD write
+ gcode_M28(); break;
+ case 29: // M29: Stop SD write
+ gcode_M29(); break;
+ case 30: // M30 Delete File
+ gcode_M30(); break;
+ case 32: // M32: Select file and start SD print
+ gcode_M32(); break;
+
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
- case 33: gcode_M33(); break; // M33: Report longname path
+ case 33: // M33: Get the long full path to a file or folder
+ gcode_M33(); break;
#endif
+
#if ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_GCODE)
- case 34: gcode_M34(); break; // M34: Set SD card sorting options
- #endif
- case 928: gcode_M928(); break; // M928: Start SD write
+ case 34: // M34: Set SD card sorting options
+ gcode_M34(); break;
+ #endif // SDCARD_SORT_ALPHA && SDSORT_GCODE
+
+ case 928: // M928: Start SD write
+ gcode_M928(); break;
#endif // SDSUPPORT
- case 31: gcode_M31(); break; // M31: Report print job elapsed time
+ case 31: // M31: Report time since the start of SD print or last M109
+ gcode_M31(); break;
+
+ case 42: // M42: Change pin state
+ gcode_M42(); break;
- case 42: gcode_M42(); break; // M42: Change pin state
#if ENABLED(PINS_DEBUGGING)
- case 43: gcode_M43(); break; // M43: Read/monitor pin and endstop states
+ case 43: // M43: Read pin state
+ gcode_M43(); break;
#endif
+
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
- case 48: gcode_M48(); break; // M48: Z probe repeatability test
- #endif
+ case 48: // M48: Z probe repeatability test
+ gcode_M48();
+ break;
+ #endif // Z_MIN_PROBE_REPEATABILITY_TEST
+
#if ENABLED(G26_MESH_VALIDATION)
- case 49: gcode_M49(); break; // M49: Toggle the G26 Debug Flag
- #endif
+ case 49: // M49: Turn on or off G26 debug flag for verbose output
+ gcode_M49();
+ break;
+ #endif // G26_MESH_VALIDATION
#if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY)
- case 73: gcode_M73(); break; // M73: Set Print Progress %
+ case 73: // M73: Set print progress percentage
+ gcode_M73(); break;
#endif
- case 75: gcode_M75(); break; // M75: Start Print Job Timer
- case 76: gcode_M76(); break; // M76: Pause Print Job Timer
- case 77: gcode_M77(); break; // M77: Stop Print Job Timer
+
+ case 75: // M75: Start print timer
+ gcode_M75(); break;
+ case 76: // M76: Pause print timer
+ gcode_M76(); break;
+ case 77: // M77: Stop print timer
+ gcode_M77(); break;
+
#if ENABLED(PRINTCOUNTER)
- case 78: gcode_M78(); break; // M78: Report Print Statistics
+ case 78: // M78: Show print statistics
+ gcode_M78(); break;
#endif
#if ENABLED(M100_FREE_MEMORY_WATCHER)
- case 100: gcode_M100(); break; // M100: Free Memory Report
+ case 100: // M100: Free Memory Report
+ gcode_M100();
+ break;
#endif
- case 104: gcode_M104(); break; // M104: Set Hotend Temperature
- case 110: gcode_M110(); break; // M110: Set Current Line Number
- case 111: gcode_M111(); break; // M111: Set Debug Flags
+ case 104: // M104: Set hot end temperature
+ gcode_M104();
+ break;
+
+ case 110: // M110: Set Current Line Number
+ gcode_M110();
+ break;
+
+ case 111: // M111: Set debug level
+ gcode_M111();
+ break;
#if DISABLED(EMERGENCY_PARSER)
- case 108: gcode_M108(); break; // M108: Cancel Waiting
- case 112: gcode_M112(); break; // M112: Emergency Stop
- case 410: gcode_M410(); break; // M410: Quickstop. Abort all planned moves
- #else
- case 108: case 112: case 410: break; // Silently drop as handled by emergency parser
+
+ case 108: // M108: Cancel Waiting
+ gcode_M108();
+ break;
+
+ case 112: // M112: Emergency Stop
+ gcode_M112();
+ break;
+
+ case 410: // M410 quickstop - Abort all the planned moves.
+ gcode_M410();
+ break;
+
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
- case 113: gcode_M113(); break; // M113: Set Host Keepalive Interval
+ case 113: // M113: Set Host Keepalive interval
+ gcode_M113();
+ break;
#endif
- case 105: gcode_M105(); KEEPALIVE_STATE(NOT_BUSY); return; // M105: Report Temperatures (and say "ok")
+ case 140: // M140: Set bed temperature
+ gcode_M140();
+ break;
- #if ENABLED(AUTO_REPORT_TEMPERATURES)
- case 155: gcode_M155(); break; // M155: Set Temperature Auto-report Interval
+ case 105: // M105: Report current temperature
+ gcode_M105();
+ KEEPALIVE_STATE(NOT_BUSY);
+ return; // "ok" already printed
+
+ #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
+ case 155: // M155: Set temperature auto-report interval
+ gcode_M155();
+ break;
#endif
- case 109: gcode_M109(); break; // M109: Set Hotend Temperature. Wait for target.
+ case 109: // M109: Wait for hotend temperature to reach target
+ gcode_M109();
+ break;
- #if HAS_HEATED_BED
- case 140: gcode_M140(); break; // M140: Set Bed Temperature
- case 190: gcode_M190(); break; // M190: Set Bed Temperature. Wait for target.
- #endif
+ #if HAS_TEMP_BED
+ case 190: // M190: Wait for bed temperature to reach target
+ gcode_M190();
+ break;
+ #endif // HAS_TEMP_BED
#if FAN_COUNT > 0
- case 106: gcode_M106(); break; // M106: Set Fan Speed
- case 107: gcode_M107(); break; // M107: Fan Off
- #endif
+ case 106: // M106: Fan On
+ gcode_M106();
+ break;
+ case 107: // M107: Fan Off
+ gcode_M107();
+ break;
+ #endif // FAN_COUNT > 0
#if ENABLED(PARK_HEAD_ON_PAUSE)
- case 125: gcode_M125(); break; // M125: Park (for Filament Change)
+ case 125: // M125: Store current position and move to filament change position
+ gcode_M125(); break;
#endif
#if ENABLED(BARICUDA)
+ // PWM for HEATER_1_PIN
#if HAS_HEATER_1
- case 126: gcode_M126(); break; // M126: Valve 1 Open
- case 127: gcode_M127(); break; // M127: Valve 1 Closed
- #endif
+ case 126: // M126: valve open
+ gcode_M126();
+ break;
+ case 127: // M127: valve closed
+ gcode_M127();
+ break;
+ #endif // HAS_HEATER_1
+
+ // PWM for HEATER_2_PIN
#if HAS_HEATER_2
- case 128: gcode_M128(); break; // M128: Valve 2 Open
- case 129: gcode_M129(); break; // M129: Valve 2 Closed
- #endif
- #endif
+ case 128: // M128: valve open
+ gcode_M128();
+ break;
+ case 129: // M129: valve closed
+ gcode_M129();
+ break;
+ #endif // HAS_HEATER_2
+ #endif // BARICUDA
#if HAS_POWER_SWITCH
- case 80: gcode_M80(); break; // M80: Turn on Power Supply
- #endif
- case 81: gcode_M81(); break; // M81: Turn off Power and Power Supply
- case 82: gcode_M82(); break; // M82: Disable Relative E-Axis
- case 83: gcode_M83(); break; // M83: Set Relative E-Axis
- case 18: case 84: gcode_M18_M84(); break; // M18/M84: Disable Steppers / Set Timeout
- case 85: gcode_M85(); break; // M85: Set inactivity stepper shutdown timeout
- case 92: gcode_M92(); break; // M92: Set steps-per-unit
- case 114: gcode_M114(); break; // M114: Report Current Position
- case 115: gcode_M115(); break; // M115: Capabilities Report
- case 117: gcode_M117(); break; // M117: Set LCD message text
- case 118: gcode_M118(); break; // M118: Print a message in the host console
- case 119: gcode_M119(); break; // M119: Report Endstop states
- case 120: gcode_M120(); break; // M120: Enable Endstops
- case 121: gcode_M121(); break; // M121: Disable Endstops
+ case 80: // M80: Turn on Power Supply
+ gcode_M80();
+ break;
+
+ #endif // HAS_POWER_SWITCH
+
+ case 81: // M81: Turn off Power, including Power Supply, if possible
+ gcode_M81();
+ break;
+
+ case 82: // M82: Set E axis normal mode (same as other axes)
+ gcode_M82();
+ break;
+ case 83: // M83: Set E axis relative mode
+ gcode_M83();
+ break;
+ case 18: // M18 => M84
+ case 84: // M84: Disable all steppers or set timeout
+ gcode_M18_M84();
+ break;
+ case 85: // M85: Set inactivity stepper shutdown timeout
+ gcode_M85();
+ break;
+ case 92: // M92: Set the steps-per-unit for one or more axes
+ gcode_M92();
+ break;
+ case 114: // M114: Report current position
+ gcode_M114();
+ break;
+ case 115: // M115: Report capabilities
+ gcode_M115();
+ break;
+ case 117: // M117: Set LCD message text, if possible
+ gcode_M117();
+ break;
+ case 118: // M118: Display a message in the host console
+ gcode_M118();
+ break;
+ case 119: // M119: Report endstop states
+ gcode_M119();
+ break;
+ case 120: // M120: Enable endstops
+ gcode_M120();
+ break;
+ case 121: // M121: Disable endstops
+ gcode_M121();
+ break;
#if ENABLED(ULTIPANEL)
- case 145: gcode_M145(); break; // M145: Set material heatup parameters
+
+ case 145: // M145: Set material heatup parameters
+ gcode_M145();
+ break;
+
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
- case 149: gcode_M149(); break; // M149: Set Temperature Units, C F K
+ case 149: // M149: Set temperature units
+ gcode_M149();
+ break;
#endif
#if HAS_COLOR_LEDS
- case 150: gcode_M150(); break; // M150: Set Status LED Color
- #endif
+
+ case 150: // M150: Set Status LED Color
+ gcode_M150();
+ break;
+
+ #endif // HAS_COLOR_LEDS
#if ENABLED(MIXING_EXTRUDER)
- case 163: gcode_M163(); break; // M163: Set Mixing Component
+ case 163: // M163: Set a component weight for mixing extruder
+ gcode_M163();
+ break;
#if MIXING_VIRTUAL_TOOLS > 1
- case 164: gcode_M164(); break; // M164: Save Current Mix
+ case 164: // M164: Save current mix as a virtual extruder
+ gcode_M164();
+ break;
#endif
#if ENABLED(DIRECT_MIXING_IN_G1)
- case 165: gcode_M165(); break; // M165: Set Multiple Mixing Components
+ case 165: // M165: Set multiple mix weights
+ gcode_M165();
+ break;
#endif
#endif
#if DISABLED(NO_VOLUMETRICS)
- case 200: gcode_M200(); break; // M200: Set Filament Diameter, Volumetric Extrusion
- #endif
-
- case 201: gcode_M201(); break; // M201: Set Max Printing Acceleration (units/sec^2)
- #if 0
- case 202: gcode_M202(); break; // M202: Not used for Sprinter/grbl gen6
- #endif
- case 203: gcode_M203(); break; // M203: Set Max Feedrate (units/sec)
- case 204: gcode_M204(); break; // M204: Set Acceleration
- case 205: gcode_M205(); break; // M205: Set Advanced settings
-
- #if HAS_M206_COMMAND
- case 206: gcode_M206(); break; // M206: Set Home Offsets
- case 428: gcode_M428(); break; // M428: Set Home Offsets based on current position
- #endif
-
- #if ENABLED(FWRETRACT)
- case 207: gcode_M207(); break; // M207: Set Retract Length, Feedrate, Z lift
- case 208: gcode_M208(); break; // M208: Set Additional Prime Length and Feedrate
- case 209:
- if (MIN_AUTORETRACT <= MAX_AUTORETRACT) gcode_M209(); // M209: Turn Auto-Retract on/off
+ case 200: // M200: Set filament diameter, E to cubic units
+ gcode_M200();
break;
#endif
- case 211: gcode_M211(); break; // M211: Enable/Disable/Report Software Endstops
+ case 201: // M201: Set max acceleration for print moves (units/s^2)
+ gcode_M201();
+ break;
+ #if 0 // Not used for Sprinter/grbl gen6
+ case 202: // M202
+ gcode_M202();
+ break;
+ #endif
+ case 203: // M203: Set max feedrate (units/sec)
+ gcode_M203();
+ break;
+ case 204: // M204: Set acceleration
+ gcode_M204();
+ break;
+ case 205: // M205: Set advanced settings
+ gcode_M205();
+ break;
+
+ #if HAS_M206_COMMAND
+ case 206: // M206: Set home offsets
+ gcode_M206();
+ break;
+ #endif
+
+ #if ENABLED(DELTA)
+ case 665: // M665: Set delta configurations
+ gcode_M665();
+ break;
+ #endif
+
+ #if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
+ case 666: // M666: Set delta or dual endstop adjustment
+ gcode_M666();
+ break;
+ #endif
+
+ #if ENABLED(FWRETRACT)
+ case 207: // M207: Set Retract Length, Feedrate, and Z lift
+ gcode_M207();
+ break;
+ case 208: // M208: Set Recover (unretract) Additional Length and Feedrate
+ gcode_M208();
+ break;
+ case 209: // M209: Turn Automatic Retract Detection on/off
+ if (MIN_AUTORETRACT <= MAX_AUTORETRACT) gcode_M209();
+ break;
+ #endif // FWRETRACT
+
+ case 211: // M211: Enable, Disable, and/or Report software endstops
+ gcode_M211();
+ break;
#if HOTENDS > 1
- case 218: gcode_M218(); break; // M218: Set Tool Offset
- #endif
+ case 218: // M218: Set a tool offset
+ gcode_M218();
+ break;
+ #endif // HOTENDS > 1
- case 220: gcode_M220(); break; // M220: Set Feedrate Percentage
- case 221: gcode_M221(); break; // M221: Set Flow Percentage
- case 226: gcode_M226(); break; // M226: Wait for Pin State
+ case 220: // M220: Set Feedrate Percentage: S ("FR" on your LCD)
+ gcode_M220();
+ break;
- #if defined(CHDK) || HAS_PHOTOGRAPH
- case 240: gcode_M240(); break; // M240: Trigger Camera
- #endif
+ case 221: // M221: Set Flow Percentage
+ gcode_M221();
+ break;
- #if HAS_LCD_CONTRAST
- case 250: gcode_M250(); break; // M250: Set LCD Contrast
- #endif
-
- #if ENABLED(EXPERIMENTAL_I2CBUS)
- case 260: gcode_M260(); break; // M260: Send Data to i2c slave
- case 261: gcode_M261(); break; // M261: Request Data from i2c slave
- #endif
+ case 226: // M226: Wait until a pin reaches a state
+ gcode_M226();
+ break;
#if HAS_SERVOS
- case 280: gcode_M280(); break; // M280: Set Servo Position
- #endif
+ case 280: // M280: Set servo position absolute
+ gcode_M280();
+ break;
+ #endif // HAS_SERVOS
#if ENABLED(BABYSTEPPING)
- case 290: gcode_M290(); break; // M290: Babystepping
- #endif
+ case 290: // M290: Babystepping
+ gcode_M290();
+ break;
+ #endif // BABYSTEPPING
#if HAS_BUZZER
- case 300: gcode_M300(); break; // M300: Add Tone/Buzz to Queue
- #endif
+ case 300: // M300: Play beep tone
+ gcode_M300();
+ break;
+ #endif // HAS_BUZZER
#if ENABLED(PIDTEMP)
- case 301: gcode_M301(); break; // M301: Set Hotend PID parameters
- #endif
-
- #if ENABLED(PREVENT_COLD_EXTRUSION)
- case 302: gcode_M302(); break; // M302: Set Minimum Extrusion Temp
- #endif
-
- case 303: gcode_M303(); break; // M303: PID Autotune
+ case 301: // M301: Set hotend PID parameters
+ gcode_M301();
+ break;
+ #endif // PIDTEMP
#if ENABLED(PIDTEMPBED)
- case 304: gcode_M304(); break; // M304: Set Bed PID parameters
- #endif
+ case 304: // M304: Set bed PID parameters
+ gcode_M304();
+ break;
+ #endif // PIDTEMPBED
- #if HAS_MICROSTEPS
- case 350: gcode_M350(); break; // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
- case 351: gcode_M351(); break; // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
- #endif
+ #if defined(CHDK) || HAS_PHOTOGRAPH
+ case 240: // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
+ gcode_M240();
+ break;
+ #endif // CHDK || PHOTOGRAPH_PIN
- case 355: gcode_M355(); break; // M355: Set Case Light brightness
+ #if HAS_LCD_CONTRAST
+ case 250: // M250: Set LCD contrast
+ gcode_M250();
+ break;
+ #endif // HAS_LCD_CONTRAST
+
+ #if ENABLED(EXPERIMENTAL_I2CBUS)
+
+ case 260: // M260: Send data to an i2c slave
+ gcode_M260();
+ break;
+
+ case 261: // M261: Request data from an i2c slave
+ gcode_M261();
+ break;
+
+ #endif // EXPERIMENTAL_I2CBUS
+
+ #if ENABLED(PREVENT_COLD_EXTRUSION)
+ case 302: // M302: Allow cold extrudes (set the minimum extrude temperature)
+ gcode_M302();
+ break;
+ #endif // PREVENT_COLD_EXTRUSION
+
+ case 303: // M303: PID autotune
+ gcode_M303();
+ break;
#if ENABLED(MORGAN_SCARA)
- case 360: if (gcode_M360()) return; break; // M360: SCARA Theta pos1
- case 361: if (gcode_M361()) return; break; // M361: SCARA Theta pos2
- case 362: if (gcode_M362()) return; break; // M362: SCARA Psi pos1
- case 363: if (gcode_M363()) return; break; // M363: SCARA Psi pos2
- case 364: if (gcode_M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
- #endif
+ case 360: // M360: SCARA Theta pos1
+ if (gcode_M360()) return;
+ break;
+ case 361: // M361: SCARA Theta pos2
+ if (gcode_M361()) return;
+ break;
+ case 362: // M362: SCARA Psi pos1
+ if (gcode_M362()) return;
+ break;
+ case 363: // M363: SCARA Psi pos2
+ if (gcode_M363()) return;
+ break;
+ case 364: // M364: SCARA Psi pos3 (90 deg to Theta)
+ if (gcode_M364()) return;
+ break;
+ #endif // SCARA
- case 400: gcode_M400(); break; // M400: Synchronize. Wait for moves to finish.
+ case 400: // M400: Finish all moves
+ gcode_M400();
+ break;
#if HAS_BED_PROBE
- case 401: gcode_M401(); break; // M401: Deploy Probe
- case 402: gcode_M402(); break; // M402: Stow Probe
- #endif
+ case 401: // M401: Deploy probe
+ gcode_M401();
+ break;
+ case 402: // M402: Stow probe
+ gcode_M402();
+ break;
+ #endif // HAS_BED_PROBE
#if ENABLED(FILAMENT_WIDTH_SENSOR)
- case 404: gcode_M404(); break; // M404: Set/Report Nominal Filament Width
- case 405: gcode_M405(); break; // M405: Enable Filament Width Sensor
- case 406: gcode_M406(); break; // M406: Disable Filament Width Sensor
- case 407: gcode_M407(); break; // M407: Report Measured Filament Width
- #endif
+ case 404: // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
+ gcode_M404();
+ break;
+ case 405: // M405: Turn on filament sensor for control
+ gcode_M405();
+ break;
+ case 406: // M406: Turn off filament sensor for control
+ gcode_M406();
+ break;
+ case 407: // M407: Display measured filament diameter
+ gcode_M407();
+ break;
+ #endif // FILAMENT_WIDTH_SENSOR
#if HAS_LEVELING
- case 420: gcode_M420(); break; // M420: Set Bed Leveling Enabled / Fade
+ case 420: // M420: Enable/Disable Bed Leveling
+ gcode_M420();
+ break;
#endif
#if HAS_MESH
- case 421: gcode_M421(); break; // M421: Set a Mesh Z value
+ case 421: // M421: Set a Mesh Bed Leveling Z coordinate
+ gcode_M421();
+ break;
#endif
- case 500: gcode_M500(); break; // M500: Store Settings in EEPROM
- case 501: gcode_M501(); break; // M501: Read Settings from EEPROM
- case 502: gcode_M502(); break; // M502: Revert Settings to defaults
+ #if HAS_M206_COMMAND
+ case 428: // M428: Apply current_position to home_offset
+ gcode_M428();
+ break;
+ #endif
+
+ case 500: // M500: Store settings in EEPROM
+ gcode_M500();
+ break;
+ case 501: // M501: Read settings from EEPROM
+ gcode_M501();
+ break;
+ case 502: // M502: Revert to default settings
+ gcode_M502();
+ break;
+
#if DISABLED(DISABLE_M503)
- case 503: gcode_M503(); break; // M503: Report Settings (in SRAM)
- #endif
- #if ENABLED(EEPROM_SETTINGS)
- case 504: gcode_M504(); break; // M504: Validate EEPROM
- #endif
-
- #if ENABLED(SDSUPPORT)
- case 524: gcode_M524(); break; // M524: Abort SD print job
+ case 503: // M503: print settings currently in memory
+ gcode_M503();
+ break;
#endif
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
- case 540: gcode_M540(); break; // M540: Set Abort on Endstop Hit for SD Printing
- #endif
-
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- case 600: gcode_M600(); break; // M600: Pause for Filament Change
- case 603: gcode_M603(); break; // M603: Configure Filament Change
- #endif
-
- #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
- case 605: gcode_M605(); break; // M605: Set Dual X Carriage movement mode
- #endif
-
- #if ENABLED(DELTA) || ENABLED(HANGPRINTER)
- case 665: gcode_M665(); break; // M665: Delta / Hangprinter Configuration
- #endif
- #if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
- case 666: gcode_M666(); break; // M666: DELTA/Dual Endstop Adjustment
- #endif
-
- #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
- case 701: gcode_M701(); break; // M701: Load Filament
- case 702: gcode_M702(); break; // M702: Unload Filament
- #endif
-
- #if ENABLED(MAX7219_GCODE)
- case 7219: gcode_M7219(); break; // M7219: Set LEDs, columns, and rows
- #endif
-
- #if ENABLED(DEBUG_GCODE_PARSER)
- case 800: parser.debug(); break; // M800: GCode Parser Test for M
+ case 540: // M540: Set abort on endstop hit for SD printing
+ gcode_M540();
+ break;
#endif
#if HAS_BED_PROBE
- case 851: gcode_M851(); break; // M851: Set Z Probe Z Offset
- #endif
+ case 851: // M851: Set Z Probe Z Offset
+ gcode_M851();
+ break;
+ #endif // HAS_BED_PROBE
#if ENABLED(SKEW_CORRECTION_GCODE)
- case 852: gcode_M852(); break; // M852: Set Skew factors
+ case 852: // M852: Set Skew factors
+ gcode_M852();
+ break;
#endif
- #if ENABLED(I2C_POSITION_ENCODERS)
- case 860: gcode_M860(); break; // M860: Report encoder module position
- case 861: gcode_M861(); break; // M861: Report encoder module status
- case 862: gcode_M862(); break; // M862: Perform axis test
- case 863: gcode_M863(); break; // M863: Calibrate steps/mm
- case 864: gcode_M864(); break; // M864: Change module address
- case 865: gcode_M865(); break; // M865: Check module firmware version
- case 866: gcode_M866(); break; // M866: Report axis error count
- case 867: gcode_M867(); break; // M867: Toggle error correction
- case 868: gcode_M868(); break; // M868: Set error correction threshold
- case 869: gcode_M869(); break; // M869: Report axis error
+ #if ENABLED(ADVANCED_PAUSE_FEATURE)
+ case 600: // M600: Pause for filament change
+ gcode_M600();
+ break;
+ #endif // ADVANCED_PAUSE_FEATURE
+
+ #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
+ case 605: // M605: Set Dual X Carriage movement mode
+ gcode_M605();
+ break;
+ #endif // DUAL_X_CARRIAGE
+
+ #if ENABLED(MK2_MULTIPLEXER)
+ case 702: // M702: Unload all extruders
+ gcode_M702();
+ break;
#endif
#if ENABLED(LIN_ADVANCE)
- case 900: gcode_M900(); break; // M900: Set Linear Advance K factor
+ case 900: // M900: Set advance K factor.
+ gcode_M900();
+ break;
#endif
- case 907: gcode_M907(); break; // M907: Set Digital Trimpot Motor Current using axis codes.
+ case 907: // M907: Set digital trimpot motor current using axis codes.
+ gcode_M907();
+ break;
#if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
- case 908: gcode_M908(); break; // M908: Direct Control Digital Trimpot
- #if ENABLED(DAC_STEPPER_CURRENT)
- case 909: gcode_M909(); break; // M909: Print Digipot/DAC current value (As with Printrbot RevF)
- case 910: gcode_M910(); break; // M910: Commit Digipot/DAC value to External EEPROM (As with Printrbot RevF)
- #endif
- #endif
- #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208)
+ case 908: // M908: Control digital trimpot directly.
+ gcode_M908();
+ break;
+
+ #if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF
+
+ case 909: // M909: Print digipot/DAC current value
+ gcode_M909();
+ break;
+
+ case 910: // M910: Commit digipot/DAC value to external EEPROM
+ gcode_M910();
+ break;
+
+ #endif
+
+ #endif // HAS_DIGIPOTSS || DAC_STEPPER_CURRENT
+
+ #if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+ case 906: // M906: Set motor current in milliamps using axis codes X, Y, Z, E
+ gcode_M906();
+ break;
+
+ case 911: // M911: Report TMC prewarn triggered flags
+ gcode_M911();
+ break;
+
+ case 912: // M911: Clear TMC prewarn triggered flags
+ gcode_M912();
+ break;
+
#if ENABLED(TMC_DEBUG)
- case 122: gcode_M122(); break; // M122: Debug TMC steppers
+ case 122: // Debug TMC steppers
+ gcode_M122();
+ break;
#endif
- case 906: gcode_M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E
- case 911: gcode_M911(); break; // M911: Report TMC prewarn triggered flags
- case 912: gcode_M912(); break; // M911: Clear TMC prewarn triggered flags
+
#if ENABLED(HYBRID_THRESHOLD)
- case 913: gcode_M913(); break; // M913: Set HYBRID_THRESHOLD speed.
+ case 913: // M913: Set HYBRID_THRESHOLD speed.
+ gcode_M913();
+ break;
#endif
+
#if ENABLED(SENSORLESS_HOMING)
- case 914: gcode_M914(); break; // M914: Set SENSORLESS_HOMING sensitivity.
+ case 914: // M914: Set SENSORLESS_HOMING sensitivity.
+ gcode_M914();
+ break;
#endif
- #if ENABLED(TMC_Z_CALIBRATION)
- case 915: gcode_M915(); break; // M915: TMC Z axis calibration routine
+
+ #if ENABLED(TMC_Z_CALIBRATION) && (Z_IS_TRINAMIC || Z2_IS_TRINAMIC)
+ case 915: // M915: TMC Z axis calibration routine
+ gcode_M915();
+ break;
#endif
#endif
- case 999: gcode_M999(); break; // M999: Restart after being Stopped
+ #if HAS_MICROSTEPS
- default: parser.unknown_command_error();
+ case 350: // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
+ gcode_M350();
+ break;
+
+ case 351: // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
+ gcode_M351();
+ break;
+
+ #endif // HAS_MICROSTEPS
+
+ case 355: // M355 set case light brightness
+ gcode_M355();
+ break;
+
+ #if ENABLED(DEBUG_GCODE_PARSER)
+ case 800:
+ parser.debug(); // GCode Parser Test for M
+ break;
+ #endif
+
+ #if ENABLED(I2C_POSITION_ENCODERS)
+
+ case 860: // M860 Report encoder module position
+ gcode_M860();
+ break;
+
+ case 861: // M861 Report encoder module status
+ gcode_M861();
+ break;
+
+ case 862: // M862 Perform axis test
+ gcode_M862();
+ break;
+
+ case 863: // M863 Calibrate steps/mm
+ gcode_M863();
+ break;
+
+ case 864: // M864 Change module address
+ gcode_M864();
+ break;
+
+ case 865: // M865 Check module firmware version
+ gcode_M865();
+ break;
+
+ case 866: // M866 Report axis error count
+ gcode_M866();
+ break;
+
+ case 867: // M867 Toggle error correction
+ gcode_M867();
+ break;
+
+ case 868: // M868 Set error correction threshold
+ gcode_M868();
+ break;
+
+ case 869: // M869 Report axis error
+ gcode_M869();
+ break;
+
+ #endif // I2C_POSITION_ENCODERS
+
+ case 999: // M999: Restart after being Stopped
+ gcode_M999();
+ break;
}
break;
- case 'T': gcode_T(parser.codenum); break; // T: Tool Select
+ case 'T':
+ gcode_T(parser.codenum);
+ break;
default: parser.unknown_command_error();
}
KEEPALIVE_STATE(NOT_BUSY);
+
ok_to_send();
}
@@ -13190,9 +12501,9 @@ void process_next_command() {
* Send a "Resend: nnn" message to the host to
* indicate that a command needs to be re-sent.
*/
-void flush_and_request_resend() {
+void FlushSerialRequestResend() {
//char command_queue[cmd_queue_index_r][100]="Resend:";
- SERIAL_FLUSH();
+ MYSERIAL.flush();
SERIAL_PROTOCOLPGM(MSG_RESEND);
SERIAL_PROTOCOLLN(gcode_LastN + 1);
ok_to_send();
@@ -13208,6 +12519,7 @@ void flush_and_request_resend() {
* B Block queue space remaining
*/
void ok_to_send() {
+ refresh_cmd_timeout();
if (!send_ok[cmd_queue_index_r]) return;
SERIAL_PROTOCOLPGM(MSG_OK);
#if ENABLED(ADVANCED_OK)
@@ -13267,6 +12579,20 @@ void ok_to_send() {
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ #define ABL_BG_SPACING(A) bilinear_grid_spacing_virt[A]
+ #define ABL_BG_FACTOR(A) bilinear_grid_factor_virt[A]
+ #define ABL_BG_POINTS_X ABL_GRID_POINTS_VIRT_X
+ #define ABL_BG_POINTS_Y ABL_GRID_POINTS_VIRT_Y
+ #define ABL_BG_GRID(X,Y) z_values_virt[X][Y]
+ #else
+ #define ABL_BG_SPACING(A) bilinear_grid_spacing[A]
+ #define ABL_BG_FACTOR(A) bilinear_grid_factor[A]
+ #define ABL_BG_POINTS_X GRID_MAX_POINTS_X
+ #define ABL_BG_POINTS_Y GRID_MAX_POINTS_Y
+ #define ABL_BG_GRID(X,Y) z_values[X][Y]
+ #endif
+
// Get the Z adjustment for non-linear bed leveling
float bilinear_z_offset(const float raw[XYZ]) {
@@ -13301,7 +12627,7 @@ void ok_to_send() {
#endif
gridx = gx;
- nextx = MIN(gridx + 1, ABL_BG_POINTS_X - 1);
+ nextx = min(gridx + 1, ABL_BG_POINTS_X - 1);
}
if (last_y != ry || last_gridx != gridx) {
@@ -13318,7 +12644,7 @@ void ok_to_send() {
#endif
gridy = gy;
- nexty = MIN(gridy + 1, ABL_BG_POINTS_Y - 1);
+ nexty = min(gridy + 1, ABL_BG_POINTS_Y - 1);
}
if (last_gridx != gridx || last_gridy != gridy) {
@@ -13342,7 +12668,7 @@ void ok_to_send() {
/*
static float last_offset = 0;
- if (ABS(last_offset - offset) > 0.2) {
+ if (FABS(last_offset - offset) > 0.2) {
SERIAL_ECHOPGM("Sudden Shift at ");
SERIAL_ECHOPAIR("x=", rx);
SERIAL_ECHOPAIR(" / ", bilinear_grid_spacing[X_AXIS]);
@@ -13387,9 +12713,30 @@ void ok_to_send() {
delta_diagonal_rod_2_tower[B_AXIS] = sq(delta_diagonal_rod + drt[B_AXIS]);
delta_diagonal_rod_2_tower[C_AXIS] = sq(delta_diagonal_rod + drt[C_AXIS]);
update_software_endstops(Z_AXIS);
- axis_homed = 0;
+ axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false;
}
+ #if ENABLED(DELTA_FAST_SQRT)
+ /**
+ * Fast inverse sqrt from Quake III Arena
+ * See: https://en.wikipedia.org/wiki/Fast_inverse_square_root
+ */
+ float Q_rsqrt(const float number) {
+ long i;
+ float x2, y;
+ const float threehalfs = 1.5f;
+ x2 = number * 0.5f;
+ y = number;
+ i = * ( long * ) &y; // evil floating point bit level hacking
+ i = 0x5F3759DF - ( i >> 1 ); // what the f***?
+ y = * ( float * ) &i;
+ y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
+ // y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
+ return y;
+ }
+
+ #endif
+
/**
* Delta Inverse Kinematics
*
@@ -13404,31 +12751,23 @@ void ok_to_send() {
*
* - Disable the home_offset (M206) and/or position_shift (G92)
* features to remove up to 12 float additions.
+ *
+ * - Use a fast-inverse-sqrt function and add the reciprocal.
+ * (see above)
*/
- #define DELTA_DEBUG(VAR) do { \
- SERIAL_ECHOPAIR("cartesian X:", VAR[X_AXIS]); \
- SERIAL_ECHOPAIR(" Y:", VAR[Y_AXIS]); \
- SERIAL_ECHOLNPAIR(" Z:", VAR[Z_AXIS]); \
+ #define DELTA_DEBUG() do { \
+ SERIAL_ECHOPAIR("cartesian X:", raw[X_AXIS]); \
+ SERIAL_ECHOPAIR(" Y:", raw[Y_AXIS]); \
+ SERIAL_ECHOLNPAIR(" Z:", raw[Z_AXIS]); \
SERIAL_ECHOPAIR("delta A:", delta[A_AXIS]); \
SERIAL_ECHOPAIR(" B:", delta[B_AXIS]); \
SERIAL_ECHOLNPAIR(" C:", delta[C_AXIS]); \
}while(0)
void inverse_kinematics(const float raw[XYZ]) {
- #if HOTENDS > 1
- // Delta hotend offsets must be applied in Cartesian space with no "spoofing"
- const float pos[XYZ] = {
- raw[X_AXIS] - hotend_offset[X_AXIS][active_extruder],
- raw[Y_AXIS] - hotend_offset[Y_AXIS][active_extruder],
- raw[Z_AXIS]
- };
- DELTA_IK(pos);
- //DELTA_DEBUG(pos);
- #else
- DELTA_IK(raw);
- //DELTA_DEBUG(raw);
- #endif
+ DELTA_IK(raw);
+ // DELTA_DEBUG();
}
/**
@@ -13438,10 +12777,10 @@ void ok_to_send() {
float delta_safe_distance_from_top() {
float cartesian[XYZ] = { 0, 0, 0 };
inverse_kinematics(cartesian);
- const float centered_extent = delta[A_AXIS];
+ float distance = delta[A_AXIS];
cartesian[Y_AXIS] = DELTA_PRINTABLE_RADIUS;
inverse_kinematics(cartesian);
- return ABS(centered_extent - delta[A_AXIS]);
+ return FABS(distance - delta[A_AXIS]);
}
/**
@@ -13469,7 +12808,7 @@ void ok_to_send() {
*
* The result is stored in the cartes[] array.
*/
- void forward_kinematics_DELTA(const float &z1, const float &z2, const float &z3) {
+ void forward_kinematics_DELTA(float z1, float z2, float z3) {
// Create a vector in old coordinates along x axis of new coordinate
const float p12[] = {
delta_tower[B_AXIS][X_AXIS] - delta_tower[A_AXIS][X_AXIS],
@@ -13477,11 +12816,11 @@ void ok_to_send() {
z2 - z1
},
- // Get the reciprocal of Magnitude of vector.
- d2 = sq(p12[0]) + sq(p12[1]) + sq(p12[2]), inv_d = RSQRT(d2),
+ // Get the Magnitude of vector.
+ d = SQRT(sq(p12[0]) + sq(p12[1]) + sq(p12[2])),
- // Create unit vector by multiplying by the inverse of the magnitude.
- ex[3] = { p12[0] * inv_d, p12[1] * inv_d, p12[2] * inv_d },
+ // Create unit vector by dividing by magnitude.
+ ex[3] = { p12[0] / d, p12[1] / d, p12[2] / d },
// Get the vector from the origin of the new system to the third point.
p13[3] = {
@@ -13500,11 +12839,11 @@ void ok_to_send() {
// variable that will be the unit vector after we scale it.
float ey[3] = { p13[0] - iex[0], p13[1] - iex[1], p13[2] - iex[2] };
- // The magnitude and the inverse of the magnitude of Y component
- const float j2 = sq(ey[0]) + sq(ey[1]) + sq(ey[2]), inv_j = RSQRT(j2);
+ // The magnitude of Y component
+ const float j = SQRT(sq(ey[0]) + sq(ey[1]) + sq(ey[2]));
// Convert to a unit vector
- ey[0] *= inv_j; ey[1] *= inv_j; ey[2] *= inv_j;
+ ey[0] /= j; ey[1] /= j; ey[2] /= j;
// The cross product of the unit x and y is the unit z
// float[] ez = vectorCrossProd(ex, ey);
@@ -13515,8 +12854,8 @@ void ok_to_send() {
},
// We now have the d, i and j values defined in Wikipedia.
// Plug them into the equations defined in Wikipedia for Xnew, Ynew and Znew
- Xnew = (delta_diagonal_rod_2_tower[A_AXIS] - delta_diagonal_rod_2_tower[B_AXIS] + d2) * inv_d * 0.5,
- Ynew = ((delta_diagonal_rod_2_tower[A_AXIS] - delta_diagonal_rod_2_tower[C_AXIS] + sq(i) + j2) * 0.5 - i * Xnew) * inv_j,
+ Xnew = (delta_diagonal_rod_2_tower[A_AXIS] - delta_diagonal_rod_2_tower[B_AXIS] + sq(d)) / (d * 2),
+ Ynew = ((delta_diagonal_rod_2_tower[A_AXIS] - delta_diagonal_rod_2_tower[C_AXIS] + HYPOT2(i, j)) / 2 - i * Xnew) / j,
Znew = SQRT(delta_diagonal_rod_2_tower[A_AXIS] - HYPOT2(Xnew, Ynew));
// Start from the origin of the old coordinates and add vectors in the
@@ -13524,124 +12863,15 @@ void ok_to_send() {
// in the old system.
cartes[X_AXIS] = delta_tower[A_AXIS][X_AXIS] + ex[0] * Xnew + ey[0] * Ynew - ez[0] * Znew;
cartes[Y_AXIS] = delta_tower[A_AXIS][Y_AXIS] + ex[1] * Xnew + ey[1] * Ynew - ez[1] * Znew;
- cartes[Z_AXIS] = z1 + ex[2] * Xnew + ey[2] * Ynew - ez[2] * Znew;
+ cartes[Z_AXIS] = z1 + ex[2] * Xnew + ey[2] * Ynew - ez[2] * Znew;
}
- void forward_kinematics_DELTA(const float (&point)[ABC]) {
+ void forward_kinematics_DELTA(float point[ABC]) {
forward_kinematics_DELTA(point[A_AXIS], point[B_AXIS], point[C_AXIS]);
}
#endif // DELTA
-#if ENABLED(HANGPRINTER)
-
- /**
- * Recalculate factors used for hangprinter kinematics whenever
- * settings have been changed (e.g., by M665).
- */
- void recalc_hangprinter_settings(){
- HANGPRINTER_IK_ORIGIN(line_lengths_origin);
-
- #if ENABLED(LINE_BUILDUP_COMPENSATION_FEATURE)
-
- const uint8_t mech_adv_tmp[MOV_AXIS] = MECHANICAL_ADVANTAGE,
- actn_pts_tmp[MOV_AXIS] = ACTION_POINTS;
- const uint16_t m_g_t_tmp[MOV_AXIS] = MOTOR_GEAR_TEETH,
- s_g_t_tmp[MOV_AXIS] = SPOOL_GEAR_TEETH;
- const float mnt_l_tmp[MOV_AXIS] = MOUNTED_LINE;
- float s_r2_tmp[MOV_AXIS] = SPOOL_RADII,
- steps_per_unit_times_r_tmp[MOV_AXIS];
- uint8_t nr_lines_dir_tmp[MOV_AXIS];
-
- LOOP_MOV_AXIS(i){
- steps_per_unit_times_r_tmp[i] = (float(mech_adv_tmp[i])*STEPS_PER_MOTOR_REVOLUTION*s_g_t_tmp[i])/(2*M_PI*m_g_t_tmp[i]);
- nr_lines_dir_tmp[i] = mech_adv_tmp[i]*actn_pts_tmp[i];
- s_r2_tmp[i] *= s_r2_tmp[i];
- planner.k2[i] = -(float)nr_lines_dir_tmp[i]*SPOOL_BUILDUP_FACTOR;
- planner.k0[i] = 2.0*steps_per_unit_times_r_tmp[i]/planner.k2[i];
- }
-
- // Assumes spools are mounted near D-anchor in ceiling
- #define HYP3D(x,y,z) SQRT(sq(x) + sq(y) + sq(z))
- float line_on_spool_origin_tmp[MOV_AXIS];
- line_on_spool_origin_tmp[A_AXIS] = actn_pts_tmp[A_AXIS] * mnt_l_tmp[A_AXIS]
- - actn_pts_tmp[A_AXIS] * HYPOT(anchor_A_y, anchor_D_z - anchor_A_z)
- - nr_lines_dir_tmp[A_AXIS] * line_lengths_origin[A_AXIS];
- line_on_spool_origin_tmp[B_AXIS] = actn_pts_tmp[B_AXIS] * mnt_l_tmp[B_AXIS]
- - actn_pts_tmp[B_AXIS] * HYP3D(anchor_B_x, anchor_B_y, anchor_D_z - anchor_B_z)
- - nr_lines_dir_tmp[B_AXIS] * line_lengths_origin[B_AXIS];
- line_on_spool_origin_tmp[C_AXIS] = actn_pts_tmp[C_AXIS] * mnt_l_tmp[C_AXIS]
- - actn_pts_tmp[C_AXIS] * HYP3D(anchor_C_x, anchor_C_y, anchor_D_z - anchor_C_z)
- - nr_lines_dir_tmp[C_AXIS] * line_lengths_origin[C_AXIS];
- line_on_spool_origin_tmp[D_AXIS] = actn_pts_tmp[D_AXIS] * mnt_l_tmp[D_AXIS]
- - nr_lines_dir_tmp[D_AXIS] * line_lengths_origin[D_AXIS];
-
- LOOP_MOV_AXIS(i) {
- planner.axis_steps_per_mm[i] = steps_per_unit_times_r_tmp[i] /
- SQRT((SPOOL_BUILDUP_FACTOR) * line_on_spool_origin_tmp[i] + s_r2_tmp[i]);
- planner.k1[i] = (SPOOL_BUILDUP_FACTOR) *
- (line_on_spool_origin_tmp[i] + nr_lines_dir_tmp[i] * line_lengths_origin[i]) + s_r2_tmp[i];
-
- planner.sqrtk1[i] = SQRT(planner.k1[i]);
- }
- planner.axis_steps_per_mm[E_AXIS] = DEFAULT_E_AXIS_STEPS_PER_UNIT;
-
- #endif // LINE_BUILDUP_COMPENSATION_FEATURE
-
- SYNC_PLAN_POSITION_KINEMATIC(); // recalcs line lengths in case anchor was moved
- }
-
- /**
- * Hangprinter inverse kinematics
- */
- void inverse_kinematics(const float raw[XYZ]) {
- HANGPRINTER_IK(raw);
- }
-
- /**
- * Hangprinter forward kinematics
- * Basic idea is to subtract squared line lengths to get linear equations.
- * Subtracting d*d from a*a, b*b, and c*c gives the cleanest derivation:
- *
- * a*a - d*d = k1 + k2*y + k3*z <---- a line (I)
- * b*b - d*d = k4 + k5*x + k6*y + k7*z <---- a plane (II)
- * c*c - d*d = k8 + k9*x + k10*y + k11*z <---- a plane (III)
- *
- * Use (I) to reduce (II) and (III) into lines. Eliminate y, keep z.
- *
- * (II): b*b - d*d = k12 + k13*x + k14*z
- * <=> x = k0b + k1b*z, <---- a line (IV)
- *
- * (III): c*c - d*d = k15 + k16*x + k17*z
- * <=> x = k0c + k1c*z, <---- a line (V)
- *
- * where k1, k2, ..., k17, k0b, k0c, k1b, and k1c are known constants.
- *
- * These two straight lines are not parallel, so they will cross in exactly one point.
- * Find z by setting (IV) = (V)
- * Find x by inserting z into (V)
- * Find y by inserting z into (I)
- *
- * Warning: truncation errors will typically be in the order of a few tens of microns.
- */
- void forward_kinematics_HANGPRINTER(float a, float b, float c, float d){
- const float Asq = sq(anchor_A_y) + sq(anchor_A_z),
- Bsq = sq(anchor_B_x) + sq(anchor_B_y) + sq(anchor_B_z),
- Csq = sq(anchor_C_x) + sq(anchor_C_y) + sq(anchor_C_z),
- Dsq = sq(anchor_D_z),
- aa = sq(a),
- dd = sq(d),
- k0b = (-sq(b) + Bsq - Dsq + dd) / (2.0 * anchor_B_x) + (anchor_B_y / (2.0 * anchor_A_y * anchor_B_x)) * (Dsq - Asq + aa - dd),
- k0c = (-sq(c) + Csq - Dsq + dd) / (2.0 * anchor_C_x) + (anchor_C_y / (2.0 * anchor_A_y * anchor_C_x)) * (Dsq - Asq + aa - dd),
- k1b = (anchor_B_y * (anchor_A_z - anchor_D_z)) / (anchor_A_y * anchor_B_x) + (anchor_D_z - anchor_B_z) / anchor_B_x,
- k1c = (anchor_C_y * (anchor_A_z - anchor_D_z)) / (anchor_A_y * anchor_C_x) + (anchor_D_z - anchor_C_z) / anchor_C_x;
-
- cartes[Z_AXIS] = (k0b - k0c) / (k1c - k1b);
- cartes[X_AXIS] = k0c + k1c * cartes[Z_AXIS];
- cartes[Y_AXIS] = (Asq - Dsq - aa + dd) / (2.0 * anchor_A_y) + ((anchor_D_z - anchor_A_z) / anchor_A_y) * cartes[Z_AXIS];
- }
-#endif // HANGPRINTER
-
/**
* Get the stepper positions in the cartes[] array.
* Forward kinematics are applied for DELTA and SCARA.
@@ -13654,28 +12884,21 @@ void ok_to_send() {
void get_cartesian_from_steppers() {
#if ENABLED(DELTA)
forward_kinematics_DELTA(
- planner.get_axis_position_mm(A_AXIS),
- planner.get_axis_position_mm(B_AXIS),
- planner.get_axis_position_mm(C_AXIS)
- );
- #elif ENABLED(HANGPRINTER)
- forward_kinematics_HANGPRINTER(
- planner.get_axis_position_mm(A_AXIS),
- planner.get_axis_position_mm(B_AXIS),
- planner.get_axis_position_mm(C_AXIS),
- planner.get_axis_position_mm(D_AXIS)
+ stepper.get_axis_position_mm(A_AXIS),
+ stepper.get_axis_position_mm(B_AXIS),
+ stepper.get_axis_position_mm(C_AXIS)
);
#else
#if IS_SCARA
forward_kinematics_SCARA(
- planner.get_axis_position_degrees(A_AXIS),
- planner.get_axis_position_degrees(B_AXIS)
+ stepper.get_axis_position_degrees(A_AXIS),
+ stepper.get_axis_position_degrees(B_AXIS)
);
#else
- cartes[X_AXIS] = planner.get_axis_position_mm(X_AXIS);
- cartes[Y_AXIS] = planner.get_axis_position_mm(Y_AXIS);
+ cartes[X_AXIS] = stepper.get_axis_position_mm(X_AXIS);
+ cartes[Y_AXIS] = stepper.get_axis_position_mm(Y_AXIS);
#endif
- cartes[Z_AXIS] = planner.get_axis_position_mm(Z_AXIS);
+ cartes[Z_AXIS] = stepper.get_axis_position_mm(Z_AXIS);
#endif
}
@@ -13724,13 +12947,13 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
// Remaining cartesian distances
const float zdiff = destination[Z_AXIS] - current_position[Z_AXIS],
- ediff = destination[E_CART] - current_position[E_CART];
+ ediff = destination[E_AXIS] - current_position[E_AXIS];
// Get the linear distance in XYZ
// If the move is very short, check the E move distance
// No E move either? Game over.
float cartesian_mm = SQRT(sq(xdiff) + sq(ydiff) + sq(zdiff));
- if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(ediff);
+ if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = FABS(ediff);
if (UNEAR_ZERO(cartesian_mm)) return;
// The length divided by the segment size
@@ -13739,8 +12962,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
NOLESS(segments, 1);
// The approximate length of each segment
- const float inv_segments = 1.0f / float(segments),
- cartesian_segment_mm = cartesian_mm * inv_segments,
+ const float inv_segments = 1.0 / float(segments),
segment_distance[XYZE] = {
xdiff * inv_segments,
ydiff * inv_segments,
@@ -13750,7 +12972,6 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
// SERIAL_ECHOPAIR("mm=", cartesian_mm);
// SERIAL_ECHOLNPAIR(" segments=", segments);
- // SERIAL_ECHOLNPAIR(" segment_mm=", cartesian_segment_mm);
// Get the raw current position as starting point
float raw[XYZE];
@@ -13765,13 +12986,12 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
idle();
}
LOOP_XYZE(i) raw[i] += segment_distance[i];
- if (!planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder, cartesian_segment_mm))
- break;
+ planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder);
}
// Since segment_distance is only approximate,
// the final move must be to the exact destination.
- planner.buffer_line_kinematic(destination, fr_mm_s, active_extruder, cartesian_segment_mm);
+ planner.buffer_line_kinematic(destination, fr_mm_s, active_extruder);
}
#elif ENABLED(MESH_BED_LEVELING)
@@ -13798,11 +13018,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
return;
}
- #define MBL_SEGMENT_END(A) (current_position[_AXIS(A)] + (destination[_AXIS(A)] - current_position[_AXIS(A)]) * normalized_dist)
- #define MBL_SEGMENT_END_E (current_position[E_CART] + (destination[E_CART] - current_position[E_CART]) * normalized_dist)
+ #define MBL_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist)
float normalized_dist, end[XYZE];
- const int8_t gcx = MAX(cx1, cx2), gcy = MAX(cy1, cy2);
+ const int8_t gcx = max(cx1, cx2), gcy = max(cy1, cy2);
// Crosses on the X and not already split on this X?
// The x_splits flags are insurance against rounding errors.
@@ -13831,7 +13050,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
}
destination[Z_AXIS] = MBL_SEGMENT_END(Z);
- destination[E_CART] = MBL_SEGMENT_END_E;
+ destination[E_AXIS] = MBL_SEGMENT_END(E);
// Do the split and look for more borders
mesh_line_to_destination(fr_mm_s, x_splits, y_splits);
@@ -13843,7 +13062,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
- #define CELL_INDEX(A,V) ((V - bilinear_start[_AXIS(A)]) * ABL_BG_FACTOR(_AXIS(A)))
+ #define CELL_INDEX(A,V) ((V - bilinear_start[A##_AXIS]) * ABL_BG_FACTOR(A##_AXIS))
/**
* Prepare a bilinear-leveled linear move on Cartesian,
@@ -13867,11 +13086,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
return;
}
- #define LINE_SEGMENT_END(A) (current_position[_AXIS(A)] + (destination[_AXIS(A)] - current_position[_AXIS(A)]) * normalized_dist)
- #define LINE_SEGMENT_END_E (current_position[E_CART] + (destination[E_CART] - current_position[E_CART]) * normalized_dist)
+ #define LINE_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist)
float normalized_dist, end[XYZE];
- const int8_t gcx = MAX(cx1, cx2), gcy = MAX(cy1, cy2);
+ const int8_t gcx = max(cx1, cx2), gcy = max(cy1, cy2);
// Crosses on the X and not already split on this X?
// The x_splits flags are insurance against rounding errors.
@@ -13900,7 +13118,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
}
destination[Z_AXIS] = LINE_SEGMENT_END(Z);
- destination[E_CART] = LINE_SEGMENT_END_E;
+ destination[E_AXIS] = LINE_SEGMENT_END(E);
// Do the split and look for more borders
bilinear_line_to_destination(fr_mm_s, x_splits, y_splits);
@@ -13916,25 +13134,11 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#if !UBL_SEGMENTED
#if IS_KINEMATIC
- #if IS_SCARA
- /**
- * Before raising this value, use M665 S[seg_per_sec] to decrease
- * the number of segments-per-second. Default is 200. Some deltas
- * do better with 160 or lower. It would be good to know how many
- * segments-per-second are actually possible for SCARA on AVR.
- *
- * Longer segments result in less kinematic overhead
- * but may produce jagged lines. Try 0.5mm, 1.0mm, and 2.0mm
- * and compare the difference.
- */
- #define SCARA_MIN_SEGMENT_LENGTH 0.5f
- #endif
-
/**
- * Prepare a linear move in a DELTA, SCARA or HANGPRINTER setup.
+ * Prepare a linear move in a DELTA or SCARA setup.
*
* This calls planner.buffer_line several times, adding
- * small incremental moves for DELTA, SCARA or HANGPRINTER.
+ * small incremental moves for DELTA or SCARA.
*
* For Unified Bed Leveling (Delta or Segmented Cartesian)
* the ubl.prepare_segmented_line_to method replaces this.
@@ -13945,18 +13149,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
const float _feedrate_mm_s = MMS_SCALED(feedrate_mm_s);
const float xdiff = rtarget[X_AXIS] - current_position[X_AXIS],
- ydiff = rtarget[Y_AXIS] - current_position[Y_AXIS]
- #if ENABLED(HANGPRINTER)
- , zdiff = rtarget[Z_AXIS] - current_position[Z_AXIS]
- #endif
- ;
+ ydiff = rtarget[Y_AXIS] - current_position[Y_AXIS];
- // If the move is only in Z/E (for Hangprinter only in E) don't split up the move
- if (!xdiff && !ydiff
- #if ENABLED(HANGPRINTER)
- && !zdiff
- #endif
- ) {
+ // If the move is only in Z/E don't split up the move
+ if (!xdiff && !ydiff) {
planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder);
return false; // caller will update current_position
}
@@ -13965,17 +13161,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
if (!position_is_reachable(rtarget[X_AXIS], rtarget[Y_AXIS])) return true;
// Remaining cartesian distances
- const float
- #if DISABLED(HANGPRINTER)
- zdiff = rtarget[Z_AXIS] - current_position[Z_AXIS],
- #endif
- ediff = rtarget[E_CART] - current_position[E_CART];
+ const float zdiff = rtarget[Z_AXIS] - current_position[Z_AXIS],
+ ediff = rtarget[E_AXIS] - current_position[E_AXIS];
// Get the linear distance in XYZ
// If the move is very short, check the E move distance
// No E move either? Game over.
float cartesian_mm = SQRT(sq(xdiff) + sq(ydiff) + sq(zdiff));
- if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(ediff);
+ if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = FABS(ediff);
if (UNEAR_ZERO(cartesian_mm)) return true;
// Minimum number of seconds to move the given distance
@@ -13985,16 +13178,16 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
// gives the number of segments
uint16_t segments = delta_segments_per_second * seconds;
- // For SCARA enforce a minimum segment size
+ // For SCARA minimum segment size is 0.25mm
#if IS_SCARA
- NOMORE(segments, cartesian_mm * (1.0f / float(SCARA_MIN_SEGMENT_LENGTH)));
+ NOMORE(segments, cartesian_mm * 4);
#endif
// At least one segment is required
NOLESS(segments, 1);
// The approximate length of each segment
- const float inv_segments = 1.0f / float(segments),
+ const float inv_segments = 1.0 / float(segments),
segment_distance[XYZE] = {
xdiff * inv_segments,
ydiff * inv_segments,
@@ -14002,54 +13195,24 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
ediff * inv_segments
};
- #if !HAS_FEEDRATE_SCALING
- const float cartesian_segment_mm = cartesian_mm * inv_segments;
- #endif
+ // SERIAL_ECHOPAIR("mm=", cartesian_mm);
+ // SERIAL_ECHOPAIR(" seconds=", seconds);
+ // SERIAL_ECHOLNPAIR(" segments=", segments);
- /*
- SERIAL_ECHOPAIR("mm=", cartesian_mm);
- SERIAL_ECHOPAIR(" seconds=", seconds);
- SERIAL_ECHOPAIR(" segments=", segments);
- #if !HAS_FEEDRATE_SCALING
- SERIAL_ECHOPAIR(" segment_mm=", cartesian_segment_mm);
- #endif
- SERIAL_EOL();
- //*/
-
- #if HAS_FEEDRATE_SCALING
+ #if ENABLED(SCARA_FEEDRATE_SCALING)
// SCARA needs to scale the feed rate from mm/s to degrees/s
// i.e., Complete the angular vector in the given time.
- const float segment_length = cartesian_mm * inv_segments,
- inv_segment_length = 1.0f / segment_length, // 1/mm/segs
+ const float inv_segment_length = min(10.0, float(segments) / cartesian_mm), // 1/mm/segs
inverse_secs = inv_segment_length * _feedrate_mm_s;
-
- float oldA = planner.position_float[A_AXIS],
- oldB = planner.position_float[B_AXIS]
- #if ENABLED(DELTA_FEEDRATE_SCALING)
- , oldC = planner.position_float[C_AXIS]
- #endif
- ;
-
- /*
- SERIAL_ECHOPGM("Scaled kinematic move: ");
- SERIAL_ECHOPAIR(" segment_length (inv)=", segment_length);
- SERIAL_ECHOPAIR(" (", inv_segment_length);
- SERIAL_ECHOPAIR(") _feedrate_mm_s=", _feedrate_mm_s);
- SERIAL_ECHOPAIR(" inverse_secs=", inverse_secs);
- SERIAL_ECHOPAIR(" oldA=", oldA);
- SERIAL_ECHOPAIR(" oldB=", oldB);
- #if ENABLED(DELTA_FEEDRATE_SCALING)
- SERIAL_ECHOPAIR(" oldC=", oldC);
- #endif
- SERIAL_EOL();
- safe_delay(5);
- //*/
+ float oldA = stepper.get_axis_position_degrees(A_AXIS),
+ oldB = stepper.get_axis_position_degrees(B_AXIS);
#endif
// Get the current position as starting point
float raw[XYZE];
COPY(raw, current_position);
+
// Calculate and execute the segments
while (--segments) {
@@ -14061,10 +13224,8 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
}
LOOP_XYZE(i) raw[i] += segment_distance[i];
- #if ENABLED(DELTA) && HOTENDS < 2
+ #if ENABLED(DELTA)
DELTA_IK(raw); // Delta can inline its kinematics
- #elif ENABLED(HANGPRINTER)
- HANGPRINTER_IK(raw); // Modifies line_lengths[ABCD]
#else
inverse_kinematics(raw);
#endif
@@ -14074,70 +13235,20 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#if ENABLED(SCARA_FEEDRATE_SCALING)
// For SCARA scale the feed rate from mm/s to degrees/s
// i.e., Complete the angular vector in the given time.
- if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_CART], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder, segment_length))
- break;
- /*
- SERIAL_ECHO(segments);
- SERIAL_ECHOPAIR(": X=", raw[X_AXIS]); SERIAL_ECHOPAIR(" Y=", raw[Y_AXIS]);
- SERIAL_ECHOPAIR(" A=", delta[A_AXIS]); SERIAL_ECHOPAIR(" B=", delta[B_AXIS]);
- SERIAL_ECHOLNPAIR(" F", HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs * 60);
- safe_delay(5);
- //*/
+ planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder);
oldA = delta[A_AXIS]; oldB = delta[B_AXIS];
- #elif ENABLED(DELTA_FEEDRATE_SCALING)
- // For DELTA scale the feed rate from Effector mm/s to Carriage mm/s
- // i.e., Complete the linear vector in the given time.
- if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], SQRT(sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC)) * inverse_secs, active_extruder, segment_length))
- break;
- /*
- SERIAL_ECHO(segments);
- SERIAL_ECHOPAIR(": X=", raw[X_AXIS]); SERIAL_ECHOPAIR(" Y=", raw[Y_AXIS]);
- SERIAL_ECHOPAIR(" A=", delta[A_AXIS]); SERIAL_ECHOPAIR(" B=", delta[B_AXIS]); SERIAL_ECHOPAIR(" C=", delta[C_AXIS]);
- SERIAL_ECHOLNPAIR(" F", SQRT(sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC)) * inverse_secs * 60);
- safe_delay(5);
- //*/
- oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; oldC = delta[C_AXIS];
- #elif ENABLED(HANGPRINTER)
- if (!planner.buffer_line(line_lengths[A_AXIS], line_lengths[B_AXIS], line_lengths[C_AXIS], line_lengths[D_AXIS], raw[E_CART], _feedrate_mm_s, active_extruder, cartesian_segment_mm))
- break;
#else
- if (!planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_CART], _feedrate_mm_s, active_extruder, cartesian_segment_mm))
- break;
+ planner.buffer_line(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], _feedrate_mm_s, active_extruder);
#endif
}
// Ensure last segment arrives at target location.
- #if HAS_FEEDRATE_SCALING
+ #if ENABLED(SCARA_FEEDRATE_SCALING)
inverse_kinematics(rtarget);
ADJUST_DELTA(rtarget);
- #endif
-
- #if ENABLED(SCARA_FEEDRATE_SCALING)
- const float diff2 = HYPOT2(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB);
- if (diff2) {
- planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], rtarget[Z_AXIS], rtarget[E_CART], SQRT(diff2) * inverse_secs, active_extruder, segment_length);
- /*
- SERIAL_ECHOPAIR("final: A=", delta[A_AXIS]); SERIAL_ECHOPAIR(" B=", delta[B_AXIS]);
- SERIAL_ECHOPAIR(" adiff=", delta[A_AXIS] - oldA); SERIAL_ECHOPAIR(" bdiff=", delta[B_AXIS] - oldB);
- SERIAL_ECHOLNPAIR(" F", SQRT(diff2) * inverse_secs * 60);
- SERIAL_EOL();
- safe_delay(5);
- //*/
- }
- #elif ENABLED(DELTA_FEEDRATE_SCALING)
- const float diff2 = sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC);
- if (diff2) {
- planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], rtarget[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder, segment_length);
- /*
- SERIAL_ECHOPAIR("final: A=", delta[A_AXIS]); SERIAL_ECHOPAIR(" B=", delta[B_AXIS]); SERIAL_ECHOPAIR(" C=", delta[C_AXIS]);
- SERIAL_ECHOPAIR(" adiff=", delta[A_AXIS] - oldA); SERIAL_ECHOPAIR(" bdiff=", delta[B_AXIS] - oldB); SERIAL_ECHOPAIR(" cdiff=", delta[C_AXIS] - oldC);
- SERIAL_ECHOLNPAIR(" F", SQRT(diff2) * inverse_secs * 60);
- SERIAL_EOL();
- safe_delay(5);
- //*/
- }
+ planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], rtarget[Z_AXIS], rtarget[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder);
#else
- planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder, cartesian_segment_mm);
+ planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder);
#endif
return false; // caller will update current_position
@@ -14198,7 +13309,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
case DXC_FULL_CONTROL_MODE: break;
case DXC_AUTO_PARK_MODE:
- if (current_position[E_CART] == destination[E_CART]) {
+ if (current_position[E_AXIS] == destination[E_AXIS]) {
// This is a travel move (with no extrusion)
// Skip it, but keep track of the current position
// (so it can be used as the start of the next non-travel move)
@@ -14211,14 +13322,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
}
// unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
for (uint8_t i = 0; i < 3; i++)
- if (!planner.buffer_line(
+ planner.buffer_line(
i == 0 ? raised_parked_position[X_AXIS] : current_position[X_AXIS],
i == 0 ? raised_parked_position[Y_AXIS] : current_position[Y_AXIS],
i == 2 ? current_position[Z_AXIS] : raised_parked_position[Z_AXIS],
- current_position[E_CART],
+ current_position[E_AXIS],
i == 1 ? PLANNER_XY_FEEDRATE() : planner.max_feedrate_mm_s[Z_AXIS],
- active_extruder)
- ) break;
+ active_extruder
+ );
delayed_move_time = 0;
active_extruder_parked = false;
#if ENABLED(DEBUG_LEVELING_FEATURE)
@@ -14235,14 +13346,19 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
}
#endif
// move duplicate extruder into correct duplication position.
- planner.set_position_mm(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_CART]);
- if (!planner.buffer_line(
+ planner.set_position_mm(
+ inactive_extruder_x_pos,
+ current_position[Y_AXIS],
+ current_position[Z_AXIS],
+ current_position[E_AXIS]
+ );
+ planner.buffer_line(
current_position[X_AXIS] + duplicate_extruder_x_offset,
- current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_CART],
- planner.max_feedrate_mm_s[X_AXIS], 1)
- ) break;
- planner.synchronize();
+ current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS],
+ planner.max_feedrate_mm_s[X_AXIS], 1
+ );
SYNC_PLAN_POSITION_KINEMATIC();
+ stepper.synchronize();
extruder_duplication_enabled = true;
active_extruder_parked = false;
#if ENABLED(DEBUG_LEVELING_FEATURE)
@@ -14265,28 +13381,29 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
* Prepare a single move and get ready for the next one
*
* This may result in several calls to planner.buffer_line to
- * do smaller moves for DELTA, SCARA, HANGPRINTER, mesh moves, etc.
+ * do smaller moves for DELTA, SCARA, mesh moves, etc.
*
* Make sure current_position[E] and destination[E] are good
* before calling or cold/lengthy extrusion may get missed.
*/
void prepare_move_to_destination() {
clamp_to_software_endstops(destination);
+ refresh_cmd_timeout();
#if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
if (!DEBUGGING(DRYRUN)) {
- if (destination[E_CART] != current_position[E_CART]) {
+ if (destination[E_AXIS] != current_position[E_AXIS]) {
#if ENABLED(PREVENT_COLD_EXTRUSION)
if (thermalManager.tooColdToExtrude(active_extruder)) {
- current_position[E_CART] = destination[E_CART]; // Behave as if the move really took place, but ignore E part
+ current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
}
#endif // PREVENT_COLD_EXTRUSION
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
- if (ABS(destination[E_CART] - current_position[E_CART]) * planner.e_factor[active_extruder] > (EXTRUDE_MAXLENGTH)) {
- current_position[E_CART] = destination[E_CART]; // Behave as if the move really took place, but ignore E part
+ if (FABS(destination[E_AXIS] - current_position[E_AXIS]) * planner.e_factor[active_extruder] > (EXTRUDE_MAXLENGTH)) {
+ current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
}
@@ -14355,7 +13472,7 @@ void prepare_move_to_destination() {
rt_X = cart[p_axis] - center_P,
rt_Y = cart[q_axis] - center_Q,
linear_travel = cart[l_axis] - current_position[l_axis],
- extruder_travel = cart[E_CART] - current_position[E_CART];
+ extruder_travel = cart[E_AXIS] - current_position[E_AXIS];
// CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required.
float angular_travel = ATAN2(r_P * rt_Y - r_Q * rt_X, r_P * rt_X + r_Q * rt_Y);
@@ -14366,9 +13483,8 @@ void prepare_move_to_destination() {
if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis])
angular_travel = RADIANS(360);
- const float flat_mm = radius * angular_travel,
- mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : ABS(flat_mm);
- if (mm_of_travel < 0.001f) return;
+ const float mm_of_travel = HYPOT(angular_travel * radius, FABS(linear_travel));
+ if (mm_of_travel < 0.001) return;
uint16_t segments = FLOOR(mm_of_travel / (MM_PER_ARC_SEGMENT));
NOLESS(segments, 1);
@@ -14405,34 +13521,30 @@ void prepare_move_to_destination() {
linear_per_segment = linear_travel / segments,
extruder_per_segment = extruder_travel / segments,
sin_T = theta_per_segment,
- cos_T = 1 - 0.5f * sq(theta_per_segment); // Small angle approximation
+ cos_T = 1 - 0.5 * sq(theta_per_segment); // Small angle approximation
// Initialize the linear axis
raw[l_axis] = current_position[l_axis];
// Initialize the extruder axis
- raw[E_CART] = current_position[E_CART];
+ raw[E_AXIS] = current_position[E_AXIS];
const float fr_mm_s = MMS_SCALED(feedrate_mm_s);
millis_t next_idle_ms = millis() + 200UL;
- #if HAS_FEEDRATE_SCALING
- // SCARA needs to scale the feed rate from mm/s to degrees/s
- const float inv_segment_length = 1.0f / (MM_PER_ARC_SEGMENT),
- inverse_secs = inv_segment_length * fr_mm_s;
- float oldA = planner.position_float[A_AXIS],
- oldB = planner.position_float[B_AXIS]
- #if ENABLED(DELTA_FEEDRATE_SCALING)
- , oldC = planner.position_float[C_AXIS]
- #endif
- ;
- #endif
-
#if N_ARC_CORRECTION > 1
int8_t arc_recalc_count = N_ARC_CORRECTION;
#endif
+ #if ENABLED(SCARA_FEEDRATE_SCALING)
+ // SCARA needs to scale the feed rate from mm/s to degrees/s
+ const float inv_segment_length = 1.0 / (MM_PER_ARC_SEGMENT),
+ inverse_secs = inv_segment_length * fr_mm_s;
+ float oldA = stepper.get_axis_position_degrees(A_AXIS),
+ oldB = stepper.get_axis_position_degrees(B_AXIS);
+ #endif
+
for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times
thermalManager.manage_heater();
@@ -14468,70 +13580,48 @@ void prepare_move_to_destination() {
raw[p_axis] = center_P + r_P;
raw[q_axis] = center_Q + r_Q;
raw[l_axis] += linear_per_segment;
- raw[E_CART] += extruder_per_segment;
+ raw[E_AXIS] += extruder_per_segment;
clamp_to_software_endstops(raw);
- #if HAS_FEEDRATE_SCALING
- inverse_kinematics(raw);
- ADJUST_DELTA(raw);
- #endif
-
#if ENABLED(SCARA_FEEDRATE_SCALING)
// For SCARA scale the feed rate from mm/s to degrees/s
// i.e., Complete the angular vector in the given time.
- if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_CART], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT))
- break;
+ inverse_kinematics(raw);
+ ADJUST_DELTA(raw);
+ planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder);
oldA = delta[A_AXIS]; oldB = delta[B_AXIS];
- #elif ENABLED(DELTA_FEEDRATE_SCALING)
- // For DELTA scale the feed rate from Effector mm/s to Carriage mm/s
- // i.e., Complete the linear vector in the given time.
- if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], SQRT(sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC)) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT))
- break;
- oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; oldC = delta[C_AXIS];
- #elif HAS_UBL_AND_CURVES
- float pos[XYZ] = { raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS] };
- planner.apply_leveling(pos);
- if (!planner.buffer_segment(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], raw[E_CART], fr_mm_s, active_extruder, MM_PER_ARC_SEGMENT))
- break;
#else
- if (!planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder))
- break;
+ planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder);
#endif
}
// Ensure last segment arrives at target location.
- #if HAS_FEEDRATE_SCALING
+ #if ENABLED(SCARA_FEEDRATE_SCALING)
inverse_kinematics(cart);
ADJUST_DELTA(cart);
- #endif
-
- #if ENABLED(SCARA_FEEDRATE_SCALING)
- const float diff2 = HYPOT2(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB);
- if (diff2)
- planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], cart[Z_AXIS], cart[E_CART], SQRT(diff2) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT);
- #elif ENABLED(DELTA_FEEDRATE_SCALING)
- const float diff2 = sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC);
- if (diff2)
- planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], cart[E_CART], SQRT(diff2) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT);
- #elif HAS_UBL_AND_CURVES
- float pos[XYZ] = { cart[X_AXIS], cart[Y_AXIS], cart[Z_AXIS] };
- planner.apply_leveling(pos);
- planner.buffer_segment(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], cart[E_CART], fr_mm_s, active_extruder, MM_PER_ARC_SEGMENT);
+ planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], cart[Z_AXIS], cart[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder);
#else
planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder);
#endif
- COPY(current_position, cart);
+ // As far as the parser is concerned, the position is now == target. In reality the
+ // motion control system might still be processing the action and the real tool position
+ // in any intermediate location.
+ set_current_from_destination();
} // plan_arc
#endif // ARC_SUPPORT
#if ENABLED(BEZIER_CURVE_SUPPORT)
- void plan_cubic_move(const float (&cart)[XYZE], const float (&offset)[4]) {
- cubic_b_spline(current_position, cart, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
- COPY(current_position, cart);
+ void plan_cubic_move(const float (&offset)[4]) {
+ cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
+
+ // As far as the parser is concerned, the position is now == destination. In reality the
+ // motion control system might still be processing the action and the real tool position
+ // in any intermediate location.
+ set_current_from_destination();
}
#endif // BEZIER_CURVE_SUPPORT
@@ -14544,41 +13634,29 @@ void prepare_move_to_destination() {
const millis_t ms = millis();
if (ELAPSED(ms, nextMotorCheck)) {
nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s
-
- // If any of the drivers or the bed are enabled...
- if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
- #if HAS_HEATED_BED
- || thermalManager.soft_pwm_amount_bed > 0
- #endif
- #if HAS_X2_ENABLE
- || X2_ENABLE_READ == X_ENABLE_ON
- #endif
- #if HAS_Y2_ENABLE
- || Y2_ENABLE_READ == Y_ENABLE_ON
- #endif
- #if HAS_Z2_ENABLE
- || Z2_ENABLE_READ == Z_ENABLE_ON
- #endif
- || E0_ENABLE_READ == E_ENABLE_ON
+ if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || thermalManager.soft_pwm_amount_bed > 0
+ || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
#if E_STEPPERS > 1
|| E1_ENABLE_READ == E_ENABLE_ON
- #if E_STEPPERS > 2
- || E2_ENABLE_READ == E_ENABLE_ON
- #if E_STEPPERS > 3
- || E3_ENABLE_READ == E_ENABLE_ON
- #if E_STEPPERS > 4
- || E4_ENABLE_READ == E_ENABLE_ON
- #endif
- #endif
+ #if HAS_X2_ENABLE
+ || X2_ENABLE_READ == X_ENABLE_ON
#endif
- #endif
+ #if E_STEPPERS > 2
+ || E2_ENABLE_READ == E_ENABLE_ON
+ #if E_STEPPERS > 3
+ || E3_ENABLE_READ == E_ENABLE_ON
+ #if E_STEPPERS > 4
+ || E4_ENABLE_READ == E_ENABLE_ON
+ #endif // E_STEPPERS > 4
+ #endif // E_STEPPERS > 3
+ #endif // E_STEPPERS > 2
+ #endif // E_STEPPERS > 1
) {
lastMotorOn = ms; //... set time to NOW so the fan will turn on
}
// Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds
- const uint8_t speed = (lastMotorOn && PENDING(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? CONTROLLERFAN_SPEED : 0;
- controllerFanSpeed = speed;
+ uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED;
// allows digital or PWM fan output to be used (see M42 handling)
WRITE(CONTROLLER_FAN_PIN, speed);
@@ -14678,7 +13756,7 @@ void prepare_move_to_destination() {
if (ELAPSED(millis(), next_status_led_update_ms)) {
next_status_led_update_ms += 500; // Update every 0.5s
float max_temp = 0.0;
- #if HAS_HEATED_BED
+ #if HAS_TEMP_BED
max_temp = MAX3(max_temp, thermalManager.degTargetBed(), thermalManager.degBed());
#endif
HOTEND_LOOP()
@@ -14700,35 +13778,66 @@ void prepare_move_to_destination() {
#endif
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+
+ void handle_filament_runout() {
+ if (!filament_ran_out) {
+ filament_ran_out = true;
+ enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
+ stepper.synchronize();
+ }
+ }
+
+#endif // FILAMENT_RUNOUT_SENSOR
+
+#if ENABLED(FAST_PWM_FAN)
+
+ void setPwmFrequency(uint8_t pin, int val) {
+ val &= 0x07;
+ switch (digitalPinToTimer(pin)) {
+ #ifdef TCCR0A
+ #if !AVR_AT90USB1286_FAMILY
+ case TIMER0A:
+ #endif
+ case TIMER0B: //_SET_CS(0, val);
+ break;
+ #endif
+ #ifdef TCCR1A
+ case TIMER1A: case TIMER1B: //_SET_CS(1, val);
+ break;
+ #endif
+ #if defined(TCCR2) || defined(TCCR2A)
+ #ifdef TCCR2
+ case TIMER2:
+ #endif
+ #ifdef TCCR2A
+ case TIMER2A: case TIMER2B:
+ #endif
+ _SET_CS(2, val); break;
+ #endif
+ #ifdef TCCR3A
+ case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;
+ #endif
+ #ifdef TCCR4A
+ case TIMER4A: case TIMER4B: case TIMER4C: _SET_CS(4, val); break;
+ #endif
+ #ifdef TCCR5A
+ case TIMER5A: case TIMER5B: case TIMER5C: _SET_CS(5, val); break;
+ #endif
+ }
+ }
+
+#endif // FAST_PWM_FAN
+
void enable_all_steppers() {
- #if ENABLED(AUTO_POWER_CONTROL)
- powerManager.power_on();
- #endif
- #if ENABLED(HANGPRINTER)
- enable_A();
- enable_B();
- enable_C();
- enable_D();
- #else
- enable_X();
- enable_Y();
- enable_Z();
- enable_E4();
- #endif
+ enable_X();
+ enable_Y();
+ enable_Z();
enable_E0();
enable_E1();
enable_E2();
enable_E3();
-}
-
-void disable_e_stepper(const uint8_t e) {
- switch (e) {
- case 0: disable_E0(); break;
- case 1: disable_E1(); break;
- case 2: disable_E2(); break;
- case 3: disable_E3(); break;
- case 4: disable_E4(); break;
- }
+ enable_E4();
}
void disable_e_steppers() {
@@ -14746,6 +13855,186 @@ void disable_all_steppers() {
disable_e_steppers();
}
+#if ENABLED(MONITOR_DRIVER_STATUS)
+ /*
+ * Check for over temperature or short to ground error flags.
+ * Report and log warning of overtemperature condition.
+ * Reduce driver current in a persistent otpw condition.
+ * Keep track of otpw counter so we don't reduce current on a single instance,
+ * and so we don't repeatedly report warning before the condition is cleared.
+ */
+
+ struct TMC_driver_data {
+ uint32_t drv_status;
+ bool is_otpw;
+ bool is_ot;
+ bool is_error;
+ };
+ #if ENABLED(HAVE_TMC2130)
+ static uint32_t get_pwm_scale(TMC2130Stepper &st) { return st.PWM_SCALE(); }
+ static uint8_t get_status_response(TMC2130Stepper &st) { return st.status_response&0xF; }
+ static TMC_driver_data get_driver_data(TMC2130Stepper &st) {
+ constexpr uint32_t OTPW_bm = 0x4000000UL;
+ constexpr uint8_t OTPW_bp = 26;
+ constexpr uint32_t OT_bm = 0x2000000UL;
+ constexpr uint8_t OT_bp = 25;
+ constexpr uint8_t DRIVER_ERROR_bm = 0x2UL;
+ constexpr uint8_t DRIVER_ERROR_bp = 1;
+ TMC_driver_data data;
+ data.drv_status = st.DRV_STATUS();
+ data.is_otpw = (data.drv_status & OTPW_bm)>>OTPW_bp;
+ data.is_ot = (data.drv_status & OT_bm)>>OT_bp;
+ data.is_error = (st.status_response & DRIVER_ERROR_bm)>>DRIVER_ERROR_bp;
+ return data;
+ }
+ #endif
+ #if ENABLED(HAVE_TMC2208)
+ static uint32_t get_pwm_scale(TMC2208Stepper &st) { return st.pwm_scale_sum(); }
+ static uint8_t get_status_response(TMC2208Stepper &st) {
+ uint32_t drv_status = st.DRV_STATUS();
+ uint8_t gstat = st.GSTAT();
+ uint8_t response = 0;
+ response |= (drv_status >> (31-3)) & 0b1000;
+ response |= gstat & 0b11;
+ return response;
+ }
+ static TMC_driver_data get_driver_data(TMC2208Stepper &st) {
+ constexpr uint32_t OTPW_bm = 0b1ul;
+ constexpr uint8_t OTPW_bp = 0;
+ constexpr uint32_t OT_bm = 0b10ul;
+ constexpr uint8_t OT_bp = 1;
+ TMC_driver_data data;
+ data.drv_status = st.DRV_STATUS();
+ data.is_otpw = (data.drv_status & OTPW_bm)>>OTPW_bp;
+ data.is_ot = (data.drv_status & OT_bm)>>OT_bp;
+ data.is_error = st.drv_err();
+ return data;
+ }
+ #endif
+
+ template
+ uint8_t monitor_tmc_driver(TMC &st, const char axisID, uint8_t otpw_cnt) {
+ TMC_driver_data data = get_driver_data(st);
+
+ #if ENABLED(STOP_ON_ERROR)
+ if (data.is_error) {
+ SERIAL_EOL();
+ SERIAL_ECHO(axisID);
+ SERIAL_ECHO(" driver error detected:");
+ if (data.is_ot) SERIAL_ECHO("\novertemperature");
+ if (st.s2ga()) SERIAL_ECHO("\nshort to ground (coil A)");
+ if (st.s2gb()) SERIAL_ECHO("\nshort to ground (coil B)");
+ SERIAL_EOL();
+ #if ENABLED(TMC_DEBUG)
+ gcode_M122();
+ #endif
+ kill(PSTR("Driver error"));
+ }
+ #endif
+
+ // Report if a warning was triggered
+ if (data.is_otpw && otpw_cnt==0) {
+ char timestamp[10];
+ duration_t elapsed = print_job_timer.duration();
+ const bool has_days = (elapsed.value > 60*60*24L);
+ (void)elapsed.toDigital(timestamp, has_days);
+ SERIAL_EOL();
+ SERIAL_ECHO(timestamp);
+ SERIAL_ECHOPGM(": ");
+ SERIAL_ECHO(axisID);
+ SERIAL_ECHOPGM(" driver overtemperature warning! (");
+ SERIAL_ECHO(st.getCurrent());
+ SERIAL_ECHOLN("mA)");
+ }
+ #if CURRENT_STEP_DOWN > 0
+ // Decrease current if is_otpw is true and driver is enabled and there's been more then 4 warnings
+ if (data.is_otpw && !st.isEnabled() && otpw_cnt > 4) {
+ st.setCurrent(st.getCurrent() - CURRENT_STEP_DOWN, R_SENSE, HOLD_MULTIPLIER);
+ #if ENABLED(REPORT_CURRENT_CHANGE)
+ SERIAL_ECHO(axisID);
+ SERIAL_ECHOLNPAIR(" current decreased to ", st.getCurrent());
+ #endif
+ }
+ #endif
+
+ if (data.is_otpw) {
+ otpw_cnt++;
+ st.flag_otpw = true;
+ }
+ else if (otpw_cnt>0) otpw_cnt--;
+
+ if (report_tmc_status) {
+ const uint32_t pwm_scale = get_pwm_scale(st);
+ SERIAL_ECHO(axisID);
+ SERIAL_ECHOPAIR(":", pwm_scale);
+ SERIAL_ECHO(" |0b"); MYSERIAL.print(get_status_response(st), BIN);
+ SERIAL_ECHO("| ");
+ if (data.is_error) SERIAL_ECHO('E');
+ else if (data.is_ot) SERIAL_ECHO('O');
+ else if (data.is_otpw) SERIAL_ECHO('W');
+ else if (otpw_cnt>0) MYSERIAL.print(otpw_cnt, DEC);
+ else if (st.flag_otpw) SERIAL_ECHO('F');
+ SERIAL_ECHO("\t");
+ }
+
+ return otpw_cnt;
+ }
+
+ void monitor_tmc_driver() {
+ static millis_t next_cOT = 0;
+ if (ELAPSED(millis(), next_cOT)) {
+ next_cOT = millis() + 500;
+ #if ENABLED(X_IS_TMC2130)|| (ENABLED(X_IS_TMC2208) && defined(X_HARDWARE_SERIAL)) || ENABLED(IS_TRAMS)
+ static uint8_t x_otpw_cnt = 0;
+ x_otpw_cnt = monitor_tmc_driver(stepperX, axis_codes[X_AXIS], x_otpw_cnt);
+ #endif
+ #if ENABLED(Y_IS_TMC2130)|| (ENABLED(Y_IS_TMC2208) && defined(Y_HARDWARE_SERIAL)) || ENABLED(IS_TRAMS)
+ static uint8_t y_otpw_cnt = 0;
+ y_otpw_cnt = monitor_tmc_driver(stepperY, axis_codes[Y_AXIS], y_otpw_cnt);
+ #endif
+ #if ENABLED(Z_IS_TMC2130)|| (ENABLED(Z_IS_TMC2208) && defined(Z_HARDWARE_SERIAL)) || ENABLED(IS_TRAMS)
+ static uint8_t z_otpw_cnt = 0;
+ z_otpw_cnt = monitor_tmc_driver(stepperZ, axis_codes[Z_AXIS], z_otpw_cnt);
+ #endif
+ #if ENABLED(X2_IS_TMC2130) || (ENABLED(X2_IS_TMC2208) && defined(X2_HARDWARE_SERIAL))
+ static uint8_t x2_otpw_cnt = 0;
+ x2_otpw_cnt = monitor_tmc_driver(stepperX2, axis_codes[X_AXIS], x2_otpw_cnt);
+ #endif
+ #if ENABLED(Y2_IS_TMC2130) || (ENABLED(Y2_IS_TMC2208) && defined(Y2_HARDWARE_SERIAL))
+ static uint8_t y2_otpw_cnt = 0;
+ y2_otpw_cnt = monitor_tmc_driver(stepperY2, axis_codes[Y_AXIS], y2_otpw_cnt);
+ #endif
+ #if ENABLED(Z2_IS_TMC2130) || (ENABLED(Z2_IS_TMC2208) && defined(Z2_HARDWARE_SERIAL))
+ static uint8_t z2_otpw_cnt = 0;
+ z2_otpw_cnt = monitor_tmc_driver(stepperZ2, axis_codes[Z_AXIS], z2_otpw_cnt);
+ #endif
+ #if ENABLED(E0_IS_TMC2130)|| (ENABLED(E0_IS_TMC2208) && defined(E0_HARDWARE_SERIAL)) || ENABLED(IS_TRAMS)
+ static uint8_t e0_otpw_cnt = 0;
+ e0_otpw_cnt = monitor_tmc_driver(stepperE0, axis_codes[E_AXIS], e0_otpw_cnt);
+ #endif
+ #if ENABLED(E1_IS_TMC2130) || (ENABLED(E1_IS_TMC2208) && defined(E1_HARDWARE_SERIAL))
+ static uint8_t e1_otpw_cnt = 0;
+ e1_otpw_cnt = monitor_tmc_driver(stepperE1, axis_codes[E_AXIS], e1_otpw_cnt);
+ #endif
+ #if ENABLED(E2_IS_TMC2130) || (ENABLED(E2_IS_TMC2208) && defined(E2_HARDWARE_SERIAL))
+ static uint8_t e2_otpw_cnt = 0;
+ e2_otpw_cnt = monitor_tmc_driver(stepperE2, axis_codes[E_AXIS], e2_otpw_cnt);
+ #endif
+ #if ENABLED(E3_IS_TMC2130) || (ENABLED(E3_IS_TMC2208) && defined(E3_HARDWARE_SERIAL))
+ static uint8_t e3_otpw_cnt = 0;
+ e3_otpw_cnt = monitor_tmc_driver(stepperE3, axis_codes[E_AXIS], e3_otpw_cnt);
+ #endif
+ #if ENABLED(E4_IS_TMC2130) || (ENABLED(E4_IS_TMC2208) && defined(E4_HARDWARE_SERIAL))
+ static uint8_t e4_otpw_cnt = 0;
+ e4_otpw_cnt = monitor_tmc_driver(stepperE4, axis_codes[E_AXIS], e4_otpw_cnt);
+ #endif
+
+ if (report_tmc_status) SERIAL_EOL();
+ }
+ }
+
+#endif // MONITOR_DRIVER_STATUS
+
/**
* Manage several activities:
* - Check for Filament Runout
@@ -14758,10 +14047,11 @@ void disable_all_steppers() {
* - Check if cooling fan needs to be switched on
* - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT)
*/
-void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
+void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- runout.run();
+ if ((IS_SD_PRINTING || print_job_timer.isRunning()) && (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING))
+ handle_filament_runout();
#endif
#if ENABLED(ANYCUBIC_TFT_MODEL) && ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
@@ -14772,7 +14062,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
const millis_t ms = millis();
- if (max_inactive_time && ELAPSED(ms, previous_move_ms + max_inactive_time)) {
+ if (max_inactive_time && ELAPSED(ms, previous_cmd_ms + max_inactive_time)) {
SERIAL_ERROR_START();
SERIAL_ECHOLNPAIR(MSG_KILL_INACTIVE_TIME, parser.command_ptr);
kill(PSTR(MSG_KILLED));
@@ -14780,31 +14070,28 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
// Prevent steppers timing-out in the middle of M600
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
- #define MOVE_AWAY_TEST !did_pause_print
+ #define MOVE_AWAY_TEST !move_away_flag
#else
#define MOVE_AWAY_TEST true
#endif
- if (stepper_inactive_time) {
- if (planner.has_blocks_queued())
- previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
- else if (MOVE_AWAY_TEST && !ignore_stepper_queue && ELAPSED(ms, previous_move_ms + stepper_inactive_time)) {
- #if ENABLED(DISABLE_INACTIVE_X)
- disable_X();
- #endif
- #if ENABLED(DISABLE_INACTIVE_Y)
- disable_Y();
- #endif
- #if ENABLED(DISABLE_INACTIVE_Z)
- disable_Z();
- #endif
- #if ENABLED(DISABLE_INACTIVE_E)
- disable_e_steppers();
- #endif
- #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD
- if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
- #endif
- }
+ if (MOVE_AWAY_TEST && stepper_inactive_time && ELAPSED(ms, previous_cmd_ms + stepper_inactive_time)
+ && !ignore_stepper_queue && !planner.blocks_queued()) {
+ #if ENABLED(DISABLE_INACTIVE_X)
+ disable_X();
+ #endif
+ #if ENABLED(DISABLE_INACTIVE_Y)
+ disable_Y();
+ #endif
+ #if ENABLED(DISABLE_INACTIVE_Z)
+ disable_Z();
+ #endif
+ #if ENABLED(DISABLE_INACTIVE_E)
+ disable_e_steppers();
+ #endif
+ #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD
+ ubl.lcd_map_control = defer_return_to_status = false;
+ #endif
}
#ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH
@@ -14841,7 +14128,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
// ---------------------------------------------------------
static int homeDebounceCount = 0; // poor man's debouncing count
const int HOME_DEBOUNCE_DELAY = 2500;
- if (!IS_SD_PRINTING() && !READ(HOME_PIN)) {
+ if (!IS_SD_PRINTING && !READ(HOME_PIN)) {
if (!homeDebounceCount) {
enqueue_and_echo_commands_P(PSTR("G28"));
LCD_MESSAGEPGM(MSG_AUTO_HOME);
@@ -14857,26 +14144,12 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
controllerFan(); // Check if fan should be turned on to cool stepper drivers down
#endif
- #if ENABLED(AUTO_POWER_CONTROL)
- powerManager.check();
- #endif
-
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
- if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP
- && ELAPSED(ms, previous_move_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
- && !planner.has_blocks_queued()
- ) {
+ if (ELAPSED(ms, previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
+ && thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
#if ENABLED(SWITCHING_EXTRUDER)
- bool oldstatus;
- switch (active_extruder) {
- default: oldstatus = E0_ENABLE_READ; enable_E0(); break;
- #if E_STEPPERS > 1
- case 2: case 3: oldstatus = E1_ENABLE_READ; enable_E1(); break;
- #if E_STEPPERS > 2
- case 4: oldstatus = E2_ENABLE_READ; enable_E2(); break;
- #endif // E_STEPPERS > 2
- #endif // E_STEPPERS > 1
- }
+ const bool oldstatus = E0_ENABLE_READ;
+ enable_E0();
#else // !SWITCHING_EXTRUDER
bool oldstatus;
switch (active_extruder) {
@@ -14896,24 +14169,17 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
}
#endif // !SWITCHING_EXTRUDER
- const float olde = current_position[E_CART];
- current_position[E_CART] += EXTRUDER_RUNOUT_EXTRUDE;
- planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
- current_position[E_CART] = olde;
- planner.set_e_position_mm(olde);
- planner.synchronize();
+ previous_cmd_ms = ms; // refresh_cmd_timeout()
+ const float olde = current_position[E_AXIS];
+ current_position[E_AXIS] += EXTRUDER_RUNOUT_EXTRUDE;
+ planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
+ current_position[E_AXIS] = olde;
+ planner.set_e_position_mm(olde);
+ stepper.synchronize();
#if ENABLED(SWITCHING_EXTRUDER)
- switch (active_extruder) {
- default: oldstatus = E0_ENABLE_WRITE(oldstatus); break;
- #if E_STEPPERS > 1
- case 2: case 3: oldstatus = E1_ENABLE_WRITE(oldstatus); break;
- #if E_STEPPERS > 2
- case 4: oldstatus = E2_ENABLE_WRITE(oldstatus); break;
- #endif // E_STEPPERS > 2
- #endif // E_STEPPERS > 1
- }
- #else // !SWITCHING_EXTRUDER
+ E0_ENABLE_WRITE(oldstatus);
+ #else
switch (active_extruder) {
case 0: E0_ENABLE_WRITE(oldstatus); break;
#if E_STEPPERS > 1
@@ -14930,8 +14196,6 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#endif // E_STEPPERS > 1
}
#endif // !SWITCHING_EXTRUDER
-
- previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
}
#endif // EXTRUDER_RUNOUT_PREVENT
@@ -14965,8 +14229,8 @@ void idle(
#endif
) {
#if ENABLED(MAX7219_DEBUG)
- max7219.idle_tasks();
- #endif
+ Max7219_idle_tasks();
+ #endif // MAX7219_DEBUG
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
@@ -14976,6 +14240,10 @@ void idle(
host_keepalive();
+ #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
+ thermalManager.auto_report_temperatures();
+ #endif
+
manage_inactivity(
#if ENABLED(ADVANCED_PAUSE_FEATURE)
no_stepper_sleep
@@ -14993,21 +14261,12 @@ void idle(
#endif
#if ENABLED(I2C_POSITION_ENCODERS)
- static millis_t i2cpem_next_update_ms;
- if (planner.has_blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) {
+ if (planner.blocks_queued() &&
+ ( (blockBufferIndexRef != planner.block_buffer_head) ||
+ ((lastUpdateMillis + I2CPE_MIN_UPD_TIME_MS) < millis())) ) {
+ blockBufferIndexRef = planner.block_buffer_head;
I2CPEM.update();
- i2cpem_next_update_ms = millis() + I2CPE_MIN_UPD_TIME_MS;
- }
- #endif
-
- #if HAS_AUTO_REPORTING
- if (!suspend_auto_report) {
- #if ENABLED(AUTO_REPORT_TEMPERATURES)
- thermalManager.auto_report_temperatures();
- #endif
- #if ENABLED(AUTO_REPORT_SD_STATUS)
- card.auto_report_sd_status();
- #endif
+ lastUpdateMillis = millis();
}
#endif
}
@@ -15045,7 +14304,7 @@ void kill(const char* lcd_msg) {
#endif
#if HAS_POWER_SWITCH
- PSU_OFF();
+ SET_INPUT(PS_ON_PIN);
#endif
suicide();
@@ -15099,7 +14358,7 @@ void stop() {
void setup() {
#if ENABLED(MAX7219_DEBUG)
- max7219.init();
+ Max7219_init();
#endif
#if ENABLED(DISABLE_JTAG)
@@ -15109,7 +14368,7 @@ void setup() {
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- runout.setup();
+ setup_filrunoutpin();
#endif
setup_killpin();
@@ -15120,7 +14379,7 @@ void setup() {
disableStepperDrivers();
#endif
- MYSERIAL0.begin(BAUDRATE);
+ MYSERIAL.begin(BAUDRATE);
SERIAL_PROTOCOLLNPGM("start");
SERIAL_ECHO_START();
@@ -15129,11 +14388,7 @@ void setup() {
AnycubicTFT.Setup();
#endif
- // Prepare communication for TMC drivers
- #if HAS_DRIVER(TMC2130)
- tmc_init_cs_pins();
- #endif
- #if HAS_DRIVER(TMC2208)
+ #if ENABLED(HAVE_TMC2208)
tmc2208_serial_begin();
#endif
@@ -15162,7 +14417,7 @@ void setup() {
SERIAL_ECHO_START();
SERIAL_ECHOPAIR(MSG_FREE_MEMORY, freeMemory());
- SERIAL_ECHOLNPAIR(MSG_PLANNER_BUFFER_BYTES, int(sizeof(block_t))*(BLOCK_BUFFER_SIZE));
+ SERIAL_ECHOLNPAIR(MSG_PLANNER_BUFFER_BYTES, (int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
// Send "ok" after commands by default
for (int8_t i = 0; i < BUFSIZE; i++) send_ok[i] = true;
@@ -15183,13 +14438,12 @@ void setup() {
thermalManager.init(); // Initialize temperature loop
- print_job_timer.init(); // Initial setup of print job timer
+ #if ENABLED(USE_WATCHDOG)
+ watchdog_init();
+ #endif
- endstops.init(); // Init endstops and pullups
-
- stepper.init(); // Init stepper. This enables interrupts!
-
- servo_init(); // Initialize all servos, stow servo probe
+ stepper.init(); // Initialize stepper, this enables interrupts!
+ servo_init();
#if HAS_PHOTOGRAPH
OUT_WRITE(PHOTOGRAPH_PIN, LOW);
@@ -15272,7 +14526,6 @@ void setup() {
#endif
lcd_init();
- lcd_reset_status();
#if ENABLED(SHOW_BOOTSCREEN)
lcd_bootscreen();
@@ -15299,6 +14552,7 @@ void setup() {
#if ENABLED(BLTOUCH)
// Make sure any BLTouch error condition is cleared
bltouch_command(BLTOUCH_RESET);
+ set_bltouch_deployed(true);
set_bltouch_deployed(false);
#endif
@@ -15311,7 +14565,11 @@ void setup() {
i2c.onRequest(i2c_on_request);
#endif
- #if DO_SWITCH_EXTRUDER
+ #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
+ setup_endstop_interrupts();
+ #endif
+
+ #if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH
move_extruder_servo(0); // Initialize extruder servo
#endif
@@ -15328,24 +14586,11 @@ void setup() {
pe_deactivate_magnet(1);
#endif
#endif
-
- #if ENABLED(POWER_LOSS_RECOVERY)
- check_print_job_recovery();
- #endif
-
- #if ENABLED(USE_WATCHDOG)
- watchdog_init();
- #endif
-
- #if ENABLED(HANGPRINTER)
- enable_A();
- enable_B();
- enable_C();
- enable_D();
- #endif
-
- #if ENABLED(SDSUPPORT) && DISABLED(ULTRA_LCD)
- card.beginautostart();
+ #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
+ SET_OUTPUT(LCD_PINS_DC);
+ OUT_WRITE(LCD_PINS_RS, LOW);
+ delay(1000);
+ WRITE(LCD_PINS_RS, HIGH);
#endif
}
@@ -15353,7 +14598,6 @@ void setup() {
/**
* The main Marlin program loop
*
- * - Abort SD printing if flagged
* - Save or log commands to SD
* - Process available commands (if not saving)
* - Call heater manager
@@ -15362,33 +14606,11 @@ void setup() {
* - Call LCD update
*/
void loop() {
+ if (commands_in_queue < BUFSIZE) get_available_commands();
#if ENABLED(SDSUPPORT)
-
- card.checkautostart();
-
- if (card.abort_sd_printing) {
- card.stopSDPrint(
- #if SD_RESORT
- true
- #endif
- );
- clear_command_queue();
- quickstop_stepper();
- print_job_timer.stop();
- thermalManager.disable_all_heaters();
- #if FAN_COUNT > 0
- for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
- #endif
- wait_for_heatup = false;
- #if ENABLED(POWER_LOSS_RECOVERY)
- card.removeJobRecoveryFile();
- #endif
- }
-
- #endif // SDSUPPORT
-
- if (commands_in_queue < BUFSIZE) get_available_commands();
+ card.checkautostart(false);
+ #endif
if (commands_in_queue) {
@@ -15401,13 +14623,12 @@ void loop() {
card.closefile();
SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
- #if USE_MARLINSERIAL
- #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
+ #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();
@@ -15421,12 +14642,8 @@ void loop() {
ok_to_send();
}
}
- else {
+ else
process_next_command();
- #if ENABLED(POWER_LOSS_RECOVERY)
- if (card.cardOK && card.sdprinting) save_job_recovery_info();
- #endif
- }
#else
@@ -15440,7 +14657,7 @@ void loop() {
if (++cmd_queue_index_r >= BUFSIZE) cmd_queue_index_r = 0;
}
}
- endstops.event_handler();
+ endstops.report_state();
idle();
#ifdef ANYCUBIC_TFT_MODEL
diff --git a/Marlin/Max7219_Debug_LEDs.cpp b/Marlin/Max7219_Debug_LEDs.cpp
index 2be4bfd..b38a75d 100644
--- a/Marlin/Max7219_Debug_LEDs.cpp
+++ b/Marlin/Max7219_Debug_LEDs.cpp
@@ -22,569 +22,325 @@
/**
* This module is off by default, but can be enabled to facilitate the display of
- * extra debug information during code development.
+ * 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, then connect up the pins assigned
+ * 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_CLK_PIN 77
* #define MAX7219_DIN_PIN 78
* #define MAX7219_LOAD_PIN 79
*
- * send() is called automatically at startup, and then there are a number of
+ * 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(uint8_t col, uint8_t row);
+ * void Max7219_LED_Off(uint8_t col, uint8_t row);
+ * void Max7219_LED_Toggle(uint8_t col, uint8_t row);
+ * 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_2_Rows(uint8_t row, uint16_t val);
+ * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
+ * void Max7219_Set_Column(uint8_t col, uint8_t val);
+ * void Max7219_idle_tasks();
*/
#include "MarlinConfig.h"
#if ENABLED(MAX7219_DEBUG)
-#define MAX7219_ERRORS // Disable to save 406 bytes of Program Memory
-
#include "Max7219_Debug_LEDs.h"
#include "planner.h"
#include "stepper.h"
#include "Marlin.h"
-#include "delay.h"
-Max7219 max7219;
-
-uint8_t Max7219::led_line[MAX7219_LINES]; // = { 0 };
-
-#define LINE_REG(Q) (max7219_reg_digit0 + ((Q) & 0x7))
-#if _ROT == 0 || _ROT == 270
- #define _LED_BIT(Q) (7 - ((Q) & 0x7))
- #define _LED_UNIT(Q) ((Q) & ~0x7)
-#else
- #define _LED_BIT(Q) ((Q) & 0x7)
- #define _LED_UNIT(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
-#endif
-#if _ROT < 180
- #define _LED_IND(P,Q) (_LED_UNIT(P) + (Q))
-#else
- #define _LED_IND(P,Q) (_LED_UNIT(P) + (7 - ((Q) & 0x7)))
-#endif
-#if _ROT == 0 || _ROT == 180
- #define LED_IND(X,Y) _LED_IND(X,Y)
- #define LED_BIT(X,Y) _LED_BIT(X)
-#elif _ROT == 90 || _ROT == 270
- #define LED_IND(X,Y) _LED_IND(Y,X)
- #define LED_BIT(X,Y) _LED_BIT(Y)
-#endif
-#define XOR_7219(X,Y) do{ led_line[LED_IND(X,Y)] ^= _BV(LED_BIT(X,Y)); }while(0)
-#define SET_7219(X,Y) do{ led_line[LED_IND(X,Y)] |= _BV(LED_BIT(X,Y)); }while(0)
-#define CLR_7219(X,Y) do{ led_line[LED_IND(X,Y)] &= ~_BV(LED_BIT(X,Y)); }while(0)
-#define BIT_7219(X,Y) TEST(led_line[LED_IND(X,Y)], LED_BIT(X,Y))
+static uint8_t LEDs[8] = { 0 };
#ifdef CPU_32_BIT
- #define SIG_DELAY() DELAY_US(1) // Approximate a 1µs delay on 32-bit ARM
- #undef CRITICAL_SECTION_START
- #undef CRITICAL_SECTION_END
- #define CRITICAL_SECTION_START NOOP
- #define CRITICAL_SECTION_END NOOP
+ #define MS_DELAY() delayMicroseconds(5) // 32-bit processors need a delay to stabilize the signal
#else
- #define SIG_DELAY() DELAY_NS(188) // Delay for 0.1875µs (16MHz AVR) or 0.15µs (20MHz AVR)
+ #define MS_DELAY() NOOP
#endif
-void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/*=-1*/) {
- #if ENABLED(MAX7219_ERRORS)
- SERIAL_ECHOPGM("??? Max7219::");
- serialprintPGM(func);
- SERIAL_CHAR('(');
- SERIAL_ECHO(v1);
- if (v2 > 0) SERIAL_ECHOPAIR(", ", v2);
- SERIAL_CHAR(')');
- SERIAL_EOL();
- #else
- UNUSED(func); UNUSED(v1); UNUSED(v2);
- #endif
-}
-
-/**
- * Flip the lowest n_bytes of the supplied bits:
- * flipped(x, 1) flips the low 8 bits of x.
- * flipped(x, 2) flips the low 16 bits of x.
- * flipped(x, 3) flips the low 24 bits of x.
- * flipped(x, 4) flips the low 32 bits of x.
- */
-inline uint32_t flipped(const uint32_t bits, const uint8_t n_bytes) {
- uint32_t mask = 1, outbits = 0;
- for (uint8_t b = 0; b < n_bytes * 8; b++) {
- outbits <<= 1;
- if (bits & mask) outbits |= 1;
- mask <<= 1;
- }
- return outbits;
-}
-
-void Max7219::noop() {
- CRITICAL_SECTION_START;
- SIG_DELAY();
- WRITE(MAX7219_DIN_PIN, LOW);
- for (uint8_t i = 16; i--;) {
- SIG_DELAY();
- WRITE(MAX7219_CLK_PIN, LOW);
- SIG_DELAY();
- SIG_DELAY();
- WRITE(MAX7219_CLK_PIN, HIGH);
- SIG_DELAY();
- }
- CRITICAL_SECTION_END;
-}
-
-void Max7219::putbyte(uint8_t data) {
- CRITICAL_SECTION_START;
+void Max7219_PutByte(uint8_t data) {
+ CRITICAL_SECTION_START
for (uint8_t i = 8; i--;) {
- SIG_DELAY();
+ MS_DELAY();
WRITE(MAX7219_CLK_PIN, LOW); // tick
- SIG_DELAY();
+ MS_DELAY();
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
- SIG_DELAY();
+ MS_DELAY();
WRITE(MAX7219_CLK_PIN, HIGH); // tock
- SIG_DELAY();
+ MS_DELAY();
data <<= 1;
}
- CRITICAL_SECTION_END;
+ CRITICAL_SECTION_END
}
-void Max7219::pulse_load() {
- SIG_DELAY();
- WRITE(MAX7219_LOAD_PIN, LOW); // tell the chip to load the data
- SIG_DELAY();
+void Max7219(const uint8_t reg, const uint8_t data) {
+ MS_DELAY();
+ CRITICAL_SECTION_START
+ WRITE(MAX7219_LOAD_PIN, LOW); // begin
+ MS_DELAY();
+ Max7219_PutByte(reg); // specify register
+ MS_DELAY();
+ Max7219_PutByte(data); // put data
+ MS_DELAY();
+ WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
+ MS_DELAY();
WRITE(MAX7219_LOAD_PIN, HIGH);
- SIG_DELAY();
+ CRITICAL_SECTION_END
+ MS_DELAY();
}
-void Max7219::send(const uint8_t reg, const uint8_t data) {
- SIG_DELAY();
- CRITICAL_SECTION_START;
- SIG_DELAY();
- putbyte(reg); // specify register
- SIG_DELAY();
- putbyte(data); // put data
- CRITICAL_SECTION_END;
-}
-
-// Send out a single native row of bits to all units
-void Max7219::refresh_line(const uint8_t line) {
- for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
- send(LINE_REG(line), led_line[(u << 3) | (line & 0x7)]);
- pulse_load();
-}
-
-// Send out a single native row of bits to just one unit
-void Max7219::refresh_unit_line(const uint8_t line) {
- for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
- if (u == (line >> 3)) send(LINE_REG(line), led_line[line]); else noop();
- pulse_load();
-}
-
-void Max7219::set(const uint8_t line, const uint8_t bits) {
- led_line[line] = bits;
- refresh_line(line);
-}
-
-#if ENABLED(MAX7219_NUMERIC)
-
- // Draw an integer with optional leading zeros and optional decimal point
- void Max7219::print(const uint8_t start, int16_t value, uint8_t size, const bool leadzero=false, bool dec=false) {
- constexpr uint8_t led_numeral[10] = { 0x7E, 0x60, 0x6D, 0x79, 0x63, 0x5B, 0x5F, 0x70, 0x7F, 0x7A },
- led_decimal = 0x80, led_minus = 0x01;
-
- bool blank = false, neg = value < 0;
- if (neg) value *= -1;
- while (size--) {
- const bool minus = neg && blank;
- if (minus) neg = false;
- send(
- max7219_reg_digit0 + start + size,
- minus ? led_minus : blank ? 0x00 : led_numeral[value % 10] | (dec ? led_decimal : 0x00)
- );
- pulse_load(); // tell the chips to load the clocked out data
- value /= 10;
- if (!value && !leadzero) blank = true;
- dec = false;
- }
+void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
+ if (row > 7 || col > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_LED_Set(", (int)row);
+ SERIAL_ECHOPAIR(",", (int)col);
+ SERIAL_ECHOLNPGM(")");
+ 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]);
+}
- // Draw a float with a decimal point and optional digits
- void Max7219::print(const uint8_t start, const float value, const uint8_t pre_size, const uint8_t post_size, const bool leadzero=false) {
- if (pre_size) print(start, value, pre_size, leadzero, !!post_size);
- if (post_size) {
- const int16_t after = ABS(value) * (10 ^ post_size);
- print(start + pre_size, after, post_size, true);
- }
+void Max7219_LED_On(const uint8_t col, const uint8_t row) {
+ if (row > 7 || col > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_LED_On(", (int)col);
+ SERIAL_ECHOPAIR(",", (int)row);
+ SERIAL_ECHOLNPGM(")");
+ return;
}
-
-#endif // MAX7219_NUMERIC
-
-// Modify a single LED bit and send the changed line
-void Max7219::led_set(const uint8_t x, const uint8_t y, const bool on) {
- if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_set"), x, y);
- if (BIT_7219(x, y) == on) return;
- XOR_7219(x, y);
- refresh_line(LED_IND(x, y));
+ Max7219_LED_Set(col, row, true);
}
-void Max7219::led_on(const uint8_t x, const uint8_t y) {
- if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_on"), x, y);
- led_set(x, y, true);
-}
-
-void Max7219::led_off(const uint8_t x, const uint8_t y) {
- if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_off"), x, y);
- led_set(x, y, false);
-}
-
-void Max7219::led_toggle(const uint8_t x, const uint8_t y) {
- if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_toggle"), x, y);
- led_set(x, y, !BIT_7219(x, y));
-}
-
-void Max7219::send_row(const uint8_t row) {
- #if _ROT == 0 || _ROT == 180
- refresh_line(LED_IND(0, row));
- #else
- UNUSED(row);
- refresh();
- #endif
-}
-
-void Max7219::send_column(const uint8_t col) {
- #if _ROT == 90 || _ROT == 270
- refresh_line(LED_IND(col, 0));
- #else
- UNUSED(col);
- refresh();
- #endif
-}
-
-void Max7219::clear() {
- ZERO(led_line);
- refresh();
-}
-
-void Max7219::fill() {
- memset(led_line, 0xFF, sizeof(led_line));
- refresh();
-}
-
-void Max7219::clear_row(const uint8_t row) {
- if (row >= MAX7219_Y_LEDS) return error(PSTR("clear_row"), row);
- for (uint8_t x = 0; x < MAX7219_X_LEDS; x++) CLR_7219(x, row);
- send_row(row);
-}
-
-void Max7219::clear_column(const uint8_t col) {
- if (col >= MAX7219_X_LEDS) return error(PSTR("set_column"), col);
- for (uint8_t y = 0; y < MAX7219_Y_LEDS; y++) CLR_7219(col, y);
- send_column(col);
-}
-
-/**
- * Plot the low order bits of val to the specified row of the matrix.
- * With 4 Max7219 units in the chain, it's possible to set 32 bits at once with
- * one call to the function (if rotated 90° or 180°).
- */
-void Max7219::set_row(const uint8_t row, const uint32_t val) {
- if (row >= MAX7219_Y_LEDS) return error(PSTR("set_row"), row);
- uint32_t mask = _BV32(MAX7219_X_LEDS - 1);
- for (uint8_t x = 0; x < MAX7219_X_LEDS; x++) {
- if (val & mask) SET_7219(x, row); else CLR_7219(x, row);
- mask >>= 1;
+void Max7219_LED_Off(const uint8_t col, const uint8_t row) {
+ if (row > 7 || col > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_LED_Off(", (int)row);
+ SERIAL_ECHOPAIR(",", (int)col);
+ SERIAL_ECHOLNPGM(")");
+ return;
}
- send_row(row);
+ Max7219_LED_Set(col, row, false);
}
-/**
- * Plot the low order bits of val to the specified column of the matrix.
- * With 4 Max7219 units in the chain, it's possible to set 32 bits at once with
- * one call to the function (if rotated 90° or 180°).
- */
-void Max7219::set_column(const uint8_t col, const uint32_t val) {
- if (col >= MAX7219_X_LEDS) return error(PSTR("set_column"), col);
- uint32_t mask = _BV32(MAX7219_Y_LEDS - 1);
- for (uint8_t y = 0; y < MAX7219_Y_LEDS; y++) {
- if (val & mask) SET_7219(col, y); else CLR_7219(col, y);
- mask >>= 1;
+void Max7219_LED_Toggle(const uint8_t col, const uint8_t row) {
+ if (row > 7 || col > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_LED_Toggle(", (int)row);
+ SERIAL_ECHOPAIR(",", (int)col);
+ SERIAL_ECHOLNPGM(")");
+ return;
}
- send_column(col);
+ if (TEST(LEDs[row], col))
+ Max7219_LED_Off(col, row);
+ else
+ Max7219_LED_On(col, row);
}
-void Max7219::set_rows_16bits(const uint8_t y, uint32_t val) {
- #if MAX7219_X_LEDS == 8
- if (y > MAX7219_Y_LEDS - 2) return error(PSTR("set_rows_16bits"), y, val);
- set_row(y + 1, val); val >>= 8;
- set_row(y + 0, val);
- #else // at least 16 bits on each row
- if (y > MAX7219_Y_LEDS - 1) return error(PSTR("set_rows_16bits"), y, val);
- set_row(y, val);
- #endif
-}
-
-void Max7219::set_rows_32bits(const uint8_t y, uint32_t val) {
- #if MAX7219_X_LEDS == 8
- if (y > MAX7219_Y_LEDS - 4) return error(PSTR("set_rows_32bits"), y, val);
- set_row(y + 3, val); val >>= 8;
- set_row(y + 2, val); val >>= 8;
- set_row(y + 1, val); val >>= 8;
- set_row(y + 0, val);
- #elif MAX7219_X_LEDS == 16
- if (y > MAX7219_Y_LEDS - 2) return error(PSTR("set_rows_32bits"), y, val);
- set_row(y + 1, val); val >>= 16;
- set_row(y + 0, val);
- #else // at least 24 bits on each row. In the 3 matrix case, just display the low 24 bits
- if (y > MAX7219_Y_LEDS - 1) return error(PSTR("set_rows_32bits"), y, val);
- set_row(y, val);
- #endif
-}
-
-void Max7219::set_columns_16bits(const uint8_t x, uint32_t val) {
- #if MAX7219_Y_LEDS == 8
- if (x > MAX7219_X_LEDS - 2) return error(PSTR("set_columns_16bits"), x, val);
- set_column(x + 0, val); val >>= 8;
- set_column(x + 1, val);
- #else // at least 16 bits in each column
- if (x > MAX7219_X_LEDS - 1) return error(PSTR("set_columns_16bits"), x, val);
- set_column(x, val);
- #endif
-}
-
-void Max7219::set_columns_32bits(const uint8_t x, uint32_t val) {
- #if MAX7219_Y_LEDS == 8
- if (x > MAX7219_X_LEDS - 4) return error(PSTR("set_rows_32bits"), x, val);
- set_column(x + 3, val); val >>= 8;
- set_column(x + 2, val); val >>= 8;
- set_column(x + 1, val); val >>= 8;
- set_column(x + 0, val);
- #elif MAX7219_Y_LEDS == 16
- if (x > MAX7219_X_LEDS - 2) return error(PSTR("set_rows_32bits"), x, val);
- set_column(x + 1, val); val >>= 16;
- set_column(x + 0, val);
- #else // at least 24 bits on each row. In the 3 matrix case, just display the low 24 bits
- if (x > MAX7219_X_LEDS - 1) return error(PSTR("set_rows_32bits"), x, val);
- set_column(x, val);
- #endif
-}
-
-// Initialize the Max7219
-void Max7219::register_setup() {
- for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
- send(max7219_reg_scanLimit, 0x07);
- pulse_load(); // tell the chips to load the clocked out data
-
- for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
- send(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
- pulse_load(); // tell the chips to load the clocked out data
-
- for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
- send(max7219_reg_shutdown, 0x01); // not in shutdown mode
- pulse_load(); // tell the chips to load the clocked out data
-
- for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
- send(max7219_reg_displayTest, 0x00); // no display test
- pulse_load(); // tell the chips to load the clocked out data
-
- for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
- send(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
- // range: 0x00 to 0x0F
- pulse_load(); // tell the chips to load the clocked out data
-}
-
-#ifdef MAX7219_INIT_TEST
-#if MAX7219_INIT_TEST == 2
-
- void Max7219::spiral(const bool on, const uint16_t del) {
- constexpr int8_t way[] = { 1, 0, 0, 1, -1, 0, 0, -1 };
- int8_t px = 0, py = 0, dir = 0;
- for (uint8_t i = MAX7219_X_LEDS * MAX7219_Y_LEDS; i--;) {
- led_set(px, py, on);
- delay(del);
- const int8_t x = px + way[dir], y = py + way[dir + 1];
- if (!WITHIN(x, 0, MAX7219_X_LEDS-1) || !WITHIN(y, 0, MAX7219_Y_LEDS-1) || BIT_7219(x, y) == on) dir = (dir + 2) & 0x7;
- px += way[dir]; py += way[dir + 1];
- }
+void Max7219_Clear_Column(const uint8_t col) {
+ if (col > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_Clear_Column(", (int)col);
+ SERIAL_ECHOLNPGM(")");
+ return;
}
+ LEDs[col] = 0;
+ Max7219(8 - col, LEDs[col]);
+}
-#else
-
- void Max7219::sweep(const int8_t dir, const uint16_t ms, const bool on) {
- uint8_t x = dir > 0 ? 0 : MAX7219_X_LEDS-1;
- for (uint8_t i = MAX7219_X_LEDS; i--; x += dir) {
- set_column(x, on ? 0xFFFFFFFF : 0x00000000);
- delay(ms);
- }
+void Max7219_Clear_Row(const uint8_t row) {
+ if (row > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_Clear_Row(", (int)row);
+ SERIAL_ECHOLNPGM(")");
+ return;
}
+ for (uint8_t c = 0; c <= 7; c++)
+ Max7219_LED_Off(c, row);
+}
-#endif
-#endif // MAX7219_INIT_TEST
+void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
+ if (row > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_Set_Row(", (int)row);
+ SERIAL_ECHOPAIR(",", (int)val);
+ SERIAL_ECHOLNPGM(")");
+ 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_2_Rows(const uint8_t row, const uint16_t val) {
+ if (row > 6) {
+ SERIAL_ECHOPAIR("??? Max7219_Set_2_Rows(", (int)row);
+ SERIAL_ECHOPAIR(",", (int)val);
+ SERIAL_ECHOLNPGM(")");
+ return;
+ }
+ Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
+ Max7219_Set_Row(row + 0, (val ) & 0xFF);
+}
+
+void Max7219_Set_4_Rows(const uint8_t row, const uint32_t val) {
+ if (row > 4) {
+ SERIAL_ECHOPAIR("??? Max7219_Set_4_Rows(", (int)row);
+ SERIAL_ECHOPAIR(",", (long)val);
+ SERIAL_ECHOLNPGM(")");
+ return;
+ }
+ Max7219_Set_Row(row + 3, (val >> 24) & 0xFF);
+ Max7219_Set_Row(row + 2, (val >> 16) & 0xFF);
+ Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
+ Max7219_Set_Row(row + 0, (val ) & 0xFF);
+}
+
+void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
+ if (col > 7) {
+ SERIAL_ECHOPAIR("??? Max7219_Column(", (int)col);
+ SERIAL_ECHOPAIR(",", (int)val);
+ SERIAL_ECHOLNPGM(")");
+ return;
+ }
+ LEDs[col] = val;
+ Max7219(8 - col, LEDs[col]);
+}
+
+void Max7219_init() {
+ uint8_t i, x, y;
-void Max7219::init() {
SET_OUTPUT(MAX7219_DIN_PIN);
SET_OUTPUT(MAX7219_CLK_PIN);
+
OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
delay(1);
- register_setup();
-
- for (uint8_t i = 0; i <= 7; i++) { // Empty registers to turn all LEDs off
- led_line[i] = 0x00;
- send(max7219_reg_digit0 + i, 0);
- pulse_load(); // tell the chips to load the clocked out data
+ //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 <= 7; i++) { // empty registers, turn all LEDs off
+ LEDs[i] = 0x00;
+ Max7219(i + 1, 0);
}
- #ifdef MAX7219_INIT_TEST
- #if MAX7219_INIT_TEST == 2
- spiral(true, 8);
- delay(150);
- spiral(false, 8);
- #else
- // Do an aesthetically-pleasing pattern to fully test the Max7219 module and LEDs.
- // Light up and turn off columns, both forward and backward.
- sweep(1, 20, true);
- sweep(1, 20, false);
- delay(150);
- sweep(-1, 20, true);
- sweep(-1, 20, false);
- #endif
- #endif
+ 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 <= 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 = 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 = 8; x--;)
+ for (y = 0; y <= 7; y++) {
+ Max7219_LED_Off(x, y);
+ delay(2);
+ }
}
/**
- * This code demonstrates some simple debugging using a single 8x8 LED Matrix. If your feature could
- * benefit from matrix display, add its code here. Very little processing is required, so the 7219 is
- * ideal for debugging when realtime feedback is important but serial output can't be used.
- */
-
-// Apply changes to update a marker
-void Max7219::mark16(const uint8_t y, const uint8_t v1, const uint8_t v2) {
- #if MAX7219_X_LEDS == 8
- #if MAX7219_Y_LEDS == 8
- led_off(v1 & 0x7, y + (v1 >= 8));
- led_on(v2 & 0x7, y + (v2 >= 8));
- #else
- led_off(y, v1 & 0xF); // At least 16 LEDs down. Use a single column.
- led_on(y, v2 & 0xF);
- #endif
- #else
- led_off(v1 & 0xF, y); // At least 16 LEDs across. Use a single row.
- led_on(v2 & 0xF, y);
+* 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.
+*
+* But with that said, if your debugging can be facilitated by making calls into the library from
+* other places in the code, feel free to do it. The CPU burden for a few calls to toggle an LED
+* or clear a row is not very significant.
+*/
+void Max7219_idle_tasks() {
+#if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
+ CRITICAL_SECTION_START
+ #if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_QUEUE
+ const uint8_t head = planner.block_buffer_head;
#endif
-}
-
-// Apply changes to update a tail-to-head range
-void Max7219::range16(const uint8_t y, const uint8_t ot, const uint8_t nt, const uint8_t oh, const uint8_t nh) {
- #if MAX7219_X_LEDS == 8
- #if MAX7219_Y_LEDS == 8
- if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
- led_off(n & 0x7, y + (n >= 8));
- if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
- led_on(n & 0x7, y + (n >= 8));
- #else // The Max7219 Y-Axis has at least 16 LED's. So use a single column
- if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
- led_off(y, n & 0xF);
- if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
- led_on(y, n & 0xF);
- #endif
- #else // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
- if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
- led_off(n & 0xF, y);
- if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
- led_on(n & 0xF, y);
- #endif
-}
-
-// Apply changes to update a quantity
-void Max7219::quantity16(const uint8_t y, const uint8_t ov, const uint8_t nv) {
- for (uint8_t i = MIN(nv, ov); i < MAX(nv, ov); i++)
- #if MAX7219_X_LEDS == 8
- #if MAX7219_Y_LEDS == 8
- led_set(i >> 1, y + (i & 1), nv >= ov); // single 8x8 LED matrix. Use two lines to get 16 LED's
- #else
- led_set(y, i, nv >= ov); // The Max7219 Y-Axis has at least 16 LED's. So use a single column
- #endif
- #else
- led_set(i, y, nv >= ov); // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
- #endif
-}
-
-void Max7219::idle_tasks() {
- #define MAX7219_USE_HEAD (defined(MAX7219_DEBUG_PLANNER_HEAD) || defined(MAX7219_DEBUG_PLANNER_QUEUE))
- #define MAX7219_USE_TAIL (defined(MAX7219_DEBUG_PLANNER_TAIL) || defined(MAX7219_DEBUG_PLANNER_QUEUE))
- #if MAX7219_USE_HEAD || MAX7219_USE_TAIL
- CRITICAL_SECTION_START;
- #if MAX7219_USE_HEAD
- const uint8_t head = planner.block_buffer_head;
- #endif
- #if MAX7219_USE_TAIL
- const uint8_t tail = planner.block_buffer_tail;
- #endif
- CRITICAL_SECTION_END;
+ #if MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
+ const uint8_t tail = planner.block_buffer_tail;
#endif
+ CRITICAL_SECTION_END
+#endif
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
- static uint8_t refresh_cnt; // = 0
- constexpr uint16_t refresh_limit = 5;
static millis_t next_blink = 0;
- const millis_t ms = millis();
- const bool do_blink = ELAPSED(ms, next_blink);
- #else
- static uint16_t refresh_cnt; // = 0
- constexpr bool do_blink = true;
- constexpr uint16_t refresh_limit = 50000;
- #endif
-
- // Some Max7219 units are vulnerable to electrical noise, especially
- // with long wires next to high current wires. If the display becomes
- // corrupted, this will fix it within a couple seconds.
- if (do_blink && ++refresh_cnt >= refresh_limit) {
- refresh_cnt = 0;
- register_setup();
- }
-
- #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
- if (do_blink) {
- led_toggle(MAX7219_X_LEDS - 1, MAX7219_Y_LEDS - 1);
- next_blink = ms + 1000;
+ if (ELAPSED(millis(), next_blink)) {
+ Max7219_LED_Toggle(7, 7);
+ next_blink = millis() + 750;
}
#endif
- #if defined(MAX7219_DEBUG_PLANNER_HEAD) && defined(MAX7219_DEBUG_PLANNER_TAIL) && MAX7219_DEBUG_PLANNER_HEAD == MAX7219_DEBUG_PLANNER_TAIL
+ #ifdef MAX7219_DEBUG_STEPPER_HEAD
+ static int16_t last_head_cnt = 0;
+ if (last_head_cnt != head) {
+ if (last_head_cnt < 8)
+ Max7219_LED_Off(last_head_cnt, MAX7219_DEBUG_STEPPER_HEAD);
+ else
+ Max7219_LED_Off(last_head_cnt - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
- static int16_t last_head_cnt = 0xF, last_tail_cnt = 0xF;
-
- if (last_head_cnt != head || last_tail_cnt != tail) {
- range16(MAX7219_DEBUG_PLANNER_HEAD, last_tail_cnt, tail, last_head_cnt, head);
last_head_cnt = head;
- last_tail_cnt = tail;
+ if (head < 8)
+ Max7219_LED_On(head, MAX7219_DEBUG_STEPPER_HEAD);
+ else
+ Max7219_LED_On(head - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
}
-
- #else
-
- #ifdef MAX7219_DEBUG_PLANNER_HEAD
- static int16_t last_head_cnt = 0x1;
- if (last_head_cnt != head) {
- mark16(MAX7219_DEBUG_PLANNER_HEAD, last_head_cnt, head);
- last_head_cnt = head;
- }
- #endif
-
- #ifdef MAX7219_DEBUG_PLANNER_TAIL
- static int16_t last_tail_cnt = 0x1;
- if (last_tail_cnt != tail) {
- mark16(MAX7219_DEBUG_PLANNER_TAIL, last_tail_cnt, tail);
- last_tail_cnt = tail;
- }
- #endif
-
#endif
- #ifdef MAX7219_DEBUG_PLANNER_QUEUE
+ #ifdef MAX7219_DEBUG_STEPPER_TAIL
+ static int16_t last_tail_cnt = 0;
+ if (last_tail_cnt != tail) {
+ if (last_tail_cnt < 8)
+ Max7219_LED_Off(last_tail_cnt, MAX7219_DEBUG_STEPPER_TAIL);
+ else
+ Max7219_LED_Off(last_tail_cnt - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
+
+ last_tail_cnt = tail;
+ if (tail < 8)
+ Max7219_LED_On(tail, MAX7219_DEBUG_STEPPER_TAIL);
+ else
+ Max7219_LED_On(tail - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
+ }
+ #endif
+
+ #ifdef MAX7219_DEBUG_STEPPER_QUEUE
static int16_t last_depth = 0;
- const int16_t current_depth = (head - tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1) & 0xF;
- if (current_depth != last_depth) {
- quantity16(MAX7219_DEBUG_PLANNER_QUEUE, last_depth, current_depth);
+ int16_t current_depth = head - 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
+
+ const uint8_t st = min(current_depth, last_depth),
+ en = max(current_depth, last_depth);
+ if (current_depth < last_depth)
+ for (uint8_t i = st; i <= en; i++) // clear the highest order LEDs
+ Max7219_LED_Off(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
+ else
+ for (uint8_t i = st; i <= en; i++) // set the LEDs to current depth
+ Max7219_LED_On(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
+
last_depth = current_depth;
}
#endif
diff --git a/Marlin/Max7219_Debug_LEDs.h b/Marlin/Max7219_Debug_LEDs.h
index 3523eef..3beccb0 100644
--- a/Marlin/Max7219_Debug_LEDs.h
+++ b/Marlin/Max7219_Debug_LEDs.h
@@ -22,45 +22,41 @@
/**
* This module is off by default, but can be enabled to facilitate the display of
- * extra debug information during code development.
+ * 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, then connect up the pins assigned
+ * 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_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
+ * 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.
*
- * If you are using the Max7219 matrix for firmware debug purposes in time sensitive
- * areas of the code, please be aware that the orientation (rotation) of the display can
- * affect the speed. The Max7219 can update a single column fairly fast. It is much
- * faster to do a Max7219_Set_Column() with a rotation of 90 or 270 degrees than to do
- * a Max7219_Set_Row(). The opposite is true for rotations of 0 or 180 degrees.
+ * void Max7219_init();
+ * void Max7219_PutByte(uint8_t data);
+ * void Max7219(uint8_t reg, uint8_t data);
+ * void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
+ * void Max7219_LED_On(uint8_t col, uint8_t row);
+ * void Max7219_LED_Off(uint8_t col, uint8_t row);
+ * 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_2_Rows(uint8_t row, uint16_t val);
+ * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
+ * void Max7219_Set_Column(uint8_t col, uint8_t val);
+ * void Max7219_idle_tasks();
*/
-#pragma once
-#ifndef MAX7219_ROTATE
- #define MAX7219_ROTATE 0
-#endif
-#define _ROT ((MAX7219_ROTATE + 360) % 360)
-
-#define MAX7219_LINES (8 * (MAX7219_NUMBER_UNITS))
-
-#if _ROT == 0 || _ROT == 180
- #define MAX7219_Y_LEDS 8
- #define MAX7219_X_LEDS MAX7219_LINES
-#elif _ROT == 90 || _ROT == 270
- #define MAX7219_X_LEDS 8
- #define MAX7219_Y_LEDS MAX7219_LINES
-#else
- #error "MAX7219_ROTATE must be a multiple of +/- 90°."
-#endif
+#ifndef __MAX7219_DEBUG_LEDS_H__
+#define __MAX7219_DEBUG_LEDS_H__
//
-// MAX7219 registers
+// define max7219 registers
//
#define max7219_reg_noop 0x00
#define max7219_reg_digit0 0x01
@@ -72,83 +68,23 @@
#define max7219_reg_digit6 0x07
#define max7219_reg_digit7 0x08
-#define max7219_reg_decodeMode 0x09
#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_displayTest 0x0F
-class Max7219 {
-public:
- static uint8_t led_line[MAX7219_LINES];
+void Max7219_init();
+void Max7219_PutByte(uint8_t data);
+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();
- Max7219() { }
-
- static void init();
- static void register_setup();
- static void putbyte(uint8_t data);
- static void pulse_load();
-
- // Set a single register (e.g., a whole native row)
- static void send(const uint8_t reg, const uint8_t data);
-
- // Refresh all units
- inline static void refresh() { for (uint8_t i = 0; i < 8; i++) refresh_line(i); }
-
- // Update a single native line on all units
- static void refresh_line(const uint8_t line);
-
- // Update a single native line on just one unit
- static void refresh_unit_line(const uint8_t line);
-
- // Set a single LED by XY coordinate
- static void led_set(const uint8_t x, const uint8_t y, const bool on);
- static void led_on(const uint8_t x, const uint8_t y);
- static void led_off(const uint8_t x, const uint8_t y);
- static void led_toggle(const uint8_t x, const uint8_t y);
-
- // Set all LEDs in a single column
- static void set_column(const uint8_t col, const uint32_t val);
- static void clear_column(const uint8_t col);
-
- // Set all LEDs in a single row
- static void set_row(const uint8_t row, const uint32_t val);
- static void clear_row(const uint8_t row);
-
- // 16 and 32 bit versions of Row and Column functions
- // Multiple rows and columns will be used to display the value if
- // the array of matrix LED's is too narrow to accomplish the goal
- static void set_rows_16bits(const uint8_t y, uint32_t val);
- static void set_rows_32bits(const uint8_t y, uint32_t val);
- static void set_columns_16bits(const uint8_t x, uint32_t val);
- static void set_columns_32bits(const uint8_t x, uint32_t val);
-
- // Quickly clear the whole matrix
- static void clear();
-
- // Quickly fill the whole matrix
- static void fill();
-
- // Apply custom code to update the matrix
- static void idle_tasks();
-
-private:
- static void error(const char * const func, const int32_t v1, const int32_t v2=-1);
- static void noop();
- static void set(const uint8_t line, const uint8_t bits);
- static void send_row(const uint8_t row);
- static void send_column(const uint8_t col);
- static void mark16(const uint8_t y, const uint8_t v1, const uint8_t v2);
- static void range16(const uint8_t y, const uint8_t ot, const uint8_t nt, const uint8_t oh, const uint8_t nh);
- static void quantity16(const uint8_t y, const uint8_t ov, const uint8_t nv);
-
- #ifdef MAX7219_INIT_TEST
- #if MAX7219_INIT_TEST == 2
- static void spiral(const bool on, const uint16_t del);
- #else
- static void sweep(const int8_t dir, const uint16_t ms, const bool on);
- #endif
- #endif
-};
-
-extern Max7219 max7219;
+#endif // __MAX7219_DEBUG_LEDS_H__
diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h
index 7e745ce..2399c42 100644
--- a/Marlin/SanityCheck.h
+++ b/Marlin/SanityCheck.h
@@ -42,21 +42,18 @@
* the bleeding-edge source code, but sometimes this is not enough. This check
* forces a minimum config file revision. Otherwise Marlin will not build.
*/
-#define HEXIFY(H) _CAT(0x,H)
-#if !defined(CONFIGURATION_H_VERSION) || HEXIFY(CONFIGURATION_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_H_VERSION)
+#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION
#error "You are using an old Configuration.h file, update it before building Marlin."
#endif
-#if !defined(CONFIGURATION_ADV_H_VERSION) || HEXIFY(CONFIGURATION_ADV_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_ADV_H_VERSION)
+#if ! defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION
#error "You are using an old Configuration_adv.h file, update it before building Marlin."
#endif
/**
* Warnings for old configurations
*/
-#ifndef MOTHERBOARD
- #error "MOTHERBOARD is required. Please update your configuration."
-#elif !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
+#if !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
#error "X_BED_SIZE and Y_BED_SIZE are now required! Please update your configuration."
#elif WATCH_TEMP_PERIOD > 500
#error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
@@ -81,9 +78,7 @@
#elif defined(SDEXTRASLOW)
#error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead."
#elif defined(FILAMENT_SENSOR)
- #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR. Please update your configuration."
-#elif defined(ENDSTOPPULLUP_FIL_RUNOUT)
- #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP. Please update your configuration."
+ #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead."
#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
#error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
#elif defined(LANGUAGE_INCLUDE)
@@ -98,8 +93,6 @@
#error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
#error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
-#elif defined(Z_ENDSTOP_SERVO_NR)
- #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR. Please update your configuration."
#elif defined(DEFAULT_XYJERK)
#error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead."
#elif defined(XY_TRAVEL_SPEED)
@@ -133,17 +126,11 @@
#elif defined(FILAMENT_CHANGE_RETRACT_LENGTH)
#error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
#elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
- #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
-#elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE)
- #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
+ #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
#elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
- #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
-#elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH)
- #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
+ #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_EXTRUDE_LENGTH. Please update your configuration."
#elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
#error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
-#elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
- #error "FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS is now FILAMENT_CHANGE_ALERT_BEEPS. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT)
#error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT. Please update your configuration."
#elif defined(PLA_PREHEAT_HOTEND_TEMP)
@@ -171,7 +158,7 @@
#elif defined(MIN_Z_HEIGHT_FOR_HOMING)
#error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
#elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
- #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead."
+ #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE instead."
#elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS)
#error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
#elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
@@ -184,8 +171,6 @@
#error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration."
#elif !defined(MIN_STEPS_PER_SEGMENT)
#error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
-#elif MIN_STEPS_PER_SEGMENT <= 0
- #error "MIN_STEPS_PER_SEGMENT must be at least 1. Please update your Configuration_adv.h."
#elif defined(PREVENT_DANGEROUS_EXTRUDE)
#error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION. Please update your configuration."
#elif defined(SCARA)
@@ -234,20 +219,12 @@
#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(LIN_ADVANCE_E_D_RATIO)
- #error "LIN_ADVANCE (1.5) no longer uses LIN_ADVANCE_E_D_RATIO. Check your configuration."
#elif defined(NEOPIXEL_RGBW_LED)
#error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
-#elif ENABLED(DELTA) && defined(DELTA_PROBEABLE_RADIUS)
- #error "Remove DELTA_PROBEABLE_RADIUS and use MIN_PROBE_EDGE to inset the probe area instead."
#elif defined(UBL_MESH_INSET)
#error "UBL_MESH_INSET is now just MESH_INSET. Please update your configuration."
#elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y)
#error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]. Please update your configuration."
-#elif defined(ABL_PROBE_PT_1_X) || defined(ABL_PROBE_PT_1_Y) || defined(ABL_PROBE_PT_2_X) || defined(ABL_PROBE_PT_2_Y) || defined(ABL_PROBE_PT_3_X) || defined(ABL_PROBE_PT_3_Y)
- #error "ABL_PROBE_PT_[123]_[XY] is now PROBE_PT_[123]_[XY]. Please update your configuration."
-#elif defined(UBL_PROBE_PT_1_X) || defined(UBL_PROBE_PT_1_Y) || defined(UBL_PROBE_PT_2_X) || defined(UBL_PROBE_PT_2_Y) || defined(UBL_PROBE_PT_3_X) || defined(UBL_PROBE_PT_3_Y)
- #error "UBL_PROBE_PT_[123]_[XY] is now PROBE_PT_[123]_[XY]. Please update your configuration."
#elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY)
#error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY. Please update your configuration."
#elif defined(BABYSTEP_ZPROBE_GFX_REVERSE)
@@ -260,61 +237,8 @@
#error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING. Please update your configuration."
#elif defined(ANET_KEYPAD_LCD)
#error "ANET_KEYPAD_LCD is now ZONESTAR_LCD. Please update your configuration."
-#elif defined(LCD_I2C_SAINSMART_YWROBOT)
- #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004). Please update your configuration."
#elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT)
#error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration."
-#elif defined(HAVE_TMCDRIVER)
- #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
-#elif defined(HAVE_TMC26X)
- #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
-#elif defined(HAVE_TMC2130)
- #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h."
-#elif defined(HAVE_L6470DRIVER)
- #error "HAVE_L6470DRIVER is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h."
-#elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) \
- || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC)
- #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
-#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) \
- || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X)
- #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
-#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) \
- || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130)
- #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h."
-#elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) \
- || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208)
- #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208. Please update your Configuration.h."
-#elif defined(X_IS_L6470) || defined(X2_IS_L6470) || defined(Y_IS_L6470) || defined(Y2_IS_L6470) || defined(Z_IS_L6470) || defined(Z2_IS_L6470) \
- || defined(E0_IS_L6470) || defined(E1_IS_L6470) || defined(E2_IS_L6470) || defined(E3_IS_L6470) || defined(E4_IS_L6470)
- #error "[AXIS]_IS_L6470 is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h."
-#elif defined(AUTOMATIC_CURRENT_CONTROL)
- #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
-#elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
- #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration."
-#elif ENABLED(LEVEL_BED_CORNERS) && !defined(LEVEL_CORNERS_INSET)
- #error "LEVEL_BED_CORNERS requires a LEVEL_CORNERS_INSET value. Please update your Configuration.h."
-#elif defined(BEZIER_JERK_CONTROL)
- #error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION. Please update your configuration."
-#elif defined(JUNCTION_DEVIATION_FACTOR)
- #error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM. Please update your configuration."
-#elif defined(JUNCTION_ACCELERATION_FACTOR)
- #error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h."
-#elif defined(JUNCTION_ACCELERATION)
- #error "JUNCTION_ACCELERATION is obsolete. Delete it from Configuration_adv.h."
-#elif defined(MAX7219_DEBUG_STEPPER_HEAD)
- #error "MAX7219_DEBUG_STEPPER_HEAD is now MAX7219_DEBUG_PLANNER_HEAD. Please update your configuration."
-#elif defined(MAX7219_DEBUG_STEPPER_TAIL)
- #error "MAX7219_DEBUG_STEPPER_TAIL is now MAX7219_DEBUG_PLANNER_TAIL. Please update your configuration."
-#elif defined(MAX7219_DEBUG_STEPPER_QUEUE)
- #error "MAX7219_DEBUG_STEPPER_QUEUE is now MAX7219_DEBUG_PLANNER_QUEUE. Please update your configuration."
-#endif
-
-#define BOARD_MKS_13 -47
-#define BOARD_TRIGORILLA -343
-#if MB(MKS_13)
- #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
-#elif MB(BOARD_TRIGORILLA)
- #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
#endif
/**
@@ -341,22 +265,16 @@
/**
* Serial
*/
-#if USE_MARLINSERIAL
+#ifndef USBCON
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
#error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
#elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
#error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
#elif 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, a power of 2 greater than 1, and no greater than 256."
- #elif ENABLED(BLUETOOTH)
- #error "BLUETOOTH is only supported with AT90USB."
#endif
-#elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX)
- #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
-#endif
-
-#if SERIAL_PORT > 7
- #error "Set SERIAL_PORT to the port on your board. Usually this is 0."
+#elif ENABLED(SERIAL_XON_XOFF)
+ #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices."
#endif
/**
@@ -401,12 +319,12 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
* Progress Bar
*/
#if ENABLED(LCD_PROGRESS_BAR)
- #if DISABLED(SDSUPPORT) && DISABLED(LCD_SET_PROGRESS_MANUALLY)
- #error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
+ #if DISABLED(SDSUPPORT)
+ #error "LCD_PROGRESS_BAR requires SDSUPPORT."
+ #elif DISABLED(ULTRA_LCD)
+ #error "LCD_PROGRESS_BAR requires a character LCD."
#elif ENABLED(DOGLCD)
#error "LCD_PROGRESS_BAR does not apply to graphical displays."
- #elif DISABLED(ULTIPANEL)
- #error "LCD_PROGRESS_BAR requires a character LCD."
#elif ENABLED(FILAMENT_LCD_DISPLAY)
#error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
#endif
@@ -414,13 +332,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR or Graphical LCD."
#endif
-/**
- * Custom Boot and Status screens
- */
-#if DISABLED(DOGLCD) && (ENABLED(SHOW_CUSTOM_BOOTSCREEN) || ENABLED(CUSTOM_STATUS_SCREEN_IMAGE))
- #error "Graphical LCD is required for SHOW_CUSTOM_BOOTSCREEN and CUSTOM_STATUS_SCREEN_IMAGE."
-#endif
-
/**
* SD File Sorting
*/
@@ -452,8 +363,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
* I2C Position Encoders
*/
#if ENABLED(I2C_POSITION_ENCODERS)
- #if DISABLED(BABYSTEPPING) || DISABLED(BABYSTEP_XY)
- #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY."
+ #if DISABLED(BABYSTEPPING)
+ #error "I2C_POSITION_ENCODERS requires BABYSTEPPING."
#elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5)
#error "I2CPE_ENCODER_CNT must be between 1 and 5."
#endif
@@ -465,8 +376,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#if ENABLED(BABYSTEPPING)
#if ENABLED(SCARA)
#error "BABYSTEPPING is not implemented for SCARA yet."
- #elif ENABLED(HANGPRINTER)
- #error "BABYSTEPPING is not implemented for HANGPRINTER."
#elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
#error "BABYSTEPPING only implemented for Z axis on deltabots."
#elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && ENABLED(MESH_BED_LEVELING)
@@ -474,28 +383,18 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#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 Graphical LCD."
+ #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
/**
- * Filament Runout needs one or more pins and either SD Support or Auto print start detection
+ * Filament Runout needs a pin and either SD Support or Auto print start detection
*/
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #if !PIN_EXISTS(FIL_RUNOUT)
+ #if !HAS_FIL_RUNOUT
#error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
- #elif NUM_RUNOUT_SENSORS > E_STEPPERS
- #error "NUM_RUNOUT_SENSORS cannot exceed the number of E steppers."
- #elif NUM_RUNOUT_SENSORS > 1 && !PIN_EXISTS(FIL_RUNOUT2)
- #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 1 requires FIL_RUNOUT2_PIN."
- #elif NUM_RUNOUT_SENSORS > 2 && !PIN_EXISTS(FIL_RUNOUT3)
- #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 2 requires FIL_RUNOUT3_PIN."
- #elif NUM_RUNOUT_SENSORS > 3 && !PIN_EXISTS(FIL_RUNOUT4)
- #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 3 requires FIL_RUNOUT4_PIN."
- #elif NUM_RUNOUT_SENSORS > 4 && !PIN_EXISTS(FIL_RUNOUT5)
- #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 4 requires FIL_RUNOUT5_PIN."
#elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART)
#error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
#elif DISABLED(ADVANCED_PAUSE_FEATURE)
@@ -507,34 +406,24 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
* Advanced Pause
*/
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #if !HAS_RESUME_CONTINUE
- #error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller or EMERGENCY_PARSER."
+ #if DISABLED(NEWPANEL)
+ #error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller."
#elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
#error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
#elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER)
#error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
#elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
- #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT."
+ #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT"
#elif DISABLED(NOZZLE_PARK_FEATURE)
- #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
- #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
- #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
- #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH
- #error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
- #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH
- #error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
+ #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE"
#endif
#endif
/**
* Individual axis homing is useless for DELTAS
*/
-#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU)
- #if ENABLED(DELTA)
- #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
- #elif ENABLED(HANGPRINTER)
- #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with HANGPRINTER kinematics."
- #endif
+#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA)
+ #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
#endif
/**
@@ -565,6 +454,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
*/
#ifdef SNMM
#error "SNMM is now MK2_MULTIPLEXER. Please update your configuration."
+#elif ENABLED(MK2_MULTIPLEXER) && DISABLED(ADVANCED_PAUSE_FEATURE)
+ #error "ADVANCED_PAUSE_FEATURE is required with MK2_MULTIPLEXER."
#endif
/**
@@ -608,14 +499,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
#endif
-/**
- * Linear Advance 1.5 - Check K value range
- */
-#if ENABLED(LIN_ADVANCE)
- static_assert(
- WITHIN(LIN_ADVANCE_K, 0, 10),
- "LIN_ADVANCE_K must be a value from 0 to 10 (Changed in LIN_ADVANCE v1.5, Marlin 1.1.9)."
- );
+#if ENABLED(LIN_ADVANCE) && !IS_CARTESIAN
+ #error "Sorry! LIN_ADVANCE is only compatible with Cartesian."
#endif
/**
@@ -666,8 +551,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* Servo deactivation depends on servo endstops, switching nozzle, or switching extruder
*/
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_PROBE && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR)
- #error "Z_PROBE_SERVO_NR, switching nozzle, or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE."
+#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR)
+ #error "Z_ENDSTOP_SERVO_NR, switching nozzle, or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE."
#endif
/**
@@ -691,25 +576,44 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* Allow only one kinematic type to be defined
*/
-#if 1 < 0 \
- + ENABLED(HANGPRINTER) \
- + ENABLED(DELTA) \
- + ENABLED(MORGAN_SCARA) \
- + ENABLED(MAKERARM_SCARA) \
- + ENABLED(COREXY) \
- + ENABLED(COREXZ) \
- + ENABLED(COREYZ) \
- + ENABLED(COREYX) \
- + ENABLED(COREZX) \
- + ENABLED(COREZY)
- #error "Please enable only one of HANGPRINTER, DELTA, MORGAN_SCARA, MAKERARM_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
-#endif
+static_assert(1 >= 0
+ #if ENABLED(DELTA)
+ + 1
+ #endif
+ #if ENABLED(MORGAN_SCARA)
+ + 1
+ #endif
+ #if ENABLED(MAKERARM_SCARA)
+ + 1
+ #endif
+ #if ENABLED(COREXY)
+ + 1
+ #endif
+ #if ENABLED(COREXZ)
+ + 1
+ #endif
+ #if ENABLED(COREYZ)
+ + 1
+ #endif
+ #if ENABLED(COREYX)
+ + 1
+ #endif
+ #if ENABLED(COREZX)
+ + 1
+ #endif
+ #if ENABLED(COREZY)
+ + 1
+ #endif
+ , "Please enable only one of DELTA, MORGAN_SCARA, MAKERARM_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
+);
/**
* Delta requirements
*/
#if ENABLED(DELTA)
- #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
+ #if HAS_BED_PROBE && ENABLED(Z_MIN_PROBE_ENDSTOP)
+ #error "Delta probably shouldn't use Z_MIN_PROBE_ENDSTOP. Comment out this line to continue."
+ #elif DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
#error "You probably want to use Max Endstops for DELTA!"
#elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
#error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
@@ -724,42 +628,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
#endif
-/**
- * Hangprinter requirements
- */
-#if ENABLED(HANGPRINTER)
- #if EXTRUDERS > 4
- #error "Marlin supports a maximum of 4 EXTRUDERS when driving a Hangprinter."
- #elif ENABLED(CONVENTIONAL_GEOMETRY)
- #if ANCHOR_A_Y > 0
- #error "ANCHOR_A_Y should be negative by convention."
- #elif (ANCHOR_B_X) * (ANCHOR_C_X) > 0
- #error "ANCHOR_B_X and ANCHOR_C_X should have opposite signs by convention."
- #elif ANCHOR_B_Y < 0
- #error "ANCHOR_B_Y should be positive by convention."
- #elif ANCHOR_C_Y < 0
- #error "ANCHOR_C_Y should be positive by convention."
- #elif ANCHOR_A_Z > 0
- #error "ANCHOR_A_Z should be negative by convention."
- #elif ANCHOR_B_Z > 0
- #error "ANCHOR_B_Z should be negative by convention."
- #elif ANCHOR_C_Z > 0
- #error "ANCHOR_C_Z should be negative by convention."
- #elif ANCHOR_D_Z < 0
- #error "ANCHOR_D_Z should be positive by convention."
- #endif
- #endif
-#elif ENABLED(LINE_BUILDUP_COMPENSATION_FEATURE)
- #error "LINE_BUILDUP_COMPENSATION_FEATURE is only compatible with HANGPRINTER."
-#endif
-
-/**
- * Mechaduino requirements
- */
-#if ENABLED(MECHADUINO_I2C_COMMANDS) && DISABLED(EXPERIMENTAL_I2CBUS)
- #error "MECHADUINO_I2C_COMMANDS requires EXPERIMENTAL_I2CBUS to be enabled."
-#endif
-
/**
* Probes
*/
@@ -767,16 +635,30 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* Allow only one probe option to be defined
*/
-#if 1 < 0 \
- + ENABLED(PROBE_MANUALLY) \
- + ENABLED(FIX_MOUNTED_PROBE) \
- + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \
- + ENABLED(BLTOUCH) \
- + ENABLED(SOLENOID_PROBE) \
- + ENABLED(Z_PROBE_ALLEN_KEY) \
- + ENABLED(Z_PROBE_SLED)
- #error "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
-#endif
+static_assert(1 >= 0
+ #if ENABLED(PROBE_MANUALLY)
+ + 1
+ #endif
+ #if ENABLED(FIX_MOUNTED_PROBE)
+ + 1
+ #endif
+ #if HAS_Z_SERVO_ENDSTOP && DISABLED(BLTOUCH)
+ + 1
+ #endif
+ #if ENABLED(BLTOUCH)
+ + 1
+ #endif
+ #if ENABLED(SOLENOID_PROBE)
+ + 1
+ #endif
+ #if ENABLED(Z_PROBE_ALLEN_KEY)
+ + 1
+ #endif
+ #if ENABLED(Z_PROBE_SLED)
+ + 1
+ #endif
+ , "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
+);
#if HAS_BED_PROBE
@@ -801,19 +683,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* NUM_SERVOS is required for a Z servo probe
*/
- #if HAS_Z_SERVO_PROBE
+ #if HAS_Z_SERVO_ENDSTOP
#ifndef NUM_SERVOS
- #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)."
- #elif Z_PROBE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
- #error "SERVO0_PIN must be defined for your servo or BLTOUCH probe."
- #elif Z_PROBE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
- #error "SERVO1_PIN must be defined for your servo or BLTOUCH probe."
- #elif Z_PROBE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
- #error "SERVO2_PIN must be defined for your servo or BLTOUCH probe."
- #elif Z_PROBE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
- #error "SERVO3_PIN must be defined for your servo or BLTOUCH probe."
- #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
- #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
+ #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
+ #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
+ #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS."
#endif
#endif
@@ -827,7 +701,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires USE_ZMIN_PLUG to be enabled."
#elif !HAS_Z_MIN
#error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined."
- #elif Z_MIN_PROBE_ENDSTOP_INVERTING != Z_MIN_ENDSTOP_INVERTING
+ #elif ENABLED(Z_MIN_PROBE_ENDSTOP_INVERTING) != ENABLED(Z_MIN_ENDSTOP_INVERTING)
#error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_INVERTING to match Z_MIN_PROBE_ENDSTOP_INVERTING."
#endif
#elif ENABLED(Z_MIN_PROBE_ENDSTOP)
@@ -849,21 +723,12 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "Probes need Z_CLEARANCE_DEPLOY_PROBE >= 0."
#elif Z_CLEARANCE_BETWEEN_PROBES < 0
#error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
- #elif Z_AFTER_PROBING < 0
- #error "Probes need Z_AFTER_PROBING >= 0."
#endif
#if MULTIPLE_PROBING && MULTIPLE_PROBING < 2
#error "MULTIPLE_PROBING must be >= 2."
#endif
- #if Z_PROBE_LOW_POINT > 0
- #error "Z_PROBE_LOW_POINT must be less than or equal to 0."
- #endif
-
- static_assert(int(X_PROBE_OFFSET_FROM_EXTRUDER) == (X_PROBE_OFFSET_FROM_EXTRUDER), "X_PROBE_OFFSET_FROM_EXTRUDER must be an integer value.");
- static_assert(int(Y_PROBE_OFFSET_FROM_EXTRUDER) == (Y_PROBE_OFFSET_FROM_EXTRUDER), "Y_PROBE_OFFSET_FROM_EXTRUDER must be an integer value.");
-
#else
/**
@@ -882,28 +747,29 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* Allow only one bed leveling option to be defined
*/
-#if 1 < 0 \
- + ENABLED(AUTO_BED_LEVELING_LINEAR) \
- + ENABLED(AUTO_BED_LEVELING_3POINT) \
- + ENABLED(AUTO_BED_LEVELING_BILINEAR) \
- + ENABLED(AUTO_BED_LEVELING_UBL) \
- + ENABLED(MESH_BED_LEVELING)
- #error "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
-#endif
+static_assert(1 >= 0
+ #if ENABLED(AUTO_BED_LEVELING_LINEAR)
+ + 1
+ #endif
+ #if ENABLED(AUTO_BED_LEVELING_3POINT)
+ + 1
+ #endif
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+ + 1
+ #endif
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
+ + 1
+ #endif
+ #if ENABLED(MESH_BED_LEVELING)
+ + 1
+ #endif
+ , "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
+);
/**
* Bed Leveling Requirements
*/
-#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_3POINT)
- static_assert(WITHIN(PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_1_X is outside the probe region.");
- static_assert(WITHIN(PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_2_X is outside the probe region.");
- static_assert(WITHIN(PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_3_X is outside the probe region.");
- static_assert(WITHIN(PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y), "PROBE_PT_1_Y is outside the probe region.");
- static_assert(WITHIN(PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "PROBE_PT_2_Y is outside the probe region.");
- static_assert(WITHIN(PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "PROBE_PT_3_Y is outside the probe region.");
-#endif
-
#if ENABLED(AUTO_BED_LEVELING_UBL)
/**
@@ -919,8 +785,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
#elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
#error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
- #elif !defined(RESTORE_LEVELING_AFTER_G28)
- #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
+ #else
+ static_assert(WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "UBL_PROBE_PT_1_X can't be reached by the Z probe.");
+ static_assert(WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "UBL_PROBE_PT_2_X can't be reached by the Z probe.");
+ static_assert(WITHIN(UBL_PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "UBL_PROBE_PT_3_X can't be reached by the Z probe.");
+ static_assert(WITHIN(UBL_PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_1_Y can't be reached by the Z probe.");
+ static_assert(WITHIN(UBL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_2_Y can't be reached by the Z probe.");
+ static_assert(WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_3_Y can't be reached by the Z probe.");
#endif
#elif OLDSCHOOL_ABL
@@ -929,11 +800,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
* Auto Bed Leveling
*/
+ #if ENABLED(USE_RAW_KINEMATICS)
+ #error "USE_RAW_KINEMATICS is not compatible with AUTO_BED_LEVELING"
+ #endif
+
/**
* Delta and SCARA have limited bed leveling options
*/
#if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR)
- #error "SCARA machines can only use the AUTO_BED_LEVELING_BILINEAR leveling option."
+ #error "Only AUTO_BED_LEVELING_BILINEAR currently supports SCARA bed leveling."
#endif
/**
@@ -941,12 +816,28 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
*/
#if ABL_GRID
- static_assert(LEFT_PROBE_BED_POSITION < RIGHT_PROBE_BED_POSITION, "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION.");
- static_assert(FRONT_PROBE_BED_POSITION < BACK_PROBE_BED_POSITION, "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.");
- static_assert(LEFT_PROBE_BED_POSITION >= MIN_PROBE_X, "LEFT_PROBE_BED_POSITION is outside the probe region.");
- static_assert(RIGHT_PROBE_BED_POSITION <= MAX_PROBE_X, "RIGHT_PROBE_BED_POSITION is outside the probe region.");
- static_assert(FRONT_PROBE_BED_POSITION >= MIN_PROBE_Y, "FRONT_PROBE_BED_POSITION is outside the probe region.");
- static_assert(BACK_PROBE_BED_POSITION <= MAX_PROBE_Y, "BACK_PROBE_BED_POSITION is outside the probe region.");
+ #ifdef DELTA_PROBEABLE_RADIUS
+ static_assert(LEFT_PROBE_BED_POSITION >= -DELTA_PROBEABLE_RADIUS, "LEFT_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
+ static_assert(RIGHT_PROBE_BED_POSITION <= DELTA_PROBEABLE_RADIUS, "RIGHT_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
+ static_assert(FRONT_PROBE_BED_POSITION >= -DELTA_PROBEABLE_RADIUS, "FRONT_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
+ static_assert(BACK_PROBE_BED_POSITION <= DELTA_PROBEABLE_RADIUS, "BACK_PROBE_BED_POSITION must be within DELTA_PROBEABLE_RADIUS.");
+ #else
+ static_assert(LEFT_PROBE_BED_POSITION < RIGHT_PROBE_BED_POSITION, "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION.");
+ static_assert(FRONT_PROBE_BED_POSITION < BACK_PROBE_BED_POSITION, "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.");
+ static_assert(LEFT_PROBE_BED_POSITION >= MIN_PROBE_X, "LEFT_PROBE_BED_POSITION can't be reached by the Z probe.");
+ static_assert(RIGHT_PROBE_BED_POSITION <= MAX_PROBE_X, "RIGHT_PROBE_BED_POSITION can't be reached by the Z probe.");
+ static_assert(FRONT_PROBE_BED_POSITION >= MIN_PROBE_Y, "FRONT_PROBE_BED_POSITION can't be reached by the Z probe.");
+ static_assert(BACK_PROBE_BED_POSITION <= MAX_PROBE_Y, "BACK_PROBE_BED_POSITION can't be reached by the Z probe.");
+ #endif
+
+ #else // AUTO_BED_LEVELING_3POINT
+
+ static_assert(WITHIN(ABL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "ABL_PROBE_PT_1_X can't be reached by the Z probe.");
+ static_assert(WITHIN(ABL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "ABL_PROBE_PT_2_X can't be reached by the Z probe.");
+ static_assert(WITHIN(ABL_PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "ABL_PROBE_PT_3_X can't be reached by the Z probe.");
+ static_assert(WITHIN(ABL_PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y), "ABL_PROBE_PT_1_Y can't be reached by the Z probe.");
+ static_assert(WITHIN(ABL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "ABL_PROBE_PT_2_Y can't be reached by the Z probe.");
+ static_assert(WITHIN(ABL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "ABL_PROBE_PT_3_Y can't be reached by the Z probe.");
#endif // AUTO_BED_LEVELING_3POINT
@@ -967,9 +858,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
-#if HAS_MESH
- static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling.");
-#elif ENABLED(G26_MESH_VALIDATION)
+#if !HAS_MESH && ENABLED(G26_MESH_VALIDATION)
#error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
#endif
@@ -983,36 +872,34 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#if ENABLED(LCD_BED_LEVELING)
#if DISABLED(ULTIPANEL)
#error "LCD_BED_LEVELING requires an LCD controller."
- #elif !(ENABLED(MESH_BED_LEVELING) || OLDSCHOOL_ABL)
- #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."
+ #elif !(ENABLED(MESH_BED_LEVELING) || (OLDSCHOOL_ABL && ENABLED(PROBE_MANUALLY)))
+ #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or ABL with PROBE_MANUALLY."
#endif
#endif
/**
- * Homing
+ * Homing Bump
*/
#if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
#error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0."
#endif
-#if ENABLED(CODEPENDENT_XY_HOMING)
- #if ENABLED(QUICK_HOME)
- #error "QUICK_HOME is incompatible with CODEPENDENT_XY_HOMING."
- #elif IS_KINEMATIC
- #error "CODEPENDENT_XY_HOMING requires a Cartesian setup."
- #endif
-#endif
-
/**
* Make sure Z_SAFE_HOMING point is reachable
*/
#if ENABLED(Z_SAFE_HOMING)
- #if HAS_BED_PROBE
- static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X), "Z_SAFE_HOMING_X_POINT is outside the probe region.");
- static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y), "Z_SAFE_HOMING_Y_POINT is outside the probe region.");
- #else
- static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, X_MIN_POS, X_MAX_POS), "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle.");
- static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS), "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle.");
+ #if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X)
+ #if HAS_BED_PROBE
+ #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
+ #else
+ #error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle."
+ #endif
+ #elif !WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y)
+ #if HAS_BED_PROBE
+ #error "Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe."
+ #else
+ #error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle."
+ #endif
#endif
#endif // Z_SAFE_HOMING
@@ -1021,7 +908,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
*/
#if ENABLED(DISABLE_X) || ENABLED(DISABLE_Y) || ENABLED(DISABLE_Z)
#if ENABLED(HOME_AFTER_DEACTIVATE) || ENABLED(Z_SAFE_HOMING)
- #error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
+ #error "DISABLE_[XYZ] not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
#endif
#endif // DISABLE_[XYZ]
@@ -1050,12 +937,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* SAV_3DGLCD display options
*/
-#if ENABLED(SAV_3DGLCD)
- #if DISABLED(U8GLIB_SSD1306) && DISABLED(U8GLIB_SH1106)
- #error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
- #elif ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106)
- #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
- #endif
+#if ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106)
+ #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
#endif
/**
@@ -1127,9 +1010,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "HEATER_0_PIN not defined for this board."
#elif !PIN_EXISTS(TEMP_0) && !(defined(MAX6675_SS) && MAX6675_SS >= 0)
#error "TEMP_0_PIN not defined for this board."
-#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR)))
- #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
-#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)))
+#elif !PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)
#error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
#elif TEMP_SENSOR_0 == 0
#error "TEMP_SENSOR_0 is required."
@@ -1208,13 +1089,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
#endif
-/**
- * LED Control Menu
- */
-#if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
- #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9632, or NEOPIXEL_LED."
-#endif
-
/**
* Basic 2-nozzle duplication mode
*/
@@ -1254,7 +1128,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
#endif
#endif
-
/**
* Endstop Tests
*/
@@ -1262,51 +1135,51 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#define _PLUG_UNUSED_TEST(AXIS,PLUG) (DISABLED(USE_##PLUG##MIN_PLUG) && DISABLED(USE_##PLUG##MAX_PLUG) && !(ENABLED(AXIS##_DUAL_ENDSTOPS) && WITHIN(AXIS##2_USE_ENDSTOP, _##PLUG##MAX_, _##PLUG##MIN_)))
#define _AXIS_PLUG_UNUSED_TEST(AXIS) (_PLUG_UNUSED_TEST(AXIS,X) && _PLUG_UNUSED_TEST(AXIS,Y) && _PLUG_UNUSED_TEST(AXIS,Z))
-#if DISABLED(HANGPRINTER)
- // At least 3 endstop plugs must be used
- #if _AXIS_PLUG_UNUSED_TEST(X)
- #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
- #elif _AXIS_PLUG_UNUSED_TEST(Y)
- #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
- #elif _AXIS_PLUG_UNUSED_TEST(Z)
- #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
- #endif
+// At least 3 endstop plugs must be used
+#if _AXIS_PLUG_UNUSED_TEST(X)
+ #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
+#endif
+#if _AXIS_PLUG_UNUSED_TEST(Y)
+ #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
+#endif
+#if _AXIS_PLUG_UNUSED_TEST(Z)
+ #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
+#endif
- // Delta and Cartesian use 3 homing endstops
- #if !IS_SCARA
- #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
- #error "Enable USE_XMIN_PLUG when homing X to MIN."
- #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
- #error "Enable USE_XMAX_PLUG when homing X to MAX."
- #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG)
- #error "Enable USE_YMIN_PLUG when homing Y to MIN."
- #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
- #error "Enable USE_YMAX_PLUG when homing Y to MAX."
- #endif
- #endif
- #if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
- #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
- #elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
- #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
+// Delta and Cartesian use 3 homing endstops
+#if !IS_SCARA
+ #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
+ #error "Enable USE_XMIN_PLUG when homing X to MIN."
+ #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
+ #error "Enable USE_XMAX_PLUG when homing X to MAX."
+ #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG)
+ #error "Enable USE_YMIN_PLUG when homing Y to MIN."
+ #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
+ #error "Enable USE_YMAX_PLUG when homing Y to MAX."
#endif
#endif
+#if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
+ #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
+#elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
+ #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
+#endif
// Dual endstops requirements
#if ENABLED(X_DUAL_ENDSTOPS)
#if !X2_USE_ENDSTOP
#error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
- #elif X2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
- #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _XMIN_."
- #elif X2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
- #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."
- #elif X2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
- #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _YMIN_."
- #elif X2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
- #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _YMAX_."
- #elif X2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
- #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _ZMIN_."
- #elif X2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
- #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _ZMAX_."
+ #elif X2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
+ #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _X_MIN_."
+ #elif X2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
+ #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _X_MAX_."
+ #elif X2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
+ #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _Y_MIN_."
+ #elif X2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
+ #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _Y_MAX_."
+ #elif X2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
+ #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _Z_MIN_."
+ #elif X2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
+ #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _Z_MAX_."
#elif !HAS_X2_MIN && !HAS_X2_MAX
#error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
#elif ENABLED(DELTA)
@@ -1316,18 +1189,18 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#if ENABLED(Y_DUAL_ENDSTOPS)
#if !Y2_USE_ENDSTOP
#error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
- #elif Y2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
- #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _XMIN_."
- #elif Y2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
- #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _XMAX_."
- #elif Y2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
- #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _YMIN_."
- #elif Y2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
- #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."
- #elif Y2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
- #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _ZMIN_."
- #elif Y2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
- #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _ZMAX_."
+ #elif Y2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
+ #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _X_MIN_."
+ #elif Y2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
+ #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _X_MAX_."
+ #elif Y2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
+ #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _Y_MIN_."
+ #elif Y2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
+ #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _Y_MAX_."
+ #elif Y2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
+ #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _Z_MIN_."
+ #elif Y2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
+ #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _Z_MAX_."
#elif !HAS_Y2_MIN && !HAS_Y2_MAX
#error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
#elif ENABLED(DELTA)
@@ -1337,18 +1210,18 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#if ENABLED(Z_DUAL_ENDSTOPS)
#if !Z2_USE_ENDSTOP
#error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
- #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
- #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_."
- #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
- #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_."
- #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
- #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_."
- #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
- #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_."
- #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
- #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_."
- #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
- #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_."
+ #elif Z2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
+ #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _X_MIN_."
+ #elif Z2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
+ #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _X_MAX_."
+ #elif Z2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
+ #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _Y_MIN_."
+ #elif Z2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
+ #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _Y_MAX_."
+ #elif Z2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
+ #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _Z_MIN_."
+ #elif Z2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
+ #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _Z_MAX_."
#elif !HAS_Z2_MIN && !HAS_Z2_MAX
#error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
#elif ENABLED(DELTA)
@@ -1359,7 +1232,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/**
* emergency-command parser
*/
-#if ENABLED(EMERGENCY_PARSER) && !USE_MARLINSERIAL
+#if ENABLED(EMERGENCY_PARSER) && defined(USBCON)
#error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
#endif
@@ -1431,150 +1304,201 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
* SAV_3DGLCD => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
* MKS_12864OLED => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
* MKS_12864OLED_SSD1306 => U8GLIB_SSD1306 => ULTIMAKERCONTROLLER
- * MKS_MINI_12864 => MINIPANEL
* miniVIKI => ULTIMAKERCONTROLLER
* VIKI2 => ULTIMAKERCONTROLLER
* ELB_FULL_GRAPHIC_CONTROLLER => ULTIMAKERCONTROLLER
* PANEL_ONE => ULTIMAKERCONTROLLER
*/
-#if 1 < 0 \
- + ( ENABLED(ULTIMAKERCONTROLLER) \
+static_assert(1 >= 0
+ #if ENABLED(ULTIMAKERCONTROLLER) \
&& DISABLED(SAV_3DGLCD) \
&& DISABLED(miniVIKI) \
&& DISABLED(VIKI2) \
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
&& DISABLED(PANEL_ONE) \
&& DISABLED(MKS_12864OLED) \
- && DISABLED(MKS_12864OLED_SSD1306) ) \
- + ( ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
+ && DISABLED(MKS_12864OLED_SSD1306)
+ + 1
+ #endif
+ #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) \
- && DISABLED(MKS_12864OLED_SSD1306) ) \
- + (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(BQ_LCD_SMART_CONTROLLER)) \
- + ENABLED(LCD_FOR_MELZI) \
- + ENABLED(MKS_12864OLED) \
- + ENABLED(MKS_12864OLED_SSD1306) \
- + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
- + ENABLED(CARTESIO_UI) \
- + ENABLED(PANEL_ONE) \
- + ENABLED(MAKRPANEL) \
- + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \
- + ENABLED(VIKI2) \
- + ENABLED(miniVIKI) \
- + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
- + ENABLED(G3D_PANEL) \
- + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)) \
- + ENABLED(MKS_MINI_12864) \
- + (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI) && DISABLED(ZONESTAR_LCD)) \
- + ENABLED(RIGIDBOT_PANEL) \
- + ENABLED(RA_CONTROL_PANEL) \
- + ENABLED(LCD_SAINSMART_I2C_1602) \
- + ENABLED(LCD_SAINSMART_I2C_2004) \
- + ENABLED(LCM1602) \
- + ENABLED(LCD_I2C_PANELOLU2) \
- + ENABLED(LCD_I2C_VIKI) \
- + (ENABLED(U8GLIB_SSD1306) && DISABLED(OLED_PANEL_TINYBOY2) && DISABLED(MKS_12864OLED_SSD1306)) \
- + ENABLED(SAV_3DLCD) \
- + ENABLED(BQ_LCD_SMART_CONTROLLER) \
- + ENABLED(SAV_3DGLCD) \
- + ENABLED(OLED_PANEL_TINYBOY2) \
- + ENABLED(ZONESTAR_LCD) \
- + ENABLED(ULTI_CONTROLLER)
- #error "Please select no more than one LCD controller option."
+ && DISABLED(MKS_12864OLED_SSD1306)
+ + 1
+ #endif
+ #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(MKS_12864OLED_SSD1306)
+ + 1
+ #endif
+ #if ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
+ + 1
+ #endif
+ #if ENABLED(CARTESIO_UI)
+ + 1
+ #endif
+ #if ENABLED(PANEL_ONE)
+ + 1
+ #endif
+ #if ENABLED(MAKRPANEL)
+ + 1
+ #endif
+ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
+ + 1
+ #endif
+ #if ENABLED(VIKI2)
+ + 1
+ #endif
+ #if ENABLED(miniVIKI)
+ + 1
+ #endif
+ #if ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
+ + 1
+ #endif
+ #if ENABLED(G3D_PANEL)
+ + 1
+ #endif
+ #if ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)
+ + 1
+ #endif
+ #if ENABLED(MKS_MINI_12864)
+ + 1
+ #endif
+ #if ENABLED(REPRAPWORLD_KEYPAD) \
+ && DISABLED(CARTESIO_UI) \
+ && DISABLED(ZONESTAR_LCD)
+ + 1
+ #endif
+ #if ENABLED(RIGIDBOT_PANEL)
+ + 1
+ #endif
+ #if ENABLED(RA_CONTROL_PANEL)
+ + 1
+ #endif
+ #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
+ + 1
+ #endif
+ #if ENABLED(LCM1602)
+ + 1
+ #endif
+ #if ENABLED(LCD_I2C_PANELOLU2)
+ + 1
+ #endif
+ #if ENABLED(LCD_I2C_VIKI)
+ + 1
+ #endif
+ #if ENABLED(U8GLIB_SSD1306) && DISABLED(OLED_PANEL_TINYBOY2) && DISABLED(MKS_12864OLED_SSD1306)
+ + 1
+ #endif
+ #if ENABLED(SAV_3DLCD)
+ + 1
+ #endif
+ #if ENABLED(BQ_LCD_SMART_CONTROLLER)
+ + 1
+ #endif
+ #if ENABLED(SAV_3DGLCD)
+ + 1
+ #endif
+ #if ENABLED(OLED_PANEL_TINYBOY2)
+ + 1
+ #endif
+ #if ENABLED(ZONESTAR_LCD)
+ + 1
+ #endif
+ , "Please select no more than one LCD controller option."
+);
+
+/**
+ * Make sure HAVE_TMCDRIVER is warranted
+ */
+#if ENABLED(HAVE_TMCDRIVER) && !( \
+ ENABLED( X_IS_TMC ) \
+ || ENABLED( X2_IS_TMC ) \
+ || ENABLED( Y_IS_TMC ) \
+ || ENABLED( Y2_IS_TMC ) \
+ || ENABLED( Z_IS_TMC ) \
+ || ENABLED( Z2_IS_TMC ) \
+ || ENABLED( E0_IS_TMC ) \
+ || ENABLED( E1_IS_TMC ) \
+ || ENABLED( E2_IS_TMC ) \
+ || ENABLED( E3_IS_TMC ) \
+ || ENABLED( E4_IS_TMC ) \
+ )
+ #error "HAVE_TMCDRIVER requires at least one TMC stepper to be set."
#endif
/**
- * Check existing CS pins against enabled TMC SPI drivers.
+ * Make sure HAVE_TMC2130 is warranted
*/
-#if AXIS_DRIVER_TYPE(X, TMC2130) && !PIN_EXISTS(X_CS)
- #error "X_CS_PIN is required for TMC2130. Define X_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(X2, TMC2130) && !PIN_EXISTS(X2_CS)
- #error "X2_CS_PIN is required for X2. Define X2_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(Y, TMC2130) && !PIN_EXISTS(Y_CS)
- #error "Y_CS_PIN is required for TMC2130. Define Y_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(Y2, TMC2130) && !PIN_EXISTS(Y2_CS)
- #error "Y2_CS_PIN is required for TMC2130. Define Y2_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(Z, TMC2130) && !PIN_EXISTS(Z_CS)
- #error "Z_CS_PIN is required for TMC2130. Define Z_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(Z2, TMC2130) && !PIN_EXISTS(Z2_CS)
- #error "Z2_CS_PIN is required for TMC2130. Define Z2_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(E0, TMC2130) && !PIN_EXISTS(E0_CS)
- #error "E0_CS_PIN is required for TMC2130. Define E0_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(E1, TMC2130) && !PIN_EXISTS(E1_CS)
- #error "E1_CS_PIN is required for TMC2130. Define E1_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(E2, TMC2130) && !PIN_EXISTS(E2_CS)
- #error "E2_CS_PIN is required for TMC2130. Define E2_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(E3, TMC2130) && !PIN_EXISTS(E3_CS)
- #error "E3_CS_PIN is required for TMC2130. Define E3_CS_PIN in Configuration_adv.h."
-#elif AXIS_DRIVER_TYPE(E4, TMC2130) && !PIN_EXISTS(E4_CS)
- #error "E4_CS_PIN is required for TMC2130. Define E4_CS_PIN in Configuration_adv.h."
-#endif
-
-/**
- * TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
- */
-#if HAS_DRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
- defined(X_HARDWARE_SERIAL ) \
- || defined(X2_HARDWARE_SERIAL) \
- || defined(Y_HARDWARE_SERIAL ) \
- || defined(Y2_HARDWARE_SERIAL) \
- || defined(Z_HARDWARE_SERIAL ) \
- || defined(Z2_HARDWARE_SERIAL) \
- || defined(E0_HARDWARE_SERIAL) \
- || defined(E1_HARDWARE_SERIAL) \
- || defined(E2_HARDWARE_SERIAL) \
- || defined(E3_HARDWARE_SERIAL) \
- || defined(E4_HARDWARE_SERIAL) )
- #error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
-#endif
-
-#if ENABLED(SENSORLESS_HOMING)
- // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop
- // is necessary in order to reset the stallGuard indication between the initial movement of all three
- // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of
- // clearing the stallGuard activated status is found.
- #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP)
- #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP."
- #elif X_SENSORLESS && X_HOME_DIR == -1 && (!X_MIN_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_XMIN))
- #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMIN when homing to X_MIN."
- #elif X_SENSORLESS && X_HOME_DIR == 1 && (!X_MAX_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_XMAX))
- #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMAX when homing to X_MAX."
- #elif Y_SENSORLESS && Y_HOME_DIR == -1 && (!Y_MIN_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_YMIN))
- #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMIN when homing to Y_MIN."
- #elif Y_SENSORLESS && Y_HOME_DIR == 1 && (!Y_MAX_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_YMAX))
- #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMAX when homing to Y_MAX."
- #elif Z_SENSORLESS && Z_HOME_DIR == -1 && (!Z_MIN_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_ZMIN))
- #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMIN when homing to Z_MIN."
- #elif Z_SENSORLESS && Z_HOME_DIR == 1 && (!Z_MAX_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_ZMAX))
- #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMAX when homing to Z_MAX."
- #elif ENABLED(ENDSTOP_NOISE_FILTER)
- #error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_FILTER."
+#if ENABLED(HAVE_TMC2130)
+ #if !( ENABLED( X_IS_TMC2130 ) \
+ || ENABLED( X2_IS_TMC2130 ) \
+ || ENABLED( Y_IS_TMC2130 ) \
+ || ENABLED( Y2_IS_TMC2130 ) \
+ || ENABLED( Z_IS_TMC2130 ) \
+ || ENABLED( Z2_IS_TMC2130 ) \
+ || ENABLED( E0_IS_TMC2130 ) \
+ || ENABLED( E1_IS_TMC2130 ) \
+ || ENABLED( E2_IS_TMC2130 ) \
+ || ENABLED( E3_IS_TMC2130 ) \
+ || ENABLED( E4_IS_TMC2130 ) )
+ #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
+ #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
+ #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
+ #elif defined(AUTOMATIC_CURRENT_CONTROL)
+ #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
#endif
#endif
-// Sensorless homing is required for both combined steppers in an H-bot
-#if CORE_IS_XY && X_SENSORLESS != Y_SENSORLESS
- #error "CoreXY requires both X and Y to use sensorless homing if either does."
-#elif CORE_IS_XZ && X_SENSORLESS != Z_SENSORLESS
- #error "CoreXZ requires both X and Z to use sensorless homing if either does."
-#elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS
- #error "CoreYZ requires both Y and Z to use sensorless homing if either does."
+/**
+ * Make sure HAVE_TMC2208 is warranted
+ */
+
+#if ENABLED(HAVE_TMC2208) && !( \
+ ENABLED( X_IS_TMC2208 ) \
+ || ENABLED( X2_IS_TMC2208 ) \
+ || ENABLED( Y_IS_TMC2208 ) \
+ || ENABLED( Y2_IS_TMC2208 ) \
+ || ENABLED( Z_IS_TMC2208 ) \
+ || ENABLED( Z2_IS_TMC2208 ) \
+ || ENABLED( E0_IS_TMC2208 ) \
+ || ENABLED( E1_IS_TMC2208 ) \
+ || ENABLED( E2_IS_TMC2208 ) \
+ || ENABLED( E3_IS_TMC2208 ) )
+ #error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
#endif
#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
#error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
#endif
-#if ENABLED(TMC_Z_CALIBRATION) && !AXIS_IS_TMC(Z) && !AXIS_IS_TMC(Z2)
- #error "TMC_Z_CALIBRATION requires at least one TMC driver on Z axis"
-#endif
-#if ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD
- #error "SENSORLESS_HOMING requires TMC2130 or TMC2660 stepper drivers."
-#endif
-#if ENABLED(STEALTHCHOP) && !HAS_STEALTHCHOP
- #error "STEALTHCHOP requires TMC2130 or TMC2208 stepper drivers."
+/**
+ * Make sure HAVE_L6470DRIVER is warranted
+ */
+#if ENABLED(HAVE_L6470DRIVER) && !( \
+ ENABLED( X_IS_L6470 ) \
+ || ENABLED( X2_IS_L6470 ) \
+ || ENABLED( Y_IS_L6470 ) \
+ || ENABLED( Y2_IS_L6470 ) \
+ || ENABLED( Z_IS_L6470 ) \
+ || ENABLED( Z2_IS_L6470 ) \
+ || ENABLED( E0_IS_L6470 ) \
+ || ENABLED( E1_IS_L6470 ) \
+ || ENABLED( E2_IS_L6470 ) \
+ || ENABLED( E3_IS_L6470 ) \
+ || ENABLED( E4_IS_L6470 ) \
+ )
+ #error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set."
#endif
/**
@@ -1588,24 +1512,17 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
/**
- * Require 5/4 or more elements in per-axis initializers
+ * Require 4 or more elements in per-axis initializers
*/
-#if ENABLED(HANGPRINTER)
- #define MIN_ELEMENTS "5"
-#else
- #define MIN_ELEMENTS "4"
-#endif
-
constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT,
sanity_arr_2[] = DEFAULT_MAX_FEEDRATE,
sanity_arr_3[] = DEFAULT_MAX_ACCELERATION;
-
-static_assert(COUNT(sanity_arr_1) >= NUM_AXIS, "DEFAULT_AXIS_STEPS_PER_UNIT requires " MIN_ELEMENTS " (or more) elements for HANGPRINTER.");
-static_assert(COUNT(sanity_arr_2) >= NUM_AXIS, "DEFAULT_MAX_FEEDRATE requires " MIN_ELEMENTS " (or more) elements for HANGPRINTER.");
-static_assert(COUNT(sanity_arr_3) >= NUM_AXIS, "DEFAULT_MAX_ACCELERATION requires " MIN_ELEMENTS " (or more) elements for HANGPRINTER.");
-static_assert(COUNT(sanity_arr_1) <= NUM_AXIS_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements.");
-static_assert(COUNT(sanity_arr_2) <= NUM_AXIS_N, "DEFAULT_MAX_FEEDRATE has too many elements.");
-static_assert(COUNT(sanity_arr_3) <= NUM_AXIS_N, "DEFAULT_MAX_ACCELERATION has too many elements.");
+static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires 4 (or more) elements.");
+static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires 4 (or more) elements.");
+static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires 4 (or more) elements.");
+static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements.");
+static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements.");
+static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements.");
/**
* Sanity checks for Spindle / Laser
@@ -1680,10 +1597,6 @@ static_assert(COUNT(sanity_arr_3) <= NUM_AXIS_N, "DEFAULT_MAX_ACCELERATION has t
#error "LED_CONTROL_MENU requires an LCD controller."
#endif
-#if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)
- #error "CASE_LIGHT_USE_NEOPIXEL requires NEOPIXEL_LED."
-#endif
-
#if ENABLED(SKEW_CORRECTION)
#if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
#error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
@@ -1698,8 +1611,4 @@ static_assert(COUNT(sanity_arr_3) <= NUM_AXIS_N, "DEFAULT_MAX_ACCELERATION has t
#endif
#endif
-#if ENABLED(POWER_LOSS_RECOVERY) && !ENABLED(ULTIPANEL)
- #error "POWER_LOSS_RECOVERY currently requires an LCD Controller."
-#endif
-
#endif // _SANITYCHECK_H_
diff --git a/Marlin/Sd2Card.cpp b/Marlin/Sd2Card.cpp
index 118b83c..6683e4b 100644
--- a/Marlin/Sd2Card.cpp
+++ b/Marlin/Sd2Card.cpp
@@ -297,7 +297,7 @@ bool Sd2Card::eraseSingleBlockEnable() {
* \return true for success, false for failure.
* The reason for failure can be determined by calling errorCode() and errorData().
*/
-bool Sd2Card::init(uint8_t sckRateID, pin_t chipSelectPin) {
+bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
errorCode_ = type_ = 0;
chipSelectPin_ = chipSelectPin;
// 16-bit init start time allows over a minute
@@ -399,28 +399,27 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
#if ENABLED(SD_CHECK_AND_RETRY)
uint8_t retryCnt = 3;
- for (;;) {
+ for(;;) {
if (cardCommand(CMD17, blockNumber))
error(SD_CARD_ERROR_CMD17);
else if (readData(dst, 512))
return true;
- chipSelectHigh();
if (!--retryCnt) break;
+ chipSelectHigh();
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
errorCode_ = 0;
}
- return false;
#else
- if (cardCommand(CMD17, blockNumber)) {
+ if (cardCommand(CMD17, blockNumber))
error(SD_CARD_ERROR_CMD17);
- chipSelectHigh();
- return false;
- }
else
return readData(dst, 512);
#endif
+
+ chipSelectHigh();
+ return false;
}
/**
diff --git a/Marlin/Sd2Card.h b/Marlin/Sd2Card.h
index c831f23..9849980 100644
--- a/Marlin/Sd2Card.h
+++ b/Marlin/Sd2Card.h
@@ -140,7 +140,7 @@ class Sd2Card {
* \return true for success or false for failure.
*/
bool init(uint8_t sckRateID = SPI_FULL_SPEED,
- pin_t chipSelectPin = SD_CHIP_SELECT_PIN);
+ uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
bool readBlock(uint32_t block, uint8_t* dst);
/**
diff --git a/Marlin/SdBaseFile.cpp b/Marlin/SdBaseFile.cpp
index 3754fef..c1d8012 100644
--- a/Marlin/SdBaseFile.cpp
+++ b/Marlin/SdBaseFile.cpp
@@ -339,38 +339,38 @@ int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) {
&& DIR_IS_FILE_OR_SUBDIR(&dir)) break;
}
// indent for dir level
- for (uint8_t i = 0; i < indent; i++) SERIAL_CHAR(' ');
+ for (uint8_t i = 0; i < indent; i++) MYSERIAL.write(' ');
// print name
for (uint8_t i = 0; i < 11; i++) {
if (dir.name[i] == ' ')continue;
if (i == 8) {
- SERIAL_CHAR('.');
+ MYSERIAL.write('.');
w++;
}
- SERIAL_CHAR(dir.name[i]);
+ MYSERIAL.write(dir.name[i]);
w++;
}
if (DIR_IS_SUBDIR(&dir)) {
- SERIAL_CHAR('/');
+ MYSERIAL.write('/');
w++;
}
if (flags & (LS_DATE | LS_SIZE)) {
- while (w++ < 14) SERIAL_CHAR(' ');
+ while (w++ < 14) MYSERIAL.write(' ');
}
// print modify date/time if requested
if (flags & LS_DATE) {
- SERIAL_CHAR(' ');
+ MYSERIAL.write(' ');
printFatDate(dir.lastWriteDate);
- SERIAL_CHAR(' ');
+ MYSERIAL.write(' ');
printFatTime(dir.lastWriteTime);
}
// print size if requested
if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) {
- SERIAL_CHAR(' ');
- SERIAL_ECHO(dir.fileSize);
+ MYSERIAL.write(' ');
+ MYSERIAL.print(dir.fileSize);
}
- SERIAL_EOL();
+ MYSERIAL.println();
return DIR_IS_FILE(&dir) ? 1 : 2;
}
@@ -601,7 +601,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t ofla
// search for file
while (dirFile->curPosition_ < dirFile->fileSize_) {
- index = 0xF & (dirFile->curPosition_ >> 5);
+ index = 0XF & (dirFile->curPosition_ >> 5);
p = dirFile->readDirCache();
if (!p) return false;
@@ -705,7 +705,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) {
return false;
}
// open cached entry
- return openCachedEntry(index & 0xF, oflag);
+ return openCachedEntry(index & 0XF, oflag);
}
// open a cached directory entry. Assumes vol_ is initialized
@@ -775,7 +775,7 @@ bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) {
vol_ = dirFile->vol_;
while (1) {
- index = 0xF & (dirFile->curPosition_ >> 5);
+ index = 0XF & (dirFile->curPosition_ >> 5);
// read entry into cache
p = dirFile->readDirCache();
@@ -902,10 +902,11 @@ int SdBaseFile::peek() {
return c;
}
+
// print uint8_t with width 2
-static void print2u(const uint8_t v) {
- if (v < 10) SERIAL_CHAR('0');
- SERIAL_ECHO_F(v, DEC);
+static void print2u(uint8_t v) {
+ if (v < 10) MYSERIAL.write('0');
+ MYSERIAL.print(v, DEC);
}
/**
@@ -926,10 +927,10 @@ static void print2u(const uint8_t v) {
* \param[in] fatDate The date field from a directory entry.
*/
void SdBaseFile::printFatDate(uint16_t fatDate) {
- SERIAL_ECHO(FAT_YEAR(fatDate));
- SERIAL_CHAR('-');
+ MYSERIAL.print(FAT_YEAR(fatDate));
+ MYSERIAL.write('-');
print2u(FAT_MONTH(fatDate));
- SERIAL_CHAR('-');
+ MYSERIAL.write('-');
print2u(FAT_DAY(fatDate));
}
@@ -944,9 +945,9 @@ void SdBaseFile::printFatDate(uint16_t fatDate) {
*/
void SdBaseFile::printFatTime(uint16_t fatTime) {
print2u(FAT_HOUR(fatTime));
- SERIAL_CHAR(':');
+ MYSERIAL.write(':');
print2u(FAT_MINUTE(fatTime));
- SERIAL_CHAR(':');
+ MYSERIAL.write(':');
print2u(FAT_SECOND(fatTime));
}
@@ -958,7 +959,7 @@ void SdBaseFile::printFatTime(uint16_t fatTime) {
bool SdBaseFile::printName() {
char name[FILENAME_LENGTH];
if (!getFilename(name)) return false;
- SERIAL_ECHO(name);
+ MYSERIAL.print(name);
return true;
}
@@ -1054,9 +1055,8 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
// if not a directory file or miss-positioned return an error
if (!isDir() || (0x1F & curPosition_)) return -1;
- // If we have a longFilename buffer, mark it as invalid.
- // If a long filename is found it will be filled automatically.
- if (longFilename) longFilename[0] = '\0';
+ //If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly.
+ if (longFilename != NULL) longFilename[0] = '\0';
while (1) {
@@ -1066,15 +1066,12 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
// last entry if DIR_NAME_FREE
if (dir->name[0] == DIR_NAME_FREE) return 0;
- // skip deleted entry and entry for . and ..
- if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') {
- if (longFilename) longFilename[0] = '\0'; // Invalidate erased file long name, if any
- continue;
- }
+ // skip empty entries and entry for . and ..
+ if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') continue;
// Fill the long filename if we have a long filename entry.
// Long filename entries are stored before the short filename.
- if (longFilename && DIR_IS_LONG_NAME(dir)) {
+ if (longFilename != NULL && DIR_IS_LONG_NAME(dir)) {
vfat_t* VFAT = (vfat_t*)dir;
// Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0
if (VFAT->firstClusterLow == 0) {
@@ -1103,7 +1100,7 @@ dir_t* SdBaseFile::readDirCache() {
if (!isDir()) return 0;
// index of entry in cache
- i = (curPosition_ >> 5) & 0xF;
+ i = (curPosition_ >> 5) & 0XF;
// use read to locate and cache block
if (read() < 0) return 0;
@@ -1725,4 +1722,8 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
return -1;
}
+#if ALLOW_DEPRECATED_FUNCTIONS
+ void (*SdBaseFile::oldDateTime_)(uint16_t &date, uint16_t &time) = 0;
+#endif
+
#endif // SDSUPPORT
diff --git a/Marlin/SdBaseFile.h b/Marlin/SdBaseFile.h
index 12216bd..425c65f 100644
--- a/Marlin/SdBaseFile.h
+++ b/Marlin/SdBaseFile.h
@@ -37,8 +37,6 @@
#include "SdFatConfig.h"
#include "SdVolume.h"
-#include
-
/**
* \struct filepos_t
* \brief internal type for istream
@@ -385,6 +383,119 @@ class SdBaseFile {
bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
dir_t* readDirCache();
+
+// Deprecated functions
+#if ALLOW_DEPRECATED_FUNCTIONS
+ public:
+
+ /**
+ * \deprecated Use:
+ * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
+ * \param[out] bgnBlock the first block address for the file.
+ * \param[out] endBlock the last block address for the file.
+ * \return true for success or false for failure.
+ */
+ bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) {
+ return contiguousRange(&bgnBlock, &endBlock);
+ }
+
+ /**
+ * \deprecated Use:
+ * bool createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size)
+ * \param[in] dirFile The directory where the file will be created.
+ * \param[in] path A path with a valid DOS 8.3 file name.
+ * \param[in] size The desired file size.
+ * \return true for success or false for failure.
+ */
+ bool createContiguous(SdBaseFile& dirFile, const char* path, uint32_t size) {
+ return createContiguous(&dirFile, path, size);
+ }
+
+ /**
+ * \deprecated Use:
+ * static void dateTimeCallback(
+ * void (*dateTime)(uint16_t* date, uint16_t* time));
+ * \param[in] dateTime The user's call back function.
+ */
+ static void dateTimeCallback(
+ void (*dateTime)(uint16_t &date, uint16_t &time)) {
+ oldDateTime_ = dateTime;
+ dateTime_ = dateTime ? oldToNew : 0;
+ }
+
+ /**
+ * \deprecated Use:
+ * bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
+ * \param[in] dirFile An open SdFat instance for the directory containing the
+ * file to be opened.
+ * \param[in] path A path with a valid 8.3 DOS name for the file.
+ * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
+ * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+ * \return true for success or false for failure.
+ */
+ bool open(SdBaseFile& dirFile, const char* path, uint8_t oflag) {
+ return open(&dirFile, path, oflag);
+ }
+
+ /**
+ * \deprecated Do not use in new apps
+ * \param[in] dirFile An open SdFat instance for the directory containing the
+ * file to be opened.
+ * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
+ * \return true for success or false for failure.
+ */
+ bool open(SdBaseFile& dirFile, const char* path) {
+ return open(dirFile, path, O_RDWR);
+ }
+
+ /**
+ * \deprecated Use:
+ * bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
+ * \param[in] dirFile An open SdFat instance for the directory.
+ * \param[in] index The \a index of the directory entry for the file to be
+ * opened. The value for \a index is (directory file position)/32.
+ * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
+ * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+ * \return true for success or false for failure.
+ */
+ bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) {
+ return open(&dirFile, index, oflag);
+ }
+
+ /**
+ * \deprecated Use: bool openRoot(SdVolume* vol);
+ * \param[in] vol The FAT volume containing the root directory to be opened.
+ * \return true for success or false for failure.
+ */
+ bool openRoot(SdVolume& vol) { return openRoot(&vol); }
+
+ /**
+ * \deprecated Use: int8_t readDir(dir_t* dir);
+ * \param[out] dir The dir_t struct that will receive the data.
+ * \return bytes read for success zero for eof or -1 for failure.
+ */
+ int8_t readDir(dir_t& dir, char* longFilename) {
+ return readDir(&dir, longFilename);
+ }
+
+ /**
+ * \deprecated Use:
+ * static uint8_t remove(SdBaseFile* dirFile, const char* path);
+ * \param[in] dirFile The directory that contains the file.
+ * \param[in] path The name of the file to be removed.
+ * \return true for success or false for failure.
+ */
+ static bool remove(SdBaseFile& dirFile, const char* path) { return remove(&dirFile, path); }
+
+ private:
+ static void (*oldDateTime_)(uint16_t &date, uint16_t &time);
+ static void oldToNew(uint16_t * const date, uint16_t * const time) {
+ uint16_t d, t;
+ oldDateTime_(d, t);
+ *date = d;
+ *time = t;
+ }
+#endif // ALLOW_DEPRECATED_FUNCTIONS
};
#endif // _SDBASEFILE_H_
diff --git a/Marlin/SdFatConfig.h b/Marlin/SdFatConfig.h
index cfa5e34..606a66f 100644
--- a/Marlin/SdFatConfig.h
+++ b/Marlin/SdFatConfig.h
@@ -61,6 +61,11 @@
*/
#define ENDL_CALLS_FLUSH 0
+/**
+ * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
+ */
+#define ALLOW_DEPRECATED_FUNCTIONS 1
+
/**
* Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
* FAT12 has not been well tested.
diff --git a/Marlin/SdFatUtil.cpp b/Marlin/SdFatUtil.cpp
index 2bd471b..1d8cdb4 100644
--- a/Marlin/SdFatUtil.cpp
+++ b/Marlin/SdFatUtil.cpp
@@ -63,7 +63,7 @@ int SdFatUtil::FreeRam() {
* \param[in] str Pointer to string stored in flash memory.
*/
void SdFatUtil::print_P(PGM_P str) {
- for (uint8_t c; (c = pgm_read_byte(str)); str++) SERIAL_CHAR(c);
+ for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
}
/**
@@ -72,7 +72,7 @@ void SdFatUtil::print_P(PGM_P str) {
* \param[in] pr Print object for output.
* \param[in] str Pointer to string stored in flash memory.
*/
-void SdFatUtil::println_P(PGM_P str) { print_P(str); SERIAL_EOL(); }
+void SdFatUtil::println_P(PGM_P str) { print_P(str); MYSERIAL.println(); }
/**
* %Print a string in flash memory to Serial.
diff --git a/Marlin/SdVolume.cpp b/Marlin/SdVolume.cpp
index df781cb..bf8abc5 100644
--- a/Marlin/SdVolume.cpp
+++ b/Marlin/SdVolume.cpp
@@ -204,7 +204,7 @@ bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
index &= 0x1FF;
uint8_t tmp = value;
if (cluster & 1) {
- tmp = (cacheBuffer_.data[index] & 0xF) | tmp << 4;
+ tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4;
}
cacheBuffer_.data[index] = tmp;
index++;
diff --git a/Marlin/Version.h b/Marlin/Version.h
index c34d0ee..2a6b30c 100644
--- a/Marlin/Version.h
+++ b/Marlin/Version.h
@@ -35,20 +35,20 @@
/**
* Marlin release version identifier
*/
- #define SHORT_BUILD_VERSION "1.1.9"
+ #define SHORT_BUILD_VERSION "1.1.8"
/**
* Verbose version identifier which should contain a reference to the location
* from where the binary was downloaded or the source code was compiled.
*/
- #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github, davidramiro)"
+ #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (davidramiro, Github)"
/**
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
* here we define this default string as the date where the latest release
* version was tagged.
*/
- #define STRING_DISTRIBUTION_DATE "2019-01-22"
+ #define STRING_DISTRIBUTION_DATE "2019-01-31 12:00"
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.
@@ -57,8 +57,8 @@
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
* the configuration files.
*/
- #define REQUIRED_CONFIGURATION_H_VERSION 010109
- #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010109
+ #define REQUIRED_CONFIGURATION_H_VERSION 010107
+ #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010107
/**
* The protocol for communication to the host. Protocol indicates communication
@@ -70,7 +70,7 @@
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
- #define MACHINE_NAME "Anycubic i3 Mega"
+ #define MACHINE_NAME "3D Printer"
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
diff --git a/Marlin/boards.h b/Marlin/boards.h
index a7aceff..e31cbf4 100644
--- a/Marlin/boards.h
+++ b/Marlin/boards.h
@@ -58,10 +58,8 @@
#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
-#define BOARD_MKS_BASE 40 // MKS BASE v1.0
-#define BOARD_MKS_BASE_15 405 // MKS v1.5 with Allegro A4982 stepper drivers
-#define BOARD_MKS_BASE_HEROIC 41 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
-#define BOARD_MKS_GEN_13 47 // MKS GEN v1.3 or 1.4
+#define BOARD_MKS_BASE 40 // MKS BASE 1.0
+#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher)
#define BOARD_MKS_GEN_L 53 // MKS GEN L
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
@@ -76,9 +74,6 @@
#define BOARD_RUMBA 80 // Rumba
#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
#define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
-#define BOARD_TRIGORILLA_13 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB
-#define BOARD_TRIGORILLA_14 443 // TriGorilla Anycubic version 1.4 based on RAMPS EFB
-#define BOARD_RAMPS_ENDER_4 243 // Creality: Ender-4, CR-8
//
// Other ATmega1280, ATmega2560
@@ -96,8 +91,6 @@
#define BOARD_RAMBO 301 // Rambo
#define BOARD_MINIRAMBO 302 // Mini-Rambo
#define BOARD_MINIRAMBO_10A 303 // Mini-Rambo 1.0a
-#define BOARD_EINSY_RAMBO 304 // Einsy Rambo
-#define BOARD_EINSY_RETRO 305 // Einsy Retro
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_MEGACONTROLLER 310 // Mega controller
@@ -121,11 +114,8 @@
#define BOARD_MELZI 63 // Melzi
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version)
#define BOARD_MELZI_CREALITY 89 // Melzi Creality3D board (for CR-10 etc)
-#define BOARD_MELZI_MALYAN 92 // Melzi Malyan M150 board
-#define BOARD_MELZI_TRONXY 505 // Tronxy X5S
#define BOARD_STB_11 64 // STB V1.1
#define BOARD_AZTEEG_X1 65 // Azteeg X1
-#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)
//
// Other ATmega644P, ATmega644, ATmega1284P
@@ -142,6 +132,7 @@
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_SETHI 20 // Sethi 3D_1
+#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)
//
// Teensyduino - AT90USB1286, AT90USB1286P
@@ -156,6 +147,8 @@
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
+#define BOARD_TRIGORILLA 998 // Tigorilla
+
#define MB(board) (MOTHERBOARD==BOARD_##board)
#endif // __BOARDS_H
diff --git a/Marlin/buzzer.h b/Marlin/buzzer.h
index d36447d..530b729 100644
--- a/Marlin/buzzer.h
+++ b/Marlin/buzzer.h
@@ -104,7 +104,7 @@ class Buzzer {
* @param duration Duration of the tone in milliseconds
* @param frequency Frequency of the tone in hertz
*/
- void tone(const uint16_t &duration, const uint16_t &frequency=0) {
+ void tone(const uint16_t &duration, const uint16_t &frequency = 0) {
while (buffer.isFull()) {
this->tick();
thermalManager.manage_heater();
diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp
index 082da72..4d56438 100644
--- a/Marlin/cardreader.cpp
+++ b/Marlin/cardreader.cpp
@@ -29,11 +29,8 @@
#include "ultralcd.h"
#include "stepper.h"
#include "language.h"
-#include "printcounter.h"
-#if ENABLED(POWER_LOSS_RECOVERY)
- #include "power_loss_recovery.h"
-#endif
+#define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
CardReader::CardReader() {
#if ENABLED(SDCARD_SORT_ALPHA)
@@ -52,13 +49,15 @@ CardReader::CardReader() {
workDirDepth = 0;
ZERO(workDirParents);
- // Disable autostart until card is initialized
- autostart_index = -1;
+ autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
+ autostart_index = 0;
//power to SD reader
#if SDPOWER > -1
OUT_WRITE(SDPOWER, HIGH);
- #endif
+ #endif // SDPOWER
+
+ next_autostart_ms = millis() + 5000;
}
char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
@@ -86,25 +85,25 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
uint8_t cnt = 0;
// Read the next entry from a directory
- while (parent.readDir(&p, longFilename) > 0) {
+ while (parent.readDir(p, longFilename) > 0) {
// If the entry is a directory and the action is LS_SerialPrint
if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) {
// Get the short name for the item, which we know is a folder
- char dosFilename[FILENAME_LENGTH];
- createFilename(dosFilename, p);
+ char lfilename[FILENAME_LENGTH];
+ createFilename(lfilename, p);
// Allocate enough stack space for the full path to a folder, trailing slash, and nul
- const bool prepend_is_empty = (!prepend || prepend[0] == '\0');
- const int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(dosFilename) + 1 + 1;
+ bool prepend_is_empty = (prepend[0] == '\0');
+ int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(lfilename) + 1 + 1;
char path[len];
// Append the FOLDERNAME12/ to the passed string.
// It contains the full path to the "parent" argument.
// We now have the full path to the item in this folder.
strcpy(path, prepend_is_empty ? "/" : prepend); // root slash if prepend is empty
- strcat(path, dosFilename); // FILENAME_LENGTH-1 characters maximum
+ strcat(path, lfilename); // FILENAME_LENGTH-1 characters maximum
strcat(path, "/"); // 1 character
// Serial.print(path);
@@ -112,11 +111,11 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
// Get a new directory object using the full path
// and dive recursively into it.
SdFile dir;
- if (!dir.open(&parent, dosFilename, O_READ)) {
+ if (!dir.open(parent, lfilename, O_READ)) {
if (lsAction == LS_SerialPrint) {
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
- SERIAL_ECHOLN(dosFilename);
+ SERIAL_ECHOLN(lfilename);
}
}
lsDive(path, dir);
@@ -141,7 +140,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
case LS_SerialPrint:
createFilename(filename, p);
- if (prepend) SERIAL_PROTOCOL(prepend);
+ SERIAL_PROTOCOL(prepend);
SERIAL_PROTOCOL(filename);
SERIAL_PROTOCOLCHAR(' ');
SERIAL_PROTOCOLLN(p.fileSize);
@@ -164,7 +163,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
void CardReader::ls() {
lsAction = LS_SerialPrint;
root.rewind();
- lsDive(NULL, root);
+ lsDive("", root);
}
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
@@ -199,7 +198,7 @@ void CardReader::ls() {
// Find the item, setting the long filename
diveDir.rewind();
- lsDive(NULL, diveDir, segment);
+ lsDive("", diveDir, segment);
// Print /LongNamePart to serial output
SERIAL_PROTOCOLCHAR('/');
@@ -212,7 +211,7 @@ void CardReader::ls() {
// Open the sub-item as the new dive parent
SdFile dir;
- if (!dir.open(&diveDir, segment, O_READ)) {
+ if (!dir.open(diveDir, segment, O_READ)) {
SERIAL_EOL();
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
@@ -230,28 +229,6 @@ void CardReader::ls() {
#endif // LONG_FILENAME_HOST_SUPPORT
-/**
- * Echo the DOS 8.3 filename (and long filename, if any)
- */
-void CardReader::printFilename() {
- if (file.isOpen()) {
- char dosFilename[FILENAME_LENGTH];
- file.getFilename(dosFilename);
- SERIAL_ECHO(dosFilename);
- #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
- getfilename(0, dosFilename);
- if (longFilename[0]) {
- SERIAL_ECHO(' ');
- SERIAL_ECHO(longFilename);
- }
- #endif
- }
- else
- SERIAL_ECHOPGM("(no file)");
-
- SERIAL_EOL();
-}
-
void CardReader::initsd() {
cardOK = false;
if (root.isOpen()) root.close();
@@ -260,16 +237,16 @@ void CardReader::initsd() {
#define SPI_SPEED SPI_FULL_SPEED
#endif
- if (!sd2card.init(SPI_SPEED, SDSS)
+ if (!card.init(SPI_SPEED, SDSS)
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
- && !sd2card.init(SPI_SPEED, LCD_SDSS)
+ && !card.init(SPI_SPEED, LCD_SDSS)
#endif
) {
- //if (!sd2card.init(SPI_HALF_SPEED,SDSS))
+ //if (!card.init(SPI_HALF_SPEED,SDSS))
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
}
- else if (!volume.init(&sd2card)) {
+ else if (!volume.init(&card)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
}
@@ -285,6 +262,17 @@ void CardReader::initsd() {
setroot();
}
+void CardReader::setroot() {
+ /*if (!workDir.openRoot(&volume)) {
+ SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
+ }*/
+ workDir = root;
+ curDir = &workDir;
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ presort();
+ #endif
+}
+
void CardReader::release() {
sdprinting = false;
cardOK = false;
@@ -294,37 +282,27 @@ void CardReader::openAndPrintFile(const char *name) {
char cmd[4 + strlen(name) + 1]; // Room for "M23 ", filename, and null
sprintf_P(cmd, PSTR("M23 %s"), name);
for (char *c = &cmd[4]; *c; c++) *c = tolower(*c);
- enqueue_and_echo_command_now(cmd);
+ enqueue_and_echo_command(cmd);
enqueue_and_echo_commands_P(PSTR("M24"));
}
void CardReader::startFileprint() {
if (cardOK) {
sdprinting = true;
- #if SD_RESORT
+ #if ENABLED(SDCARD_SORT_ALPHA)
flush_presort();
#endif
}
}
-void CardReader::stopSDPrint(
- #if SD_RESORT
- const bool re_sort/*=false*/
- #endif
-) {
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- did_pause_print = 0;
- #endif
- sdprinting = abort_sd_printing = false;
+void CardReader::stopSDPrint() {
+ sdprinting = false;
if (isFileOpen()) file.close();
- #if SD_RESORT
- if (re_sort) presort();
- #endif
}
-void CardReader::openLogFile(char * const path) {
+void CardReader::openLogFile(char* name) {
logging = true;
- openFile(path, false);
+ openFile(name, false);
}
void appendAtom(SdFile &file, char *& dst, uint8_t &cnt) {
@@ -347,7 +325,7 @@ void CardReader::getAbsFilename(char *t) {
*t = '\0';
}
-void CardReader::openFile(char * const path, const bool read, const bool subcall/*=false*/) {
+void CardReader::openFile(char* name, const bool read, const bool subcall/*=false*/) {
if (!cardOK) return;
@@ -357,7 +335,7 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall
if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
SERIAL_ERROR_START();
SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
- SERIAL_ERRORLN((int)SD_PROCEDURE_DEPTH);
+ SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
kill(PSTR(MSG_KILLED));
return;
}
@@ -367,7 +345,7 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall
filespos[file_subcall_ctr] = sdpos;
SERIAL_ECHO_START();
- SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", path);
+ SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", name);
SERIAL_ECHOPAIR("\" parent:\"", proc_filenames[file_subcall_ctr]);
SERIAL_ECHOLNPAIR("\" pos", sdpos);
file_subcall_ctr++;
@@ -388,14 +366,49 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall
SERIAL_ECHO_START();
SERIAL_ECHOPGM("Now ");
serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
- SERIAL_ECHOLNPAIR(" file: ", path);
+ SERIAL_ECHOLNPAIR(" file: ", name);
}
stopSDPrint();
- SdFile *curDir;
- const char * const fname = diveToFile(curDir, path, false);
- if (!fname) return;
+ SdFile myDir;
+ curDir = &root;
+ char *fname = name;
+ char *dirname_start, *dirname_end;
+
+ if (name[0] == '/') {
+ dirname_start = &name[1];
+ while (dirname_start != NULL) {
+ dirname_end = strchr(dirname_start, '/');
+ //SERIAL_ECHOPGM("start:");SERIAL_ECHOLN((int)(dirname_start - name));
+ //SERIAL_ECHOPGM("end :");SERIAL_ECHOLN((int)(dirname_end - name));
+ if (dirname_end != NULL && dirname_end > dirname_start) {
+ char subdirname[FILENAME_LENGTH];
+ strncpy(subdirname, dirname_start, dirname_end - dirname_start);
+ subdirname[dirname_end - dirname_start] = '\0';
+ if (!myDir.open(curDir, subdirname, O_READ)) {
+ SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
+ SERIAL_PROTOCOL(subdirname);
+ SERIAL_PROTOCOLCHAR('.');
+ return;
+ }
+ else {
+ //SERIAL_ECHOLNPGM("dive ok");
+ }
+
+ curDir = &myDir;
+ dirname_start = dirname_end + 1;
+ }
+ else { // the remainder after all /fsa/fdsa/ is the filename
+ fname = dirname_start;
+ //SERIAL_ECHOLNPGM("remainder");
+ //SERIAL_ECHOLN(fname);
+ break;
+ }
+ }
+ }
+ else
+ curDir = &workDir; // Relative paths start in current directory
if (read) {
if (file.open(curDir, fname, O_READ)) {
@@ -404,12 +417,8 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall
SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname);
SERIAL_PROTOCOLLNPAIR(MSG_SD_SIZE, filesize);
SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
-
getfilename(0, fname);
lcd_setstatus(longFilename[0] ? longFilename : fname);
- //if (longFilename[0]) {
- // SERIAL_PROTOCOLPAIR(MSG_SD_FILE_LONG_NAME, longFilename);
- //}
}
else {
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
@@ -425,7 +434,7 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall
}
else {
saving = true;
- SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, path);
+ SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, name);
lcd_setstatus(fname);
}
}
@@ -436,9 +445,40 @@ void CardReader::removeFile(const char * const name) {
stopSDPrint();
- SdFile *curDir;
- const char * const fname = diveToFile(curDir, name, false);
- if (!fname) return;
+ SdFile myDir;
+ curDir = &root;
+ const char *fname = name;
+
+ char *dirname_start, *dirname_end;
+ if (name[0] == '/') {
+ dirname_start = strchr(name, '/') + 1;
+ while (dirname_start != NULL) {
+ dirname_end = strchr(dirname_start, '/');
+ //SERIAL_ECHOPGM("start:");SERIAL_ECHOLN((int)(dirname_start - name));
+ //SERIAL_ECHOPGM("end :");SERIAL_ECHOLN((int)(dirname_end - name));
+ if (dirname_end != NULL && dirname_end > dirname_start) {
+ char subdirname[FILENAME_LENGTH];
+ strncpy(subdirname, dirname_start, dirname_end - dirname_start);
+ subdirname[dirname_end - dirname_start] = 0;
+ SERIAL_ECHOLN(subdirname);
+ if (!myDir.open(curDir, subdirname, O_READ)) {
+ SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, subdirname);
+ SERIAL_PROTOCOLCHAR('.');
+ SERIAL_EOL();
+ return;
+ }
+
+ curDir = &myDir;
+ dirname_start = dirname_end + 1;
+ }
+ else {
+ fname = dirname_start;
+ break;
+ }
+ }
+ }
+ else // Relative paths are rooted in the current directory
+ curDir = &workDir;
if (file.remove(curDir, fname)) {
SERIAL_PROTOCOLPGM("File deleted:");
@@ -456,7 +496,7 @@ void CardReader::removeFile(const char * const name) {
}
void CardReader::getStatus() {
- if (cardOK && sdprinting) {
+ if (cardOK) {
SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
SERIAL_PROTOCOL(sdpos);
SERIAL_PROTOCOLCHAR('/');
@@ -486,46 +526,40 @@ void CardReader::write_command(char *buf) {
}
}
-//
-// Run the next autostart file. Called:
-// - On boot after successful card init
-// - After finishing the previous autostart file
-// - From the LCD command to run the autostart file
-//
+void CardReader::checkautostart(bool force) {
+ if (!force && (!autostart_stilltocheck || PENDING(millis(), next_autostart_ms)))
+ return;
-void CardReader::checkautostart() {
+ autostart_stilltocheck = false;
- if (autostart_index < 0 || sdprinting) return;
+ if (!cardOK) {
+ initsd();
+ if (!cardOK) return; // fail
+ }
- if (!cardOK) initsd();
+ char autoname[10];
+ sprintf_P(autoname, PSTR("auto%i.g"), autostart_index);
+ for (int8_t i = 0; i < (int8_t)strlen(autoname); i++) autoname[i] = tolower(autoname[i]);
- if (cardOK
- #if ENABLED(POWER_LOSS_RECOVERY)
- && !jobRecoverFileExists() // Don't run auto#.g when a resume file exists
- #endif
- ) {
- char autoname[10];
- sprintf_P(autoname, PSTR("auto%i.g"), int(autostart_index));
- dir_t p;
- root.rewind();
- while (root.readDir(&p, NULL) > 0) {
- for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
- if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
- openAndPrintFile(autoname);
- autostart_index++;
- return;
- }
+ dir_t p;
+
+ root.rewind();
+
+ bool found = false;
+ while (root.readDir(p, NULL) > 0) {
+ for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
+ if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
+ openAndPrintFile(autoname);
+ found = true;
}
}
- autostart_index = -1;
+ if (!found)
+ autostart_index = -1;
+ else
+ autostart_index++;
}
-void CardReader::beginautostart() {
- autostart_index = 0;
- setroot();
-}
-
-void CardReader::closefile(const bool store_location) {
+void CardReader::closefile(bool store_location) {
file.sync();
file.close();
saving = logging = false;
@@ -538,7 +572,6 @@ void CardReader::closefile(const bool store_location) {
/**
* Get the name of a file in the current directory by index
- * with optional name to match.
*/
void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
#if ENABLED(SDSORT_CACHE_NAMES)
@@ -555,59 +588,35 @@ void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
return;
}
#endif // SDSORT_CACHE_NAMES
+ curDir = &workDir;
lsAction = LS_GetFilename;
nrFile_index = nr;
- workDir.rewind();
- lsDive(NULL, workDir, match);
+ curDir->rewind();
+ lsDive("", *curDir, match);
}
uint16_t CardReader::getnrfilenames() {
+ curDir = &workDir;
lsAction = LS_Count;
nrFiles = 0;
- workDir.rewind();
- lsDive(NULL, workDir);
+ curDir->rewind();
+ lsDive("", *curDir);
//SERIAL_ECHOLN(nrFiles);
return nrFiles;
}
-/**
- * Dive to the given file path, with optional echo.
- * On exit set curDir and return the name part of the path.
- * A NULL result indicates an unrecoverable error.
- */
-const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, const bool echo) {
- SdFile myDir;
- if (path[0] != '/') { curDir = &workDir; return path; }
-
- curDir = &root;
- const char *dirname_start = &path[1];
- while (dirname_start) {
- char * const dirname_end = strchr(dirname_start, '/');
- if (dirname_end <= dirname_start) break;
- const uint8_t len = dirname_end - dirname_start;
- char dosSubdirname[len + 1];
- strncpy(dosSubdirname, dirname_start, len);
- dosSubdirname[len] = 0;
-
- if (echo) SERIAL_ECHOLN(dosSubdirname);
-
- if (!myDir.open(curDir, dosSubdirname, O_READ)) {
- SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, dosSubdirname);
- SERIAL_PROTOCOLCHAR('.');
- SERIAL_EOL();
- return NULL;
- }
- curDir = &myDir;
- dirname_start = dirname_end + 1;
- }
- return dirname_start;
-}
-
void CardReader::chdir(const char * relpath) {
SdFile newDir;
- SdFile *parent = workDir.isOpen() ? &workDir : &root;
+ SdFile *parent = &root;
- if (newDir.open(parent, relpath, O_READ)) {
+ if (workDir.isOpen()) parent = &workDir;
+
+ if (!newDir.open(*parent, relpath, O_READ)) {
+ SERIAL_ECHO_START();
+ SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
+ SERIAL_ECHOLN(relpath);
+ }
+ else {
workDir = newDir;
if (workDirDepth < MAX_DIR_DEPTH)
workDirParents[workDirDepth++] = workDir;
@@ -615,11 +624,6 @@ void CardReader::chdir(const char * relpath) {
presort();
#endif
}
- else {
- SERIAL_ECHO_START();
- SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
- SERIAL_ECHOLN(relpath);
- }
}
int8_t CardReader::updir() {
@@ -632,16 +636,6 @@ int8_t CardReader::updir() {
return workDirDepth;
}
-void CardReader::setroot() {
- /*if (!workDir.openRoot(&volume)) {
- SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
- }*/
- workDir = root;
- #if ENABLED(SDCARD_SORT_ALPHA)
- presort();
- #endif
-}
-
#if ENABLED(SDCARD_SORT_ALPHA)
/**
@@ -666,14 +660,14 @@ void CardReader::setroot() {
*/
void CardReader::presort() {
- // Throw away old sort index
- flush_presort();
-
// Sorting may be turned off
#if ENABLED(SDSORT_GCODE)
if (!sort_alpha) return;
#endif
+ // Throw away old sort index
+ flush_presort();
+
// If there are files, sort up to the limit
uint16_t fileCnt = getnrfilenames();
if (fileCnt > 0) {
@@ -729,7 +723,7 @@ void CardReader::setroot() {
getfilename(i);
#if ENABLED(SDSORT_DYNAMIC_RAM)
// Use dynamic method to copy long filename
- sortnames[i] = strdup(longest_filename());
+ sortnames[i] = strdup(LONGEST_FILENAME);
#if ENABLED(SDSORT_CACHE_NAMES)
// When caching also store the short name, since
// we're replacing the getfilename() behavior.
@@ -738,10 +732,10 @@ void CardReader::setroot() {
#else
// Copy filenames into the static array
#if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
- strncpy(sortnames[i], longest_filename(), SORTED_LONGNAME_MAXLEN);
+ strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0';
#else
- strncpy(sortnames[i], longest_filename(), SORTED_LONGNAME_MAXLEN);
+ strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
#endif
#if ENABLED(SDSORT_CACHE_NAMES)
strcpy(sortshort[i], filename);
@@ -789,12 +783,12 @@ void CardReader::setroot() {
// throughout the loop. Slow if there are many.
#if DISABLED(SDSORT_USES_RAM)
getfilename(o1);
- strcpy(name1, longest_filename()); // save (or getfilename below will trounce it)
+ strcpy(name1, LONGEST_FILENAME); // save (or getfilename below will trounce it)
#if HAS_FOLDER_SORTING
bool dir1 = filenameIsDir;
#endif
getfilename(o2);
- char *name2 = longest_filename(); // use the string in-place
+ char *name2 = LONGEST_FILENAME; // use the string in-place
#endif // !SDSORT_USES_RAM
// Sort the current pair according to settings.
@@ -832,7 +826,7 @@ void CardReader::setroot() {
getfilename(0);
#if ENABLED(SDSORT_DYNAMIC_RAM)
sortnames = new char*[1];
- sortnames[0] = strdup(longest_filename()); // malloc
+ sortnames[0] = strdup(LONGEST_FILENAME); // malloc
#if ENABLED(SDSORT_CACHE_NAMES)
sortshort = new char*[1];
sortshort[0] = strdup(filename); // malloc
@@ -840,10 +834,10 @@ void CardReader::setroot() {
isDir = new uint8_t[1];
#else
#if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
- strncpy(sortnames[0], longest_filename(), SORTED_LONGNAME_MAXLEN);
+ strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0';
#else
- strncpy(sortnames[0], longest_filename(), SORTED_LONGNAME_MAXLEN);
+ strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
#endif
#if ENABLED(SDSORT_CACHE_NAMES)
strcpy(sortshort[0], filename);
@@ -887,7 +881,7 @@ uint16_t CardReader::get_num_Files() {
}
void CardReader::printingHasFinished() {
- planner.synchronize();
+ stepper.synchronize();
file.close();
if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure.
file_subcall_ctr--;
@@ -897,13 +891,8 @@ void CardReader::printingHasFinished() {
}
else {
sdprinting = false;
-
- #if ENABLED(POWER_LOSS_RECOVERY)
- removeJobRecoveryFile();
- #endif
-
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
- planner.finish_and_disable();
+ stepper.cleaning_buffer_counter = 1; // The command will fire from the Stepper ISR
#endif
print_job_timer.stop();
if (print_job_timer.duration() > 60)
@@ -911,77 +900,11 @@ void CardReader::printingHasFinished() {
#if ENABLED(SDCARD_SORT_ALPHA)
presort();
#endif
- #if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY)
- progress_bar_percent = 0;
- #endif
+
#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
lcd_reselect_last_file();
#endif
}
}
-#if ENABLED(AUTO_REPORT_SD_STATUS)
- uint8_t CardReader::auto_report_sd_interval = 0;
- millis_t CardReader::next_sd_report_ms;
-
- void CardReader::auto_report_sd_status() {
- millis_t current_ms = millis();
- if (auto_report_sd_interval && ELAPSED(current_ms, next_sd_report_ms)) {
- next_sd_report_ms = current_ms + 1000UL * auto_report_sd_interval;
- getStatus();
- }
- }
-#endif // AUTO_REPORT_SD_STATUS
-
-#if ENABLED(POWER_LOSS_RECOVERY)
-
- char job_recovery_file_name[4] = "bin";
-
- void CardReader::openJobRecoveryFile(const bool read) {
- if (!cardOK) return;
- if (jobRecoveryFile.isOpen()) return;
- if (!jobRecoveryFile.open(&root, job_recovery_file_name, read ? O_READ : O_CREAT | O_WRITE | O_TRUNC | O_SYNC)) {
- SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, job_recovery_file_name);
- SERIAL_PROTOCOLCHAR('.');
- SERIAL_EOL();
- }
- else if (!read)
- SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, job_recovery_file_name);
- }
-
- void CardReader::closeJobRecoveryFile() { jobRecoveryFile.close(); }
-
- bool CardReader::jobRecoverFileExists() {
- const bool exists = jobRecoveryFile.open(&root, job_recovery_file_name, O_READ);
- if (exists) jobRecoveryFile.close();
- return exists;
- }
-
- int16_t CardReader::saveJobRecoveryInfo() {
- jobRecoveryFile.seekSet(0);
- const int16_t ret = jobRecoveryFile.write(&job_recovery_info, sizeof(job_recovery_info));
- #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
- if (ret == -1) SERIAL_PROTOCOLLNPGM("Power-loss file write failed.");
- #endif
- return ret;
- }
-
- int16_t CardReader::loadJobRecoveryInfo() {
- return jobRecoveryFile.read(&job_recovery_info, sizeof(job_recovery_info));
- }
-
- void CardReader::removeJobRecoveryFile() {
- job_recovery_info.valid_head = job_recovery_info.valid_foot = job_recovery_commands_count = 0;
- if (jobRecoverFileExists()) {
- closefile();
- removeFile(job_recovery_file_name);
- #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
- SERIAL_PROTOCOLPGM("Power-loss file delete");
- serialprintPGM(jobRecoverFileExists() ? PSTR(" failed.\n") : PSTR("d.\n"));
- #endif
- }
- }
-
-#endif // POWER_LOSS_RECOVERY
-
#endif // SDSUPPORT
diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h
index c043470..5bcdd2b 100644
--- a/Marlin/cardreader.h
+++ b/Marlin/cardreader.h
@@ -27,11 +27,11 @@
#if ENABLED(SDSUPPORT)
-#define SD_RESORT ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_DYNAMIC_RAM)
-
#define MAX_DIR_DEPTH 10 // Maximum folder depth
#include "SdFile.h"
+#include "types.h"
+#include "enum.h"
class CardReader {
public:
@@ -39,25 +39,22 @@ public:
void initsd();
void write_command(char *buf);
+ // Files auto[0-9].g on the sd card are performed in sequence.
+ // This is to delay autostart and hence the initialisation of
+ // the sd card to some seconds after the normal init, so the
+ // device is available soon after a reset.
- void beginautostart();
- void checkautostart();
-
- void openFile(char * const path, const bool read, const bool subcall=false);
- void openLogFile(char * const path);
+ void checkautostart(bool x);
+ void openFile(char* name, const bool read, const bool subcall=false);
+ void openLogFile(char* name);
void removeFile(const char * const name);
- void closefile(const bool store_location=false);
+ void closefile(bool store_location=false);
void release();
void openAndPrintFile(const char *name);
void startFileprint();
- void stopSDPrint(
- #if SD_RESORT
- const bool re_sort=false
- #endif
- );
+ void stopSDPrint();
void getStatus();
void printingHasFinished();
- void printFilename();
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
void printLongPath(char *path);
@@ -73,8 +70,6 @@ public:
int8_t updir();
void setroot();
- const char* diveToFile(SdFile*& curDir, const char * const path, const bool echo);
-
uint16_t get_num_Files();
#if ENABLED(SDCARD_SORT_ALPHA)
@@ -87,41 +82,20 @@ public:
#endif
#endif
- #if ENABLED(POWER_LOSS_RECOVERY)
- void openJobRecoveryFile(const bool read);
- void closeJobRecoveryFile();
- bool jobRecoverFileExists();
- int16_t saveJobRecoveryInfo();
- int16_t loadJobRecoveryInfo();
- void removeJobRecoveryFile();
- #endif
-
FORCE_INLINE void pauseSDPrint() { sdprinting = false; }
FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
FORCE_INLINE bool eof() { return sdpos >= filesize; }
FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
- FORCE_INLINE void setIndex(const uint32_t index) { sdpos = index; file.seekSet(index); }
- FORCE_INLINE uint32_t getIndex() { return sdpos; }
+ FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); }
FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
- #if ENABLED(AUTO_REPORT_SD_STATUS)
- void auto_report_sd_status(void);
- FORCE_INLINE void set_auto_report_interval(uint8_t v) {
- NOMORE(v, 60);
- auto_report_sd_interval = v;
- next_sd_report_ms = millis() + 1000UL * v;
- }
- #endif
-
- FORCE_INLINE char* longest_filename() { return longFilename[0] ? longFilename : filename; }
-
public:
- bool saving, logging, sdprinting, cardOK, filenameIsDir, abort_sd_printing;
+ bool saving, logging, sdprinting, cardOK, filenameIsDir;
char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
- int8_t autostart_index;
+ int autostart_index;
private:
- SdFile root, workDir, workDirParents[MAX_DIR_DEPTH];
+ SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH];
uint8_t workDirDepth;
// Sort files and folders alphabetically.
@@ -174,14 +148,10 @@ private:
#endif // SDCARD_SORT_ALPHA
- Sd2Card sd2card;
+ Sd2Card card;
SdVolume volume;
SdFile file;
- #if ENABLED(POWER_LOSS_RECOVERY)
- SdFile jobRecoveryFile;
- #endif
-
#define SD_PROCEDURE_DEPTH 1
#define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
uint8_t file_subcall_ctr;
@@ -189,6 +159,9 @@ private:
char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
uint32_t filesize, sdpos;
+ millis_t next_autostart_ms;
+ bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
+
LsAction lsAction; //stored for recursion.
uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
char* diveDirName;
@@ -197,22 +170,17 @@ private:
#if ENABLED(SDCARD_SORT_ALPHA)
void flush_presort();
#endif
-
- #if ENABLED(AUTO_REPORT_SD_STATUS)
- static uint8_t auto_report_sd_interval;
- static millis_t next_sd_report_ms;
- #endif
};
#if PIN_EXISTS(SD_DETECT)
#if ENABLED(SD_DETECT_INVERTED)
- #define IS_SD_INSERTED() READ(SD_DETECT_PIN)
+ #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == HIGH)
#else
- #define IS_SD_INSERTED() !READ(SD_DETECT_PIN)
+ #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == LOW)
#endif
#else
// No card detect line? Assume the card is inserted.
- #define IS_SD_INSERTED() true
+ #define IS_SD_INSERTED true
#endif
extern CardReader card;
@@ -220,11 +188,11 @@ extern CardReader card;
#endif // SDSUPPORT
#if ENABLED(SDSUPPORT)
- #define IS_SD_PRINTING() card.sdprinting
- #define IS_SD_FILE_OPEN() card.isFileOpen()
+ #define IS_SD_PRINTING (card.sdprinting)
+ #define IS_SD_FILE_OPEN (card.isFileOpen())
#else
- #define IS_SD_PRINTING() false
- #define IS_SD_FILE_OPEN() false
+ #define IS_SD_PRINTING (false)
+ #define IS_SD_FILE_OPEN (false)
#endif
#endif // _CARDREADER_H_
diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp
index 6ec8f53..2da7cbf 100644
--- a/Marlin/configuration_store.cpp
+++ b/Marlin/configuration_store.cpp
@@ -36,15 +36,160 @@
*
*/
-// Change EEPROM version if the structure changes
-#define EEPROM_VERSION "V55"
+#define EEPROM_VERSION "V47"
+
+// Change EEPROM version if these are changed:
#define EEPROM_OFFSET 100
-// Check the integrity of data offsets.
-// Can be disabled for production build.
-//#define DEBUG_EEPROM_READWRITE
-
+/**
+ * V47 EEPROM Layout:
+ *
+ * 100 Version (char x4)
+ * 104 EEPROM CRC16 (uint16_t)
+ *
+ * 106 E_STEPPERS (uint8_t)
+ * 107 M92 XYZE planner.axis_steps_per_mm (float x4 ... x8) + 64
+ * 123 M203 XYZE planner.max_feedrate_mm_s (float x4 ... x8) + 64
+ * 139 M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4 ... x8) + 64
+ * 155 M204 P planner.acceleration (float)
+ * 159 M204 R planner.retract_acceleration (float)
+ * 163 M204 T planner.travel_acceleration (float)
+ * 167 M205 S planner.min_feedrate_mm_s (float)
+ * 171 M205 T planner.min_travel_feedrate_mm_s (float)
+ * 175 M205 B planner.min_segment_time_us (ulong)
+ * 179 M205 X planner.max_jerk[X_AXIS] (float)
+ * 183 M205 Y planner.max_jerk[Y_AXIS] (float)
+ * 187 M205 Z planner.max_jerk[Z_AXIS] (float)
+ * 191 M205 E planner.max_jerk[E_AXIS] (float)
+ * 195 M206 XYZ home_offset (float x3)
+ * 207 M218 XYZ hotend_offset (float x3 per additional hotend) +16
+ *
+ * Global Leveling: 4 bytes
+ * 219 z_fade_height (float)
+ *
+ * MESH_BED_LEVELING: 43 bytes
+ * 223 M420 S planner.leveling_active (bool)
+ * 224 mbl.z_offset (float)
+ * 228 GRID_MAX_POINTS_X (uint8_t)
+ * 229 GRID_MAX_POINTS_Y (uint8_t)
+ * 230 G29 S3 XYZ z_values[][] (float x9, up to float x81) +288
+ *
+ * HAS_BED_PROBE: 4 bytes
+ * 266 M851 zprobe_zoffset (float)
+ *
+ * ABL_PLANAR: 36 bytes
+ * 270 planner.bed_level_matrix (matrix_3x3 = float x9)
+ *
+ * AUTO_BED_LEVELING_BILINEAR: 46 bytes
+ * 306 GRID_MAX_POINTS_X (uint8_t)
+ * 307 GRID_MAX_POINTS_Y (uint8_t)
+ * 308 bilinear_grid_spacing (int x2)
+ * 312 G29 L F bilinear_start (int x2)
+ * 316 z_values[][] (float x9, up to float x256) +988
+ *
+ * AUTO_BED_LEVELING_UBL: 2 bytes
+ * 352 G29 A planner.leveling_active (bool)
+ * 353 G29 S ubl.storage_slot (int8_t)
+ *
+ * DELTA: 44 bytes
+ * 354 M666 H delta_height (float)
+ * 358 M666 XYZ delta_endstop_adj (float x3)
+ * 370 M665 R delta_radius (float)
+ * 374 M665 L delta_diagonal_rod (float)
+ * 378 M665 S delta_segments_per_second (float)
+ * 382 M665 B delta_calibration_radius (float)
+ * 386 M665 X delta_tower_angle_trim[A] (float)
+ * 390 M665 Y delta_tower_angle_trim[B] (float)
+ * 394 M665 Z delta_tower_angle_trim[C] (float)
+ *
+ * [XYZ]_DUAL_ENDSTOPS: 12 bytes
+ * 354 M666 X x_endstop_adj (float)
+ * 358 M666 Y y_endstop_adj (float)
+ * 362 M666 Z z_endstop_adj (float)
+ *
+ * ULTIPANEL: 6 bytes
+ * 398 M145 S0 H lcd_preheat_hotend_temp (int x2)
+ * 402 M145 S0 B lcd_preheat_bed_temp (int x2)
+ * 406 M145 S0 F lcd_preheat_fan_speed (int x2)
+ *
+ * PIDTEMP: 82 bytes
+ * 410 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
+ * 426 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
+ * 442 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
+ * 458 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
+ * 474 M301 E4 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
+ * 490 M301 L lpq_len (int)
+ *
+ * PIDTEMPBED: 12 bytes
+ * 492 M304 PID bedKp, .bedKi, .bedKd (float x3)
+ *
+ * DOGLCD: 2 bytes
+ * 504 M250 C lcd_contrast (uint16_t)
+ *
+ * FWRETRACT: 33 bytes
+ * 506 M209 S autoretract_enabled (bool)
+ * 507 M207 S retract_length (float)
+ * 511 M207 F retract_feedrate_mm_s (float)
+ * 515 M207 Z retract_zlift (float)
+ * 519 M208 S retract_recover_length (float)
+ * 523 M208 F retract_recover_feedrate_mm_s (float)
+ * 527 M207 W swap_retract_length (float)
+ * 531 M208 W swap_retract_recover_length (float)
+ * 535 M208 R swap_retract_recover_feedrate_mm_s (float)
+ *
+ * Volumetric Extrusion: 21 bytes
+ * 539 M200 D parser.volumetric_enabled (bool)
+ * 540 M200 T D planner.filament_size (float x5) (T0..3)
+ *
+ * HAS_TRINAMIC: 22 bytes
+ * 560 M906 X Stepper X current (uint16_t)
+ * 562 M906 Y Stepper Y current (uint16_t)
+ * 564 M906 Z Stepper Z current (uint16_t)
+ * 566 M906 X2 Stepper X2 current (uint16_t)
+ * 568 M906 Y2 Stepper Y2 current (uint16_t)
+ * 570 M906 Z2 Stepper Z2 current (uint16_t)
+ * 572 M906 E0 Stepper E0 current (uint16_t)
+ * 574 M906 E1 Stepper E1 current (uint16_t)
+ * 576 M906 E2 Stepper E2 current (uint16_t)
+ * 578 M906 E3 Stepper E3 current (uint16_t)
+ * 580 M906 E4 Stepper E4 current (uint16_t)
+ *
+ * SENSORLESS HOMING 4 bytes
+ * 582 M914 X Stepper X and X2 threshold (int16_t)
+ * 584 M914 Y Stepper Y and Y2 threshold (int16_t)
+ *
+ * LIN_ADVANCE: 8 bytes
+ * 586 M900 K extruder_advance_k (float)
+ * 590 M900 WHD advance_ed_ratio (float)
+ *
+ * HAS_MOTOR_CURRENT_PWM:
+ * 594 M907 X Stepper XY current (uint32_t)
+ * 598 M907 Z Stepper Z current (uint32_t)
+ * 602 M907 E Stepper E current (uint32_t)
+ *
+ * CNC_COORDINATE_SYSTEMS 108 bytes
+ * 606 G54-G59.3 coordinate_system (float x 27)
+ *
+ * SKEW_CORRECTION: 12 bytes
+ * 714 M852 I planner.xy_skew_factor (float)
+ * 718 M852 J planner.xz_skew_factor (float)
+ * 722 M852 K planner.yz_skew_factor (float)
+ *
+ * 726 Minimum end-point
+ * 2255 (726 + 208 + 36 + 9 + 288 + 988) Maximum end-point
+ *
+ * ========================================================================
+ * meshes_begin (between max and min end-point, directly above)
+ * -- MESHES --
+ * meshes_end
+ * -- MAT (Mesh Allocation Table) -- 128 bytes (placeholder size)
+ * mat_end = E2END (0xFFF)
+ *
+ */
#include "configuration_store.h"
+
+MarlinSettings settings;
+
#include "Marlin.h"
#include "language.h"
#include "endstops.h"
@@ -52,8 +197,7 @@
#include "temperature.h"
#include "ultralcd.h"
#include "stepper.h"
-#include "parser.h"
-#include "vector_3.h"
+#include "gcode.h"
#if ENABLED(MESH_BED_LEVELING)
#include "mesh_bed_leveling.h"
@@ -61,238 +205,23 @@
#if HAS_TRINAMIC
#include "stepper_indirection.h"
- #include "tmc_util.h"
- #define TMC_GET_PWMTHRS(A,Q) _tmc_thrs(stepper##Q.microsteps(), stepper##Q.TPWMTHRS(), planner.axis_steps_per_mm[_AXIS(A)])
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
#include "ubl.h"
#endif
-#if ENABLED(FWRETRACT)
- #include "fwretract.h"
-#endif
-
-#if ENABLED(PID_EXTRUSION_SCALING)
- #define LPQ_LEN thermalManager.lpq_len
-#endif
-
-#pragma pack(push, 1) // No padding between variables
-
-typedef struct PID { float Kp, Ki, Kd; } PID;
-typedef struct PIDC { float Kp, Ki, Kd, Kc; } PIDC;
-
-/**
- * Current EEPROM Layout
- *
- * Keep this data structure up to date so
- * EEPROM size is known at compile time!
- */
-typedef struct SettingsDataStruct {
- char version[4]; // Vnn\0
- uint16_t crc; // Data Checksum
-
- //
- // DISTINCT_E_FACTORS
- //
- uint8_t esteppers; // NUM_AXIS_N - MOV_AXIS
-
- uint32_t planner_max_acceleration_mm_per_s2[NUM_AXIS_N], // M201 XYZE/ABCDE planner.max_acceleration_mm_per_s2[NUM_AXIS_N]
- planner_min_segment_time_us; // M205 Q planner.min_segment_time_us
- float planner_axis_steps_per_mm[NUM_AXIS_N], // M92 XYZE/ABCDE planner.axis_steps_per_mm[NUM_AXIS_N]
- planner_max_feedrate_mm_s[NUM_AXIS_N], // M203 XYZE/ABCDE planner.max_feedrate_mm_s[NUM_AXIS_N]
- planner_acceleration, // M204 P planner.acceleration
- planner_retract_acceleration, // M204 R planner.retract_acceleration
- planner_travel_acceleration, // M204 T planner.travel_acceleration
- planner_min_feedrate_mm_s, // M205 S planner.min_feedrate_mm_s
- planner_min_travel_feedrate_mm_s, // M205 T planner.min_travel_feedrate_mm_s
- planner_max_jerk[NUM_AXIS], // M205 XYZE/ABCDE planner.max_jerk[NUM_AXIS]
- planner_junction_deviation_mm; // M205 J planner.junction_deviation_mm
-
- float home_offset[XYZ]; // M206 XYZ
-
- #if HOTENDS > 1
- float hotend_offset[XYZ][HOTENDS - 1]; // M218 XYZ
- #endif
-
- //
- // ENABLE_LEVELING_FADE_HEIGHT
- //
- float planner_z_fade_height; // M420 Zn planner.z_fade_height
-
- //
- // MESH_BED_LEVELING
- //
- float mbl_z_offset; // mbl.z_offset
- uint8_t mesh_num_x, mesh_num_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
- #if ENABLED(MESH_BED_LEVELING)
- float mbl_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; // mbl.z_values
- #else
- float mbl_z_values[3][3];
- #endif
-
- //
- // HAS_BED_PROBE
- //
- float zprobe_zoffset; // M851 Z
-
- //
- // ABL_PLANAR
- //
- matrix_3x3 planner_bed_level_matrix; // planner.bed_level_matrix
-
- //
- // AUTO_BED_LEVELING_BILINEAR
- //
- uint8_t grid_max_x, grid_max_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
- int bilinear_grid_spacing[2],
- bilinear_start[2]; // G29 L F
- #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
- float z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; // G29
- #else
- float z_values[3][3];
- #endif
-
- //
- // AUTO_BED_LEVELING_UBL
- //
- bool planner_leveling_active; // M420 S planner.leveling_active
- int8_t ubl_storage_slot; // ubl.storage_slot
-
- //
- // DELTA / [XYZ]_DUAL_ENDSTOPS
- //
- #if ENABLED(DELTA)
-
- float delta_height, // M666 H
- delta_endstop_adj[ABC], // M666 XYZ
- delta_radius, // M665 R
- delta_diagonal_rod, // M665 L
- delta_segments_per_second, // M665 S
- delta_calibration_radius, // M665 B
- delta_tower_angle_trim[ABC]; // M665 XYZ
-
- #elif ENABLED(HANGPRINTER)
-
- float anchor_A_y, // M665 W
- anchor_A_z, // M665 E
- anchor_B_x, // M665 R
- anchor_B_y, // M665 T
- anchor_B_z, // M665 Y
- anchor_C_x, // M665 U
- anchor_C_y, // M665 I
- anchor_C_z, // M665 O
- anchor_D_z, // M665 P
- delta_segments_per_second, // M665 S
- hangprinter_calibration_radius_placeholder;
-
- #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
-
- float x_endstop_adj, // M666 X
- y_endstop_adj, // M666 Y
- z_endstop_adj; // M666 Z
-
- #endif
-
- //
- // ULTIPANEL
- //
- int16_t lcd_preheat_hotend_temp[2], // M145 S0 H
- lcd_preheat_bed_temp[2], // M145 S0 B
- lcd_preheat_fan_speed[2]; // M145 S0 F
-
- //
- // PIDTEMP
- //
- PIDC hotendPID[MAX_EXTRUDERS]; // M301 En PIDC / M303 En U
-
- int16_t lpq_len; // M301 L
-
- //
- // PIDTEMPBED
- //
- PID bedPID; // M304 PID / M303 E-1 U
-
- //
- // HAS_LCD_CONTRAST
- //
- int16_t lcd_contrast; // M250 C
-
- //
- // FWRETRACT
- //
- bool autoretract_enabled; // M209 S
- float retract_length, // M207 S
- retract_feedrate_mm_s, // M207 F
- retract_zlift, // M207 Z
- retract_recover_length, // M208 S
- retract_recover_feedrate_mm_s, // M208 F
- swap_retract_length, // M207 W
- swap_retract_recover_length, // M208 W
- swap_retract_recover_feedrate_mm_s; // M208 R
-
- //
- // !NO_VOLUMETRIC
- //
- bool parser_volumetric_enabled; // M200 D parser.volumetric_enabled
- float planner_filament_size[MAX_EXTRUDERS]; // M200 T D planner.filament_size[]
-
- //
- // HAS_TRINAMIC
- //
- #define TMC_AXES (MAX_EXTRUDERS + 6)
- uint16_t tmc_stepper_current[TMC_AXES]; // M906 X Y Z X2 Y2 Z2 E0 E1 E2 E3 E4
- uint32_t tmc_hybrid_threshold[TMC_AXES]; // M913 X Y Z X2 Y2 Z2 E0 E1 E2 E3 E4
- int16_t tmc_sgt[XYZ]; // M914 X Y Z
-
- //
- // LIN_ADVANCE
- //
- float planner_extruder_advance_K; // M900 K planner.extruder_advance_K
-
- //
- // HAS_MOTOR_CURRENT_PWM
- //
- uint32_t motor_current_setting[XYZ]; // M907 X Z E
-
- //
- // CNC_COORDINATE_SYSTEMS
- //
- float coordinate_system[MAX_COORDINATE_SYSTEMS][XYZ]; // G54-G59.3
-
- //
- // SKEW_CORRECTION
- //
- float planner_xy_skew_factor, // M852 I planner.xy_skew_factor
- planner_xz_skew_factor, // M852 J planner.xz_skew_factor
- planner_yz_skew_factor; // M852 K planner.yz_skew_factor
-
- //
- // ADVANCED_PAUSE_FEATURE
- //
- float filament_change_unload_length[MAX_EXTRUDERS], // M603 T U
- filament_change_load_length[MAX_EXTRUDERS]; // M603 T L
-
-} SettingsData;
-
-#pragma pack(pop)
-
-MarlinSettings settings;
-
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
extern void refresh_bed_level();
#endif
-uint16_t MarlinSettings::datasize() { return sizeof(SettingsData); }
-
-/**
- * Post-process after Retrieve or Reset
- */
-
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
float new_z_fade_height;
#endif
+/**
+ * Post-process after Retrieve or Reset
+ */
void MarlinSettings::postprocess() {
const float oldpos[] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
@@ -303,8 +232,6 @@ void MarlinSettings::postprocess() {
// planner position so the stepper counts will be set correctly.
#if ENABLED(DELTA)
recalc_delta_settings();
- #elif ENABLED(HANGPRINTER)
- recalc_hangprinter_settings();
#endif
#if ENABLED(PIDTEMP)
@@ -313,9 +240,6 @@ void MarlinSettings::postprocess() {
#if DISABLED(NO_VOLUMETRICS)
planner.calculate_volumetric_multipliers();
- #else
- for (uint8_t i = COUNT(planner.e_factor); i--;)
- planner.refresh_e_factor(i);
#endif
#if HAS_HOME_OFFSET || ENABLED(DUAL_X_CARRIAGE)
@@ -329,20 +253,13 @@ void MarlinSettings::postprocess() {
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
refresh_bed_level();
+ //set_bed_leveling_enabled(leveling_is_on);
#endif
#if HAS_MOTOR_CURRENT_PWM
stepper.refresh_motor_power();
#endif
- #if ENABLED(FWRETRACT)
- fwretract.refresh_autoretract();
- #endif
-
- #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE)
- planner.recalculate_max_e_jerk();
- #endif
-
// Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
// and init stepper.count[], planner.position[] with current_position
planner.refresh_positioning();
@@ -359,25 +276,18 @@ void MarlinSettings::postprocess() {
#define EEPROM_SKIP(VAR) eeprom_index += sizeof(VAR)
#define EEPROM_WRITE(VAR) write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
#define EEPROM_READ(VAR) read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
- #define EEPROM_READ_ALWAYS(VAR) read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, true)
- #define EEPROM_ASSERT(TST,ERR) if (!(TST)) do{ SERIAL_ERROR_START(); SERIAL_ERRORLNPGM(ERR); eeprom_error = true; }while(0)
-
- #if ENABLED(DEBUG_EEPROM_READWRITE)
- #define _FIELD_TEST(FIELD) \
- EEPROM_ASSERT( \
- eeprom_error || eeprom_index == offsetof(SettingsData, FIELD) + EEPROM_OFFSET, \
- "Field " STRINGIFY(FIELD) " mismatch." \
- )
- #else
- #define _FIELD_TEST(FIELD) NOOP
- #endif
+ #define EEPROM_ASSERT(TST,ERR) if (!(TST)) do{ SERIAL_ERROR_START(); SERIAL_ERRORLNPGM(ERR); eeprom_read_error = true; }while(0)
const char version[4] = EEPROM_VERSION;
- bool MarlinSettings::eeprom_error, MarlinSettings::validating;
+ bool MarlinSettings::eeprom_error;
+
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
+ int16_t MarlinSettings::meshes_begin;
+ #endif
void MarlinSettings::write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
- if (eeprom_error) { pos += size; return; }
+ if (eeprom_error) return;
while (size--) {
uint8_t * const p = (uint8_t * const)pos;
uint8_t v = *value;
@@ -398,32 +308,23 @@ void MarlinSettings::postprocess() {
};
}
- void MarlinSettings::read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool force/*=false*/) {
- if (eeprom_error) { pos += size; return; }
+ void MarlinSettings::read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
+ if (eeprom_error) return;
do {
uint8_t c = eeprom_read_byte((unsigned char*)pos);
- if (!validating || force) *value = c;
+ *value = c;
crc16(crc, &c, 1);
pos++;
value++;
} while (--size);
}
- bool MarlinSettings::size_error(const uint16_t size) {
- if (size != datasize()) {
- SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM("EEPROM datasize error.");
- return true;
- }
- return false;
- }
-
/**
* M500 - Store Configuration
*/
bool MarlinSettings::save() {
- float dummy = 0;
- char ver[4] = "ERR";
+ float dummy = 0.0f;
+ char ver[4] = "000";
uint16_t working_crc = 0;
@@ -436,39 +337,20 @@ void MarlinSettings::postprocess() {
working_crc = 0; // clear before first "real data"
- _FIELD_TEST(esteppers);
-
- const uint8_t esteppers = NUM_AXIS_N - MOV_AXIS;
+ const uint8_t esteppers = COUNT(planner.axis_steps_per_mm) - XYZ;
EEPROM_WRITE(esteppers);
- EEPROM_WRITE(planner.max_acceleration_mm_per_s2);
- EEPROM_WRITE(planner.min_segment_time_us);
EEPROM_WRITE(planner.axis_steps_per_mm);
EEPROM_WRITE(planner.max_feedrate_mm_s);
+ EEPROM_WRITE(planner.max_acceleration_mm_per_s2);
+
EEPROM_WRITE(planner.acceleration);
EEPROM_WRITE(planner.retract_acceleration);
EEPROM_WRITE(planner.travel_acceleration);
EEPROM_WRITE(planner.min_feedrate_mm_s);
EEPROM_WRITE(planner.min_travel_feedrate_mm_s);
-
- #if ENABLED(JUNCTION_DEVIATION)
- const float planner_max_jerk[] = {
- #if ENABLED(HANGPRINTER)
- float(DEFAULT_AJERK), float(DEFAULT_BJERK), float(DEFAULT_CJERK), float(DEFAULT_DJERK), float(DEFAULT_EJERK)
- #else
- float(DEFAULT_XJERK), float(DEFAULT_YJERK), float(DEFAULT_ZJERK), float(DEFAULT_EJERK)
- #endif
- };
- EEPROM_WRITE(planner_max_jerk);
- EEPROM_WRITE(planner.junction_deviation_mm);
- #else
- EEPROM_WRITE(planner.max_jerk);
- dummy = 0.02f;
- EEPROM_WRITE(dummy);
- #endif
-
- _FIELD_TEST(home_offset);
-
+ EEPROM_WRITE(planner.min_segment_time_us);
+ EEPROM_WRITE(planner.max_jerk);
#if !HAS_HOME_OFFSET
const float home_offset[XYZ] = { 0 };
#endif
@@ -502,21 +384,22 @@ void MarlinSettings::postprocess() {
"MBL Z array is the wrong size."
);
const uint8_t mesh_num_x = GRID_MAX_POINTS_X, mesh_num_y = GRID_MAX_POINTS_Y;
+ EEPROM_WRITE(mbl.has_mesh);
EEPROM_WRITE(mbl.z_offset);
EEPROM_WRITE(mesh_num_x);
EEPROM_WRITE(mesh_num_y);
EEPROM_WRITE(mbl.z_values);
#else // For disabled MBL write a default mesh
- dummy = 0;
+ const bool leveling_is_on = false;
+ dummy = 0.0f;
const uint8_t mesh_num_x = 3, mesh_num_y = 3;
+ EEPROM_WRITE(leveling_is_on);
EEPROM_WRITE(dummy); // z_offset
EEPROM_WRITE(mesh_num_x);
EEPROM_WRITE(mesh_num_y);
for (uint8_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_WRITE(dummy);
#endif // MESH_BED_LEVELING
- _FIELD_TEST(zprobe_zoffset);
-
#if !HAS_BED_PROBE
const float zprobe_zoffset = 0;
#endif
@@ -529,7 +412,7 @@ void MarlinSettings::postprocess() {
#if ABL_PLANAR
EEPROM_WRITE(planner.bed_level_matrix);
#else
- dummy = 0;
+ dummy = 0.0;
for (uint8_t q = 9; q--;) EEPROM_WRITE(dummy);
#endif
@@ -553,7 +436,7 @@ void MarlinSettings::postprocess() {
// For disabled Bilinear Grid write an empty 3x3 grid
const uint8_t grid_max_x = 3, grid_max_y = 3;
const int bilinear_start[2] = { 0 }, bilinear_grid_spacing[2] = { 0 };
- dummy = 0;
+ dummy = 0.0f;
EEPROM_WRITE(grid_max_x);
EEPROM_WRITE(grid_max_y);
EEPROM_WRITE(bilinear_grid_spacing);
@@ -561,8 +444,6 @@ void MarlinSettings::postprocess() {
for (uint16_t q = grid_max_x * grid_max_y; q--;) EEPROM_WRITE(dummy);
#endif // AUTO_BED_LEVELING_BILINEAR
- _FIELD_TEST(planner_leveling_active);
-
#if ENABLED(AUTO_BED_LEVELING_UBL)
EEPROM_WRITE(planner.leveling_active);
EEPROM_WRITE(ubl.storage_slot);
@@ -575,9 +456,6 @@ void MarlinSettings::postprocess() {
// 11 floats for DELTA / [XYZ]_DUAL_ENDSTOPS
#if ENABLED(DELTA)
-
- _FIELD_TEST(delta_height);
-
EEPROM_WRITE(delta_height); // 1 float
EEPROM_WRITE(delta_endstop_adj); // 3 floats
EEPROM_WRITE(delta_radius); // 1 float
@@ -586,54 +464,38 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(delta_calibration_radius); // 1 float
EEPROM_WRITE(delta_tower_angle_trim); // 3 floats
- #elif ENABLED(HANGPRINTER)
-
- dummy = 0.0f;
- _FIELD_TEST(anchor_A_y);
- EEPROM_WRITE(anchor_A_y); // 1 float
- EEPROM_WRITE(anchor_A_z); // 1 float
- EEPROM_WRITE(anchor_B_x); // 1 float
- EEPROM_WRITE(anchor_B_y); // 1 float
- EEPROM_WRITE(anchor_B_z); // 1 float
- EEPROM_WRITE(anchor_C_x); // 1 float
- EEPROM_WRITE(anchor_C_y); // 1 float
- EEPROM_WRITE(anchor_C_z); // 1 float
- EEPROM_WRITE(anchor_D_z); // 1 float
- EEPROM_WRITE(delta_segments_per_second); // 1 float
- EEPROM_WRITE(dummy); // 1 float
-
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
-
- _FIELD_TEST(x_endstop_adj);
-
// Write dual endstops in X, Y, Z order. Unused = 0.0
- dummy = 0;
+ dummy = 0.0f;
#if ENABLED(X_DUAL_ENDSTOPS)
- EEPROM_WRITE(endstops.x_endstop_adj); // 1 float
+ EEPROM_WRITE(x_endstop_adj); // 1 float
#else
EEPROM_WRITE(dummy);
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
- EEPROM_WRITE(endstops.y_endstop_adj); // 1 float
+ EEPROM_WRITE(y_endstop_adj); // 1 float
#else
EEPROM_WRITE(dummy);
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
- EEPROM_WRITE(endstops.z_endstop_adj); // 1 float
+ EEPROM_WRITE(z_endstop_adj); // 1 float
#else
EEPROM_WRITE(dummy);
#endif
+ for (uint8_t q = 8; q--;) EEPROM_WRITE(dummy);
+
+ #else
+ dummy = 0.0f;
+ for (uint8_t q = 11; q--;) EEPROM_WRITE(dummy);
#endif
- _FIELD_TEST(lcd_preheat_hotend_temp);
-
#if DISABLED(ULTIPANEL)
- constexpr int16_t lcd_preheat_hotend_temp[2] = { PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND },
- lcd_preheat_bed_temp[2] = { PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED },
- lcd_preheat_fan_speed[2] = { PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED };
+ constexpr int lcd_preheat_hotend_temp[2] = { PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND },
+ lcd_preheat_bed_temp[2] = { PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED },
+ lcd_preheat_fan_speed[2] = { PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED };
#endif
EEPROM_WRITE(lcd_preheat_hotend_temp);
@@ -659,18 +521,16 @@ void MarlinSettings::postprocess() {
{
dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
EEPROM_WRITE(dummy); // Kp
- dummy = 0;
+ dummy = 0.0f;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy); // Ki, Kd, Kc
}
} // Hotends Loop
- _FIELD_TEST(lpq_len);
-
#if DISABLED(PID_EXTRUSION_SCALING)
- const int16_t LPQ_LEN = 20;
+ int lpq_len = 20;
#endif
- EEPROM_WRITE(LPQ_LEN);
+ EEPROM_WRITE(lpq_len);
#if DISABLED(PIDTEMPBED)
dummy = DUMMY_PID_VALUE;
@@ -681,36 +541,35 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(thermalManager.bedKd);
#endif
- _FIELD_TEST(lcd_contrast);
-
#if !HAS_LCD_CONTRAST
- const int16_t lcd_contrast = 32;
+ const uint16_t lcd_contrast = 32;
#endif
EEPROM_WRITE(lcd_contrast);
#if DISABLED(FWRETRACT)
const bool autoretract_enabled = false;
- const float autoretract_defaults[] = { 3, 45, 0, 0, 0, 13, 0, 8 };
- EEPROM_WRITE(autoretract_enabled);
- EEPROM_WRITE(autoretract_defaults);
- #else
- EEPROM_WRITE(fwretract.autoretract_enabled);
- EEPROM_WRITE(fwretract.retract_length);
- EEPROM_WRITE(fwretract.retract_feedrate_mm_s);
- EEPROM_WRITE(fwretract.retract_zlift);
- EEPROM_WRITE(fwretract.retract_recover_length);
- EEPROM_WRITE(fwretract.retract_recover_feedrate_mm_s);
- EEPROM_WRITE(fwretract.swap_retract_length);
- EEPROM_WRITE(fwretract.swap_retract_recover_length);
- EEPROM_WRITE(fwretract.swap_retract_recover_feedrate_mm_s);
+ const float retract_length = 3,
+ retract_feedrate_mm_s = 45,
+ retract_zlift = 0,
+ retract_recover_length = 0,
+ retract_recover_feedrate_mm_s = 0,
+ swap_retract_length = 13,
+ swap_retract_recover_length = 0,
+ swap_retract_recover_feedrate_mm_s = 8;
#endif
+ EEPROM_WRITE(autoretract_enabled);
+ EEPROM_WRITE(retract_length);
+ EEPROM_WRITE(retract_feedrate_mm_s);
+ EEPROM_WRITE(retract_zlift);
+ EEPROM_WRITE(retract_recover_length);
+ EEPROM_WRITE(retract_recover_feedrate_mm_s);
+ EEPROM_WRITE(swap_retract_length);
+ EEPROM_WRITE(swap_retract_recover_length);
+ EEPROM_WRITE(swap_retract_recover_feedrate_mm_s);
//
// Volumetric & Filament Size
//
-
- _FIELD_TEST(parser_volumetric_enabled);
-
#if DISABLED(NO_VOLUMETRICS)
EEPROM_WRITE(parser.volumetric_enabled);
@@ -721,257 +580,152 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(dummy);
}
- #else
-
- const bool volumetric_enabled = false;
- dummy = DEFAULT_NOMINAL_FILAMENT_DIA;
- EEPROM_WRITE(volumetric_enabled);
- for (uint8_t q = MAX_EXTRUDERS; q--;) EEPROM_WRITE(dummy);
-
#endif
- //
// Save TMC2130 or TMC2208 Configuration, and placeholder values
- //
-
- _FIELD_TEST(tmc_stepper_current);
-
- uint16_t tmc_stepper_current[TMC_AXES] = {
- #if HAS_TRINAMIC
- #if AXIS_IS_TMC(X)
- stepperX.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(Y)
- stepperY.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(Z)
- stepperZ.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(X2)
- stepperX2.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(Y2)
- stepperY2.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(Z2)
- stepperZ2.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(E0)
- stepperE0.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(E1)
- stepperE1.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(E2)
- stepperE2.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(E3)
- stepperE3.getCurrent(),
- #else
- 0,
- #endif
- #if AXIS_IS_TMC(E4)
- stepperE4.getCurrent()
- #else
- 0
- #endif
+ uint16_t val;
+ #if HAS_TRINAMIC
+ #if X_IS_TRINAMIC
+ val = stepperX.getCurrent();
#else
- 0
+ val = 0;
#endif
- };
- EEPROM_WRITE(tmc_stepper_current);
-
- //
- // Save TMC2130 or TMC2208 Hybrid Threshold, and placeholder values
- //
-
- _FIELD_TEST(tmc_hybrid_threshold);
-
- uint32_t tmc_hybrid_threshold[TMC_AXES] = {
- #if ENABLED(HYBRID_THRESHOLD)
- #if AXIS_HAS_STEALTHCHOP(X)
- TMC_GET_PWMTHRS(X, X),
- #else
- X_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y)
- TMC_GET_PWMTHRS(Y, Y),
- #else
- Y_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z)
- TMC_GET_PWMTHRS(Z, Z),
- #else
- Z_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(X2)
- TMC_GET_PWMTHRS(X, X2),
- #else
- X2_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y2)
- TMC_GET_PWMTHRS(Y, Y2),
- #else
- Y2_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z2)
- TMC_GET_PWMTHRS(Z, Z2),
- #else
- Z2_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(E0)
- TMC_GET_PWMTHRS(E, E0),
- #else
- E0_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(E1)
- TMC_GET_PWMTHRS(E, E1),
- #else
- E1_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(E2)
- TMC_GET_PWMTHRS(E, E2),
- #else
- E2_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(E3)
- TMC_GET_PWMTHRS(E, E3),
- #else
- E3_HYBRID_THRESHOLD,
- #endif
- #if AXIS_HAS_STEALTHCHOP(E4)
- TMC_GET_PWMTHRS(E, E4)
- #else
- E4_HYBRID_THRESHOLD
- #endif
+ EEPROM_WRITE(val);
+ #if Y_IS_TRINAMIC
+ val = stepperY.getCurrent();
#else
- 100, 100, 3, // X, Y, Z
- 100, 100, 3, // X2, Y2, Z2
- 30, 30, 30, 30, 30 // E0, E1, E2, E3, E4
+ val = 0;
#endif
- };
- EEPROM_WRITE(tmc_hybrid_threshold);
+ EEPROM_WRITE(val);
+ #if Z_IS_TRINAMIC
+ val = stepperZ.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if X2_IS_TRINAMIC
+ val = stepperX2.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if Y2_IS_TRINAMIC
+ val = stepperY2.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if Z2_IS_TRINAMIC
+ val = stepperZ2.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if E0_IS_TRINAMIC
+ val = stepperE0.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if E1_IS_TRINAMIC
+ val = stepperE1.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if E2_IS_TRINAMIC
+ val = stepperE2.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if E3_IS_TRINAMIC
+ val = stepperE3.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #if E4_IS_TRINAMIC
+ val = stepperE4.getCurrent();
+ #else
+ val = 0;
+ #endif
+ EEPROM_WRITE(val);
+ #else
+ val = 0;
+ for (uint8_t q = 11; q--;) EEPROM_WRITE(val);
+ #endif
//
// TMC2130 Sensorless homing threshold
//
- int16_t tmc_sgt[XYZ] = {
- #if ENABLED(SENSORLESS_HOMING)
- #if X_SENSORLESS
- stepperX.sgt(),
- #else
- 0,
- #endif
- #if Y_SENSORLESS
- stepperY.sgt(),
- #else
- 0,
- #endif
- #if Z_SENSORLESS
- stepperZ.sgt()
- #else
- 0
- #endif
+ int16_t thrs;
+ #if ENABLED(SENSORLESS_HOMING)
+ #if ENABLED(X_IS_TMC2130)
+ thrs = stepperX.sgt();
#else
- 0
+ thrs = 0;
#endif
- };
- EEPROM_WRITE(tmc_sgt);
+ EEPROM_WRITE(thrs);
+ #if ENABLED(Y_IS_TMC2130)
+ thrs = stepperY.sgt();
+ #else
+ thrs = 0;
+ #endif
+ EEPROM_WRITE(thrs);
+ #else
+ thrs = 0;
+ for (uint8_t q = 2; q--;) EEPROM_WRITE(thrs);
+ #endif
//
// Linear Advance
//
- _FIELD_TEST(planner_extruder_advance_K);
-
#if ENABLED(LIN_ADVANCE)
- EEPROM_WRITE(planner.extruder_advance_K);
+ EEPROM_WRITE(planner.extruder_advance_k);
+ EEPROM_WRITE(planner.advance_ed_ratio);
#else
- dummy = 0;
+ dummy = 0.0f;
+ EEPROM_WRITE(dummy);
EEPROM_WRITE(dummy);
#endif
- _FIELD_TEST(motor_current_setting);
-
#if HAS_MOTOR_CURRENT_PWM
- for (uint8_t q = XYZ; q--;) EEPROM_WRITE(stepper.motor_current_setting[q]);
+ for (uint8_t q = 3; q--;) EEPROM_WRITE(stepper.motor_current_setting[q]);
#else
- const uint32_t dummyui32[XYZ] = { 0 };
- EEPROM_WRITE(dummyui32);
+ const uint32_t dummyui32 = 0;
+ for (uint8_t q = 3; q--;) EEPROM_WRITE(dummyui32);
#endif
//
// CNC Coordinate Systems
//
- _FIELD_TEST(coordinate_system);
-
#if ENABLED(CNC_COORDINATE_SYSTEMS)
EEPROM_WRITE(coordinate_system); // 27 floats
#else
- dummy = 0;
- for (uint8_t q = MAX_COORDINATE_SYSTEMS * XYZ; q--;) EEPROM_WRITE(dummy);
+ dummy = 0.0f;
+ for (uint8_t q = 27; q--;) EEPROM_WRITE(dummy);
#endif
//
// Skew correction factors
//
- _FIELD_TEST(planner_xy_skew_factor);
-
#if ENABLED(SKEW_CORRECTION)
EEPROM_WRITE(planner.xy_skew_factor);
EEPROM_WRITE(planner.xz_skew_factor);
EEPROM_WRITE(planner.yz_skew_factor);
#else
- dummy = 0;
+ dummy = 0.0f;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
#endif
- //
- // Advanced Pause filament load & unload lengths
- //
-
- _FIELD_TEST(filament_change_unload_length);
-
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
- if (q < COUNT(filament_change_unload_length)) dummy = filament_change_unload_length[q];
- EEPROM_WRITE(dummy);
- }
- for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
- if (q < COUNT(filament_change_load_length)) dummy = filament_change_load_length[q];
- EEPROM_WRITE(dummy);
- }
- #else
- dummy = 0;
- for (uint8_t q = MAX_EXTRUDERS * 2; q--;) EEPROM_WRITE(dummy);
- #endif
-
- //
- // Validate CRC and Data Size
- //
if (!eeprom_error) {
- const uint16_t eeprom_size = eeprom_index - (EEPROM_OFFSET),
- final_crc = working_crc;
+ const int eeprom_size = eeprom_index;
+
+ const uint16_t final_crc = working_crc;
// Write the EEPROM header
eeprom_index = EEPROM_OFFSET;
@@ -982,17 +736,12 @@ void MarlinSettings::postprocess() {
// Report storage size
#if ENABLED(EEPROM_CHITCHAT)
SERIAL_ECHO_START();
- SERIAL_ECHOPAIR("Settings Stored (", eeprom_size);
+ SERIAL_ECHOPAIR("Settings Stored (", eeprom_size - (EEPROM_OFFSET));
SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc);
SERIAL_ECHOLNPGM(")");
#endif
-
- eeprom_error |= size_error(eeprom_size);
}
- //
- // UBL Mesh
- //
#if ENABLED(UBL_SAVE_ACTIVE_ON_M500)
if (ubl.storage_slot >= 0)
store_mesh(ubl.storage_slot);
@@ -1004,20 +753,20 @@ void MarlinSettings::postprocess() {
/**
* M501 - Retrieve Configuration
*/
- bool MarlinSettings::_load() {
+ bool MarlinSettings::load() {
uint16_t working_crc = 0;
EEPROM_START();
char stored_ver[4];
- EEPROM_READ_ALWAYS(stored_ver);
+ EEPROM_READ(stored_ver);
uint16_t stored_crc;
- EEPROM_READ_ALWAYS(stored_crc);
+ EEPROM_READ(stored_crc);
// Version has to match or defaults are used
if (strncmp(version, stored_ver, 3) != 0) {
- if (stored_ver[3] != '\0') {
+ if (stored_ver[0] != 'V') {
stored_ver[0] = '?';
stored_ver[1] = '\0';
}
@@ -1027,21 +776,19 @@ void MarlinSettings::postprocess() {
SERIAL_ECHOPAIR("(EEPROM=", stored_ver);
SERIAL_ECHOLNPGM(" Marlin=" EEPROM_VERSION ")");
#endif
- eeprom_error = true;
+ reset();
}
else {
float dummy = 0;
- #if DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(FWRETRACT) || ENABLED(NO_VOLUMETRICS)
+ #if DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(FWRETRACT)
bool dummyb;
#endif
working_crc = 0; // Init to 0. Accumulated by EEPROM_READ
- _FIELD_TEST(esteppers);
-
// Number of esteppers may change
uint8_t esteppers;
- EEPROM_READ_ALWAYS(esteppers);
+ EEPROM_READ(esteppers);
//
// Planner Motion
@@ -1049,20 +796,17 @@ void MarlinSettings::postprocess() {
// Get only the number of E stepper parameters previously stored
// Any steppers added later are set to their defaults
- const uint32_t def1[] = DEFAULT_MAX_ACCELERATION;
- const float def2[] = DEFAULT_AXIS_STEPS_PER_UNIT, def3[] = DEFAULT_MAX_FEEDRATE;
-
- uint32_t tmp1[MOV_AXIS + esteppers];
- EEPROM_READ(tmp1); // max_acceleration_mm_per_s2
- EEPROM_READ(planner.min_segment_time_us);
-
- float tmp2[MOV_AXIS + esteppers], tmp3[MOV_AXIS + esteppers];
- EEPROM_READ(tmp2); // axis_steps_per_mm
- EEPROM_READ(tmp3); // max_feedrate_mm_s
- if (!validating) LOOP_NUM_AXIS_N(i) {
- planner.max_acceleration_mm_per_s2[i] = i < MOV_AXIS + esteppers ? tmp1[i] : def1[i < COUNT(def1) ? i : COUNT(def1) - 1];
- planner.axis_steps_per_mm[i] = i < MOV_AXIS + esteppers ? tmp2[i] : def2[i < COUNT(def2) ? i : COUNT(def2) - 1];
- planner.max_feedrate_mm_s[i] = i < MOV_AXIS + esteppers ? tmp3[i] : def3[i < COUNT(def3) ? i : COUNT(def3) - 1];
+ const float def1[] = DEFAULT_AXIS_STEPS_PER_UNIT, def2[] = DEFAULT_MAX_FEEDRATE;
+ const uint32_t def3[] = DEFAULT_MAX_ACCELERATION;
+ float tmp1[XYZ + esteppers], tmp2[XYZ + esteppers];
+ uint32_t tmp3[XYZ + esteppers];
+ EEPROM_READ(tmp1);
+ EEPROM_READ(tmp2);
+ EEPROM_READ(tmp3);
+ LOOP_XYZE_N(i) {
+ planner.axis_steps_per_mm[i] = i < XYZ + esteppers ? tmp1[i] : def1[i < COUNT(def1) ? i : COUNT(def1) - 1];
+ planner.max_feedrate_mm_s[i] = i < XYZ + esteppers ? tmp2[i] : def2[i < COUNT(def2) ? i : COUNT(def2) - 1];
+ planner.max_acceleration_mm_per_s2[i] = i < XYZ + esteppers ? tmp3[i] : def3[i < COUNT(def3) ? i : COUNT(def3) - 1];
}
EEPROM_READ(planner.acceleration);
@@ -1070,21 +814,13 @@ void MarlinSettings::postprocess() {
EEPROM_READ(planner.travel_acceleration);
EEPROM_READ(planner.min_feedrate_mm_s);
EEPROM_READ(planner.min_travel_feedrate_mm_s);
-
- #if ENABLED(JUNCTION_DEVIATION)
- for (uint8_t q = 4; q--;) EEPROM_READ(dummy);
- EEPROM_READ(planner.junction_deviation_mm);
- #else
- EEPROM_READ(planner.max_jerk);
- EEPROM_READ(dummy);
- #endif
+ EEPROM_READ(planner.min_segment_time_us);
+ EEPROM_READ(planner.max_jerk);
//
// Home Offset (M206)
//
- _FIELD_TEST(home_offset);
-
#if !HAS_HOME_OFFSET
float home_offset[XYZ];
#endif
@@ -1114,20 +850,23 @@ void MarlinSettings::postprocess() {
// Mesh (Manual) Bed Leveling
//
+ bool leveling_is_on;
uint8_t mesh_num_x, mesh_num_y;
+ EEPROM_READ(leveling_is_on);
EEPROM_READ(dummy);
- EEPROM_READ_ALWAYS(mesh_num_x);
- EEPROM_READ_ALWAYS(mesh_num_y);
+ EEPROM_READ(mesh_num_x);
+ EEPROM_READ(mesh_num_y);
#if ENABLED(MESH_BED_LEVELING)
- if (!validating) mbl.z_offset = dummy;
+ mbl.has_mesh = leveling_is_on;
+ mbl.z_offset = dummy;
if (mesh_num_x == GRID_MAX_POINTS_X && mesh_num_y == GRID_MAX_POINTS_Y) {
// EEPROM data fits the current mesh
EEPROM_READ(mbl.z_values);
}
else {
// EEPROM data is stale
- if (!validating) mbl.reset();
+ mbl.reset();
for (uint16_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_READ(dummy);
}
#else
@@ -1135,8 +874,6 @@ void MarlinSettings::postprocess() {
for (uint16_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_READ(dummy);
#endif // MESH_BED_LEVELING
- _FIELD_TEST(zprobe_zoffset);
-
#if !HAS_BED_PROBE
float zprobe_zoffset;
#endif
@@ -1157,11 +894,11 @@ void MarlinSettings::postprocess() {
//
uint8_t grid_max_x, grid_max_y;
- EEPROM_READ_ALWAYS(grid_max_x); // 1 byte
- EEPROM_READ_ALWAYS(grid_max_y); // 1 byte
+ EEPROM_READ(grid_max_x); // 1 byte
+ EEPROM_READ(grid_max_y); // 1 byte
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (grid_max_x == GRID_MAX_POINTS_X && grid_max_y == GRID_MAX_POINTS_Y) {
- if (!validating) set_bed_leveling_enabled(false);
+ set_bed_leveling_enabled(false);
EEPROM_READ(bilinear_grid_spacing); // 2 ints
EEPROM_READ(bilinear_start); // 2 ints
EEPROM_READ(z_values); // 9 to 256 floats
@@ -1180,8 +917,6 @@ void MarlinSettings::postprocess() {
// Unified Bed Leveling active state
//
- _FIELD_TEST(planner_leveling_active);
-
#if ENABLED(AUTO_BED_LEVELING_UBL)
EEPROM_READ(planner.leveling_active);
EEPROM_READ(ubl.storage_slot);
@@ -1196,9 +931,6 @@ void MarlinSettings::postprocess() {
//
#if ENABLED(DELTA)
-
- _FIELD_TEST(delta_height);
-
EEPROM_READ(delta_height); // 1 float
EEPROM_READ(delta_endstop_adj); // 3 floats
EEPROM_READ(delta_radius); // 1 float
@@ -1207,49 +939,38 @@ void MarlinSettings::postprocess() {
EEPROM_READ(delta_calibration_radius); // 1 float
EEPROM_READ(delta_tower_angle_trim); // 3 floats
- #elif ENABLED(HANGPRINTER)
- EEPROM_READ(anchor_A_y); // 1 float
- EEPROM_READ(anchor_A_z); // 1 float
- EEPROM_READ(anchor_B_x); // 1 float
- EEPROM_READ(anchor_B_y); // 1 float
- EEPROM_READ(anchor_B_z); // 1 float
- EEPROM_READ(anchor_C_x); // 1 float
- EEPROM_READ(anchor_C_y); // 1 float
- EEPROM_READ(anchor_C_z); // 1 float
- EEPROM_READ(anchor_D_z); // 1 float
- EEPROM_READ(delta_segments_per_second); // 1 float
- EEPROM_READ(dummy); // 1 float
-
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
- _FIELD_TEST(x_endstop_adj);
-
#if ENABLED(X_DUAL_ENDSTOPS)
- EEPROM_READ(endstops.x_endstop_adj); // 1 float
+ EEPROM_READ(x_endstop_adj); // 1 float
#else
EEPROM_READ(dummy);
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
- EEPROM_READ(endstops.y_endstop_adj); // 1 float
+ EEPROM_READ(y_endstop_adj); // 1 float
#else
EEPROM_READ(dummy);
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
- EEPROM_READ(endstops.z_endstop_adj); // 1 float
+ EEPROM_READ(z_endstop_adj); // 1 float
#else
EEPROM_READ(dummy);
#endif
+ for (uint8_t q=8; q--;) EEPROM_READ(dummy);
+
+ #else
+
+ for (uint8_t q=11; q--;) EEPROM_READ(dummy);
+
#endif
//
// LCD Preheat settings
//
- _FIELD_TEST(lcd_preheat_hotend_temp);
-
#if DISABLED(ULTIPANEL)
- int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
+ int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
#endif
EEPROM_READ(lcd_preheat_hotend_temp); // 2 floats
EEPROM_READ(lcd_preheat_bed_temp); // 2 floats
@@ -1269,7 +990,7 @@ void MarlinSettings::postprocess() {
EEPROM_READ(dummy); // Kp
if (e < HOTENDS && dummy != DUMMY_PID_VALUE) {
// do not need to scale PID values as the values in EEPROM are already scaled
- if (!validating) PID_PARAM(Kp, e) = dummy;
+ PID_PARAM(Kp, e) = dummy;
EEPROM_READ(PID_PARAM(Ki, e));
EEPROM_READ(PID_PARAM(Kd, e));
#if ENABLED(PID_EXTRUSION_SCALING)
@@ -1291,12 +1012,10 @@ void MarlinSettings::postprocess() {
// PID Extrusion Scaling
//
- _FIELD_TEST(lpq_len);
-
#if DISABLED(PID_EXTRUSION_SCALING)
- int16_t LPQ_LEN;
+ int lpq_len;
#endif
- EEPROM_READ(LPQ_LEN);
+ EEPROM_READ(lpq_len);
//
// Heated Bed PID
@@ -1305,7 +1024,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(PIDTEMPBED)
EEPROM_READ(dummy); // bedKp
if (dummy != DUMMY_PID_VALUE) {
- if (!validating) thermalManager.bedKp = dummy;
+ thermalManager.bedKp = dummy;
EEPROM_READ(thermalManager.bedKi);
EEPROM_READ(thermalManager.bedKd);
}
@@ -1317,10 +1036,8 @@ void MarlinSettings::postprocess() {
// LCD Contrast
//
- _FIELD_TEST(lcd_contrast);
-
#if !HAS_LCD_CONTRAST
- int16_t lcd_contrast;
+ uint16_t lcd_contrast;
#endif
EEPROM_READ(lcd_contrast);
@@ -1329,15 +1046,15 @@ void MarlinSettings::postprocess() {
//
#if ENABLED(FWRETRACT)
- EEPROM_READ(fwretract.autoretract_enabled);
- EEPROM_READ(fwretract.retract_length);
- EEPROM_READ(fwretract.retract_feedrate_mm_s);
- EEPROM_READ(fwretract.retract_zlift);
- EEPROM_READ(fwretract.retract_recover_length);
- EEPROM_READ(fwretract.retract_recover_feedrate_mm_s);
- EEPROM_READ(fwretract.swap_retract_length);
- EEPROM_READ(fwretract.swap_retract_recover_length);
- EEPROM_READ(fwretract.swap_retract_recover_feedrate_mm_s);
+ EEPROM_READ(autoretract_enabled);
+ EEPROM_READ(retract_length);
+ EEPROM_READ(retract_feedrate_mm_s);
+ EEPROM_READ(retract_zlift);
+ EEPROM_READ(retract_recover_length);
+ EEPROM_READ(retract_recover_feedrate_mm_s);
+ EEPROM_READ(swap_retract_length);
+ EEPROM_READ(swap_retract_recover_length);
+ EEPROM_READ(swap_retract_recover_feedrate_mm_s);
#else
EEPROM_READ(dummyb);
for (uint8_t q=8; q--;) EEPROM_READ(dummy);
@@ -1346,204 +1063,134 @@ void MarlinSettings::postprocess() {
//
// Volumetric & Filament Size
//
-
- _FIELD_TEST(parser_volumetric_enabled);
-
#if DISABLED(NO_VOLUMETRICS)
EEPROM_READ(parser.volumetric_enabled);
for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
EEPROM_READ(dummy);
- if (!validating && q < COUNT(planner.filament_size))
- planner.filament_size[q] = dummy;
+ if (q < COUNT(planner.filament_size)) planner.filament_size[q] = dummy;
}
- #else
-
- EEPROM_READ(dummyb);
- for (uint8_t q=MAX_EXTRUDERS; q--;) EEPROM_READ(dummy);
-
#endif
- if (!validating) reset_stepper_drivers();
-
//
- // TMC2130 Stepper Settings
+ // TMC2130 Stepper Current
//
- _FIELD_TEST(tmc_stepper_current);
-
+ uint16_t val;
#if HAS_TRINAMIC
-
- #define SET_CURR(Q) stepper##Q.setCurrent(currents[TMC_##Q] ? currents[TMC_##Q] : Q##_CURRENT, R_SENSE, HOLD_MULTIPLIER)
- uint16_t currents[TMC_AXES];
- EEPROM_READ(currents);
- if (!validating) {
- #if AXIS_IS_TMC(X)
- SET_CURR(X);
- #endif
- #if AXIS_IS_TMC(Y)
- SET_CURR(Y);
- #endif
- #if AXIS_IS_TMC(Z)
- SET_CURR(Z);
- #endif
- #if AXIS_IS_TMC(X2)
- SET_CURR(X2);
- #endif
- #if AXIS_IS_TMC(Y2)
- SET_CURR(Y2);
- #endif
- #if AXIS_IS_TMC(Z2)
- SET_CURR(Z2);
- #endif
- #if AXIS_IS_TMC(E0)
- SET_CURR(E0);
- #endif
- #if AXIS_IS_TMC(E1)
- SET_CURR(E1);
- #endif
- #if AXIS_IS_TMC(E2)
- SET_CURR(E2);
- #endif
- #if AXIS_IS_TMC(E3)
- SET_CURR(E3);
- #endif
- #if AXIS_IS_TMC(E4)
- SET_CURR(E4);
- #endif
- }
+ EEPROM_READ(val);
+ #if X_IS_TRINAMIC
+ stepperX.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if Y_IS_TRINAMIC
+ stepperY.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if Z_IS_TRINAMIC
+ stepperZ.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if X2_IS_TRINAMIC
+ stepperX2.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if Y2_IS_TRINAMIC
+ stepperY2.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if Z2_IS_TRINAMIC
+ stepperZ2.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if E0_IS_TRINAMIC
+ stepperE0.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if E1_IS_TRINAMIC
+ stepperE1.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if E2_IS_TRINAMIC
+ stepperE2.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if E3_IS_TRINAMIC
+ stepperE3.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ EEPROM_READ(val);
+ #if E4_IS_TRINAMIC
+ stepperE4.setCurrent(val, R_SENSE, HOLD_MULTIPLIER);
+ #endif
#else
- uint16_t val;
- for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(val);
- #endif
-
- #if ENABLED(HYBRID_THRESHOLD)
- #define TMC_SET_PWMTHRS(A,Q) tmc_set_pwmthrs(stepper##Q, tmc_hybrid_threshold[TMC_##Q], planner.axis_steps_per_mm[_AXIS(A)])
- uint32_t tmc_hybrid_threshold[TMC_AXES];
- EEPROM_READ(tmc_hybrid_threshold);
- if (!validating) {
- #if AXIS_HAS_STEALTHCHOP(X)
- TMC_SET_PWMTHRS(X, X);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y)
- TMC_SET_PWMTHRS(Y, Y);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z)
- TMC_SET_PWMTHRS(Z, Z);
- #endif
- #if AXIS_HAS_STEALTHCHOP(X2)
- TMC_SET_PWMTHRS(X, X2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Y2)
- TMC_SET_PWMTHRS(Y, Y2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(Z2)
- TMC_SET_PWMTHRS(Z, Z2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(E0)
- TMC_SET_PWMTHRS(E, E0);
- #endif
- #if AXIS_HAS_STEALTHCHOP(E1)
- TMC_SET_PWMTHRS(E, E1);
- #endif
- #if AXIS_HAS_STEALTHCHOP(E2)
- TMC_SET_PWMTHRS(E, E2);
- #endif
- #if AXIS_HAS_STEALTHCHOP(E3)
- TMC_SET_PWMTHRS(E, E3);
- #endif
- #if AXIS_HAS_STEALTHCHOP(E4)
- TMC_SET_PWMTHRS(E, E4);
- #endif
- }
- #else
- uint32_t thrs_val;
- for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(thrs_val);
+ for (uint8_t q = 11; q--;) EEPROM_READ(val);
#endif
/*
* TMC2130 Sensorless homing threshold.
* X and X2 use the same value
* Y and Y2 use the same value
- * Z and Z2 use the same value
*/
- int16_t tmc_sgt[XYZ];
- EEPROM_READ(tmc_sgt);
+ int16_t thrs;
#if ENABLED(SENSORLESS_HOMING)
- if (!validating) {
- #ifdef X_HOMING_SENSITIVITY
- #if AXIS_HAS_STALLGUARD(X)
- stepperX.sgt(tmc_sgt[0]);
- #endif
- #if AXIS_HAS_STALLGUARD(X2)
- stepperX2.sgt(tmc_sgt[0]);
- #endif
- #endif
- #ifdef Y_HOMING_SENSITIVITY
- #if AXIS_HAS_STALLGUARD(Y)
- stepperY.sgt(tmc_sgt[1]);
- #endif
- #if AXIS_HAS_STALLGUARD(Y2)
- stepperY2.sgt(tmc_sgt[1]);
- #endif
- #endif
- #ifdef Z_HOMING_SENSITIVITY
- #if AXIS_HAS_STALLGUARD(Z)
- stepperZ.sgt(tmc_sgt[2]);
- #endif
- #if AXIS_HAS_STALLGUARD(Z2)
- stepperZ2.sgt(tmc_sgt[2]);
- #endif
- #endif
- }
+ EEPROM_READ(thrs);
+ #if ENABLED(X_IS_TMC2130)
+ stepperX.sgt(thrs);
+ #endif
+ #if ENABLED(X2_IS_TMC2130)
+ stepperX2.sgt(thrs);
+ #endif
+ EEPROM_READ(thrs);
+ #if ENABLED(Y_IS_TMC2130)
+ stepperY.sgt(thrs);
+ #endif
+ #if ENABLED(Y2_IS_TMC2130)
+ stepperY2.sgt(thrs);
+ #endif
+ #else
+ for (uint8_t q = 0; q < 2; q++) EEPROM_READ(thrs);
#endif
//
// Linear Advance
//
- _FIELD_TEST(planner_extruder_advance_K);
-
#if ENABLED(LIN_ADVANCE)
- EEPROM_READ(planner.extruder_advance_K);
+ EEPROM_READ(planner.extruder_advance_k);
+ EEPROM_READ(planner.advance_ed_ratio);
#else
EEPROM_READ(dummy);
+ EEPROM_READ(dummy);
#endif
//
// Motor Current PWM
//
- _FIELD_TEST(motor_current_setting);
-
#if HAS_MOTOR_CURRENT_PWM
- for (uint8_t q = XYZ; q--;) EEPROM_READ(stepper.motor_current_setting[q]);
+ for (uint8_t q = 3; q--;) EEPROM_READ(stepper.motor_current_setting[q]);
#else
- uint32_t dummyui32[XYZ];
- EEPROM_READ(dummyui32);
+ uint32_t dummyui32;
+ for (uint8_t q = 3; q--;) EEPROM_READ(dummyui32);
#endif
//
// CNC Coordinate System
//
- _FIELD_TEST(coordinate_system);
-
#if ENABLED(CNC_COORDINATE_SYSTEMS)
- if (!validating) (void)select_coordinate_system(-1); // Go back to machine space
+ (void)select_coordinate_system(-1); // Go back to machine space
EEPROM_READ(coordinate_system); // 27 floats
#else
- for (uint8_t q = MAX_COORDINATE_SYSTEMS * XYZ; q--;) EEPROM_READ(dummy);
+ for (uint8_t q = 27; q--;) EEPROM_READ(dummy);
#endif
//
// Skew correction factors
//
- _FIELD_TEST(planner_xy_skew_factor);
-
#if ENABLED(SKEW_CORRECTION_GCODE)
EEPROM_READ(planner.xy_skew_factor);
#if ENABLED(SKEW_CORRECTION_FOR_Z)
@@ -1557,43 +1204,8 @@ void MarlinSettings::postprocess() {
for (uint8_t q = 3; q--;) EEPROM_READ(dummy);
#endif
- //
- // Advanced Pause filament load & unload lengths
- //
-
- _FIELD_TEST(filament_change_unload_length);
-
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
- EEPROM_READ(dummy);
- if (!validating && q < COUNT(filament_change_unload_length)) filament_change_unload_length[q] = dummy;
- }
- for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
- EEPROM_READ(dummy);
- if (!validating && q < COUNT(filament_change_load_length)) filament_change_load_length[q] = dummy;
- }
- #else
- for (uint8_t q = MAX_EXTRUDERS * 2; q--;) EEPROM_READ(dummy);
- #endif
-
- eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET));
- if (eeprom_error) {
- SERIAL_ECHO_START();
- SERIAL_ECHOPAIR("Index: ", int(eeprom_index - (EEPROM_OFFSET)));
- SERIAL_ECHOLNPAIR(" Size: ", datasize());
- }
- else if (working_crc != stored_crc) {
- eeprom_error = true;
- #if ENABLED(EEPROM_CHITCHAT)
- SERIAL_ERROR_START();
- SERIAL_ERRORPGM("EEPROM CRC mismatch - (stored) ");
- SERIAL_ERROR(stored_crc);
- SERIAL_ERRORPGM(" != ");
- SERIAL_ERROR(working_crc);
- SERIAL_ERRORLNPGM(" (calculated)!");
- #endif
- }
- else if (!validating) {
+ if (working_crc == stored_crc) {
+ postprocess();
#if ENABLED(EEPROM_CHITCHAT)
SERIAL_ECHO_START();
SERIAL_ECHO(version);
@@ -1602,67 +1214,63 @@ void MarlinSettings::postprocess() {
SERIAL_ECHOLNPGM(")");
#endif
}
-
- if (!validating && !eeprom_error) postprocess();
+ else {
+ #if ENABLED(EEPROM_CHITCHAT)
+ SERIAL_ERROR_START();
+ SERIAL_ERRORPGM("EEPROM CRC mismatch - (stored) ");
+ SERIAL_ERROR(stored_crc);
+ SERIAL_ERRORPGM(" != ");
+ SERIAL_ERROR(working_crc);
+ SERIAL_ERRORLNPGM(" (calculated)!");
+ #endif
+ reset();
+ }
#if ENABLED(AUTO_BED_LEVELING_UBL)
- if (!validating) {
- ubl.report_state();
+ meshes_begin = (eeprom_index + 32) & 0xFFF8; // Pad the end of configuration data so it
+ // can float up or down a little bit without
+ // disrupting the mesh data
+ ubl.report_state();
- if (!ubl.sanity_check()) {
- SERIAL_EOL();
- #if ENABLED(EEPROM_CHITCHAT)
- ubl.echo_name();
- SERIAL_ECHOLNPGM(" initialized.\n");
- #endif
- }
- else {
- eeprom_error = true;
- #if ENABLED(EEPROM_CHITCHAT)
- SERIAL_PROTOCOLPGM("?Can't enable ");
- ubl.echo_name();
- SERIAL_PROTOCOLLNPGM(".");
- #endif
- ubl.reset();
- }
+ if (!ubl.sanity_check()) {
+ SERIAL_EOL();
+ #if ENABLED(EEPROM_CHITCHAT)
+ ubl.echo_name();
+ SERIAL_ECHOLNPGM(" initialized.\n");
+ #endif
+ }
+ else {
+ #if ENABLED(EEPROM_CHITCHAT)
+ SERIAL_PROTOCOLPGM("?Can't enable ");
+ ubl.echo_name();
+ SERIAL_PROTOCOLLNPGM(".");
+ #endif
+ ubl.reset();
+ }
- if (ubl.storage_slot >= 0) {
- load_mesh(ubl.storage_slot);
- #if ENABLED(EEPROM_CHITCHAT)
- SERIAL_ECHOPAIR("Mesh ", ubl.storage_slot);
- SERIAL_ECHOLNPGM(" loaded from storage.");
- #endif
- }
- else {
- ubl.reset();
- #if ENABLED(EEPROM_CHITCHAT)
- SERIAL_ECHOLNPGM("UBL System reset()");
- #endif
- }
+ if (ubl.storage_slot >= 0) {
+ load_mesh(ubl.storage_slot);
+ #if ENABLED(EEPROM_CHITCHAT)
+ SERIAL_ECHOPAIR("Mesh ", ubl.storage_slot);
+ SERIAL_ECHOLNPGM(" loaded from storage.");
+ #endif
+ }
+ else {
+ ubl.reset();
+ #if ENABLED(EEPROM_CHITCHAT)
+ SERIAL_ECHOLNPGM("UBL System reset()");
+ #endif
}
#endif
}
#if ENABLED(EEPROM_CHITCHAT) && DISABLED(DISABLE_M503)
- if (!validating) report();
+ report();
#endif
return !eeprom_error;
}
- bool MarlinSettings::validate() {
- validating = true;
- const bool success = _load();
- validating = false;
- return success;
- }
-
- bool MarlinSettings::load() {
- if (validate()) return _load();
- reset();
- return true;
- }
-
#if ENABLED(AUTO_BED_LEVELING_UBL)
#if ENABLED(EEPROM_CHITCHAT)
@@ -1673,23 +1281,18 @@ void MarlinSettings::postprocess() {
}
#endif
- uint16_t MarlinSettings::meshes_start_index() {
- return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; // Pad the end of configuration data so it can float up
- // or down a little bit without disrupting the mesh data
- }
-
uint16_t MarlinSettings::calc_num_meshes() {
- return (meshes_end - meshes_start_index()) / sizeof(ubl.z_values);
- }
+ //obviously this will get more sophisticated once we've added an actual MAT
- int MarlinSettings::mesh_slot_offset(const int8_t slot) {
- return meshes_end - (slot + 1) * sizeof(ubl.z_values);
+ if (meshes_begin <= 0) return 0;
+
+ return (meshes_end - meshes_begin) / sizeof(ubl.z_values);
}
void MarlinSettings::store_mesh(const int8_t slot) {
#if ENABLED(AUTO_BED_LEVELING_UBL)
- const int16_t a = calc_num_meshes();
+ const uint16_t a = calc_num_meshes();
if (!WITHIN(slot, 0, a - 1)) {
#if ENABLED(EEPROM_CHITCHAT)
ubl_invalid_slot(a);
@@ -1701,8 +1304,9 @@ void MarlinSettings::postprocess() {
return;
}
- int pos = mesh_slot_offset(slot);
uint16_t crc = 0;
+ int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
+
write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
// Write crc to MAT along with other data, or just tack on to the beginning or end
@@ -1722,7 +1326,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(AUTO_BED_LEVELING_UBL)
- const int16_t a = settings.calc_num_meshes();
+ const uint16_t a = settings.calc_num_meshes();
if (!WITHIN(slot, 0, a - 1)) {
#if ENABLED(EEPROM_CHITCHAT)
@@ -1731,8 +1335,8 @@ void MarlinSettings::postprocess() {
return;
}
- int pos = mesh_slot_offset(slot);
uint16_t crc = 0;
+ int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&ubl.z_values;
read_data(pos, dest, sizeof(ubl.z_values), &crc);
@@ -1769,36 +1373,23 @@ void MarlinSettings::postprocess() {
*/
void MarlinSettings::reset() {
static const float tmp1[] PROGMEM = DEFAULT_AXIS_STEPS_PER_UNIT, tmp2[] PROGMEM = DEFAULT_MAX_FEEDRATE;
-
static const uint32_t tmp3[] PROGMEM = DEFAULT_MAX_ACCELERATION;
- LOOP_NUM_AXIS_N(i) {
+ LOOP_XYZE_N(i) {
planner.axis_steps_per_mm[i] = pgm_read_float(&tmp1[i < COUNT(tmp1) ? i : COUNT(tmp1) - 1]);
planner.max_feedrate_mm_s[i] = pgm_read_float(&tmp2[i < COUNT(tmp2) ? i : COUNT(tmp2) - 1]);
planner.max_acceleration_mm_per_s2[i] = pgm_read_dword_near(&tmp3[i < COUNT(tmp3) ? i : COUNT(tmp3) - 1]);
}
- planner.min_segment_time_us = DEFAULT_MINSEGMENTTIME;
planner.acceleration = DEFAULT_ACCELERATION;
planner.retract_acceleration = DEFAULT_RETRACT_ACCELERATION;
planner.travel_acceleration = DEFAULT_TRAVEL_ACCELERATION;
planner.min_feedrate_mm_s = DEFAULT_MINIMUMFEEDRATE;
planner.min_travel_feedrate_mm_s = DEFAULT_MINTRAVELFEEDRATE;
-
- #if ENABLED(JUNCTION_DEVIATION)
- planner.junction_deviation_mm = float(JUNCTION_DEVIATION_MM);
- #else
- #if ENABLED(HANGPRINTER)
- planner.max_jerk[A_AXIS] = DEFAULT_AJERK;
- planner.max_jerk[B_AXIS] = DEFAULT_BJERK;
- planner.max_jerk[C_AXIS] = DEFAULT_CJERK;
- planner.max_jerk[D_AXIS] = DEFAULT_DJERK;
- #else
- planner.max_jerk[X_AXIS] = DEFAULT_XJERK;
- planner.max_jerk[Y_AXIS] = DEFAULT_YJERK;
- planner.max_jerk[Z_AXIS] = DEFAULT_ZJERK;
- #endif
- planner.max_jerk[E_AXIS] = DEFAULT_EJERK;
- #endif
+ planner.min_segment_time_us = DEFAULT_MINSEGMENTTIME;
+ planner.max_jerk[X_AXIS] = DEFAULT_XJERK;
+ planner.max_jerk[Y_AXIS] = DEFAULT_YJERK;
+ planner.max_jerk[Z_AXIS] = DEFAULT_ZJERK;
+ planner.max_jerk[E_AXIS] = DEFAULT_EJERK;
#if HAS_HOME_OFFSET
ZERO(home_offset);
@@ -1808,7 +1399,7 @@ void MarlinSettings::reset() {
constexpr float tmp4[XYZ][HOTENDS] = {
HOTEND_OFFSET_X,
HOTEND_OFFSET_Y
- #if HAS_HOTEND_OFFSET_Z
+ #ifdef HOTEND_OFFSET_Z
, HOTEND_OFFSET_Z
#else
, { 0 }
@@ -1848,23 +1439,10 @@ void MarlinSettings::reset() {
delta_calibration_radius = DELTA_CALIBRATION_RADIUS;
COPY(delta_tower_angle_trim, dta);
- #elif ENABLED(HANGPRINTER)
-
- anchor_A_y = float(ANCHOR_A_Y);
- anchor_A_z = float(ANCHOR_A_Z);
- anchor_B_x = float(ANCHOR_B_X);
- anchor_B_y = float(ANCHOR_B_Y);
- anchor_B_z = float(ANCHOR_B_Z);
- anchor_C_x = float(ANCHOR_C_X);
- anchor_C_y = float(ANCHOR_C_Y);
- anchor_C_z = float(ANCHOR_C_Z);
- anchor_D_z = float(ANCHOR_D_Z);
- delta_segments_per_second = KINEMATIC_SEGMENTS_PER_SECOND;
-
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
#if ENABLED(X_DUAL_ENDSTOPS)
- endstops.x_endstop_adj = (
+ x_endstop_adj = (
#ifdef X_DUAL_ENDSTOPS_ADJUSTMENT
X_DUAL_ENDSTOPS_ADJUSTMENT
#else
@@ -1873,7 +1451,7 @@ void MarlinSettings::reset() {
);
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
- endstops.y_endstop_adj = (
+ y_endstop_adj = (
#ifdef Y_DUAL_ENDSTOPS_ADJUSTMENT
Y_DUAL_ENDSTOPS_ADJUSTMENT
#else
@@ -1882,7 +1460,7 @@ void MarlinSettings::reset() {
);
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
- endstops.z_endstop_adj = (
+ z_endstop_adj = (
#ifdef Z_DUAL_ENDSTOPS_ADJUSTMENT
Z_DUAL_ENDSTOPS_ADJUSTMENT
#else
@@ -1890,6 +1468,7 @@ void MarlinSettings::reset() {
#endif
);
#endif
+
#endif
#if ENABLED(ULTIPANEL)
@@ -1906,7 +1485,7 @@ void MarlinSettings::reset() {
HOTEND_LOOP()
#endif
{
- PID_PARAM(Kp, e) = float(DEFAULT_Kp);
+ PID_PARAM(Kp, e) = DEFAULT_Kp;
PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki);
PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd);
#if ENABLED(PID_EXTRUSION_SCALING)
@@ -1914,7 +1493,7 @@ void MarlinSettings::reset() {
#endif
}
#if ENABLED(PID_EXTRUSION_SCALING)
- thermalManager.lpq_len = 20; // default last-position-queue size
+ lpq_len = 20; // default last-position-queue size
#endif
#endif // PIDTEMP
@@ -1929,8 +1508,16 @@ void MarlinSettings::reset() {
#endif
#if ENABLED(FWRETRACT)
- fwretract.reset();
- #endif
+ autoretract_enabled = false;
+ retract_length = RETRACT_LENGTH;
+ retract_feedrate_mm_s = RETRACT_FEEDRATE;
+ retract_zlift = RETRACT_ZLIFT;
+ retract_recover_length = RETRACT_RECOVER_LENGTH;
+ retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE;
+ swap_retract_length = RETRACT_LENGTH_SWAP;
+ swap_retract_recover_length = RETRACT_RECOVER_LENGTH_SWAP;
+ swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP;
+ #endif // FWRETRACT
#if DISABLED(NO_VOLUMETRICS)
@@ -1954,15 +1541,63 @@ void MarlinSettings::reset() {
#endif
);
- reset_stepper_drivers();
+ #if X_IS_TRINAMIC
+ stepperX.setCurrent(X_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if Y_IS_TRINAMIC
+ stepperY.setCurrent(Y_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if Z_IS_TRINAMIC
+ stepperZ.setCurrent(Z_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if X2_IS_TRINAMIC
+ stepperX2.setCurrent(X2_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if Y2_IS_TRINAMIC
+ stepperY2.setCurrent(Y2_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if Z2_IS_TRINAMIC
+ stepperZ2.setCurrent(Z2_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if E0_IS_TRINAMIC
+ stepperE0.setCurrent(E0_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if E1_IS_TRINAMIC
+ stepperE1.setCurrent(E1_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if E2_IS_TRINAMIC
+ stepperE2.setCurrent(E2_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if E3_IS_TRINAMIC
+ stepperE3.setCurrent(E3_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+ #if E4_IS_TRINAMIC
+ stepperE4.setCurrent(E4_CURRENT, R_SENSE, HOLD_MULTIPLIER);
+ #endif
+
+ #if ENABLED(SENSORLESS_HOMING)
+ #if ENABLED(X_IS_TMC2130)
+ stepperX.sgt(X_HOMING_SENSITIVITY);
+ #endif
+ #if ENABLED(X2_IS_TMC2130)
+ stepperX2.sgt(X_HOMING_SENSITIVITY);
+ #endif
+ #if ENABLED(Y_IS_TMC2130)
+ stepperY.sgt(Y_HOMING_SENSITIVITY);
+ #endif
+ #if ENABLED(Y2_IS_TMC2130)
+ stepperY2.sgt(Y_HOMING_SENSITIVITY);
+ #endif
+ #endif
#if ENABLED(LIN_ADVANCE)
- planner.extruder_advance_K = LIN_ADVANCE_K;
+ planner.extruder_advance_k = LIN_ADVANCE_K;
+ planner.advance_ed_ratio = LIN_ADVANCE_E_D_RATIO;
#endif
#if HAS_MOTOR_CURRENT_PWM
- uint32_t tmp_motor_current_setting[XYZ] = PWM_MOTOR_CURRENT;
- for (uint8_t q = XYZ; q--;)
+ uint32_t tmp_motor_current_setting[3] = PWM_MOTOR_CURRENT;
+ for (uint8_t q = 3; q--;)
stepper.digipot_current(q, (stepper.motor_current_setting[q] = tmp_motor_current_setting[q]));
#endif
@@ -1974,13 +1609,6 @@ void MarlinSettings::reset() {
#endif
#endif
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- for (uint8_t e = 0; e < EXTRUDERS; e++) {
- filament_change_unload_length[e] = FILAMENT_CHANGE_UNLOAD_LENGTH;
- filament_change_load_length[e] = FILAMENT_CHANGE_FAST_LOAD_LENGTH;
- }
- #endif
-
postprocess();
#if ENABLED(EEPROM_CHITCHAT)
@@ -1993,30 +1621,6 @@ void MarlinSettings::reset() {
#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START(); }while(0)
- #if HAS_TRINAMIC
- void say_M906() { SERIAL_ECHOPGM(" M906"); }
- #if ENABLED(HYBRID_THRESHOLD)
- void say_M913() { SERIAL_ECHOPGM(" M913"); }
- #endif
- #if ENABLED(SENSORLESS_HOMING)
- void say_M914() { SERIAL_ECHOPGM(" M914"); }
- #endif
- #endif
-
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- void say_M603() { SERIAL_ECHOPGM(" M603 "); }
- #endif
-
- inline void say_units(const bool colon=false) {
- serialprintPGM(
- #if ENABLED(INCH_MODE_SUPPORT)
- parser.linear_unit_factor != 1.0 ? PSTR(" (in)") :
- #endif
- PSTR(" (mm)")
- );
- if (colon) SERIAL_ECHOLNPGM(":");
- }
-
/**
* M503 - Report current settings in RAM
*
@@ -2033,15 +1637,13 @@ void MarlinSettings::reset() {
#define VOLUMETRIC_UNIT(N) (float(N) / (parser.volumetric_enabled ? parser.volumetric_unit_factor : parser.linear_unit_factor))
SERIAL_ECHOPGM(" G2");
SERIAL_CHAR(parser.linear_unit_factor == 1.0 ? '1' : '0');
- SERIAL_ECHOPGM(" ;");
- say_units();
+ SERIAL_ECHOPGM(" ; Units in ");
+ serialprintPGM(parser.linear_unit_factor == 1.0 ? PSTR("mm\n") : PSTR("inches\n"));
#else
#define LINEAR_UNIT(N) (N)
#define VOLUMETRIC_UNIT(N) (N)
- SERIAL_ECHOPGM(" G21 ;");
- say_units();
+ SERIAL_ECHOLNPGM(" G21 ; Units in mm");
#endif
- SERIAL_EOL();
#if ENABLED(ULTIPANEL)
@@ -2113,16 +1715,9 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Steps per unit:");
}
CONFIG_ECHO_START;
- #if ENABLED(HANGPRINTER)
- SERIAL_ECHOPAIR(" M92 A", LINEAR_UNIT(planner.axis_steps_per_mm[A_AXIS]));
- SERIAL_ECHOPAIR(" B", LINEAR_UNIT(planner.axis_steps_per_mm[B_AXIS]));
- SERIAL_ECHOPAIR(" C", LINEAR_UNIT(planner.axis_steps_per_mm[C_AXIS]));
- SERIAL_ECHOPAIR(" D", LINEAR_UNIT(planner.axis_steps_per_mm[D_AXIS]));
- #else
- SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.axis_steps_per_mm[X_AXIS]));
- SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.axis_steps_per_mm[Y_AXIS]));
- SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.axis_steps_per_mm[Z_AXIS]));
- #endif
+ SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.axis_steps_per_mm[X_AXIS]));
+ SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.axis_steps_per_mm[Y_AXIS]));
+ SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.axis_steps_per_mm[Z_AXIS]));
#if DISABLED(DISTINCT_E_FACTORS)
SERIAL_ECHOPAIR(" E", VOLUMETRIC_UNIT(planner.axis_steps_per_mm[E_AXIS]));
#endif
@@ -2140,16 +1735,9 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Maximum feedrates (units/s):");
}
CONFIG_ECHO_START;
- #if ENABLED(HANGPRINTER)
- SERIAL_ECHOPAIR(" M203 A", LINEAR_UNIT(planner.max_feedrate_mm_s[A_AXIS]));
- SERIAL_ECHOPAIR(" B", LINEAR_UNIT(planner.max_feedrate_mm_s[B_AXIS]));
- SERIAL_ECHOPAIR(" C", LINEAR_UNIT(planner.max_feedrate_mm_s[C_AXIS]));
- SERIAL_ECHOPAIR(" D", LINEAR_UNIT(planner.max_feedrate_mm_s[D_AXIS]));
- #else
- SERIAL_ECHOPAIR(" M203 X", LINEAR_UNIT(planner.max_feedrate_mm_s[X_AXIS]));
- SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.max_feedrate_mm_s[Y_AXIS]));
- SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.max_feedrate_mm_s[Z_AXIS]));
- #endif
+ SERIAL_ECHOPAIR(" M203 X", LINEAR_UNIT(planner.max_feedrate_mm_s[X_AXIS]));
+ SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.max_feedrate_mm_s[Y_AXIS]));
+ SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.max_feedrate_mm_s[Z_AXIS]));
#if DISABLED(DISTINCT_E_FACTORS)
SERIAL_ECHOPAIR(" E", VOLUMETRIC_UNIT(planner.max_feedrate_mm_s[E_AXIS]));
#endif
@@ -2167,16 +1755,9 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Maximum Acceleration (units/s2):");
}
CONFIG_ECHO_START;
- #if ENABLED(HANGPRINTER)
- SERIAL_ECHOPAIR(" M201 A", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[A_AXIS]));
- SERIAL_ECHOPAIR(" B", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[B_AXIS]));
- SERIAL_ECHOPAIR(" C", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[C_AXIS]));
- SERIAL_ECHOPAIR(" D", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[D_AXIS]));
- #else
- SERIAL_ECHOPAIR(" M201 X", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[X_AXIS]));
- SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[Y_AXIS]));
- SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[Z_AXIS]));
- #endif
+ SERIAL_ECHOPAIR(" M201 X", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[X_AXIS]));
+ SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[Y_AXIS]));
+ SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.max_acceleration_mm_per_s2[Z_AXIS]));
#if DISABLED(DISTINCT_E_FACTORS)
SERIAL_ECHOPAIR(" E", VOLUMETRIC_UNIT(planner.max_acceleration_mm_per_s2[E_AXIS]));
#endif
@@ -2200,42 +1781,16 @@ void MarlinSettings::reset() {
if (!forReplay) {
CONFIG_ECHO_START;
- SERIAL_ECHOPGM("Advanced: Q S T");
- #if ENABLED(JUNCTION_DEVIATION)
- SERIAL_ECHOPGM(" J");
- #else
- #if ENABLED(HANGPRINTER)
- SERIAL_ECHOPGM(" A B C D");
- #else
- SERIAL_ECHOPGM(" X Y Z");
- #endif
- #endif
- #if DISABLED(JUNCTION_DEVIATION) || ENABLED(LIN_ADVANCE)
- SERIAL_ECHOPGM(" E");
- #endif
- SERIAL_EOL();
+ SERIAL_ECHOLNPGM("Advanced: S T B X Z E");
}
CONFIG_ECHO_START;
- SERIAL_ECHOPAIR(" M205 Q", LINEAR_UNIT(planner.min_segment_time_us));
- SERIAL_ECHOPAIR(" S", LINEAR_UNIT(planner.min_feedrate_mm_s));
+ SERIAL_ECHOPAIR(" M205 S", LINEAR_UNIT(planner.min_feedrate_mm_s));
SERIAL_ECHOPAIR(" T", LINEAR_UNIT(planner.min_travel_feedrate_mm_s));
-
- #if ENABLED(JUNCTION_DEVIATION)
- SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.junction_deviation_mm));
- #else
- #if ENABLED(HANGPRINTER)
- SERIAL_ECHOPAIR(" A", LINEAR_UNIT(planner.max_jerk[A_AXIS]));
- SERIAL_ECHOPAIR(" B", LINEAR_UNIT(planner.max_jerk[B_AXIS]));
- SERIAL_ECHOPAIR(" C", LINEAR_UNIT(planner.max_jerk[C_AXIS]));
- SERIAL_ECHOPAIR(" D", LINEAR_UNIT(planner.max_jerk[D_AXIS]));
- #else
- SERIAL_ECHOPAIR(" X", LINEAR_UNIT(planner.max_jerk[X_AXIS]));
- SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.max_jerk[Y_AXIS]));
- SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.max_jerk[Z_AXIS]));
- #endif
- SERIAL_ECHOPAIR(" E", LINEAR_UNIT(planner.max_jerk[E_AXIS]));
- #endif
- SERIAL_EOL();
+ SERIAL_ECHOPAIR(" B", planner.min_segment_time_us);
+ SERIAL_ECHOPAIR(" X", LINEAR_UNIT(planner.max_jerk[X_AXIS]));
+ SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.max_jerk[Y_AXIS]));
+ SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.max_jerk[Z_AXIS]));
+ SERIAL_ECHOLNPAIR(" E", LINEAR_UNIT(planner.max_jerk[E_AXIS]));
#if HAS_M206_COMMAND
if (!forReplay) {
@@ -2258,7 +1813,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" M218 T", (int)e);
SERIAL_ECHOPAIR(" X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e]));
- #if HAS_HOTEND_OFFSET_Z
+ #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) ||ENABLED(PARKING_EXTRUDER)
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]));
#endif
SERIAL_EOL();
@@ -2303,16 +1858,14 @@ void MarlinSettings::reset() {
#if ENABLED(MESH_BED_LEVELING)
- if (leveling_is_valid()) {
- for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
- for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
- CONFIG_ECHO_START;
- SERIAL_ECHOPAIR(" G29 S3 X", (int)px + 1);
- SERIAL_ECHOPAIR(" Y", (int)py + 1);
- SERIAL_ECHOPGM(" Z");
- SERIAL_ECHO_F(LINEAR_UNIT(mbl.z_values[px][py]), 5);
- SERIAL_EOL();
- }
+ for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
+ for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
+ CONFIG_ECHO_START;
+ SERIAL_ECHOPAIR(" G29 S3 X", (int)px + 1);
+ SERIAL_ECHOPAIR(" Y", (int)py + 1);
+ SERIAL_ECHOPGM(" Z");
+ SERIAL_PROTOCOL_F(LINEAR_UNIT(mbl.z_values[px][py]), 5);
+ SERIAL_EOL();
}
}
@@ -2326,29 +1879,11 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM(" meshes.\n");
}
- //ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large mesh's. A better (more terse)
- // solution needs to be found.
- #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
-
- if (leveling_is_valid()) {
- for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
- for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
- CONFIG_ECHO_START;
- SERIAL_ECHOPAIR(" G29 W I", (int)px);
- SERIAL_ECHOPAIR(" J", (int)py);
- SERIAL_ECHOPGM(" Z");
- SERIAL_ECHO_F(LINEAR_UNIT(z_values[px][py]), 5);
- SERIAL_EOL();
- }
- }
- }
-
#endif
#endif // HAS_LEVELING
#if ENABLED(DELTA)
-
if (!forReplay) {
CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Endstop adjustment:");
@@ -2372,26 +1907,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(delta_tower_angle_trim[C_AXIS]));
SERIAL_EOL();
- #elif ENABLED(HANGPRINTER)
- if (!forReplay) {
- CONFIG_ECHO_START;
- SERIAL_ECHOLNPGM("Hangprinter settings: W E R T Y U I O P S");
- }
- CONFIG_ECHO_START;
- SERIAL_ECHOPAIR(" M665 W", anchor_A_y);
- SERIAL_ECHOPAIR(" E", anchor_A_z);
- SERIAL_ECHOPAIR(" R", anchor_B_x);
- SERIAL_ECHOPAIR(" T", anchor_B_y);
- SERIAL_ECHOPAIR(" Y", anchor_B_z);
- SERIAL_ECHOPAIR(" U", anchor_C_x);
- SERIAL_ECHOPAIR(" I", anchor_C_y);
- SERIAL_ECHOPAIR(" O", anchor_C_z);
- SERIAL_ECHOPAIR(" P", anchor_D_z);
- SERIAL_ECHOPAIR(" S", delta_segments_per_second);
- SERIAL_EOL();
-
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
-
if (!forReplay) {
CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Endstop adjustment:");
@@ -2399,17 +1915,16 @@ void MarlinSettings::reset() {
CONFIG_ECHO_START;
SERIAL_ECHOPGM(" M666");
#if ENABLED(X_DUAL_ENDSTOPS)
- SERIAL_ECHOPAIR(" X", LINEAR_UNIT(endstops.x_endstop_adj));
+ SERIAL_ECHOPAIR(" X", LINEAR_UNIT(x_endstop_adj));
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
- SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(endstops.y_endstop_adj));
+ SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(y_endstop_adj));
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
- SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(endstops.z_endstop_adj));
+ SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(z_endstop_adj));
#endif
SERIAL_EOL();
-
- #endif // [XYZ]_DUAL_ENDSTOPS
+ #endif // DELTA
#if ENABLED(ULTIPANEL)
if (!forReplay) {
@@ -2442,7 +1957,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, e)));
#if ENABLED(PID_EXTRUSION_SCALING)
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e));
- if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len);
+ if (e == 0) SERIAL_ECHOPAIR(" L", lpq_len);
#endif
SERIAL_EOL();
}
@@ -2457,7 +1972,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
#if ENABLED(PID_EXTRUSION_SCALING)
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0));
- SERIAL_ECHOPAIR(" L", thermalManager.lpq_len);
+ SERIAL_ECHOPAIR(" L", lpq_len);
#endif
SERIAL_EOL();
}
@@ -2489,26 +2004,26 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Retract: S F Z");
}
CONFIG_ECHO_START;
- SERIAL_ECHOPAIR(" M207 S", LINEAR_UNIT(fwretract.retract_length));
- SERIAL_ECHOPAIR(" W", LINEAR_UNIT(fwretract.swap_retract_length));
- SERIAL_ECHOPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(fwretract.retract_feedrate_mm_s)));
- SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(fwretract.retract_zlift));
+ SERIAL_ECHOPAIR(" M207 S", LINEAR_UNIT(retract_length));
+ SERIAL_ECHOPAIR(" W", LINEAR_UNIT(swap_retract_length));
+ SERIAL_ECHOPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(retract_feedrate_mm_s)));
+ SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(retract_zlift));
if (!forReplay) {
CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Recover: S F");
}
CONFIG_ECHO_START;
- SERIAL_ECHOPAIR(" M208 S", LINEAR_UNIT(fwretract.retract_recover_length));
- SERIAL_ECHOPAIR(" W", LINEAR_UNIT(fwretract.swap_retract_recover_length));
- SERIAL_ECHOLNPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(fwretract.retract_recover_feedrate_mm_s)));
+ SERIAL_ECHOPAIR(" M208 S", LINEAR_UNIT(retract_recover_length));
+ SERIAL_ECHOPAIR(" W", LINEAR_UNIT(swap_retract_recover_length));
+ SERIAL_ECHOLNPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(retract_recover_feedrate_mm_s)));
if (!forReplay) {
CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover");
}
CONFIG_ECHO_START;
- SERIAL_ECHOLNPAIR(" M209 S", fwretract.autoretract_enabled ? 1 : 0);
+ SERIAL_ECHOLNPAIR(" M209 S", autoretract_enabled ? 1 : 0);
#endif // FWRETRACT
@@ -2518,8 +2033,7 @@ void MarlinSettings::reset() {
#if HAS_BED_PROBE
if (!forReplay) {
CONFIG_ECHO_START;
- SERIAL_ECHOPGM("Z-Probe Offset");
- say_units(true);
+ SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
}
CONFIG_ECHO_START;
SERIAL_ECHOLNPAIR(" M851 Z", LINEAR_UNIT(zprobe_zoffset));
@@ -2535,190 +2049,84 @@ void MarlinSettings::reset() {
}
CONFIG_ECHO_START;
#if ENABLED(SKEW_CORRECTION_FOR_Z)
- SERIAL_ECHOPGM(" M852 I");
- SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6);
- SERIAL_ECHOPGM(" J");
- SERIAL_ECHO_F(LINEAR_UNIT(planner.xz_skew_factor), 6);
- SERIAL_ECHOPGM(" K");
- SERIAL_ECHO_F(LINEAR_UNIT(planner.yz_skew_factor), 6);
- SERIAL_EOL();
+ SERIAL_ECHOPAIR(" M852 I", LINEAR_UNIT(planner.xy_skew_factor));
+ SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.xz_skew_factor));
+ SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(planner.yz_skew_factor));
#else
- SERIAL_ECHOPGM(" M852 S");
- SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6);
- SERIAL_EOL();
+ SERIAL_ECHOLNPAIR(" M852 S", LINEAR_UNIT(planner.xy_skew_factor));
#endif
#endif
+ /**
+ * TMC2130 stepper driver current
+ */
#if HAS_TRINAMIC
-
- /**
- * TMC2130 / TMC2208 stepper driver current
- */
if (!forReplay) {
CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Stepper driver current:");
}
CONFIG_ECHO_START;
- #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
- say_M906();
+ SERIAL_ECHO(" M906");
+ #if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
+ SERIAL_ECHOPAIR(" X ", stepperX.getCurrent());
#endif
- #if AXIS_IS_TMC(X)
- SERIAL_ECHOPAIR(" X", stepperX.getCurrent());
+ #if ENABLED(Y_IS_TMC2130) || ENABLED(Y_IS_TMC2208)
+ SERIAL_ECHOPAIR(" Y ", stepperY.getCurrent());
#endif
- #if AXIS_IS_TMC(Y)
- SERIAL_ECHOPAIR(" Y", stepperY.getCurrent());
+ #if ENABLED(Z_IS_TMC2130) || ENABLED(Z_IS_TMC2208)
+ SERIAL_ECHOPAIR(" Z ", stepperZ.getCurrent());
#endif
- #if AXIS_IS_TMC(Z)
- SERIAL_ECHOPAIR(" Z", stepperZ.getCurrent());
+ #if ENABLED(X2_IS_TMC2130) || ENABLED(X2_IS_TMC2208)
+ SERIAL_ECHOPAIR(" X2 ", stepperX2.getCurrent());
#endif
- #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
- SERIAL_EOL();
+ #if ENABLED(Y2_IS_TMC2130) || ENABLED(Y2_IS_TMC2208)
+ SERIAL_ECHOPAIR(" Y2 ", stepperY2.getCurrent());
#endif
- #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2)
- say_M906();
- SERIAL_ECHOPGM(" I1");
+ #if ENABLED(Z2_IS_TMC2130) || ENABLED(Z2_IS_TMC2208)
+ SERIAL_ECHOPAIR(" Z2 ", stepperZ2.getCurrent());
#endif
- #if AXIS_IS_TMC(X2)
- SERIAL_ECHOPAIR(" X", stepperX2.getCurrent());
+ #if ENABLED(E0_IS_TMC2130) || ENABLED(E0_IS_TMC2208)
+ SERIAL_ECHOPAIR(" E0 ", stepperE0.getCurrent());
#endif
- #if AXIS_IS_TMC(Y2)
- SERIAL_ECHOPAIR(" Y", stepperY2.getCurrent());
+ #if ENABLED(E1_IS_TMC2130) || ENABLED(E1_IS_TMC2208)
+ SERIAL_ECHOPAIR(" E1 ", stepperE1.getCurrent());
#endif
- #if AXIS_IS_TMC(Z2)
- SERIAL_ECHOPAIR(" Z", stepperZ2.getCurrent());
+ #if ENABLED(E2_IS_TMC2130) || ENABLED(E2_IS_TMC2208)
+ SERIAL_ECHOPAIR(" E2 ", stepperE2.getCurrent());
#endif
- #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2)
- SERIAL_EOL();
+ #if ENABLED(E3_IS_TMC2130) || ENABLED(E3_IS_TMC2208)
+ SERIAL_ECHOPAIR(" E3 ", stepperE3.getCurrent());
#endif
- #if AXIS_IS_TMC(E0)
- say_M906();
- SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getCurrent());
- #endif
- #if E_STEPPERS > 1 && AXIS_IS_TMC(E1)
- say_M906();
- SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getCurrent());
- #endif
- #if E_STEPPERS > 2 && AXIS_IS_TMC(E2)
- say_M906();
- SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getCurrent());
- #endif
- #if E_STEPPERS > 3 && AXIS_IS_TMC(E3)
- say_M906();
- SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getCurrent());
- #endif
- #if E_STEPPERS > 4 && AXIS_IS_TMC(E4)
- say_M906();
- SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getCurrent());
+ #if ENABLED(E4_IS_TMC2130) || ENABLED(E4_IS_TMC2208)
+ SERIAL_ECHOPAIR(" E4 ", stepperE4.getCurrent());
#endif
SERIAL_EOL();
+ #endif
- /**
- * TMC2130 / TMC2208 / TRAMS Hybrid Threshold
- */
- #if ENABLED(HYBRID_THRESHOLD)
- if (!forReplay) {
- CONFIG_ECHO_START;
- SERIAL_ECHOLNPGM("Hybrid Threshold:");
- }
+ /**
+ * TMC2130 Sensorless homing thresholds
+ */
+ #if ENABLED(SENSORLESS_HOMING)
+ if (!forReplay) {
CONFIG_ECHO_START;
- #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
- say_M913();
- #endif
- #if AXIS_IS_TMC(X)
- SERIAL_ECHOPAIR(" X", TMC_GET_PWMTHRS(X, X));
- #endif
- #if AXIS_IS_TMC(Y)
- SERIAL_ECHOPAIR(" Y", TMC_GET_PWMTHRS(Y, Y));
- #endif
- #if AXIS_IS_TMC(Z)
- SERIAL_ECHOPAIR(" Z", TMC_GET_PWMTHRS(Z, Z));
- #endif
- #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
- SERIAL_EOL();
- #endif
- #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2)
- say_M913();
- SERIAL_ECHOPGM(" I1");
- #endif
- #if AXIS_IS_TMC(X2)
- SERIAL_ECHOPAIR(" X", TMC_GET_PWMTHRS(X, X2));
- #endif
- #if AXIS_IS_TMC(Y2)
- SERIAL_ECHOPAIR(" Y", TMC_GET_PWMTHRS(Y, Y2));
- #endif
- #if AXIS_IS_TMC(Z2)
- SERIAL_ECHOPAIR(" Z", TMC_GET_PWMTHRS(Z, Z2));
- #endif
- #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2)
- SERIAL_EOL();
- #endif
- #if AXIS_IS_TMC(E0)
- say_M913();
- SERIAL_ECHOLNPAIR(" T0 E", TMC_GET_PWMTHRS(E, E0));
- #endif
- #if E_STEPPERS > 1 && AXIS_IS_TMC(E1)
- say_M913();
- SERIAL_ECHOLNPAIR(" T1 E", TMC_GET_PWMTHRS(E, E1));
- #endif
- #if E_STEPPERS > 2 && AXIS_IS_TMC(E2)
- say_M913();
- SERIAL_ECHOLNPAIR(" T2 E", TMC_GET_PWMTHRS(E, E2));
- #endif
- #if E_STEPPERS > 3 && AXIS_IS_TMC(E3)
- say_M913();
- SERIAL_ECHOLNPAIR(" T3 E", TMC_GET_PWMTHRS(E, E3));
- #endif
- #if E_STEPPERS > 4 && AXIS_IS_TMC(E4)
- say_M913();
- SERIAL_ECHOLNPAIR(" T4 E", TMC_GET_PWMTHRS(E, E4));
- #endif
- SERIAL_EOL();
- #endif // HYBRID_THRESHOLD
-
- /**
- * TMC2130 Sensorless homing thresholds
- */
- #if ENABLED(SENSORLESS_HOMING)
- if (!forReplay) {
- CONFIG_ECHO_START;
- SERIAL_ECHOLNPGM("Sensorless homing threshold:");
- }
- CONFIG_ECHO_START;
- #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
- say_M914();
- #if X_SENSORLESS
- SERIAL_ECHOPAIR(" X", stepperX.sgt());
- #endif
- #if Y_SENSORLESS
- SERIAL_ECHOPAIR(" Y", stepperY.sgt());
- #endif
- #if Z_SENSORLESS
- SERIAL_ECHOPAIR(" Z", stepperZ.sgt());
- #endif
- SERIAL_EOL();
- #endif
-
- #define X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && AXIS_HAS_STALLGUARD(X2))
- #define Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2))
- #define Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2))
- #if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS
- say_M914();
- SERIAL_ECHOPGM(" I1");
- #if X2_SENSORLESS
- SERIAL_ECHOPAIR(" X", stepperX2.sgt());
- #endif
- #if Y2_SENSORLESS
- SERIAL_ECHOPAIR(" Y", stepperY2.sgt());
- #endif
- #if Z2_SENSORLESS
- SERIAL_ECHOPAIR(" Z", stepperZ2.sgt());
- #endif
- SERIAL_EOL();
- #endif
-
- #endif // SENSORLESS_HOMING
-
- #endif // HAS_TRINAMIC
+ SERIAL_ECHOLNPGM("Sensorless homing threshold:");
+ }
+ CONFIG_ECHO_START;
+ SERIAL_ECHO(" M914");
+ #if ENABLED(X_IS_TMC2130)
+ SERIAL_ECHOPAIR(" X", stepperX.sgt());
+ #endif
+ #if ENABLED(X2_IS_TMC2130)
+ SERIAL_ECHOPAIR(" X2 ", stepperX2.sgt());
+ #endif
+ #if ENABLED(Y_IS_TMC2130)
+ SERIAL_ECHOPAIR(" Y", stepperY.sgt());
+ #endif
+ #if ENABLED(X2_IS_TMC2130)
+ SERIAL_ECHOPAIR(" Y2 ", stepperY2.sgt());
+ #endif
+ SERIAL_EOL();
+ #endif
/**
* Linear Advance
@@ -2729,7 +2137,8 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Linear Advance:");
}
CONFIG_ECHO_START;
- SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K);
+ SERIAL_ECHOPAIR(" M900 K", planner.extruder_advance_k);
+ SERIAL_ECHOLNPAIR(" R", planner.advance_ed_ratio);
#endif
#if HAS_MOTOR_CURRENT_PWM
@@ -2743,48 +2152,6 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" E", stepper.motor_current_setting[2]);
SERIAL_EOL();
#endif
-
- /**
- * Advanced Pause filament load & unload lengths
- */
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
- if (!forReplay) {
- CONFIG_ECHO_START;
- SERIAL_ECHOLNPGM("Filament load/unload lengths:");
- }
- CONFIG_ECHO_START;
- #if EXTRUDERS == 1
- say_M603();
- SERIAL_ECHOPAIR("L", LINEAR_UNIT(filament_change_load_length[0]));
- SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[0]));
- #else
- say_M603();
- SERIAL_ECHOPAIR("T0 L", LINEAR_UNIT(filament_change_load_length[0]));
- SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[0]));
- CONFIG_ECHO_START;
- say_M603();
- SERIAL_ECHOPAIR("T1 L", LINEAR_UNIT(filament_change_load_length[1]));
- SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[1]));
- #if EXTRUDERS > 2
- CONFIG_ECHO_START;
- say_M603();
- SERIAL_ECHOPAIR("T2 L", LINEAR_UNIT(filament_change_load_length[2]));
- SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[2]));
- #if EXTRUDERS > 3
- CONFIG_ECHO_START;
- say_M603();
- SERIAL_ECHOPAIR("T3 L", LINEAR_UNIT(filament_change_load_length[3]));
- SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[3]));
- #if EXTRUDERS > 4
- CONFIG_ECHO_START;
- say_M603();
- SERIAL_ECHOPAIR("T4 L", LINEAR_UNIT(filament_change_load_length[4]));
- SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[4]));
- #endif // EXTRUDERS > 4
- #endif // EXTRUDERS > 3
- #endif // EXTRUDERS > 2
- #endif // EXTRUDERS == 1
- #endif // ADVANCED_PAUSE_FEATURE
}
#endif // !DISABLE_M503
diff --git a/Marlin/configuration_store.h b/Marlin/configuration_store.h
index f7b50e0..e152e48 100644
--- a/Marlin/configuration_store.h
+++ b/Marlin/configuration_store.h
@@ -29,34 +29,17 @@ class MarlinSettings {
public:
MarlinSettings() { }
- static uint16_t datasize();
-
static void reset();
- static bool save(); // Return 'true' if data was saved
-
- FORCE_INLINE static bool init_eeprom() {
- reset();
- #if ENABLED(EEPROM_SETTINGS)
- const bool success = save();
- #if ENABLED(EEPROM_CHITCHAT)
- if (success) report();
- #endif
- return success;
- #else
- return true;
- #endif
- }
+ static bool save();
#if ENABLED(EEPROM_SETTINGS)
- static bool load(); // Return 'true' if data was loaded ok
- static bool validate(); // Return 'true' if EEPROM data is ok
+ static bool load();
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
- static uint16_t meshes_start_index();
- FORCE_INLINE static uint16_t meshes_end_index() { return meshes_end; }
+ FORCE_INLINE static int16_t get_start_of_meshes() { return meshes_begin; }
+ FORCE_INLINE static int16_t get_end_of_meshes() { return meshes_end; }
static uint16_t calc_num_meshes();
- static int mesh_slot_offset(const int8_t slot);
static void store_mesh(const int8_t slot);
static void load_mesh(const int8_t slot, void * const into=NULL);
@@ -79,20 +62,18 @@ class MarlinSettings {
static void postprocess();
#if ENABLED(EEPROM_SETTINGS)
-
- static bool eeprom_error, validating;
+ static bool eeprom_error;
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
- static constexpr uint16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
- // live at the very end of the eeprom
+ static int16_t meshes_begin;
+ const static int16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
+ // live at the very end of the eeprom
#endif
- static bool _load();
static void write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc);
- static void read_data(int &pos, uint8_t *value, uint16_t size, uint16_t *crc, const bool force=false);
- static bool size_error(const uint16_t size);
+ static void read_data(int &pos, uint8_t *value, uint16_t size, uint16_t *crc);
#endif
};
diff --git a/Marlin/dac_mcp4728.cpp b/Marlin/dac_mcp4728.cpp
index 783f9fb..a06346c 100644
--- a/Marlin/dac_mcp4728.cpp
+++ b/Marlin/dac_mcp4728.cpp
@@ -30,13 +30,11 @@
* http://arduino.cc/forum/index.php/topic,51842.0.html
*/
-#include "MarlinConfig.h"
-
-#if ENABLED(DAC_STEPPER_CURRENT)
-
#include "dac_mcp4728.h"
#include "enum.h"
+#if ENABLED(DAC_STEPPER_CURRENT)
+
uint16_t mcp4728_values[XYZE];
/**
diff --git a/Marlin/digipot_mcp4018.cpp b/Marlin/digipot_mcp4018.cpp
index 5871fdb..06622d0 100644
--- a/Marlin/digipot_mcp4018.cpp
+++ b/Marlin/digipot_mcp4018.cpp
@@ -89,7 +89,7 @@ static void i2c_send(const uint8_t channel, const byte v) {
// This is for the MCP4018 I2C based digipot
void digipot_i2c_set_current(uint8_t channel, float current) {
- i2c_send(channel, current_to_wiper(MIN(MAX(current, 0), float(DIGIPOT_A4988_MAX_CURRENT))));
+ i2c_send(channel, current_to_wiper(min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT))));
}
void digipot_i2c_init() {
diff --git a/Marlin/digipot_mcp4451.cpp b/Marlin/digipot_mcp4451.cpp
index fed84b2..d79915c 100644
--- a/Marlin/digipot_mcp4451.cpp
+++ b/Marlin/digipot_mcp4451.cpp
@@ -50,7 +50,7 @@ static void i2c_send(const byte addr, const byte a, const byte b) {
// This is for the MCP4451 I2C based digipot
void digipot_i2c_set_current(uint8_t channel, float current) {
- current = MIN((float) MAX(current, 0), DIGIPOT_I2C_MAX_CURRENT);
+ current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT);
// these addresses are specific to Azteeg X3 Pro, can be set to others,
// In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
byte addr = 0x2C; // channel 0-3
diff --git a/Marlin/dogm_bitmaps.h b/Marlin/dogm_bitmaps.h
index 42b94b7..4e0772a 100644
--- a/Marlin/dogm_bitmaps.h
+++ b/Marlin/dogm_bitmaps.h
@@ -21,1172 +21,543 @@
*/
/**
- * Standard Marlin Boot and Status Screen bitmaps
+ * Standard Marlin Bitmap for splashscreen
*
- * Use the Marlin Bitmap Converter to make your own:
- * http://marlinfw.org/tools/u8glib/converter.html
+ * You may use one of the following tools to generate the C++ bitmap array from
+ * a black and white image:
+ *
+ * - http://www.marlinfw.org/tools/u8glib/converter.html
+ * - http://www.digole.com/tools/PicturetoC_Hex_converter.php
+ *
+ * Please note that using the high-res version takes 402Bytes of PROGMEM.
*/
-#include "MarlinConfig.h"
-
+//#define START_BMPHIGH
#if ENABLED(SHOW_BOOTSCREEN)
-
- //#define START_BMPHIGH // Costs 399 bytes more flash
-
- #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
-
- #include "_Bootscreen.h"
-
- #ifndef CUSTOM_BOOTSCREEN_TIMEOUT
- #define CUSTOM_BOOTSCREEN_TIMEOUT 2500
- #endif
-
- #endif
-
#if ENABLED(START_BMPHIGH)
-
#define START_BMPWIDTH 112
+ #define START_BMPHEIGHT 38
const unsigned char start_bmp[] PROGMEM = {
- B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
- B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
- B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
- B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
- B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
- B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
- B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
- B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111,
- B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00011000,B00000000,B00011111,B11111111,
- B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00001111,B11111111,
- B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000111,B11111111,
- B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000011,B11111111,
- B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111,
- B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111,
- B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00111100,B00000011,B11110000,B01111111,
- B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00111100,B00000111,B11111100,B00111111,
- B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00111100,B00001111,B11111110,B00011111,
- B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00111100,B00011111,B11111110,B00001111,
- B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00111100,B00111111,B00111111,B00000111,
- B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00111100,B00111110,B00011111,B00000111,
- B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B10111100,B00111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B10111111,B11111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B10111111,B11111100,B00001111,B00000011,
- B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B10111111,B11111100,B00001111,B00000011,
- B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
- B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
- B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
- B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
- B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
- B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
- B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
- };
-
+ 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF,
+ 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF,
+ 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF,
+ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3F, 0xFF,
+ 0xC0, 0x0F, 0xC0, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x00, 0x1F, 0xFF,
+ 0xC0, 0x3F, 0xE1, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x0F, 0xFF,
+ 0xC0, 0x7F, 0xF3, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x07, 0xFF,
+ 0xC0, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x03, 0xFF,
+ 0xC1, 0xF8, 0x7F, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xFF,
+ 0xC1, 0xF0, 0x3F, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xFF,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x1F, 0x00, 0x03, 0xE0, 0x78, 0x3C, 0x03, 0xF0, 0x7F,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0xC0, 0x0F, 0xF8, 0x78, 0x3C, 0x07, 0xFC, 0x3F,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0xE0, 0x1F, 0xFC, 0x78, 0x3C, 0x0F, 0xFE, 0x1F,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0xF0, 0x3F, 0xFE, 0x78, 0x3C, 0x1F, 0xFE, 0x0F,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xF3, 0xF8, 0x3F, 0x3E, 0x78, 0x3C, 0x3F, 0x3F, 0x07,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xE0, 0xFC, 0x7C, 0x1F, 0x78, 0x3C, 0x3E, 0x1F, 0x07,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x7C, 0x7C, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x7C, 0x78, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xE0, 0x3C, 0x78, 0x00, 0x7C, 0x3C, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0x3F, 0xF8, 0x00, 0x7F, 0xBC, 0x3C, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0x3F, 0xF8, 0x00, 0x3F, 0xBF, 0xFC, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0xFF, 0x3F, 0xF8, 0x00, 0x1F, 0xBF, 0xFC, 0x0F, 0x03,
+ 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0x3F, 0xF8, 0x00, 0x0F, 0xBF, 0xFC, 0x0F, 0x03,
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+ 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E,
+ 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
+ 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
+ 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80 };
#else
-
#define START_BMPWIDTH 56
+ #define START_BMPHEIGHT 19
const unsigned char start_bmp[] PROGMEM = {
- B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
- B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
- B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
- B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
- B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
- B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
- B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
- B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B11100111,
- B10001100,B00110000,B11001111,B11000111,B11001100,B00110001,B11110011,
- B10001100,B00110000,B11011100,B11101100,B11101100,B00110011,B10111001,
- B10001100,B00110000,B11011000,B01101100,B01101100,B00110011,B00011001,
- B10001100,B00110000,B11010000,B01101100,B00001100,B00110011,B00011001,
- B10001100,B00110000,B11011000,B01101100,B00001100,B00110011,B00011001,
- B10001100,B00110000,B11011100,B01101100,B00001110,B00111011,B00011001,
- B10001100,B00110000,B11001111,B01111100,B00000111,B10011111,B00011001,
- B10001100,B00110000,B11000111,B01111100,B00000011,B10001111,B00011001,
- B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
- B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
- B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
- };
-
+ 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F,
+ 0x83, 0xCF, 0x00, 0x00, 0x0C, 0x30, 0x3F,
+ 0x87, 0xFF, 0x80, 0x00, 0x0C, 0x30, 0x1F,
+ 0x86, 0x79, 0x80, 0x00, 0x0C, 0x00, 0x0F,
+ 0x8C, 0x30, 0xC7, 0x83, 0x8C, 0x30, 0xE7,
+ 0x8C, 0x30, 0xCF, 0xC7, 0xCC, 0x31, 0xF3,
+ 0x8C, 0x30, 0xDC, 0xEC, 0xEC, 0x33, 0xB9,
+ 0x8C, 0x30, 0xD8, 0x6C, 0x6C, 0x33, 0x19,
+ 0x8C, 0x30, 0xD0, 0x6C, 0x0C, 0x33, 0x19,
+ 0x8C, 0x30, 0xD8, 0x6C, 0x0C, 0x33, 0x19,
+ 0x8C, 0x30, 0xDC, 0x6C, 0x0E, 0x3B, 0x19,
+ 0x8C, 0x30, 0xCF, 0x7C, 0x07, 0x9F, 0x19,
+ 0x8C, 0x30, 0xC7, 0x7C, 0x03, 0x8F, 0x19,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+ 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8 };
#endif
-
- #ifndef START_BMP_BYTEWIDTH
- #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8)
- #endif
- #ifndef START_BMPHEIGHT
- #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH))
- #endif
-
- static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data.");
-
#endif
-#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
+// Here comes a compile-time operation to match the extruder symbols
+// on the info screen to the set number of extruders in configuration.h
+//
+// When only one extruder is selected, the "1" on the symbol will not
+// be displayed.
- // This file must define STATUS_SCREENWIDTH and status_screen[012]_bmp.
- // It can also define STATUS_SCREEN_X, STATUS_SCREEN_{BED,FAN}_TEXT_X and
- // STATUS_SCREEN_HOTEND_TEXT_X(i) to modify draw locations.
- #include "_Statusscreen.h"
+#define STATUS_SCREENWIDTH 115 // Width in pixels
+#define STATUS_SCREENHEIGHT 19 // Height in pixels
-#else // !CUSTOM_STATUS_SCREEN_IMAGE
+#if HAS_TEMP_BED
+ #if HOTENDS == 0
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
+ #elif HOTENDS == 1
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
+ 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
- // Can also be overridden in Configuration.h
- // If you can afford it, try the 3-frame fan animation!
- #ifndef FAN_ANIM_FRAMES
- #define FAN_ANIM_FRAMES 2
- #endif
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
+ #elif HOTENDS == 2
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
- #if HAS_HEATED_BED
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
+ #else
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
- #define STATUS_SCREEN_X ( 8 + (HOTENDS ? 0 : 64))
- #define STATUS_SCREENWIDTH (120 - (HOTENDS ? 0 : 64))
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
+ };
+ #endif // HOTENDS
+#else
+ #if HOTENDS == 0
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ #elif HOTENDS == 1
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
- #if HOTENDS == 0
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ #elif HOTENDS == 2
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00000000,B00100000,B10000010,B00000000,B00100001,B11111111,B00001000,
- B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B00000000,B00100000,B10000010,B00000000,B00100000,B01111100,B00001000,
- B00000000,B01000001,B00000100,B00000000,B00100001,B11111111,B00001000,
- B00000000,B10000010,B00001000,B00000000,B00100111,B11000111,B11001000,
- B00000000,B10000010,B00001000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B01000001,B00000100,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00100000,B10000010,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B11111111,B11111111,B11000000,B00111110,B00000000,B11111000,
- B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00000000,B00100000,B10000010,B00000000,B00100000,B00111001,B11101000,
- B00000000,B00010000,B01000001,B00000000,B00100000,B01111111,B11111000,
- B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00100000,B10000010,B00000000,B00111111,B11111100,B00001000,
- B00000000,B01000001,B00000100,B00000000,B00101111,B00111000,B00001000,
- B00000000,B10000010,B00001000,B00000000,B00101110,B00011000,B00001000,
- B00000000,B10000010,B00001000,B00000000,B00101100,B00011110,B00001000,
- B00000000,B01000001,B00000100,B00000000,B00110000,B00011110,B00011000,
- B00000000,B00100000,B10000010,B00000000,B00110000,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B11111111,B11111111,B11000000,B00111110,B00011000,B11111000,
- B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00000000,B00100000,B10000010,B00000000,B00101111,B10111000,B00001000,
- B00000000,B00010000,B01000001,B00000000,B00111111,B11111100,B00001000,
- B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00100000,B10000010,B00000000,B00100000,B01111111,B11111000,
- B00000000,B01000001,B00000100,B00000000,B00100000,B00111011,B11101000,
- B00000000,B10000010,B00001000,B00000000,B00100000,B01110001,B11101000,
- B00000000,B10000010,B00001000,B00000000,B00100000,B11110000,B11101000,
- B00000000,B01000001,B00000100,B00000000,B00110001,B11110000,B01011000,
- B00000000,B00100000,B10000010,B00000000,B00110011,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B11111111,B11111111,B11000000,B00111110,B00110000,B11111000,
- B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B00000000,B01000001,B00000100,B00000000,B00101100,B00000000,B11010000,
- B00000000,B10000010,B00001000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B10000010,B00001000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B01000001,B00000100,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00100000,B10000010,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B00000000,B01000001,B00000100,B00000000,B00101111,B00000011,B11010000,
- B00000000,B10000010,B00001000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B10000010,B00001000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B01000001,B00000100,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00100000,B10000010,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- #endif
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ #else
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
- #elif HOTENDS == 1
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100001,B11111111,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B01111100,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100001,B11111111,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100111,B11000111,B11001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101111,B11000111,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00110111,B10000011,B11011000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110111,B10000011,B11011000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00000000,B11111000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B00111001,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111111,B11111000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00111111,B11111100,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00101111,B00111000,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101110,B00011000,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101100,B00011110,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00110000,B00011110,B00011000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110000,B00011111,B00011000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00011000,B11111000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00101111,B10111000,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111100,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B01111111,B11111000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100000,B00111011,B11101000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B01110001,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B11110000,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00110001,B11110000,B01011000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110011,B11110000,B00011000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00110000,B11111000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B00110000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B01111000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100000,B11111100,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110000,B11111100,B00110000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101111,B10000111,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100111,B10000111,B10010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100011,B10000111,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110001,B10000110,B00110000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- #endif
-
- #elif HOTENDS == 2
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100001,B11111111,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B01111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100001,B11111111,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100111,B11000111,B11001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101111,B11000111,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00110111,B10000011,B11011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110111,B10000011,B11011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00000000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B00111001,B11101000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111111,B11111000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00111111,B11111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00101111,B00111000,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101110,B00011000,B00001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101100,B00011110,B00001000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00110000,B00011110,B00011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110000,B00011111,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00011000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00101111,B10111000,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B01111111,B11111000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100000,B00111011,B11101000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B01110001,B11101000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B11110000,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00110001,B11110000,B01011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110011,B11110000,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00110000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00101100,B00000000,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100000,B01111000,B00010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100000,B11111100,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110000,B11111100,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00101111,B00000011,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00101111,B10000111,B11010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B10000010,B00001000,B00000000,B00100111,B10000111,B10010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B01000001,B00000100,B00000000,B00100011,B10000111,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,B00110001,B10000110,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- #endif
-
- #else // HOTENDS > 2
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00100000,B10000010,B00000000,B00100001,B11111111,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111100,B00001000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00100000,B10000010,B00000000,B00100000,B01111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B01000001,B00000100,B00000000,B00100001,B11111111,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B10000010,B00001000,B00000000,B00100111,B11000111,B11001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B10000010,B00001000,B00000000,B00101111,B11000111,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B01000001,B00000100,B00000000,B00110111,B10000011,B11011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00100000,B10000010,B00000000,B00110111,B10000011,B11011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00000000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00100000,B10000010,B00000000,B00100000,B00111001,B11101000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111111,B11111000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00100000,B10000010,B00000000,B00111111,B11111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B01000001,B00000100,B00000000,B00101111,B00111000,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B10000010,B00001000,B00000000,B00101110,B00011000,B00001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B10000010,B00001000,B00000000,B00101100,B00011110,B00001000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B01000001,B00000100,B00000000,B00110000,B00011110,B00011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00100000,B10000010,B00000000,B00110000,B00011111,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00011000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00100000,B10000010,B00000000,B00101111,B10111000,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00100000,B10000010,B00000000,B00100000,B01111111,B11111000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B01000001,B00000100,B00000000,B00100000,B00111011,B11101000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B10000010,B00001000,B00000000,B00100000,B01110001,B11101000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B10000010,B00001000,B00000000,B00100000,B11110000,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B01000001,B00000100,B00000000,B00110001,B11110000,B01011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00100000,B10000010,B00000000,B00110011,B11110000,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B11111111,B11111111,B11000000,B00111110,B00110000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,B00101111,B01111011,B11010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00100000,B10000010,B00000000,B00101110,B00110001,B11010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B01000001,B00000100,B00000000,B00101100,B00000000,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B10000010,B00001000,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B10000010,B00001000,B00000000,B00100000,B01111000,B00010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B01000001,B00000100,B00000000,B00100000,B11111100,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00100000,B10000010,B00000000,B00110000,B11111100,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,B00100000,B01111000,B00010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B01000001,B00000100,B00000000,B00101111,B00000011,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B10000010,B00001000,B00000000,B00101111,B10000111,B11010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B10000010,B00001000,B00000000,B00100111,B10000111,B10010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B01000001,B00000100,B00000000,B00100011,B10000111,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00100000,B10000010,B00000000,B00110001,B10000110,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
- };
- #endif
-
- #endif // HOTENDS
-
- #else // !HAS_HEATED_BED
-
- #define STATUS_SCREEN_X ( 8 + (HOTENDS ? 0 : 96))
- #define STATUS_SCREENWIDTH (120 - (HOTENDS ? 0 : 96))
-
- #if HOTENDS == 0
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00111111,B11111111,B11111000,
- B00111110,B00000000,B11111000,
- B00111001,B00000001,B00111000,
- B00110111,B10000011,B11011000,
- B00110111,B10000011,B11011000,
- B00101111,B11000111,B11101000,
- B00100111,B11000111,B11001000,
- B00100001,B11111111,B00001000,
- B00100000,B01111100,B00001000,
- B00100000,B01111100,B00001000,
- B00100000,B01111100,B00001000,
- B00100001,B11111111,B00001000,
- B00100111,B11000111,B11001000,
- B00101111,B11000111,B11101000,
- B00110111,B10000011,B11011000,
- B00110111,B10000011,B11011000,
- B00111001,B00000001,B00111000,
- B00111110,B00000000,B11111000,
- B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00111111,B11111111,B11111000,
- B00111110,B00110000,B11111000,
- B00111001,B11110000,B00111000,
- B00110001,B11110000,B00011000,
- B00110000,B11110000,B00011000,
- B00100000,B11110000,B01101000,
- B00100000,B00110001,B11101000,
- B00100000,B00111001,B11101000,
- B00100000,B01111111,B11111000,
- B00111111,B11111111,B11111000,
- B00111111,B11111100,B00001000,
- B00101111,B00111000,B00001000,
- B00101110,B00011000,B00001000,
- B00101100,B00011110,B00001000,
- B00110000,B00011110,B00011000,
- B00110000,B00011111,B00011000,
- B00111000,B00011111,B00111000,
- B00111110,B00011000,B11111000,
- B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00111111,B11111111,B11111000,
- B00111110,B00011000,B11111000,
- B00111000,B00011111,B00111000,
- B00110000,B00011111,B10011000,
- B00110100,B00011111,B00011000,
- B00101110,B00011110,B00001000,
- B00101111,B00011100,B00001000,
- B00101111,B10111000,B00001000,
- B00111111,B11111100,B00001000,
- B00111111,B11111111,B11111000,
- B00100000,B01111111,B11111000,
- B00100000,B00111011,B11101000,
- B00100000,B01110001,B11101000,
- B00100000,B11110000,B11101000,
- B00110001,B11110000,B01011000,
- B00110011,B11110000,B00011000,
- B00111001,B11110000,B00111000,
- B00111110,B00110000,B11111000,
- B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00111111,B11111111,B11110000,
- B00111000,B00000000,B01110000,
- B00110000,B11111100,B00110000,
- B00100000,B11111100,B00010000,
- B00100000,B01111000,B00010000,
- B00100000,B00110000,B00010000,
- B00101100,B00000000,B11010000,
- B00101110,B00110001,B11010000,
- B00101111,B01111011,B11010000,
- B00101111,B01111011,B11010000,
- B00101110,B00110001,B11010000,
- B00101100,B00000000,B11010000,
- B00100000,B00110000,B00010000,
- B00100000,B01111000,B00010000,
- B00100000,B11111100,B00010000,
- B00110000,B11111100,B00110000,
- B00111000,B00000000,B01110000,
- B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00111111,B11111111,B11110000,
- B00111000,B00000000,B01110000,
- B00110001,B10000110,B00110000,
- B00100011,B10000111,B00010000,
- B00100111,B10000111,B10010000,
- B00101111,B10000111,B11010000,
- B00101111,B00000011,B11010000,
- B00100000,B00110000,B00010000,
- B00100000,B01111000,B00010000,
- B00100000,B01111000,B00010000,
- B00100000,B00110000,B00010000,
- B00101111,B00000011,B11010000,
- B00101111,B10000111,B11010000,
- B00100111,B10000111,B10010000,
- B00100011,B10000111,B00010000,
- B00110001,B10000110,B00110000,
- B00111000,B00000000,B01110000,
- B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000
- };
- #endif
-
- #elif HOTENDS == 1
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100001,B11111111,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100001,B11111111,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00111001,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111111,B11111000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111100,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00111000,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011000,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00011110,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011110,B00011000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B00011000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10111000,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111100,B00001000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111111,B11111000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00111011,B11101000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01110001,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B11101000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B01011000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110011,B11110000,B00011000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00110001,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B01111011,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B01111011,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00110001,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
- };
- #endif
-
- #elif HOTENDS == 2
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100001,B11111111,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100001,B11111111,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00111001,B11101000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111111,B11111000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00111000,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011000,B00001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00011110,B00001000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011110,B00011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10111000,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111111,B11111000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00111011,B11101000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01110001,B11101000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B01011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110011,B11110000,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00110001,B11010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B01111011,B11010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B01111011,B11010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00110001,B11010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
- };
- #endif
-
- #else // HOTENDS > 2
-
- #if FAN_ANIM_FRAMES == 3
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100001,B11111111,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00000000,B00000000,B00000000,B00100001,B11111111,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00000000,B00000000,B00000000,B00100111,B11000111,B11001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00101111,B11000111,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00110111,B10000011,B11011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111001,B00000001,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00000000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11110000,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B01101000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110001,B11101000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B00111001,B11101000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111111,B11111000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111100,B00001000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00000000,B00000000,B00000000,B00101111,B00111000,B00001000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011000,B00001000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00101100,B00011110,B00001000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011110,B00011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- const unsigned char status_screen2_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00011000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00011111,B00111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B00011111,B10011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110100,B00011111,B00011000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101110,B00011110,B00001000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00011100,B00001000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00101111,B10111000,B00001000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111100,B00001000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111111,B11111000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B00111011,B11101000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00000000,B00000000,B00000000,B00100000,B01110001,B11101000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B11110000,B11101000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00110001,B11110000,B01011000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00110011,B11110000,B00011000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111001,B11110000,B00111000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00111110,B00110000,B11111000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111000
- };
- #else
- const unsigned char status_screen0_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00101110,B00110001,B11010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00101111,B01111011,B11010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00101111,B01111011,B11010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00101110,B00110001,B11010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
- };
- const unsigned char status_screen1_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111111,B11000000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B01111101,B11100000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01111001,B11100000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
- B01110101,B11100000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
- B00111101,B11000000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
- B00111101,B11000000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
- B01111101,B11100000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
- B01111101,B11100000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00100011,B10000111,B00010000,
- B01111111,B11100000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00110001,B10000110,B00110000,
- B00011111,B10000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
- B00001111,B00000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
- B00000110,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
- };
- #endif
-
- #endif // HOTENDS
-
- #endif // !HAS_HEATED_BED
-
-#endif // !CUSTOM_STATUS_SCREEN_IMAGE
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
+ 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
+ 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
+ 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
+ 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
+ 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
+ 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
+ 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
+ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ #endif // HOTENDS
+#endif // HAS_TEMP_BED
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
const unsigned char cw_bmp[] PROGMEM = {
- B00000011,B11111000,B00000000,
- B00001111,B11111110,B00000000,
- B00011110,B00001111,B00000000,
- B00111000,B00000111,B00000000,
- B00111000,B00000011,B10000000,
- B01110000,B00000011,B10000000,
- B01110000,B00001111,B11100000,
- B01110000,B00000111,B11000000,
- B01110000,B00000011,B10000000,
- B01110000,B00000001,B00000000,
- B01110000,B00000000,B00000000,
- B00111000,B00000000,B00000000,
- B00111000,B00000111,B00000000,
- B00011110,B00001111,B00000000,
- B00001111,B11111110,B00000000,
- B00000011,B11111000,B00000000
+ 0x03,0xF8,0x00, // 000000111111100000000000
+ 0x0F,0xF7,0x00, // 000011111111111000000000
+ 0x17,0x0F,0x00, // 000111100000111100000000
+ 0x38,0x07,0x00, // 001110000000011100000000
+ 0x38,0x03,0x80, // 001110000000001110000000
+ 0x70,0x03,0x80, // 011100000000001110000000
+ 0x70,0x0F,0xE0, // 011100000000111111100000
+ 0x70,0x07,0xC0, // 011100000000011111000000
+ 0x70,0x03,0x80, // 011100000000001110000000
+ 0x70,0x01,0x00, // 011100000000000100000000
+ 0x70,0x00,0x00, // 011100000000000000000000
+ 0x68,0x00,0x00, // 001110000000000000000000
+ 0x38,0x07,0x00, // 001110000000011100000000
+ 0x17,0x0F,0x00, // 000111100000111100000000
+ 0x0F,0xFE,0x00, // 000011111111111000000000
+ 0x03,0xF8,0x00 // 000000111111100000000000
};
const unsigned char ccw_bmp[] PROGMEM = {
- B00000000,B11111110,B00000000,
- B00000011,B11111111,B10000000,
- B00000111,B10000011,B11000000,
- B00001110,B00000001,B11000000,
- B00001110,B00000000,B11100000,
- B00011100,B00000000,B11100000,
- B01111111,B00000000,B11100000,
- B00111110,B00000000,B11100000,
- B00011100,B00000000,B11100000,
- B00001000,B00000000,B11100000,
- B00000000,B00000000,B11100000,
- B00000000,B00000001,B11000000,
- B00001110,B00000001,B11000000,
- B00001111,B00000111,B10000000,
- B00000111,B11111111,B00000000,
- B00000001,B11111100,B00000000
+ 0x00,0xFE,0x00, // 000000001111111000000000
+ 0x03,0xFF,0x80, // 000000111111111110000000
+ 0x07,0x83,0xC0, // 000001111000001111000000
+ 0x0E,0x01,0xC0, // 000011100000000111000000
+ 0x0E,0x00,0xE0, // 000011100000000011100000
+ 0x1C,0x00,0xE0, // 000111000000000011100000
+ 0x7F,0x00,0xE0, // 011111110000000011100000
+ 0x3E,0x00,0xE0, // 001111100000000011100000
+ 0x1C,0x00,0xE0, // 000111000000000011100000
+ 0x08,0x00,0xE0, // 000010000000000011100000
+ 0x00,0x00,0xE0, // 000000000000000011100000
+ 0x00,0x01,0xC0, // 000000000000000111000000
+ 0x0E,0x01,0xC0, // 000011100000000111000000
+ 0x0F,0x07,0x80, // 000011110000011110000000
+ 0x07,0xFF,0x00, // 000001111111111100000000
+ 0x01,0xFC,0x00 // 000000011111110000000000
};
const unsigned char up_arrow_bmp[] PROGMEM = {
- B00000100,B00000000,
- B00001110,B00000000,
- B00011111,B00000000,
- B00111111,B10000000,
- B01111111,B11000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000
+ 0x04,0x00, // 000001000000
+ 0x0E,0x00, // 000011100000
+ 0x1F,0x00, // 000111110000
+ 0x3F,0x80, // 001111111000
+ 0x7F,0xC0, // 011111111100
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00 // 000011100000
};
const unsigned char down_arrow_bmp[] PROGMEM = {
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B00001110,B00000000,
- B01111111,B11000000,
- B00111111,B10000000,
- B00011111,B00000000,
- B00001110,B00000000,
- B00000100,B00000000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x0E,0x00, // 000011100000
+ 0x7F,0xC0, // 011111111100
+ 0x3F,0x80, // 001111111000
+ 0x1F,0x00, // 000111110000
+ 0x0E,0x00, // 000011100000
+ 0x04,0x00 // 000001000000
};
const unsigned char offset_bedline_bmp[] PROGMEM = {
- B11111111,B11111111,B11111111
+ 0xFF,0xFF,0xFF // 111111111111111111111111
};
const unsigned char nozzle_bmp[] PROGMEM = {
- B01111111,B10000000,
- B11111111,B11000000,
- B11111111,B11000000,
- B11111111,B11000000,
- B01111111,B10000000,
- B01111111,B10000000,
- B11111111,B11000000,
- B11111111,B11000000,
- B11111111,B11000000,
- B00111111,B00000000,
- B00011110,B00000000,
- B00001100,B00000000
+ 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 || MESH_EDIT_GFX_OVERLAY
-
-#ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH
- #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH ((CUSTOM_BOOTSCREEN_BMPWIDTH + 7) / 8)
-#endif
-#ifndef CUSTOM_BOOTSCREEN_BMPHEIGHT
- #define CUSTOM_BOOTSCREEN_BMPHEIGHT (sizeof(custom_start_bmp) / (CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH))
-#endif
-
-#ifndef FAN_ANIM_FRAMES
- #define FAN_ANIM_FRAMES 2
-#elif FAN_ANIM_FRAMES > 3
- #error "Only 3 fan animation frames currently supported."
-#endif
-#ifndef STATUS_SCREEN_X
- #define STATUS_SCREEN_X 0
-#endif
-#ifndef STATUS_SCREEN_Y
- #define STATUS_SCREEN_Y 1
-#endif
-#ifndef STATUS_BMP_BYTEWIDTH
- #define STATUS_BMP_BYTEWIDTH ((STATUS_SCREENWIDTH + 7) / 8)
-#endif
-#ifndef STATUS_SCREENHEIGHT
- #define STATUS_SCREENHEIGHT (sizeof(status_screen0_bmp) / (STATUS_BMP_BYTEWIDTH))
-#endif
-#ifndef STATUS_SCREEN_HOTEND_TEXT_X
- #define STATUS_SCREEN_HOTEND_TEXT_X(i) (5 + (i) * 25)
-#endif
-#ifndef STATUS_SCREEN_BED_TEXT_X
- #define STATUS_SCREEN_BED_TEXT_X 81
-#endif
-#ifndef STATUS_SCREEN_FAN_TEXT_X
- #define STATUS_SCREEN_FAN_TEXT_X 104
-#endif
-#ifndef STATUS_SCREEN_FAN_TEXT_Y
- #define STATUS_SCREEN_FAN_TEXT_Y (FAN_ANIM_FRAMES > 2 ? 28 : 27)
-#endif
-
-#define BMP_SIZE (STATUS_BMP_BYTEWIDTH) * (STATUS_SCREENHEIGHT)
-static_assert(sizeof(status_screen0_bmp) == BMP_SIZE, "Status header (status_screen0_bmp) dimensions don't match data.");
-#if FAN_ANIM_FRAMES > 1
- static_assert(sizeof(status_screen1_bmp) == BMP_SIZE, "Status header (status_screen1_bmp) dimensions don't match data.");
- #if FAN_ANIM_FRAMES > 2
- static_assert(sizeof(status_screen2_bmp) == BMP_SIZE, "Status header (status_screen2_bmp) dimensions don't match data.");
- #if FAN_ANIM_FRAMES > 3
- static_assert(sizeof(status_screen3_bmp) == BMP_SIZE, "Status header (status_screen3_bmp) dimensions don't match data.");
- #endif
- #endif
-#endif
diff --git a/Marlin/duration_t.h b/Marlin/duration_t.h
index bcc3011..5e9dd1c 100644
--- a/Marlin/duration_t.h
+++ b/Marlin/duration_t.h
@@ -23,9 +23,6 @@
#ifndef __DURATION_T__
#define __DURATION_T__
-#include
-#include
-
struct duration_t {
/**
* @brief Duration is stored in seconds
@@ -154,10 +151,10 @@ struct duration_t {
if (with_days) {
uint16_t d = this->day();
sprintf_P(buffer, PSTR("%ud %02u:%02u"), d, h % 24, m);
- return d >= 10 ? 9 : 8;
+ return d >= 10 ? 8 : 7;
}
else if (h < 100) {
- sprintf_P(buffer, PSTR("%02u:%02u"), h, m);
+ sprintf_P(buffer, PSTR("%02u:%02u"), h % 24, m);
return 5;
}
else {
diff --git a/Marlin/endstop_interrupts.h b/Marlin/endstop_interrupts.h
index 62c2ea8..6ad4fa5 100644
--- a/Marlin/endstop_interrupts.h
+++ b/Marlin/endstop_interrupts.h
@@ -24,7 +24,7 @@
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
- * the temperature-ISR via endstops.update(), most of the time finding no change.
+ * the stepper-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
@@ -40,9 +40,6 @@
#include "macros.h"
-// One ISR for all EXT-Interrupts
-void endstop_ISR(void) { endstops.update(); }
-
/**
* Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
*
@@ -75,30 +72,40 @@ void endstop_ISR(void) { endstops.update(); }
0 )
#endif
+volatile uint8_t e_hit = 0; // Different from 0 when the endstops should be tested in detail.
+ // Must be reset to 0 by the test function when finished.
// Install Pin change interrupt for a pin. Can be called multiple times.
-void pciSetup(const int8_t pin) {
+void pciSetup(byte pin) {
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
}
+// This is what is really done inside the interrupts.
+FORCE_INLINE void endstop_ISR_worker( void ) {
+ e_hit = 2; // Because the detection of a e-stop hit has a 1 step debouncer it has to be called at least twice.
+}
+
+// Use one Routine to handle each group
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstop_ISR_worker(); }
// Handlers for pin change interrupts
#ifdef PCINT0_vect
- ISR(PCINT0_vect) { endstop_ISR(); }
+ ISR(PCINT0_vect) { endstop_ISR_worker(); }
#endif
#ifdef PCINT1_vect
- ISR(PCINT1_vect) { endstop_ISR(); }
+ ISR(PCINT1_vect) { endstop_ISR_worker(); }
#endif
#ifdef PCINT2_vect
- ISR(PCINT2_vect) { endstop_ISR(); }
+ ISR(PCINT2_vect) { endstop_ISR_worker(); }
#endif
#ifdef PCINT3_vect
- ISR(PCINT3_vect) { endstop_ISR(); }
+ ISR(PCINT3_vect) { endstop_ISR_worker(); }
#endif
void setup_endstop_interrupts( void ) {
diff --git a/Marlin/endstops.cpp b/Marlin/endstops.cpp
index 38662d8..1b1cab0 100644
--- a/Marlin/endstops.cpp
+++ b/Marlin/endstops.cpp
@@ -31,39 +31,28 @@
#include "stepper.h"
#include "ultralcd.h"
-#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- #include "endstop_interrupts.h"
-#endif
+// TEST_ENDSTOP: test the old and the current status of an endstop
+#define TEST_ENDSTOP(ENDSTOP) (TEST(current_endstop_bits & old_endstop_bits, ENDSTOP))
Endstops endstops;
// public:
bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
-volatile uint8_t Endstops::hit_state;
+volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
-Endstops::esbits_t Endstops::live_state = 0;
-
-#if ENABLED(ENDSTOP_NOISE_FILTER)
- Endstops::esbits_t Endstops::validated_live_state;
- uint8_t Endstops::endstop_poll_count;
+#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
+ uint16_t
+#else
+ byte
#endif
+ Endstops::current_endstop_bits = 0,
+ Endstops::old_endstop_bits = 0;
#if HAS_BED_PROBE
volatile bool Endstops::z_probe_enabled = false;
#endif
-// Initialized by settings.load()
-#if ENABLED(X_DUAL_ENDSTOPS)
- float Endstops::x_endstop_adj;
-#endif
-#if ENABLED(Y_DUAL_ENDSTOPS)
- float Endstops::y_endstop_adj;
-#endif
-#if ENABLED(Z_DUAL_ENDSTOPS)
- float Endstops::z_endstop_adj;
-#endif
-
/**
* Class and Instance Methods
*/
@@ -174,93 +163,10 @@ void Endstops::init() {
#endif
#endif
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- setup_endstop_interrupts();
- #endif
-
- // Enable endstops
- enable_globally(
- #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
- true
- #else
- false
- #endif
- );
-
} // Endstops::init
-// Called at ~1KHz from Temperature ISR: Poll endstop state if required
-void Endstops::poll() {
-
- #if ENABLED(PINS_DEBUGGING)
- run_monitor(); // report changes in endstop status
- #endif
-
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && ENABLED(ENDSTOP_NOISE_FILTER)
- if (endstop_poll_count) update();
- #elif DISABLED(ENDSTOP_INTERRUPTS_FEATURE) || ENABLED(ENDSTOP_NOISE_FILTER)
- update();
- #endif
-}
-
-void Endstops::enable_globally(const bool onoff) {
- enabled_globally = enabled = onoff;
-
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- update();
- #endif
-}
-
-// Enable / disable endstop checking
-void Endstops::enable(const bool onoff) {
- enabled = onoff;
-
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- update();
- #endif
-}
-
-// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
-void Endstops::not_homing() {
- enabled = enabled_globally;
-
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- update();
- #endif
-}
-
-#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
- // If the last move failed to trigger an endstop, call kill
- void Endstops::validate_homing_move() {
- if (trigger_state()) hit_on_purpose();
- else kill(PSTR(MSG_ERR_HOMING_FAILED));
- }
-#endif
-
-// Enable / disable endstop z-probe checking
-#if HAS_BED_PROBE
- void Endstops::enable_z_probe(const bool onoff) {
- z_probe_enabled = onoff;
-
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- update();
- #endif
- }
-#endif
-
-#if ENABLED(PINS_DEBUGGING)
- void Endstops::run_monitor() {
- if (!monitor_flag) return;
- static uint8_t monitor_count = 16; // offset this check from the others
- monitor_count += _BV(1); // 15 Hz
- monitor_count &= 0x7F;
- if (!monitor_count) monitor(); // report changes in endstop status
- }
-#endif
-
-void Endstops::event_handler() {
- static uint8_t prev_hit_state; // = 0
- if (hit_state && hit_state != prev_hit_state) {
+void Endstops::report_state() {
+ if (endstop_hit_bits) {
#if ENABLED(ULTRA_LCD)
char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
#define _SET_STOP_CHAR(A,C) (chr## A = C)
@@ -269,11 +175,11 @@ void Endstops::event_handler() {
#endif
#define _ENDSTOP_HIT_ECHO(A,C) do{ \
- SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); \
+ SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(A ##_AXIS)); \
_SET_STOP_CHAR(A,C); }while(0)
#define _ENDSTOP_HIT_TEST(A,C) \
- if (TEST(hit_state, A ##_MIN) || TEST(hit_state, A ##_MAX)) \
+ if (TEST(endstop_hit_bits, A ##_MIN) || TEST(endstop_hit_bits, A ##_MAX)) \
_ENDSTOP_HIT_ECHO(A,C)
#define ENDSTOP_HIT_TEST_X() _ENDSTOP_HIT_TEST(X,'X')
@@ -288,7 +194,7 @@ void Endstops::event_handler() {
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
#define P_AXIS Z_AXIS
- if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
+ if (TEST(endstop_hit_bits, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
#endif
SERIAL_EOL();
@@ -296,8 +202,10 @@ void Endstops::event_handler() {
lcd_status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
#endif
+ hit_on_purpose();
+
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
- if (planner.abort_on_endstop_hit) {
+ if (stepper.abort_on_endstop_hit) {
card.sdprinting = false;
card.closefile();
quickstop_stepper();
@@ -305,19 +213,14 @@ void Endstops::event_handler() {
}
#endif
}
- prev_hit_state = hit_state;
} // Endstops::report_state
-static void print_es_state(const bool is_hit, const char * const label=NULL) {
- if (label) serialprintPGM(label);
- SERIAL_PROTOCOLPGM(": ");
- serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN));
- SERIAL_EOL();
-}
-
-void _O2 Endstops::M119() {
+void Endstops::M119() {
SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
- #define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S))
+ #define ES_REPORT(AXIS) do{ \
+ SERIAL_PROTOCOLPGM(MSG_##AXIS); \
+ SERIAL_PROTOCOLLN(((READ(AXIS##_PIN)^AXIS##_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); \
+ }while(0)
#if HAS_X_MIN
ES_REPORT(X_MIN);
#endif
@@ -355,61 +258,152 @@ void _O2 Endstops::M119() {
ES_REPORT(Z2_MAX);
#endif
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
- print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(MSG_Z_PROBE));
+ SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
+ SERIAL_PROTOCOLLN(((READ(Z_MIN_PROBE_PIN)^Z_MIN_PROBE_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #if NUM_RUNOUT_SENSORS == 1
- print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING, PSTR(MSG_FILAMENT_RUNOUT_SENSOR));
- #else
- for (uint8_t i = 1; i <= NUM_RUNOUT_SENSORS; i++) {
- pin_t pin;
- switch (i) {
- default: continue;
- case 1: pin = FIL_RUNOUT_PIN; break;
- case 2: pin = FIL_RUNOUT2_PIN; break;
- #if NUM_RUNOUT_SENSORS > 2
- case 3: pin = FIL_RUNOUT3_PIN; break;
- #if NUM_RUNOUT_SENSORS > 3
- case 4: pin = FIL_RUNOUT4_PIN; break;
- #if NUM_RUNOUT_SENSORS > 4
- case 5: pin = FIL_RUNOUT5_PIN; break;
- #endif
- #endif
- #endif
- }
- SERIAL_PROTOCOLPGM(MSG_FILAMENT_RUNOUT_SENSOR);
- if (i > 1) { SERIAL_CHAR(' '); SERIAL_CHAR('0' + i); }
- print_es_state(digitalRead(pin) != FIL_RUNOUT_INVERTING);
- }
- #endif
+ SERIAL_PROTOCOLPGM(MSG_FILAMENT_RUNOUT_SENSOR);
+ SERIAL_PROTOCOLLN(((READ(FIL_RUNOUT_PIN)^FIL_RUNOUT_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
#endif
} // Endstops::M119
-// The following routines are called from an ISR context. It could be the temperature ISR, the
-// endstop ISR or the Stepper ISR.
+#if ENABLED(X_DUAL_ENDSTOPS)
+ void Endstops::test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2) {
+ byte x_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for X, bit 1 for X2
+ if (x_test && stepper.current_block->steps[X_AXIS] > 0) {
+ SBI(endstop_hit_bits, X_MIN);
+ if (!stepper.performing_homing || (x_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
+ stepper.kill_current_block();
+ }
+ }
+#endif
+#if ENABLED(Y_DUAL_ENDSTOPS)
+ void Endstops::test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2) {
+ byte y_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Y, bit 1 for Y2
+ if (y_test && stepper.current_block->steps[Y_AXIS] > 0) {
+ SBI(endstop_hit_bits, Y_MIN);
+ if (!stepper.performing_homing || (y_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
+ stepper.kill_current_block();
+ }
+ }
+#endif
+#if ENABLED(Z_DUAL_ENDSTOPS)
+ void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
+ byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
+ if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
+ SBI(endstop_hit_bits, Z_MIN);
+ if (!stepper.performing_homing || (z_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
+ stepper.kill_current_block();
+ }
+ }
+#endif
-#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
-#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
-#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
-
-// Check endstops - Could be called from Temperature ISR!
+// Check endstops - Called from ISR!
void Endstops::update() {
- #if DISABLED(ENDSTOP_NOISE_FILTER)
- if (!abort_enabled()) return;
- #endif
+ #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
+ #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
+ #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
+ #define _ENDSTOP_HIT(AXIS, MINMAX) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MINMAX))
- #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
- #define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT))
+ // UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
+ #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
+ // COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST
+ #define COPY_BIT(DST, SRC_BIT, DST_BIT) SET_BIT(DST, DST_BIT, TEST(DST, SRC_BIT))
+
+ #define UPDATE_ENDSTOP(AXIS,MINMAX) do { \
+ UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \
+ if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX)) && stepper.current_block->steps[_AXIS(AXIS)] > 0) { \
+ _ENDSTOP_HIT(AXIS, MINMAX); \
+ stepper.endstop_triggered(_AXIS(AXIS)); \
+ } \
+ }while(0)
#if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
// If G38 command is active check Z_MIN_PROBE for ALL movement
- if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
+ if (G38_move) {
+ UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
+ if (TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE))) {
+ if (stepper.current_block->steps[_AXIS(X)] > 0) { _ENDSTOP_HIT(X, MIN); stepper.endstop_triggered(_AXIS(X)); }
+ else if (stepper.current_block->steps[_AXIS(Y)] > 0) { _ENDSTOP_HIT(Y, MIN); stepper.endstop_triggered(_AXIS(Y)); }
+ else if (stepper.current_block->steps[_AXIS(Z)] > 0) { _ENDSTOP_HIT(Z, MIN); stepper.endstop_triggered(_AXIS(Z)); }
+ G38_endstop_hit = true;
+ }
+ }
+ #endif
+
+ /**
+ * Define conditions for checking endstops
+ */
+
+ #if IS_CORE
+ #define S_(N) stepper.current_block->steps[CORE_AXIS_##N]
+ #define D_(N) stepper.motor_direction(CORE_AXIS_##N)
+ #endif
+
+ #if CORE_IS_XY || CORE_IS_XZ
+ /**
+ * Head direction in -X axis for CoreXY and CoreXZ bots.
+ *
+ * If steps differ, both axes are moving.
+ * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z, handled below)
+ * If DeltaA == DeltaB, the movement is only in the 1st axis (X)
+ */
+ #if ENABLED(COREXY) || ENABLED(COREXZ)
+ #define X_CMP ==
+ #else
+ #define X_CMP !=
+ #endif
+ #define X_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) X_CMP D_(2)) )
+ #define X_AXIS_HEAD X_HEAD
+ #else
+ #define X_MOVE_TEST stepper.current_block->steps[X_AXIS] > 0
+ #define X_AXIS_HEAD X_AXIS
+ #endif
+
+ #if CORE_IS_XY || CORE_IS_YZ
+ /**
+ * Head direction in -Y axis for CoreXY / CoreYZ bots.
+ *
+ * If steps differ, both axes are moving
+ * If DeltaA == DeltaB, the movement is only in the 1st axis (X or Y)
+ * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z)
+ */
+ #if ENABLED(COREYX) || ENABLED(COREYZ)
+ #define Y_CMP ==
+ #else
+ #define Y_CMP !=
+ #endif
+ #define Y_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) Y_CMP D_(2)) )
+ #define Y_AXIS_HEAD Y_HEAD
+ #else
+ #define Y_MOVE_TEST stepper.current_block->steps[Y_AXIS] > 0
+ #define Y_AXIS_HEAD Y_AXIS
+ #endif
+
+ #if CORE_IS_XZ || CORE_IS_YZ
+ /**
+ * Head direction in -Z axis for CoreXZ or CoreYZ bots.
+ *
+ * If steps differ, both axes are moving
+ * If DeltaA == DeltaB, the movement is only in the 1st axis (X or Y, already handled above)
+ * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Z)
+ */
+ #if ENABLED(COREZX) || ENABLED(COREZY)
+ #define Z_CMP ==
+ #else
+ #define Z_CMP !=
+ #endif
+ #define Z_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) Z_CMP D_(2)) )
+ #define Z_AXIS_HEAD Z_HEAD
+ #else
+ #define Z_MOVE_TEST stepper.current_block->steps[Z_AXIS] > 0
+ #define Z_AXIS_HEAD Z_AXIS
#endif
// With Dual X, endstops are only checked in the homing direction for the active extruder
#if ENABLED(DUAL_X_CARRIAGE)
- #define E0_ACTIVE stepper.movement_extruder() == 0
+ #define E0_ACTIVE stepper.current_block->active_extruder == 0
#define X_MIN_TEST ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE))
#define X_MAX_TEST ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE))
#else
@@ -417,358 +411,124 @@ void Endstops::update() {
#define X_MAX_TEST true
#endif
- // Use HEAD for core axes, AXIS for others
- #if CORE_IS_XY || CORE_IS_XZ
- #define X_AXIS_HEAD X_HEAD
- #else
- #define X_AXIS_HEAD X_AXIS
- #endif
- #if CORE_IS_XY || CORE_IS_YZ
- #define Y_AXIS_HEAD Y_HEAD
- #else
- #define Y_AXIS_HEAD Y_AXIS
- #endif
- #if CORE_IS_XZ || CORE_IS_YZ
- #define Z_AXIS_HEAD Z_HEAD
- #else
- #define Z_AXIS_HEAD Z_AXIS
- #endif
-
/**
- * Check and update endstops
+ * Check and update endstops according to conditions
*/
- #if HAS_X_MIN
- #if ENABLED(X_DUAL_ENDSTOPS)
- UPDATE_ENDSTOP_BIT(X, MIN);
- #if HAS_X2_MIN
- UPDATE_ENDSTOP_BIT(X2, MIN);
- #else
- COPY_LIVE_STATE(X_MIN, X2_MIN);
- #endif
- #else
- UPDATE_ENDSTOP_BIT(X, MIN);
- #endif
- #endif
-
- #if HAS_X_MAX
- #if ENABLED(X_DUAL_ENDSTOPS)
- UPDATE_ENDSTOP_BIT(X, MAX);
- #if HAS_X2_MAX
- UPDATE_ENDSTOP_BIT(X2, MAX);
- #else
- COPY_LIVE_STATE(X_MAX, X2_MAX);
- #endif
- #else
- UPDATE_ENDSTOP_BIT(X, MAX);
- #endif
- #endif
-
- #if HAS_Y_MIN
- #if ENABLED(Y_DUAL_ENDSTOPS)
- UPDATE_ENDSTOP_BIT(Y, MIN);
- #if HAS_Y2_MIN
- UPDATE_ENDSTOP_BIT(Y2, MIN);
- #else
- COPY_LIVE_STATE(Y_MIN, Y2_MIN);
- #endif
- #else
- UPDATE_ENDSTOP_BIT(Y, MIN);
- #endif
- #endif
-
- #if HAS_Y_MAX
- #if ENABLED(Y_DUAL_ENDSTOPS)
- UPDATE_ENDSTOP_BIT(Y, MAX);
- #if HAS_Y2_MAX
- UPDATE_ENDSTOP_BIT(Y2, MAX);
- #else
- COPY_LIVE_STATE(Y_MAX, Y2_MAX);
- #endif
- #else
- UPDATE_ENDSTOP_BIT(Y, MAX);
- #endif
- #endif
-
- #if HAS_Z_MIN
- #if ENABLED(Z_DUAL_ENDSTOPS)
- UPDATE_ENDSTOP_BIT(Z, MIN);
- #if HAS_Z2_MIN
- UPDATE_ENDSTOP_BIT(Z2, MIN);
- #else
- COPY_LIVE_STATE(Z_MIN, Z2_MIN);
- #endif
- #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
- UPDATE_ENDSTOP_BIT(Z, MIN);
- #elif Z_HOME_DIR < 0
- UPDATE_ENDSTOP_BIT(Z, MIN);
- #endif
- #endif
-
- // When closing the gap check the enabled probe
- #if ENABLED(Z_MIN_PROBE_ENDSTOP)
- UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
- #endif
-
- #if HAS_Z_MAX
- // Check both Z dual endstops
- #if ENABLED(Z_DUAL_ENDSTOPS)
- UPDATE_ENDSTOP_BIT(Z, MAX);
- #if HAS_Z2_MAX
- UPDATE_ENDSTOP_BIT(Z2, MAX);
- #else
- COPY_LIVE_STATE(Z_MAX, Z2_MAX);
- #endif
- #elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
- // If this pin isn't the bed probe it's the Z endstop
- UPDATE_ENDSTOP_BIT(Z, MAX);
- #endif
- #endif
-
- #if ENABLED(ENDSTOP_NOISE_FILTER)
- /**
- * Filtering out noise on endstops requires a delayed decision. Let's assume, due to noise,
- * that 50% of endstop signal samples are good and 50% are bad (assuming normal distribution
- * of random noise). Then the first sample has a 50% chance to be good or bad. The 2nd sample
- * also has a 50% chance to be good or bad. The chances of 2 samples both being bad becomes
- * 50% of 50%, or 25%. That was the previous implementation of Marlin endstop handling. It
- * reduces chances of bad readings in half, at the cost of 1 extra sample period, but chances
- * still exist. The only way to reduce them further is to increase the number of samples.
- * To reduce the chance to 1% (1/128th) requires 7 samples (adding 7ms of delay).
- */
- static esbits_t old_live_state;
- if (old_live_state != live_state) {
- endstop_poll_count = 2;
- old_live_state = live_state;
- }
- else if (endstop_poll_count && !--endstop_poll_count)
- validated_live_state = live_state;
-
- if (!abort_enabled()) return;
-
- #endif
-
- // Test the current status of an endstop
- #define TEST_ENDSTOP(ENDSTOP) (TEST(state(), ENDSTOP))
-
- // Record endstop was hit
- #define _ENDSTOP_HIT(AXIS, MINMAX) SBI(hit_state, _ENDSTOP(AXIS, MINMAX))
-
- // Call the endstop triggered routine for single endstops
- #define PROCESS_ENDSTOP(AXIS,MINMAX) do { \
- if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX))) { \
- _ENDSTOP_HIT(AXIS, MINMAX); \
- planner.endstop_triggered(_AXIS(AXIS)); \
- } \
- }while(0)
-
- // Call the endstop triggered routine for dual endstops
- #define PROCESS_DUAL_ENDSTOP(AXIS1, AXIS2, MINMAX) do { \
- const byte dual_hit = TEST_ENDSTOP(_ENDSTOP(AXIS1, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(AXIS2, MINMAX)) << 1); \
- if (dual_hit) { \
- _ENDSTOP_HIT(AXIS1, MINMAX); \
- /* if not performing home or if both endstops were trigged during homing... */ \
- if (!stepper.homing_dual_axis || dual_hit == 0b11) \
- planner.endstop_triggered(_AXIS(AXIS1)); \
- } \
- }while(0)
-
- #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
- // If G38 command is active check Z_MIN_PROBE for ALL movement
- if (G38_move) {
- if (TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE))) {
- if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, MIN); planner.endstop_triggered(X_AXIS); }
- else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, MIN); planner.endstop_triggered(Y_AXIS); }
- else if (stepper.axis_is_moving(Z_AXIS)) { _ENDSTOP_HIT(Z, MIN); planner.endstop_triggered(Z_AXIS); }
- G38_endstop_hit = true;
- }
- }
- #endif
-
- // Now, we must signal, after validation, if an endstop limit is pressed or not
- if (stepper.axis_is_moving(X_AXIS)) {
+ if (X_MOVE_TEST) {
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
#if HAS_X_MIN
#if ENABLED(X_DUAL_ENDSTOPS)
- PROCESS_DUAL_ENDSTOP(X, X2, MIN);
+ UPDATE_ENDSTOP_BIT(X, MIN);
+ #if HAS_X2_MIN
+ UPDATE_ENDSTOP_BIT(X2, MIN);
+ #else
+ COPY_BIT(current_endstop_bits, X_MIN, X2_MIN);
+ #endif
+ test_dual_x_endstops(X_MIN, X2_MIN);
#else
- if (X_MIN_TEST) PROCESS_ENDSTOP(X, MIN);
+ if (X_MIN_TEST) UPDATE_ENDSTOP(X, MIN);
#endif
#endif
}
else { // +direction
#if HAS_X_MAX
#if ENABLED(X_DUAL_ENDSTOPS)
- PROCESS_DUAL_ENDSTOP(X, X2, MAX);
+ UPDATE_ENDSTOP_BIT(X, MAX);
+ #if HAS_X2_MAX
+ UPDATE_ENDSTOP_BIT(X2, MAX);
+ #else
+ COPY_BIT(current_endstop_bits, X_MAX, X2_MAX);
+ #endif
+ test_dual_x_endstops(X_MAX, X2_MAX);
#else
- if (X_MAX_TEST) PROCESS_ENDSTOP(X, MAX);
+ if (X_MIN_TEST) UPDATE_ENDSTOP(X, MAX);
#endif
+
#endif
}
}
- if (stepper.axis_is_moving(Y_AXIS)) {
+ if (Y_MOVE_TEST) {
if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
#if HAS_Y_MIN
#if ENABLED(Y_DUAL_ENDSTOPS)
- PROCESS_DUAL_ENDSTOP(Y, Y2, MIN);
+ UPDATE_ENDSTOP_BIT(Y, MIN);
+ #if HAS_Y2_MIN
+ UPDATE_ENDSTOP_BIT(Y2, MIN);
+ #else
+ COPY_BIT(current_endstop_bits, Y_MIN, Y2_MIN);
+ #endif
+ test_dual_y_endstops(Y_MIN, Y2_MIN);
#else
- PROCESS_ENDSTOP(Y, MIN);
+ UPDATE_ENDSTOP(Y, MIN);
#endif
#endif
}
else { // +direction
#if HAS_Y_MAX
#if ENABLED(Y_DUAL_ENDSTOPS)
- PROCESS_DUAL_ENDSTOP(Y, Y2, MAX);
+ UPDATE_ENDSTOP_BIT(Y, MAX);
+ #if HAS_Y2_MAX
+ UPDATE_ENDSTOP_BIT(Y2, MAX);
+ #else
+ COPY_BIT(current_endstop_bits, Y_MAX, Y2_MAX);
+ #endif
+ test_dual_y_endstops(Y_MAX, Y2_MAX);
#else
- PROCESS_ENDSTOP(Y, MAX);
+ UPDATE_ENDSTOP(Y, MAX);
#endif
#endif
}
}
- if (stepper.axis_is_moving(Z_AXIS)) {
+ if (Z_MOVE_TEST) {
if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
#if HAS_Z_MIN
#if ENABLED(Z_DUAL_ENDSTOPS)
- PROCESS_DUAL_ENDSTOP(Z, Z2, MIN);
+ UPDATE_ENDSTOP_BIT(Z, MIN);
+ #if HAS_Z2_MIN
+ UPDATE_ENDSTOP_BIT(Z2, MIN);
+ #else
+ COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN);
+ #endif
+ test_dual_z_endstops(Z_MIN, Z2_MIN);
#else
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
- if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
- #elif ENABLED(Z_MIN_PROBE_ENDSTOP)
- if (!z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
+ if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
#else
- PROCESS_ENDSTOP(Z, MIN);
+ UPDATE_ENDSTOP(Z, MIN);
#endif
#endif
#endif
// When closing the gap check the enabled probe
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
- if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
+ if (z_probe_enabled) {
+ UPDATE_ENDSTOP(Z, MIN_PROBE);
+ if (TEST_ENDSTOP(Z_MIN_PROBE)) SBI(endstop_hit_bits, Z_MIN_PROBE);
+ }
#endif
}
else { // Z +direction. Gantry up, bed down.
#if HAS_Z_MAX
+ // Check both Z dual endstops
#if ENABLED(Z_DUAL_ENDSTOPS)
- PROCESS_DUAL_ENDSTOP(Z, Z2, MAX);
+ UPDATE_ENDSTOP_BIT(Z, MAX);
+ #if HAS_Z2_MAX
+ UPDATE_ENDSTOP_BIT(Z2, MAX);
+ #else
+ COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX);
+ #endif
+ test_dual_z_endstops(Z_MAX, Z2_MAX);
+ // If this pin is not hijacked for the bed probe
+ // then it belongs to the Z endstop
#elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
- // If this pin is not hijacked for the bed probe
- // then it belongs to the Z endstop
- PROCESS_ENDSTOP(Z, MAX);
+ UPDATE_ENDSTOP(Z, MAX);
#endif
#endif
}
}
+
+ old_endstop_bits = current_endstop_bits;
+
} // Endstops::update()
-
-#if ENABLED(PINS_DEBUGGING)
-
- bool Endstops::monitor_flag = false;
-
- /**
- * monitors endstops & Z probe for changes
- *
- * If a change is detected then the LED is toggled and
- * a message is sent out the serial port
- *
- * Yes, we could miss a rapid back & forth change but
- * that won't matter because this is all manual.
- *
- */
- void Endstops::monitor() {
-
- static uint16_t old_live_state_local = 0;
- static uint8_t local_LED_status = 0;
- uint16_t live_state_local = 0;
-
- #if HAS_X_MIN
- if (READ(X_MIN_PIN)) SBI(live_state_local, X_MIN);
- #endif
- #if HAS_X_MAX
- if (READ(X_MAX_PIN)) SBI(live_state_local, X_MAX);
- #endif
- #if HAS_Y_MIN
- if (READ(Y_MIN_PIN)) SBI(live_state_local, Y_MIN);
- #endif
- #if HAS_Y_MAX
- if (READ(Y_MAX_PIN)) SBI(live_state_local, Y_MAX);
- #endif
- #if HAS_Z_MIN
- if (READ(Z_MIN_PIN)) SBI(live_state_local, Z_MIN);
- #endif
- #if HAS_Z_MAX
- if (READ(Z_MAX_PIN)) SBI(live_state_local, Z_MAX);
- #endif
- #if HAS_Z_MIN_PROBE_PIN
- if (READ(Z_MIN_PROBE_PIN)) SBI(live_state_local, Z_MIN_PROBE);
- #endif
- #if HAS_X2_MIN
- if (READ(X2_MIN_PIN)) SBI(live_state_local, X2_MIN);
- #endif
- #if HAS_X2_MAX
- if (READ(X2_MAX_PIN)) SBI(live_state_local, X2_MAX);
- #endif
- #if HAS_Y2_MIN
- if (READ(Y2_MIN_PIN)) SBI(live_state_local, Y2_MIN);
- #endif
- #if HAS_Y2_MAX
- if (READ(Y2_MAX_PIN)) SBI(live_state_local, Y2_MAX);
- #endif
- #if HAS_Z2_MIN
- if (READ(Z2_MIN_PIN)) SBI(live_state_local, Z2_MIN);
- #endif
- #if HAS_Z2_MAX
- if (READ(Z2_MAX_PIN)) SBI(live_state_local, Z2_MAX);
- #endif
-
- uint16_t endstop_change = live_state_local ^ old_live_state_local;
-
- if (endstop_change) {
- #if HAS_X_MIN
- if (TEST(endstop_change, X_MIN)) SERIAL_PROTOCOLPAIR(" X_MIN:", TEST(live_state_local, X_MIN));
- #endif
- #if HAS_X_MAX
- if (TEST(endstop_change, X_MAX)) SERIAL_PROTOCOLPAIR(" X_MAX:", TEST(live_state_local, X_MAX));
- #endif
- #if HAS_Y_MIN
- if (TEST(endstop_change, Y_MIN)) SERIAL_PROTOCOLPAIR(" Y_MIN:", TEST(live_state_local, Y_MIN));
- #endif
- #if HAS_Y_MAX
- if (TEST(endstop_change, Y_MAX)) SERIAL_PROTOCOLPAIR(" Y_MAX:", TEST(live_state_local, Y_MAX));
- #endif
- #if HAS_Z_MIN
- if (TEST(endstop_change, Z_MIN)) SERIAL_PROTOCOLPAIR(" Z_MIN:", TEST(live_state_local, Z_MIN));
- #endif
- #if HAS_Z_MAX
- if (TEST(endstop_change, Z_MAX)) SERIAL_PROTOCOLPAIR(" Z_MAX:", TEST(live_state_local, Z_MAX));
- #endif
- #if HAS_Z_MIN_PROBE_PIN
- if (TEST(endstop_change, Z_MIN_PROBE)) SERIAL_PROTOCOLPAIR(" PROBE:", TEST(live_state_local, Z_MIN_PROBE));
- #endif
- #if HAS_X2_MIN
- if (TEST(endstop_change, X2_MIN)) SERIAL_PROTOCOLPAIR(" X2_MIN:", TEST(live_state_local, X2_MIN));
- #endif
- #if HAS_X2_MAX
- if (TEST(endstop_change, X2_MAX)) SERIAL_PROTOCOLPAIR(" X2_MAX:", TEST(live_state_local, X2_MAX));
- #endif
- #if HAS_Y2_MIN
- if (TEST(endstop_change, Y2_MIN)) SERIAL_PROTOCOLPAIR(" Y2_MIN:", TEST(live_state_local, Y2_MIN));
- #endif
- #if HAS_Y2_MAX
- if (TEST(endstop_change, Y2_MAX)) SERIAL_PROTOCOLPAIR(" Y2_MAX:", TEST(live_state_local, Y2_MAX));
- #endif
- #if HAS_Z2_MIN
- if (TEST(endstop_change, Z2_MIN)) SERIAL_PROTOCOLPAIR(" Z2_MIN:", TEST(live_state_local, Z2_MIN));
- #endif
- #if HAS_Z2_MAX
- if (TEST(endstop_change, Z2_MAX)) SERIAL_PROTOCOLPAIR(" Z2_MAX:", TEST(live_state_local, Z2_MAX));
- #endif
- SERIAL_PROTOCOLPGM("\n\n");
- analogWrite(LED_PIN, local_LED_status);
- local_LED_status ^= 255;
- old_live_state_local = live_state_local;
- }
- }
-
-#endif // PINS_DEBUGGING
diff --git a/Marlin/endstops.h b/Marlin/endstops.h
index 2114e23..e60132d 100644
--- a/Marlin/endstops.h
+++ b/Marlin/endstops.h
@@ -21,115 +21,53 @@
*/
/**
- * endstops.h - manages endstops
+ * endstops.h - manages endstops
*/
-#ifndef __ENDSTOPS_H__
-#define __ENDSTOPS_H__
+#ifndef ENDSTOPS_H
+#define ENDSTOPS_H
+#include "enum.h"
#include "MarlinConfig.h"
-#define VALIDATE_HOMING_ENDSTOPS
-
-enum EndstopEnum : char {
- X_MIN,
- Y_MIN,
- Z_MIN,
- Z_MIN_PROBE,
- X_MAX,
- Y_MAX,
- Z_MAX,
- X2_MIN,
- X2_MAX,
- Y2_MIN,
- Y2_MAX,
- Z2_MIN,
- Z2_MAX
-};
-
class Endstops {
public:
static bool enabled, enabled_globally;
+ static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
- typedef uint16_t esbits_t;
- #if ENABLED(X_DUAL_ENDSTOPS)
- static float x_endstop_adj;
- #endif
- #if ENABLED(Y_DUAL_ENDSTOPS)
- static float y_endstop_adj;
- #endif
- #if ENABLED(Z_DUAL_ENDSTOPS)
- static float z_endstop_adj;
- #endif
+ static uint16_t
#else
- typedef uint8_t esbits_t;
+ static byte
#endif
+ current_endstop_bits, old_endstop_bits;
- private:
- static esbits_t live_state;
- static volatile uint8_t hit_state; // Use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT index
-
- #if ENABLED(ENDSTOP_NOISE_FILTER)
- static esbits_t validated_live_state;
- static uint8_t endstop_poll_count; // Countdown from threshold for polling
- #endif
-
- public:
- Endstops() {};
+ Endstops() {
+ enable_globally(
+ #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
+ true
+ #else
+ false
+ #endif
+ );
+ };
/**
* Initialize the endstop pins
*/
- static void init();
+ void init();
/**
- * Are endstops or the probe set to abort the move?
- */
- FORCE_INLINE static bool abort_enabled() {
- return (enabled
- #if HAS_BED_PROBE
- || z_probe_enabled
- #endif
- );
- }
-
- /**
- * Periodic call to poll endstops if required. Called from temperature ISR
- */
- static void poll();
-
- /**
- * Update endstops bits from the pins. Apply filtering to get a verified state.
- * If abort_enabled() and moving towards a triggered switch, abort the current move.
- * Called from ISR contexts.
+ * Update the endstops bits from the pins
*/
static void update();
/**
- * Get Endstop hit state.
+ * Print an error message reporting the position when the endstops were last hit.
*/
- FORCE_INLINE static uint8_t trigger_state() { return hit_state; }
-
- /**
- * Get current endstops state
- */
- FORCE_INLINE static esbits_t state() {
- return
- #if ENABLED(ENDSTOP_NOISE_FILTER)
- validated_live_state
- #else
- live_state
- #endif
- ;
- }
-
- /**
- * Report endstop hits to serial. Called from loop().
- */
- static void event_handler();
+ static void report_state(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered
/**
* Report endstop positions in response to M119
@@ -137,38 +75,43 @@ class Endstops {
static void M119();
// Enable / disable endstop checking globally
- static void enable_globally(const bool onoff=true);
+ static void enable_globally(bool onoff=true) { enabled_globally = enabled = onoff; }
// Enable / disable endstop checking
- static void enable(const bool onoff=true);
+ static void enable(bool onoff=true) { enabled = onoff; }
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
- static void not_homing();
-
- #if ENABLED(VALIDATE_HOMING_ENDSTOPS)
- // If the last move failed to trigger an endstop, call kill
- static void validate_homing_move();
- #else
- FORCE_INLINE static void validate_homing_move() { hit_on_purpose(); }
- #endif
+ static void not_homing() { enabled = enabled_globally; }
// Clear endstops (i.e., they were hit intentionally) to suppress the report
- FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }
+ static void hit_on_purpose() { endstop_hit_bits = 0; }
// Enable / disable endstop z-probe checking
#if HAS_BED_PROBE
static volatile bool z_probe_enabled;
- static void enable_z_probe(const bool onoff=true);
+ static void enable_z_probe(bool onoff=true) { z_probe_enabled = onoff; }
#endif
- // Debugging of endstops
- #if ENABLED(PINS_DEBUGGING)
- static bool monitor_flag;
- static void monitor();
- static void run_monitor();
+ private:
+
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ static void test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2);
+ #endif
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ static void test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2);
+ #endif
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ static void test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2);
#endif
};
extern Endstops endstops;
-#endif // __ENDSTOPS_H__
+#if HAS_BED_PROBE
+ #define ENDSTOPS_ENABLED (endstops.enabled || endstops.z_probe_enabled)
+#else
+ #define ENDSTOPS_ENABLED endstops.enabled
+#endif
+
+
+#endif // ENDSTOPS_H
diff --git a/Marlin/enum.h b/Marlin/enum.h
index 470afef..4fa6496 100644
--- a/Marlin/enum.h
+++ b/Marlin/enum.h
@@ -28,27 +28,24 @@
/**
* Axis indices as enumerated constants
*
- * - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
- * - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
- * - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
+ * Special axis:
+ * - A_AXIS and B_AXIS are used by COREXY printers
+ * - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
+ * between X_AXIS and X Head movement, like CoreXY bots
*/
-enum AxisEnum : unsigned char {
+enum AxisEnum {
+ NO_AXIS = -1,
X_AXIS = 0,
A_AXIS = 0,
Y_AXIS = 1,
B_AXIS = 1,
Z_AXIS = 2,
C_AXIS = 2,
- E_CART = 3,
- #if ENABLED(HANGPRINTER) // Hangprinter order: A_AXIS, B_AXIS, C_AXIS, D_AXIS, E_AXIS
- D_AXIS = 3,
- E_AXIS = 4,
- #else
- E_AXIS = 3,
- #endif
- X_HEAD, Y_HEAD, Z_HEAD,
- ALL_AXES = 0xFE,
- NO_AXIS = 0xFF
+ E_AXIS = 3,
+ X_HEAD = 4,
+ Y_HEAD = 5,
+ Z_HEAD = 6,
+ ALL_AXES = 100
};
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
@@ -58,11 +55,8 @@ enum AxisEnum : unsigned char {
#define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
-#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_CART)
+#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
-#define LOOP_MOV_AXIS(VAR) LOOP_S_L_N(VAR, A_AXIS, MOV_AXIS)
-#define LOOP_NUM_AXIS(VAR) LOOP_S_L_N(VAR, A_AXIS, NUM_AXIS)
-#define LOOP_NUM_AXIS_N(VAR) LOOP_S_L_N(VAR, A_AXIS, NUM_AXIS_N)
typedef enum {
LINEARUNIT_MM,
@@ -79,7 +73,7 @@ typedef enum {
* Debug flags
* Not yet widely applied
*/
-enum DebugFlags : unsigned char {
+enum DebugFlags {
DEBUG_NONE = 0,
DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
@@ -91,23 +85,53 @@ enum DebugFlags : unsigned char {
DEBUG_ALL = 0xFF
};
+enum EndstopEnum {
+ X_MIN,
+ Y_MIN,
+ Z_MIN,
+ Z_MIN_PROBE,
+ X_MAX,
+ Y_MAX,
+ Z_MAX,
+ X2_MIN,
+ X2_MAX,
+ Y2_MIN,
+ Y2_MAX,
+ Z2_MIN,
+ Z2_MAX
+};
+
+#if ENABLED(EMERGENCY_PARSER)
+ enum e_parser_state {
+ state_RESET,
+ state_N,
+ state_M,
+ state_M1,
+ state_M10,
+ state_M108,
+ state_M11,
+ state_M112,
+ state_M4,
+ state_M41,
+ state_M410,
+ state_IGNORE // to '\n'
+ };
+#endif
+
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- enum AdvancedPauseMenuResponse : char {
+ enum AdvancedPauseMenuResponse {
ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
};
#if ENABLED(ULTIPANEL)
- enum AdvancedPauseMessage : char {
+ enum AdvancedPauseMessage {
ADVANCED_PAUSE_MESSAGE_INIT,
ADVANCED_PAUSE_MESSAGE_UNLOAD,
ADVANCED_PAUSE_MESSAGE_INSERT,
ADVANCED_PAUSE_MESSAGE_LOAD,
- ADVANCED_PAUSE_MESSAGE_PURGE,
- #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
- ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE,
- #endif
+ ADVANCED_PAUSE_MESSAGE_EXTRUDE,
ADVANCED_PAUSE_MESSAGE_OPTION,
ADVANCED_PAUSE_MESSAGE_RESUME,
ADVANCED_PAUSE_MESSAGE_STATUS,
@@ -115,12 +139,6 @@ enum DebugFlags : unsigned char {
ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
};
#endif
-
- enum AdvancedPauseMode : char {
- ADVANCED_PAUSE_MODE_PAUSE_PRINT,
- ADVANCED_PAUSE_MODE_LOAD_FILAMENT,
- ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT
- };
#endif
/**
@@ -128,7 +146,7 @@ enum DebugFlags : unsigned char {
* Marlin sends messages if blocked or busy
*/
#if ENABLED(HOST_KEEPALIVE_FEATURE)
- enum MarlinBusyState : char {
+ enum MarlinBusyState {
NOT_BUSY, // Not in a handler
IN_HANDLER, // Processing a GCode
IN_PROCESS, // Known to be blocking command input (as in G29)
@@ -140,12 +158,12 @@ enum DebugFlags : unsigned char {
/**
* SD Card
*/
-enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename };
+enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
/**
* Ultra LCD
*/
-enum LCDViewAction : char {
+enum LCDViewAction {
LCDVIEW_NONE,
LCDVIEW_REDRAW_NOW,
LCDVIEW_CALL_REDRAW_NEXT,
@@ -157,7 +175,7 @@ enum LCDViewAction : char {
* Dual X Carriage modes. A Dual Nozzle can also do duplication.
*/
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
- enum DualXMode : char {
+ enum DualXMode {
DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
DXC_DUPLICATION_MODE
@@ -169,7 +187,7 @@ enum LCDViewAction : char {
* (and "canned cycles" - not a current feature)
*/
#if ENABLED(CNC_WORKSPACE_PLANES)
- enum WorkspacePlane : char { PLANE_XY, PLANE_ZX, PLANE_YZ };
+ enum WorkspacePlane { PLANE_XY, PLANE_ZX, PLANE_YZ };
#endif
#endif // __ENUM_H__
diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
index 6915781..48acfd3 100644
--- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
+++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
//#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -201,11 +196,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -237,15 +232,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -259,7 +245,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -268,8 +253,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -279,7 +263,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -301,15 +284,14 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 7
-#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_1 7
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 7
-#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -359,7 +341,7 @@
#define PIDTEMP
#define BANG_MAX 70 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX 74 // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -372,59 +354,52 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Buda 2.0 on 24V
- #define DEFAULT_Kp 6
- #define DEFAULT_Ki .3
- #define DEFAULT_Kd 125
+ #define DEFAULT_Kp 6
+ #define DEFAULT_Ki .3
+ #define DEFAULT_Kd 125
// Buda 2.0 on 12V
- //#define DEFAULT_Kp 22.2
- //#define DEFAULT_Ki 1.01
- //#define DEFAULT_Kd 114
+ //#define DEFAULT_Kp 22.2
+ //#define DEFAULT_Ki 1.01
+ //#define DEFAULT_Kd 114
// 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
- //#define DEFAULT_Ki 0.1
- //#define DEFAULT_Kd 12
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
// Mendel Parts V9 on 12V
- //#define DEFAULT_Kp 63.0
- //#define DEFAULT_Ki 2.25
- //#define DEFAULT_Kd 440
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 206 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -432,47 +407,42 @@
//#define PID_BED_DEBUG // Sends debug data to the serial port.
//24V 360W silicone heater from NPH on 3mm borosilicate (TAZ 2.2+)
- #define DEFAULT_bedKp 20
- #define DEFAULT_bedKi 5
- #define DEFAULT_bedKd 275
+ #define DEFAULT_bedKp 20
+ #define DEFAULT_bedKi 5
+ #define DEFAULT_bedKd 275
//12v 400W silicone heater from QUDB into 3mm borosilicate (TAZ 1.0+)
//from pidautotune
- //#define DEFAULT_bedKp 650
- //#define DEFAULT_bedKi 60
- //#define DEFAULT_bedKd 1800
+ //#define DEFAULT_bedKp 650
+ //#define DEFAULT_bedKi 60
+ //#define DEFAULT_bedKd 1800
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- //#define DEFAULT_bedKp 10.00
- //#define DEFAULT_bedKi .023
- //#define DEFAULT_bedKd 305.4
+ //#define DEFAULT_bedKp 10.00
+ //#define DEFAULT_bedKi .023
+ //#define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -527,10 +497,11 @@
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -547,55 +518,12 @@
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
-
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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 Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -663,16 +591,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 10.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -723,7 +641,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -734,7 +651,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -753,9 +670,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -793,16 +707,13 @@
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle]
-// Certain types of probes need to stay away from edges
-#define MIN_PROBE_EDGE 10
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -826,10 +737,6 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
-#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -865,6 +772,9 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -878,8 +788,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -912,7 +820,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -920,7 +828,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -928,23 +836,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -992,12 +895,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -1020,12 +917,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1037,10 +934,13 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
- //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+ #define LEFT_PROBE_BED_POSITION 15
+ #define RIGHT_PROBE_BED_POSITION 170
+ #define FRONT_PROBE_BED_POSITION 20
+ #define BACK_PROBE_BED_POSITION 170
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1063,6 +963,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 15
+ #define ABL_PROBE_PT_1_Y 180
+ #define ABL_PROBE_PT_2_X 15
+ #define ABL_PROBE_PT_2_Y 20
+ #define ABL_PROBE_PT_3_X 170
+ #define ABL_PROBE_PT_3_Y 20
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1071,23 +982,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1096,21 +1011,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1122,11 +1024,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1400,11 +1297,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1432,6 +1329,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1458,15 +1368,6 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
@@ -1531,18 +1432,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1560,6 +1455,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1568,6 +1497,28 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1575,28 +1526,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1612,13 +1568,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1643,83 +1598,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1735,16 +1613,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1760,13 +1646,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1776,40 +1655,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1869,7 +1719,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1934,7 +1784,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
index 2503bc2..1074bc4 100644
--- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
+++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -182,12 +171,10 @@
// @section temperature
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
+//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
@@ -208,20 +195,10 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -391,9 +358,6 @@
// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES { 16, 16, 4, 16, 16 } // [1,2,4,8,16]
+#define MICROSTEP_MODES {16,16,4,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -506,8 +454,7 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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
//===========================================================================
@@ -535,20 +482,6 @@
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
-
/**
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
@@ -585,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -637,6 +556,25 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@@ -657,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -677,9 +610,6 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -701,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -759,29 +670,53 @@
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -816,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -980,55 +878,53 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1076,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1135,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1193,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1216,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1244,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1554,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1566,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1598,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1608,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1648,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h
index 282b0a9..c417cb0 100644
--- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h
+++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
//#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -201,11 +196,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -237,15 +232,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -259,7 +245,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -268,8 +253,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -279,7 +263,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -301,7 +284,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 1
#define TEMP_SENSOR_1 0
@@ -309,7 +292,6 @@
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 1
-#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -359,7 +341,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -373,49 +355,42 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
- #define DEFAULT_Kp 22.2
- #define DEFAULT_Ki 1.08
- #define DEFAULT_Kd 114
+ #define DEFAULT_Kp 22.2
+ #define DEFAULT_Ki 1.08
+ #define DEFAULT_Kd 114
// MakerGear
- //#define DEFAULT_Kp 7.0
- //#define DEFAULT_Ki 0.1
- //#define DEFAULT_Kd 12
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
// Mendel Parts V9 on 12V
- //#define DEFAULT_Kp 63.0
- //#define DEFAULT_Ki 2.25
- //#define DEFAULT_Kd 440
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -424,35 +399,30 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- #define DEFAULT_bedKp 10.00
- #define DEFAULT_bedKi .023
- #define DEFAULT_bedKd 305.4
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 800
@@ -507,10 +477,11 @@
#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -521,61 +492,18 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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
-
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -643,16 +571,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -703,7 +621,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -714,7 +631,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -733,9 +650,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -773,16 +687,13 @@
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
-// Certain types of probes need to stay away from edges
-#define MIN_PROBE_EDGE 10
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -806,10 +717,6 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
-#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -845,6 +752,9 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -858,8 +768,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -892,7 +800,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -900,7 +808,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -908,23 +816,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -972,12 +875,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -1000,12 +897,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1017,10 +914,13 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
- //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+ #define LEFT_PROBE_BED_POSITION 15
+ #define RIGHT_PROBE_BED_POSITION 170
+ #define FRONT_PROBE_BED_POSITION 20
+ #define BACK_PROBE_BED_POSITION 170
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1043,6 +943,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 15
+ #define ABL_PROBE_PT_1_Y 180
+ #define ABL_PROBE_PT_2_X 15
+ #define ABL_PROBE_PT_2_Y 20
+ #define ABL_PROBE_PT_3_X 170
+ #define ABL_PROBE_PT_3_Y 20
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1051,23 +962,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1076,21 +991,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1102,11 +1004,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1380,11 +1277,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1412,6 +1309,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1438,28 +1348,19 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-//#define ENCODER_PULSES_PER_STEP 4
+//#define ENCODER_PULSES_PER_STEP 1
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-//#define ENCODER_STEPS_PER_MENU_ITEM 1
+//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1511,18 +1412,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1540,6 +1435,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1548,6 +1477,28 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1555,28 +1506,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1592,13 +1548,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1623,83 +1578,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1715,16 +1593,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1740,13 +1626,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1756,40 +1635,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1849,7 +1699,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1914,7 +1764,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h
index d407aa8..41e29ec 100644
--- a/Marlin/example_configurations/Anet/A6/Configuration.h
+++ b/Marlin/example_configurations/Anet/A6/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
//#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -201,11 +196,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -237,15 +232,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -259,7 +245,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -268,8 +253,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -279,7 +263,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -301,15 +284,14 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 11
+#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
-#define TEMP_SENSOR_BED 11
-#define TEMP_SENSOR_CHAMBER 0
+#define TEMP_SENSOR_BED 5
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -359,7 +341,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -373,60 +355,53 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
- //#define DEFAULT_Kp 22.2
- //#define DEFAULT_Ki 1.08
- //#define DEFAULT_Kd 114
+ //#define DEFAULT_Kp 22.2
+ //#define DEFAULT_Ki 1.08
+ //#define DEFAULT_Kd 114
// MakerGear
- //#define DEFAULT_Kp 7.0
- //#define DEFAULT_Ki 0.1
- //#define DEFAULT_Kd 12
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
// Mendel Parts V9 on 12V
- //#define DEFAULT_Kp 63.0
- //#define DEFAULT_Ki 2.25
- //#define DEFAULT_Kd 440
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
// ANET A6 Firmware V2.0 Standard Extruder defaults:
// PID-P: +022.20, PID-I: +001.08, PID-D: +114.00, PID-C: 1
- //#define DEFAULT_Kp 22.2
- //#define DEFAULT_Ki 1.08
- //#define DEFAULT_Kd 114.0
+ //#define DEFAULT_Kp 22.2
+ //#define DEFAULT_Ki 1.08
+ //#define DEFAULT_Kd 114.0
// Tuned by ralf-e. Always re-tune for your machine!
- #define DEFAULT_Kp 16.83
- #define DEFAULT_Ki 1.02
- #define DEFAULT_Kd 69.29
+ #define DEFAULT_Kp 16.83
+ #define DEFAULT_Ki 1.02
+ #define DEFAULT_Kd 69.29
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -435,44 +410,39 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- //#define DEFAULT_bedKp 10.00
- //#define DEFAULT_bedKi .023
- //#define DEFAULT_bedKd 305.4
+ //#define DEFAULT_bedKp 10.00
+ //#define DEFAULT_bedKi .023
+ //#define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// ANET A6
// original Bed + 0.3mm Heat conducting into 4mm borosilicate (PID-Autotune: M303 E-1 S60 C5):
- //#define DEFAULT_bedKp 295.00
- //#define DEFAULT_bedKi 35.65
- //#define DEFAULT_bedKd 610.21
- #define DEFAULT_bedKp 295.00
- #define DEFAULT_bedKi 35.65
- #define DEFAULT_bedKd 610.21
+ //#define DEFAULT_bedKp 295.00
+ //#define DEFAULT_bedKi 35.65
+ //#define DEFAULT_bedKd 610.21
+ #define DEFAULT_bedKp 295.00
+ #define DEFAULT_bedKi 35.65
+ #define DEFAULT_bedKd 610.21
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -527,10 +497,11 @@
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -541,61 +512,18 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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
-
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -691,16 +619,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -751,7 +669,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -762,7 +679,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -781,9 +698,6 @@
* readings with inductive probes and piezo sensors.
*/
#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -842,17 +756,14 @@
//#define Y_PROBE_OFFSET_FROM_EXTRUDER 15 // Y offset: -front +behind [the nozzle]
//#define Z_PROBE_OFFSET_FROM_EXTRUDER 0.75 // Z offset: -below +above [the nozzle]
-// Certain types of probes need to stay away from edges
-#define MIN_PROBE_EDGE 10
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
//#define XY_PROBE_SPEED 6000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 3)
// The number of probes to perform at each point.
@@ -874,19 +785,10 @@
* 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.
*/
-#if 1 // 0 for less clearance
- #define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
- #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
- #define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
- //#define Z_AFTER_PROBING 5 // Z position after probing is done
-#else
- #define Z_CLEARANCE_DEPLOY_PROBE 5 // 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 3 // Z position after probing is done
-#endif
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+#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 5 // Z Clearance for Deploy/Stow
+//#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -925,6 +827,9 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -938,8 +843,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -1007,7 +910,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -1015,7 +918,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -1023,23 +926,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -1087,12 +985,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -1115,12 +1007,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1133,9 +1025,9 @@
// Set the boundaries for probing (where the probe can reach).
//#define LEFT_PROBE_BED_POSITION 15
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - 15)
- //#define FRONT_PROBE_BED_POSITION 15
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - 15)
+ //#define RIGHT_PROBE_BED_POSITION 170
+ //#define FRONT_PROBE_BED_POSITION 20
+ //#define BACK_PROBE_BED_POSITION 170
// ANET A6
//#define LEFT_PROBE_BED_POSITION 20
@@ -1144,10 +1036,10 @@
//#define BACK_PROBE_BED_POSITION 190
// ANET A6 BLTOUCH right (39mm) to the nozzle
- //#define LEFT_PROBE_BED_POSITION 36
- //#define RIGHT_PROBE_BED_POSITION 190
- //#define FRONT_PROBE_BED_POSITION 20
- //#define BACK_PROBE_BED_POSITION 190
+ #define LEFT_PROBE_BED_POSITION 36
+ #define RIGHT_PROBE_BED_POSITION 190
+ #define FRONT_PROBE_BED_POSITION 20
+ #define BACK_PROBE_BED_POSITION 190
// ANET A6 with new X-Axis and modded Y-Axis
//#define LEFT_PROBE_BED_POSITION 20
@@ -1161,6 +1053,9 @@
//#define FRONT_PROBE_BED_POSITION 20
//#define BACK_PROBE_BED_POSITION 194
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
+
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1182,6 +1077,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 15
+ #define ABL_PROBE_PT_1_Y 180
+ #define ABL_PROBE_PT_2_X 15
+ #define ABL_PROBE_PT_2_Y 20
+ #define ABL_PROBE_PT_3_X 170
+ #define ABL_PROBE_PT_3_Y 20
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1190,23 +1096,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 5 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1215,21 +1125,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1241,11 +1138,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1533,11 +1425,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1565,6 +1457,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1591,28 +1496,19 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-//#define ENCODER_PULSES_PER_STEP 4
+//#define ENCODER_PULSES_PER_STEP 1
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-//#define ENCODER_STEPS_PER_MENU_ITEM 1
+//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1664,18 +1560,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1693,6 +1583,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1701,6 +1625,30 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1708,28 +1656,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1745,13 +1698,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1776,85 +1728,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1870,16 +1743,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1895,13 +1776,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1911,40 +1785,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -2004,7 +1849,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -2069,7 +1914,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h
index 68c011c..36e8782 100644
--- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h
+++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -182,12 +171,10 @@
// @section temperature
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
+//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
@@ -198,7 +185,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the 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
@@ -208,20 +195,10 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -391,9 +358,6 @@
// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// 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]
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -506,8 +454,7 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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
//===========================================================================
@@ -535,20 +482,6 @@
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
-
/**
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
@@ -585,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -637,6 +556,25 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@@ -657,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -677,9 +610,6 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -701,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -759,29 +670,53 @@
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -816,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -980,55 +878,53 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1076,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1135,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1193,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1216,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1244,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1554,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1566,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1598,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1608,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1648,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h
index 1e6da8b..dc85dae 100644
--- a/Marlin/example_configurations/Anet/A8/Configuration.h
+++ b/Marlin/example_configurations/Anet/A8/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
//#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -202,11 +197,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -238,15 +233,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -260,7 +246,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -269,8 +254,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -280,7 +264,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -302,7 +285,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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_1 0
@@ -310,7 +293,6 @@
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 5
-#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -360,7 +342,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -374,55 +356,48 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
- //#define DEFAULT_Kp 21.0
- //#define DEFAULT_Ki 1.25
- //#define DEFAULT_Kd 86.0
+ //#define DEFAULT_Kp 21.0
+ //#define DEFAULT_Ki 1.25
+ //#define DEFAULT_Kd 86.0
// MakerGear
- //#define DEFAULT_Kp 7.0
- //#define DEFAULT_Ki 0.1
- //#define DEFAULT_Kd 12
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
// Mendel Parts V9 on 12V
- //#define DEFAULT_Kp 63.0
- //#define DEFAULT_Ki 2.25
- //#define DEFAULT_Kd 440
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
// ANET A8 Standard Extruder at 210 Degree Celsius and 100% Fan
//(measured after M106 S255 with M303 E0 S210 C8)
- #define DEFAULT_Kp 21.0
- #define DEFAULT_Ki 1.25
- #define DEFAULT_Kd 86.0
+ #define DEFAULT_Kp 21.0
+ #define DEFAULT_Ki 1.25
+ #define DEFAULT_Kd 86.0
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
//#define PIDTEMPBED
#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -431,35 +406,30 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- #define DEFAULT_bedKp 10.00
- #define DEFAULT_bedKi .023
- #define DEFAULT_bedKd 305.4
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 160 // 160 guards against false tripping when the extruder fan kicks on.
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -514,10 +484,11 @@
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -536,53 +507,10 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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
-
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -650,16 +578,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -710,7 +628,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -721,7 +638,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -740,9 +657,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -780,16 +694,13 @@
#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
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 6000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -813,10 +724,6 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
-#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -852,6 +759,9 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -865,8 +775,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -899,7 +807,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -907,7 +815,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -915,23 +823,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -979,12 +882,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -1007,12 +904,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1024,10 +921,13 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
- //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+ #define LEFT_PROBE_BED_POSITION 15
+ #define RIGHT_PROBE_BED_POSITION 190
+ #define FRONT_PROBE_BED_POSITION 15
+ #define BACK_PROBE_BED_POSITION 170
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1050,6 +950,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 20
+ #define ABL_PROBE_PT_1_Y 160
+ #define ABL_PROBE_PT_2_X 20
+ #define ABL_PROBE_PT_2_Y 10
+ #define ABL_PROBE_PT_3_X 180
+ #define ABL_PROBE_PT_3_Y 10
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1058,23 +969,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1083,21 +998,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- #define PROBE_PT_1_X 20
- #define PROBE_PT_1_Y 160
- #define PROBE_PT_2_X 20
- #define PROBE_PT_2_Y 10
- #define PROBE_PT_3_X 180
- #define PROBE_PT_3_Y 10
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1109,11 +1011,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1387,11 +1284,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1419,6 +1316,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1445,28 +1355,19 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-//#define ENCODER_PULSES_PER_STEP 4
+//#define ENCODER_PULSES_PER_STEP 1
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-//#define ENCODER_STEPS_PER_MENU_ITEM 1
+//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1518,18 +1419,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1547,6 +1442,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1555,6 +1484,30 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1562,28 +1515,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1599,13 +1557,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1630,85 +1587,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1724,16 +1602,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1749,13 +1635,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1765,40 +1644,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1858,7 +1708,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1923,7 +1773,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h
index b8680ae..6d7e288 100644
--- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h
+++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -182,12 +171,10 @@
// @section temperature
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
+//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
@@ -198,7 +185,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the 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
@@ -208,20 +195,10 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -391,9 +358,6 @@
// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// 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]
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -506,8 +454,7 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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
//===========================================================================
@@ -535,20 +482,6 @@
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
-
/**
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
@@ -585,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -637,6 +556,25 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@@ -657,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -677,9 +610,6 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -701,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -759,29 +670,53 @@
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -816,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -980,55 +878,53 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1076,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1135,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1193,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1216,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1244,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1554,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1566,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1598,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1608,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1648,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h
index d74e70b..57311ac 100644
--- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h
+++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
//#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -131,6 +126,9 @@
// Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "HEPHESTOS"
+// Added for BQ
+#define SOURCE_CODE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html"
+
// 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"
@@ -201,11 +199,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -237,15 +235,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -259,7 +248,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -268,8 +256,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -279,7 +266,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -301,7 +287,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 1
#define TEMP_SENSOR_1 0
@@ -309,7 +295,6 @@
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 0
-#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -359,7 +344,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -371,39 +356,32 @@
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
// Hephestos i3
- #define DEFAULT_Kp 23.05
- #define DEFAULT_Ki 2.00
- #define DEFAULT_Kd 66.47
+ #define DEFAULT_Kp 23.05
+ #define DEFAULT_Ki 2.00
+ #define DEFAULT_Kd 66.47
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -412,35 +390,30 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- #define DEFAULT_bedKp 10.00
- #define DEFAULT_bedKi .023
- #define DEFAULT_bedKd 305.4
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -495,10 +468,11 @@
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -517,53 +491,10 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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
-
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -631,16 +562,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -691,7 +612,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -702,7 +622,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -721,9 +641,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -761,16 +678,13 @@
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle]
-// Certain types of probes need to stay away from edges
-#define MIN_PROBE_EDGE 10
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -794,10 +708,6 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
-#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -833,6 +743,9 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -846,8 +759,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -880,7 +791,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -888,7 +799,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -896,23 +807,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -960,12 +866,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -988,12 +888,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1005,10 +905,13 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
- //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+ #define LEFT_PROBE_BED_POSITION 15
+ #define RIGHT_PROBE_BED_POSITION 170
+ #define FRONT_PROBE_BED_POSITION 20
+ #define BACK_PROBE_BED_POSITION 170
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1031,6 +934,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 15
+ #define ABL_PROBE_PT_1_Y 180
+ #define ABL_PROBE_PT_2_X 15
+ #define ABL_PROBE_PT_2_Y 20
+ #define ABL_PROBE_PT_3_X 170
+ #define ABL_PROBE_PT_3_Y 20
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1039,23 +953,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1064,21 +982,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1090,11 +995,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1368,11 +1268,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1400,6 +1300,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1426,28 +1339,19 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-//#define ENCODER_PULSES_PER_STEP 4
+//#define ENCODER_PULSES_PER_STEP 1
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-//#define ENCODER_STEPS_PER_MENU_ITEM 1
+//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1499,18 +1403,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1528,6 +1426,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1536,6 +1468,28 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1543,28 +1497,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1580,13 +1539,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1611,83 +1569,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1703,16 +1584,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1728,13 +1617,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1744,40 +1626,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1837,7 +1690,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1902,7 +1755,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
index 194d5d5..e8f5214 100644
--- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
+++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -182,12 +171,10 @@
// @section temperature
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
+//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
@@ -198,7 +185,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the 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
@@ -208,20 +195,10 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -391,9 +358,6 @@
// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// 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]
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -506,8 +454,7 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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
//===========================================================================
@@ -535,20 +482,6 @@
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
-
/**
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
@@ -585,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -637,6 +556,25 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@@ -657,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -677,9 +610,6 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -701,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -759,29 +670,53 @@
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -816,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -980,55 +878,53 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1076,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1135,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1193,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1216,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1244,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1554,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1566,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1598,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1608,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1648,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
index e4cf80e..d5ba048 100644
--- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
+++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
@@ -20,27 +20,12 @@
*
*/
-/**
- * Configuration.h
- *
- * Basic settings such as:
- *
- * - Type of electronics
- * - Type of temperature sensor
- * - Printer geometry
- * - Endstop configuration
- * - LCD controller
- * - Extra features
- *
- * Advanced settings can be found in Configuration_adv.h
- *
- */
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
-//============================= Getting Started =============================
+//================================= README ==================================
//===========================================================================
/**
@@ -49,9 +34,15 @@
* This configuration supports the standard Hephestos 2 with or without the
* heated bed kit featured at https://store.bq.com/en/heated-bed-kit-hephestos2
*
- * Enable HEPHESTOS2_HEATED_BED_KIT in Configuration_adv.h for all functionality
- * related to the heated bed.
- *
+ * Enable the following option to activate all functionality related to the heated bed.
+ */
+//#define HEPHESTOS2_HEATED_BED_KIT
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
* Here are some standard links for getting your machine calibrated:
*
* http://reprap.org/wiki/Calibration
@@ -87,27 +78,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -150,7 +136,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 1.75
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
// For Cyclops or any "multi-extruder" that shares a single nozzle.
//#define SINGLENOZZLE
@@ -209,11 +195,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -245,15 +231,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -267,7 +244,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -276,8 +252,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -287,7 +262,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -309,15 +283,20 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 70
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
-#define TEMP_SENSOR_BED 0
-#define TEMP_SENSOR_CHAMBER 0
+
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#else
+ #define TEMP_SENSOR_BED 0
+#endif
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -334,7 +313,7 @@
#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
// Bed temperature must be close to target for this long before M190 returns success
-#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_RESIDENCY_TIME 0 // (seconds)
#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
@@ -351,12 +330,12 @@
// 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!
// You should use MINTEMP for thermistor short/failure protection.
-#define HEATER_0_MAXTEMP 230
+#define HEATER_0_MAXTEMP 275
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
#define HEATER_4_MAXTEMP 275
-#define BED_MAXTEMP 100
+#define BED_MAXTEMP 110
//===========================================================================
//============================= PID Settings ================================
@@ -367,7 +346,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -375,49 +354,45 @@
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with gcode: M301 E[extruder number, 0-2]
- #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
- // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+ #define PID_FUNCTIONAL_RANGE 50 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
// Tuned PID values using M303
- #define DEFAULT_Kp 23.75
- #define DEFAULT_Ki 2.12
- #define DEFAULT_Kd 66.63
+ #define DEFAULT_Kp 19.18
+ #define DEFAULT_Ki 1.36
+ #define DEFAULT_Kd 67.42
// BQ firmware stock PID values
- //#define DEFAULT_Kp 10.7
- //#define DEFAULT_Ki 0.45
- //#define DEFAULT_Kd 3
+ //#define DEFAULT_Kp 10.7
+ //#define DEFAULT_Ki 0.45
+ //#define DEFAULT_Kd 3
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
-#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
+
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+#endif
#if ENABLED(PIDTEMPBED)
@@ -425,35 +400,30 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- #define DEFAULT_bedKp 10.00
- #define DEFAULT_bedKi .023
- #define DEFAULT_bedKd 305.4
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -508,10 +478,11 @@
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -530,53 +501,10 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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
-
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -602,14 +530,14 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 218.77 }
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 210.02 }
/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_MAX_FEEDRATE { 300, 300, 3, 120 }
+#define DEFAULT_MAX_FEEDRATE { 167, 167, 3.3, 167 }
/**
* Default Max Acceleration (change/s) change = mm/s
@@ -617,7 +545,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 3000 }
+#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 3000 }
/**
* Default Acceleration (change/s) change = mm/s
@@ -627,9 +555,9 @@
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
-#define DEFAULT_ACCELERATION 900 // X, Y, Z and E acceleration for printing moves
-#define DEFAULT_RETRACT_ACCELERATION 1300 // E acceleration for retracts
-#define DEFAULT_TRAVEL_ACCELERATION 1500 // X, Y, Z acceleration for travel (non printing) moves
+#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves
/**
* Default Jerk (mm/s)
@@ -639,20 +567,10 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
-#define DEFAULT_XJERK 5.0
-#define DEFAULT_YJERK 5.0
+#define DEFAULT_XJERK 10.0
+#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3
-#define DEFAULT_EJERK 10.0
-
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
+#define DEFAULT_EJERK 1.0
//===========================================================================
//============================= Z Probe Options =============================
@@ -704,7 +622,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -715,7 +632,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -734,9 +651,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -777,10 +691,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -804,17 +718,13 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 0 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 2 // 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 -2
+#define Z_PROBE_OFFSET_RANGE_MAX 0
// Enable the M48 repeatability test to test probe accuracy
-//#define Z_MIN_PROBE_REPEATABILITY_TEST
+#define Z_MIN_PROBE_REPEATABILITY_TEST
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{ 0:'Low', 1:'High' }
@@ -843,6 +753,9 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -854,11 +767,9 @@
// @section homing
-#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
-//#define Z_HOMING_HEIGHT 3 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+#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.
// Direction of endstops when homing; 1=MAX, -1=MIN
@@ -890,7 +801,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -898,7 +809,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -906,23 +817,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -970,12 +876,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -998,12 +898,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 185.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 50.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1011,14 +911,17 @@
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
- #define GRID_MAX_POINTS_X 5
- #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y 4
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION X_MIN_POS + (X_PROBE_OFFSET_FROM_EXTRUDER)
- //#define RIGHT_PROBE_BED_POSITION X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
- //#define FRONT_PROBE_BED_POSITION Y_MIN_POS + (Y_PROBE_OFFSET_FROM_EXTRUDER)
- //#define BACK_PROBE_BED_POSITION Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
+ #define LEFT_PROBE_BED_POSITION X_MIN_POS + (X_PROBE_OFFSET_FROM_EXTRUDER)
+ #define RIGHT_PROBE_BED_POSITION X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
+ #define FRONT_PROBE_BED_POSITION Y_MIN_POS + (Y_PROBE_OFFSET_FROM_EXTRUDER)
+ #define BACK_PROBE_BED_POSITION Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1027,7 +930,7 @@
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
- #define EXTRAPOLATE_BEYOND_GRID
+ //#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
@@ -1041,6 +944,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
+ #define ABL_PROBE_PT_1_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
+ #define ABL_PROBE_PT_2_X X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
+ #define ABL_PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
+ #define ABL_PROBE_PT_3_X ((X_MIN_POS + X_MAX_POS) / 2)
+ #define ABL_PROBE_PT_3_Y Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1049,23 +963,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1074,21 +992,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1100,16 +1005,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
-#define Z_PROBE_END_SCRIPT "G27 P0"
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
// @section homing
@@ -1140,8 +1040,8 @@
#endif
// Homing speeds (mm/m)
-#define HOMING_FEEDRATE_XY (50*60)
-#define HOMING_FEEDRATE_Z ( 4*60)
+#define HOMING_FEEDRATE_XY (60*60)
+#define HOMING_FEEDRATE_Z 120
// @section calibrate
@@ -1225,7 +1125,7 @@
// every couple of seconds when it can't accept commands.
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
-#define DEFAULT_KEEPALIVE_INTERVAL 5 // Number of seconds between "busy" messages. Set with M113.
+#define DEFAULT_KEEPALIVE_INTERVAL 10 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
//
@@ -1246,12 +1146,12 @@
// @section temperature
// Preheat Constants
-#define PREHEAT_1_TEMP_HOTEND 180
+#define PREHEAT_1_TEMP_HOTEND 205
#define PREHEAT_1_TEMP_BED 50
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
-#define PREHEAT_2_TEMP_HOTEND 210
-#define PREHEAT_2_TEMP_BED 60
+#define PREHEAT_2_TEMP_HOTEND 245
+#define PREHEAT_2_TEMP_BED 50
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
/**
@@ -1312,7 +1212,7 @@
* Attention: EXPERIMENTAL. G-code arguments may change.
*
*/
-//#define NOZZLE_CLEAN_FEATURE
+#define NOZZLE_CLEAN_FEATURE
#if ENABLED(NOZZLE_CLEAN_FEATURE)
// Default number of pattern repetitions
@@ -1322,8 +1222,8 @@
#define NOZZLE_CLEAN_TRIANGLES 3
// Specify positions as { X, Y, Z }
- #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
- #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_START_POINT { X_MIN_POS + 10, Y_MAX_POS - 9, (Z_MIN_POS + 0.5)}
+ #define NOZZLE_CLEAN_END_POINT { X_MIN_POS + 90, Y_MAX_POS - 0, (Z_MIN_POS + 0.5)}
// Circular pattern radius
#define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
@@ -1333,7 +1233,7 @@
#define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
// Moves the nozzle to the initial position
- #define NOZZLE_CLEAN_GOBACK
+ //#define NOZZLE_CLEAN_GOBACK
#endif
/**
@@ -1378,11 +1278,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1410,6 +1310,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1434,16 +1347,7 @@
*
* Use CRC checks and retries on the SD communication.
*/
-//#define SD_CHECK_AND_RETRY
-
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
+#define SD_CHECK_AND_RETRY
//
// ENCODER SETTINGS
@@ -1451,13 +1355,13 @@
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-#define ENCODER_PULSES_PER_STEP 1
+//#define ENCODER_PULSES_PER_STEP 1
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-#define ENCODER_STEPS_PER_MENU_ITEM 5
+//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1509,18 +1413,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1538,6 +1436,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1546,6 +1478,28 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1553,28 +1507,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1590,13 +1549,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1621,83 +1579,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1713,16 +1594,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1738,13 +1627,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1754,40 +1636,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1795,7 +1648,7 @@
// @section extras
// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
-#define FAST_PWM_FAN
+//#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
@@ -1847,7 +1700,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1912,7 +1765,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
index 0d0e0c0..14776c6 100644
--- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
+++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -172,22 +161,20 @@
// 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
+#define EXTRUDER_RUNOUT_PREVENT
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
- #define EXTRUDER_RUNOUT_MINTEMP 190
- #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_MINTEMP 170
+ #define EXTRUDER_RUNOUT_SECONDS 60
#define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
#define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
#endif
// @section temperature
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
+//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
@@ -198,7 +185,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the 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
@@ -206,22 +193,12 @@
// 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 800
+//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -384,16 +351,13 @@
// Homing hits each endstop, retracts by these distances, then does a slower bump.
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
-#define Z_HOME_BUMP_MM 1
+#define Z_HOME_BUMP_MM 2
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
// When G28 is called, this option will make Y home before X
#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -410,10 +374,10 @@
// 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 300
-#define DISABLE_INACTIVE_X false
-#define DISABLE_INACTIVE_Y false
-#define DISABLE_INACTIVE_Z false // set to false if the nozzle will fall down on your printed part when print has finished.
+#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
@@ -424,7 +388,7 @@
// @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 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
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// 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]
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -486,15 +434,7 @@
* M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
*/
//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
-
-#define DIGIPOT_MOTOR_CURRENT { 170, 170, 180, 190, 180 } // Values 0-255
- //
- // bq ZUM Mega 3D defaults:
- // X = 150 [~1.17A]
- // Y = 170 [~1.33A]
- // Z = 180 [~1.41A]
- // E0 = 190 [~1.49A]
-
+#define DIGIPOT_MOTOR_CURRENT { 150, 170, 180, 190, 180 } // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A])
//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
@@ -514,25 +454,24 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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 30 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
-#define ENCODER_100X_STEPS_PER_SEC 50 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+//#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
+//#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
+#define LCD_INFO_MENU
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -541,21 +480,7 @@
#define LCD_DECIMAL_SMALL_XY
// The timeout (in ms) to return to the status screen from sub-menus
-#define LCD_TIMEOUT_TO_STATUS 60000
-
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+//#define LCD_TIMEOUT_TO_STATUS 15000
/**
* LED Control Menu
@@ -583,8 +508,8 @@
// Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
#define SD_DETECT_INVERTED
- #define SD_FINISHED_STEPPERRELEASE false // Disable steppers when SD Print is finished
- #define SD_FINISHED_RELEASECOMMAND "G27 P0" // You might want to keep the z enabled so your bed stays in place.
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M104 S0\nM84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
// Reverse SD sort to show "more recent" files first, according to the card's FAT.
// Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
@@ -593,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -645,8 +556,27 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// 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
@@ -665,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -685,22 +610,19 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
- //#define XYZ_HOLLOW_FRAME
+ #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
+ #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
+ #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.
@@ -709,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -752,44 +655,68 @@
*
* 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
- #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 1500 // 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_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
#endif
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -803,7 +730,7 @@
//
// G2/G3 Arc Support
//
-//#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#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
@@ -824,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -879,7 +769,7 @@
// The number of linear motions that can be in the plan at any give time.
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
#if ENABLED(SDSUPPORT)
- #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+ #define BLOCK_BUFFER_SIZE 32 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else
#define BLOCK_BUFFER_SIZE 64 // maximize block buffer
#endif
@@ -925,13 +815,13 @@
// 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
+#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
+//#define NO_TIMEOUTS 1000 // Milliseconds
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
#define ADVANCED_OK
@@ -988,55 +878,53 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1084,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1143,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1201,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1224,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1252,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1562,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1574,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1606,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1616,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1656,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/BQ/Hephestos_2/README.md b/Marlin/example_configurations/BQ/Hephestos_2/README.md
index ab28487..cbe9965 100644
--- a/Marlin/example_configurations/BQ/Hephestos_2/README.md
+++ b/Marlin/example_configurations/BQ/Hephestos_2/README.md
@@ -1,29 +1,22 @@
# Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2)
-Based on the original configuration file shipped with the heavily modified Marlin fork by BQ.
-The forked firmware and configuration files can be found at the [BQ Github repository](https://github.com/bq/Marlin).
+This configuration file is based on the original configuration file shipped with the heavily modified Marlin fork by BQ. The original firmware and configuration file can be found at [BQ Github repository](https://github.com/bq/Marlin).
-NOTE: The look and feel of the LCD menu will change dramatically when using the original Marlin firmware.
+NOTE: The look and feel of the Hephestos 2 while navigating the LCD menu will change by using the original Marlin firmware.
## Changelog
- * 2018/05/30 - Configuration updated to the latest Marlin version (43a55a9af).
- ABL Bilinear 5x5 is active by default.
+ * 2016/03/01 - Initial release
- * 2017/07/06 - Configuration updated to the latest Marlin version and added support for the
- official BQ heated bed upgrade kit.
+ * 2016/03/21 - Activated 4-point auto leveling by default
+ Updated miscellaneous z-probe values
- * 2016/12/13 - Configuration updated to the latest Marlin version.
+ * 2016/06/21 - Disabled hot bed related options
+ Activated software endstops
+ SD printing now disables the heater when finished
- * 2016/07/13 - Configuration updated to the latest Marlin version.
+ * 2016/07/13 - Update the `DEFAULT_AXIS_STEPS_PER_UNIT` for the Z axis
+ Increased the `DEFAULT_XYJERK`
- * 2016/06/21 - Disabled heated bed related options, activated software endstops and SD printing now
- disables the heater when finishes printing.
+ * 2016/12/13 - Configuration updated.
- * 2016/03/21 - Activated 4-point auto leveling by default and updated miscellaneous z-probe values.
-
- * 2016/03/01 - The first release of Marlin's configuration file for the
- BQ Hephestos 2 3D printer.
-
-
-## Support
-This configuration should work easily with the stock Hephestos 2, nevertheless if you encounter any
-issues you may contact me on [Github](https://github.com/jbrazio), [Twitter](https://twitter.com/jbrazio) or by mail.
+ * 2017/07/06 - Configuration updated to the latest Marlin version.
+ Added support for the official BQ heated bed kit.
diff --git a/Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h b/Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h
index 0e771c0..786d37b 100644
--- a/Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h
+++ b/Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h
@@ -21,80 +21,83 @@
*/
/**
- * Custom Boot Screen bitmap
+ * Custom Bitmap for splashscreen
*
- * Place this file in the root with your configuration files
- * and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
+ * You may use one of the following tools to generate the C++ bitmap array from
+ * a black and white image:
*
- * Use the Marlin Bitmap Converter to make your own:
- * http://marlinfw.org/tools/u8glib/converter.html
+ * - http://www.marlinfw.org/tools/u8glib/converter.html
+ * - http://www.digole.com/tools/PicturetoC_Hex_converter.php
*/
+#include
-#define CUSTOM_BOOTSCREEN_BMPWIDTH 64
+#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
+#define CUSTOM_BOOTSCREEN_BMPWIDTH 62
+#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
-const unsigned char custom_start_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000011,B11110000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00001111,B11111100,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00001111,B11111100,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B11111000,B00000111,B11111000,B00000111,B11000000,B00000000,
- B00000000,B00000001,B11111100,B00000011,B11110000,B00001111,B11100000,B00000000,
- B00000000,B00000011,B11111110,B00000000,B11000000,B00011111,B11110000,B00000000,
- B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
- B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
- B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
- B00000000,B00000011,B11111100,B00000000,B00000000,B00001111,B11100000,B00000000,
- B00000000,B00000001,B11111000,B00000000,B00000000,B00001111,B11100000,B00000000,
- B00000000,B00000000,B01110000,B00000000,B00000000,B00000011,B10000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00001111,B10000000,B00000000,B00000000,B01110000,B00000000,B00000000,B00000000,
- B00011111,B11000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
- B00111111,B11000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
- B00111111,B11100000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
- B00111111,B11100000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
- B00111111,B11100000,B00000000,B00000000,B01111011,B11000000,B00001111,B00000000,
- B00111111,B11000000,B00000000,B00000000,B01111111,B11110000,B00111111,B11000000,
- B00011111,B10000000,B00000000,B00000000,B01111111,B11111000,B01111111,B11100000,
- B00001111,B00000000,B00000000,B00000000,B01111110,B11111100,B11111001,B11110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B11100000,B11110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B11100000,B11110000,
- B00000000,B00000000,B00000000,B00000000,B01111100,B01111100,B11111001,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00011111,B11111000,B11111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00001111,B11110000,B01111111,B11110000,
- B00000000,B00000000,B00000000,B00000000,B00000111,B11100000,B00011111,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
+const unsigned char custom_start_bmp[512] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0xC0, 0x0F, 0xF0, 0x07, 0x80, 0x00,
+ 0x00, 0x07, 0xE0, 0x07, 0xE0, 0x0F, 0xC0, 0x00,
+ 0x00, 0x0F, 0xF0, 0x03, 0xC0, 0x1F, 0xE0, 0x00,
+ 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
+ 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
+ 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
+ 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
+ 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
+ 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x1F, 0xE0, 0x00,
+ 0x00, 0x07, 0xE0, 0x00, 0x00, 0x0F, 0xC0, 0x00,
+ 0x00, 0x03, 0xC0, 0x00, 0x00, 0x07, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1E, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0x3F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0x7F, 0x80, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0xFF, 0xC0, 0x00, 0x00, 0xF7, 0xC0, 0x1F, 0x80,
+ 0xFF, 0xC0, 0x00, 0x00, 0xFF, 0xF0, 0x7F, 0xC0,
+ 0x7F, 0x80, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xE0,
+ 0x3F, 0x00, 0x00, 0x00, 0xFC, 0xF8, 0xF0, 0xF8,
+ 0x1E, 0x00, 0x00, 0x00, 0xF8, 0x7D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0xF8, 0x79, 0xF0, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x7F, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x3F, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x0E, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
};
diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h
index d121193..493e802 100644
--- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h
+++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
//#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -131,6 +126,9 @@
// Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "WITBOX"
+// Added for BQ
+#define SOURCE_CODE_URL "http://www.bq.com/gb/downloads-witbox.html"
+
// 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"
@@ -201,11 +199,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -237,15 +235,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -259,7 +248,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -268,8 +256,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -279,7 +266,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -301,7 +287,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 1
#define TEMP_SENSOR_1 0
@@ -309,7 +295,6 @@
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 0
-#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -359,7 +344,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -371,39 +356,32 @@
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
// Witbox
- #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
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
//#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -412,35 +390,30 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- #define DEFAULT_bedKp 10.00
- #define DEFAULT_bedKi .023
- #define DEFAULT_bedKd 305.4
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
- //#define DEFAULT_bedKp 97.1
- //#define DEFAULT_bedKi 1.41
- //#define DEFAULT_bedKd 1675.16
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -495,10 +468,11 @@
#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -517,53 +491,10 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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
-
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -631,16 +562,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -691,7 +612,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -702,7 +622,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -721,9 +641,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -761,16 +678,13 @@
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle]
-// Certain types of probes need to stay away from edges
-#define MIN_PROBE_EDGE 10
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -794,10 +708,6 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
-#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -833,6 +743,9 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -846,8 +759,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -880,7 +791,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -888,7 +799,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -896,23 +807,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -960,12 +866,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -988,12 +888,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1005,10 +905,13 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
- //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+ #define LEFT_PROBE_BED_POSITION 15
+ #define RIGHT_PROBE_BED_POSITION 170
+ #define FRONT_PROBE_BED_POSITION 20
+ #define BACK_PROBE_BED_POSITION 170
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1031,6 +934,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 15
+ #define ABL_PROBE_PT_1_Y 180
+ #define ABL_PROBE_PT_2_X 15
+ #define ABL_PROBE_PT_2_Y 20
+ #define ABL_PROBE_PT_3_X 170
+ #define ABL_PROBE_PT_3_Y 20
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1039,23 +953,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1064,21 +982,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1090,11 +995,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1368,11 +1268,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1400,6 +1300,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1426,28 +1339,19 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-//#define ENCODER_PULSES_PER_STEP 4
+//#define ENCODER_PULSES_PER_STEP 1
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-//#define ENCODER_STEPS_PER_MENU_ITEM 1
+//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1499,18 +1403,12 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1528,6 +1426,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1536,6 +1468,28 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1543,28 +1497,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1580,13 +1539,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1611,83 +1569,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-//#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1703,16 +1584,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1728,13 +1617,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1744,40 +1626,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1837,7 +1690,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1902,7 +1755,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
index 194d5d5..e8f5214 100644
--- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
+++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -182,12 +171,10 @@
// @section temperature
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
+//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
@@ -198,7 +185,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the 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
@@ -208,20 +195,10 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -391,9 +358,6 @@
// When G28 is called, this option will make Y home before X
//#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// 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]
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -506,8 +454,7 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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
//===========================================================================
@@ -535,20 +482,6 @@
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
-
/**
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
@@ -585,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -637,6 +556,25 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@@ -657,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -677,9 +610,6 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -701,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -759,29 +670,53 @@
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -816,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -980,55 +878,53 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1076,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1135,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1193,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1216,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1244,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1554,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1566,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1598,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1608,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1648,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h
index e2fd74b..350f5dc 100644
--- a/Marlin/example_configurations/Cartesio/Configuration.h
+++ b/Marlin/example_configurations/Cartesio/Configuration.h
@@ -37,7 +37,7 @@
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#define CONFIGURATION_H_VERSION 010109
+#define CONFIGURATION_H_VERSION 010107
//===========================================================================
//============================= Getting Started =============================
@@ -79,27 +79,22 @@
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
-/**
- * *** VENDORS PLEASE READ ***
- *
- * Marlin allows you to add a custom boot image for Graphical LCDs.
- * With this option Marlin will first show your custom screen followed
- * by the standard Marlin logo with version number and web URL.
- *
- * We encourage you to take advantage of this new feature and we also
- * respectfully request that you retain the unmodified Marlin boot screen.
- */
-
-// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//
+// *** VENDORS PLEASE READ *****************************************************
+//
+// Marlin now allow you to have a vendor boot image to be displayed on machine
+// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
+// custom boot image and then the default Marlin boot image is shown.
+//
+// We suggest for you to take advantage of this new feature and keep the Marlin
+// boot image unmodified. For an example have a look at the bq Hephestos 2
+// example configuration folder.
+//
#define SHOW_CUSTOM_BOOTSCREEN
-
-// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
-//#define CUSTOM_STATUS_SCREEN_IMAGE
-
// @section machine
/**
- * Select the serial port on the board to use for communication with the host.
+ * Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
@@ -202,11 +197,11 @@
/**
* "Mixing Extruder"
- * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
- * - This implementation supports up to two mixing extruders.
- * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@@ -238,15 +233,6 @@
// Enable this option to leave the PSU off at startup.
// Power to steppers and heaters will need to be turned on with M80.
//#define PS_DEFAULT_OFF
-
- //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
- #if ENABLED(AUTO_POWER_CONTROL)
- #define AUTO_POWER_FANS // Turn on PSU if fans need power
- #define AUTO_POWER_E_FANS
- #define AUTO_POWER_CONTROLLERFAN
- #define POWER_TIMEOUT 30
- #endif
-
#endif
// @section temperature
@@ -260,7 +246,6 @@
*
* Temperature sensors available:
*
- * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -269,8 +254,7 @@
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
- * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
- * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
@@ -280,7 +264,6 @@
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
- * 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
@@ -302,7 +285,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '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)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '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 -1
#define TEMP_SENSOR_1 -1
@@ -310,7 +293,6 @@
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_BED 1
-#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
#define DUMMY_THERMISTOR_998_VALUE 25
@@ -360,7 +342,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within any PID loop
+#define PID_K1 0.95 // Smoothing factor within the PID
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -374,49 +356,42 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Cartesio extruderV6 40W Normal
- #define DEFAULT_Kp 18
- #define DEFAULT_Ki 1
- #define DEFAULT_Kd 100
+ #define DEFAULT_Kp 18
+ #define DEFAULT_Ki 1
+ #define DEFAULT_Kd 100
// Cartesio extruderV6 40W Volcano
- //#define DEFAULT_Kp 50
- //#define DEFAULT_Ki 9
- //#define DEFAULT_Kd 70
+ //#define DEFAULT_Kp 50
+ //#define DEFAULT_Ki 9
+ //#define DEFAULT_Kd 70
// Cartesio extruderV6 40W Cyclops
- //#define DEFAULT_Kp 18
- //#define DEFAULT_Ki 1
- //#define DEFAULT_Kd 100
+ //#define DEFAULT_Kp 18
+ //#define DEFAULT_Ki 1
+ //#define DEFAULT_Kd 100
#endif // PIDTEMP
//===========================================================================
//============================= PID > Bed Temperature Control ===============
//===========================================================================
-
-/**
- * PID Bed Heating
- *
- * If this option is enabled set PID constants below.
- * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
- *
- * The PID frequency will be the same as the extruder PWM.
- * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
- * which is fine for driving a square wave into a resistive load and does not significantly
- * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
- * heater. If your configuration is significantly different than this and you don't understand
- * the issues involved, don't use bed PID until someone else verifies that your hardware works.
- */
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
+//
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
+// shouldn't use bed PID until someone else verifies your hardware works.
+// If this is enabled, find your own PID constants below.
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
-/**
- * Max Bed Power
- * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
- * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
- * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
- */
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
+// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
#if ENABLED(PIDTEMPBED)
@@ -424,34 +399,29 @@
//#define PID_BED_DEBUG // Sends debug data to the serial port.
//24V 500W silicone heater on to 4mm glass CartesioW
- #define DEFAULT_bedKp 390
- #define DEFAULT_bedKi 70
- #define DEFAULT_bedKd 546
+ #define DEFAULT_bedKp 390
+ #define DEFAULT_bedKi 70
+ #define DEFAULT_bedKd 546
//24V 250W silicone heater on to 4mm glass CartesioM
- //#define DEFAULT_bedKp 303
- //#define DEFAULT_bedKi 42
- //#define DEFAULT_bedKd 539
+ //#define DEFAULT_bedKp 303
+ //#define DEFAULT_bedKi 42
+ //#define DEFAULT_bedKd 539
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
// @section extruder
-/**
- * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
- * Add M302 to set the minimum extrusion temperature and/or turn
- * cold extrusion prevention on and off.
- *
- * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
- */
+// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
+// It also enables the M302 command to set the minimum extrusion temperature
+// or to allow moving the extruder regardless of the hotend temperature.
+// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-/**
- * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
- * Note: For Bowden Extruders make this large enough to allow load/unload.
- */
+// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
+// Note that for Bowden Extruders a too-small value here may prevent loading.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -506,10 +476,11 @@
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
-// Enable pullup for all endstops to prevent a floating state
-#define ENDSTOPPULLUPS
+// coarse Endstop Settings
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
+
#if DISABLED(ENDSTOPPULLUPS)
- // Disable ENDSTOPPULLUPS to set pullups individually
+ // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
@@ -526,55 +497,12 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
-
-/**
- * Stepper Drivers
- *
- * These settings allow Marlin to tune stepper driver timing and enable advanced options for
- * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
- *
- * A4988 is assumed for unspecified drivers.
- *
- * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
- * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
- * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * 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 Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
-/**
- * Endstop Noise Filter
- *
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
- */
-//#define ENDSTOP_NOISE_FILTER
-
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -642,16 +570,6 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-/**
- * S-Curve Acceleration
- *
- * This option eliminates vibration during printing by fitting a Bézier
- * curve to move acceleration, producing much smoother direction changes.
- *
- * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
- */
-//#define S_CURVE_ACCELERATION
-
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
@@ -702,7 +620,6 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
-//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -713,7 +630,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
-//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
@@ -732,9 +649,6 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -772,16 +686,13 @@
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
-// Certain types of probes need to stay away from edges
-#define MIN_PROBE_EDGE 10
-
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Feedrate (mm/m) for the "accurate" probe of each point
+// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -805,10 +716,6 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
-#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
-
-#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
@@ -844,6 +751,9 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
+// Enable this option for Toshiba stepper drivers
+//#define CONFIG_STEPPERS_TOSHIBA
+
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -857,8 +767,6 @@
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
-
//#define Z_HOMING_HEIGHT 4 // (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.
@@ -891,7 +799,7 @@
* - Use 'M211' to set software endstops on/off or report current state
*/
-// Min software endstops constrain movement within minimum coordinate bounds
+// Min software endstops curtail movement below minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
@@ -899,7 +807,7 @@
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
-// Max software endstops constrain movement within maximum coordinate bounds
+// Max software endstops curtail movement above maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
@@ -907,23 +815,18 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
- //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
-#endif
-
/**
- * Filament Runout Sensors
- * Mechanical or opto endstops are used to check for the presence of filament.
+ * Filament Runout Sensor
+ * A mechanical or opto endstop is used to check for the presence of filament.
*
- * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
- * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
- * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ * RAMPS-based boards use SERVO3_PIN.
+ * For other boards you may need to define FIL_RUNOUT_PIN.
+ * By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
- #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -971,12 +874,6 @@
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
-/**
- * Normally G28 leaves leveling disabled on completion. Enable
- * this option to have G28 restore the prior leveling state.
- */
-//#define RESTORE_LEVELING_AFTER_G28
-
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -999,12 +896,12 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- //#define G26_MESH_VALIDATION
+ //#define G26_MESH_VALIDATION // Enable G26 mesh validation
#if ENABLED(G26_MESH_VALIDATION)
- #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
- #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -1016,10 +913,13 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
- //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
- //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+ #define LEFT_PROBE_BED_POSITION 15
+ #define RIGHT_PROBE_BED_POSITION 170
+ #define FRONT_PROBE_BED_POSITION 20
+ #define BACK_PROBE_BED_POSITION 170
+
+ // The Z probe minimum outer margin (to validate G29 parameters).
+ #define MIN_PROBE_EDGE 10
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1042,6 +942,17 @@
#endif
+#elif ENABLED(AUTO_BED_LEVELING_3POINT)
+
+ // 3 arbitrary points to probe.
+ // A simple cross-product is used to estimate the plane of the bed.
+ #define ABL_PROBE_PT_1_X 15
+ #define ABL_PROBE_PT_1_Y 180
+ #define ABL_PROBE_PT_2_X 15
+ #define ABL_PROBE_PT_2_Y 20
+ #define ABL_PROBE_PT_3_X 170
+ #define ABL_PROBE_PT_3_Y 20
+
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1050,23 +961,27 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define 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_Y GRID_MAX_POINTS_X
+ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
+ #define UBL_PROBE_PT_1_Y 180
+ #define UBL_PROBE_PT_2_X 39
+ #define UBL_PROBE_PT_2_Y 20
+ #define UBL_PROBE_PT_3_X 180
+ #define UBL_PROBE_PT_3_Y 20
+
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
- //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
- // as the Z-Height correction value.
-
#elif ENABLED(MESH_BED_LEVELING)
//===========================================================================
//=================================== Mesh ==================================
//===========================================================================
- #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define MESH_INSET 10 // Mesh inset margin on print area
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1075,21 +990,8 @@
#endif // BED_LEVELING
/**
- * Points to probe for all 3-point Leveling procedures.
- * Override if the automatically selected points are inadequate.
- */
-#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-#endif
-
-/**
- * Add a bed leveling sub-menu for ABL or MBL.
- * Include a guided procedure if manual probing is enabled.
+ * Use the LCD controller for bed leveling
+ * Requires MESH_BED_LEVELING or PROBE_MANUALLY
*/
//#define LCD_BED_LEVELING
@@ -1101,11 +1003,6 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
-#if ENABLED(LEVEL_BED_CORNERS)
- #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
- //#define LEVEL_CENTER_TOO // Move to the center after the last corner
-#endif
-
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1379,11 +1276,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
- * eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
- * pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
+ * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
+ * tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1411,6 +1308,19 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * LCD TYPE
+ *
+ * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+ * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
+ * (These options will be enabled automatically for most displays.)
+ *
+ * IMPORTANT: The U8glib library is required for Full Graphic Display!
+ * https://github.com/olikraus/U8glib_Arduino
+ */
+//#define ULTRA_LCD // Character based
+//#define DOGLCD // Full graphics display
+
/**
* SD CARD
*
@@ -1437,15 +1347,6 @@
*/
//#define SD_CHECK_AND_RETRY
-/**
- * LCD Menu Items
- *
- * Disable all menus and only display the Status Screen, or
- * just remove some extraneous menu items to recover space.
- */
-//#define NO_LCD_MENUS
-//#define SLIM_LCD_MENUS
-
//
// ENCODER SETTINGS
//
@@ -1510,18 +1411,12 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
#define LCD_FEEDBACK_FREQUENCY_HZ 1000
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//======================== (Character-based LCDs) =========================
-//=============================================================================
-
//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+// CONTROLLER TYPE: Standard
//
-// Note: Usually sold with a white PCB.
+// Marlin supports a wide variety of controllers.
+// Enable one of the following options to specify your controller.
//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// ULTIMAKER Controller.
@@ -1539,6 +1434,40 @@
//
//#define PANEL_ONE
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1547,6 +1476,28 @@
//
//#define G3D_PANEL
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+#define REPRAPWORLD_KEYPAD
+#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1554,28 +1505,33 @@
//#define RIGIDBOT_PANEL
//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+//#define BQ_LCD_SMART_CONTROLLER
//
-// ANET and Tronxy 20x4 Controller
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+#define CARTESIO_UI
+
+//
+// ANET and Tronxy Controller supported displays.
//
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
// This LCD is known to be susceptible to electrical interference
// which scrambles the display. Pressing any button clears it up.
// This is a LCD2004 display with 5 analog buttons.
-//
-// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
-//
-//#define ULTRA_LCD
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
-//=============================================================================
-//======================== LCD / Controller Selection =========================
-//===================== (I2C and Shift-Register LCDs) =====================
-//=============================================================================
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
//
// CONTROLLER TYPE: I2C
@@ -1591,13 +1547,12 @@
//#define RA_CONTROL_PANEL
//
-// Sainsmart (YwRobot) LCD Displays
+// Sainsmart YW Robot (LCM1602) LCD Display
//
-// These require F.Malpartida's LiquidCrystal_I2C library
+// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
-//#define LCD_SAINSMART_I2C_1602
-//#define LCD_SAINSMART_I2C_2004
+//#define LCD_I2C_SAINSMART_YWROBOT
//
// Generic LCM1602 LCD adapter
@@ -1622,83 +1577,6 @@
//
//#define LCD_I2C_VIKI
-//
-// CONTROLLER TYPE: Shift register panels
-//
-
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
-//=============================================================================
-//======================= LCD / Controller Selection =======================
-//========================= (Graphical LCDs) ========================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Graphical 128x64 (DOGM)
-//
-// IMPORTANT: The U8glib library is required for Graphical Display!
-// https://github.com/olikraus/U8glib_Arduino
-//
-
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
-//
-#define CARTESIO_UI
-
-//
-// LCD for Melzi Card with Graphical LCD
-//
-//#define LCD_FOR_MELZI
-
//
// SSD1306 OLED full graphics generic display
//
@@ -1714,16 +1592,24 @@
#endif
//
-// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
-// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+// CONTROLLER TYPE: Shift register panels
//
-//#define ULTI_CONTROLLER
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#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
@@ -1739,13 +1625,6 @@
//
//#define CR10_STOCKDISPLAY
-//
-// ANET and Tronxy Graphical Controller
-//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1755,40 +1634,11 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
-//
// Silvergate GLCD controller
// http://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER
-//=============================================================================
-//============================ Other Controllers ============================
-//=============================================================================
-
-//
-// CONTROLLER TYPE: Standalone / Serial
-//
-
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
-
-//
-// CONTROLLER TYPE: Keypad / Add-on
-//
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-#define REPRAPWORLD_KEYPAD
-#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1848,7 +1698,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * 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!
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
@@ -1913,7 +1763,9 @@
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Only power servos during movement, otherwise leave off to prevent jitter
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE
#endif // CONFIGURATION_H
diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h
index e064cbb..aa7bcff 100644
--- a/Marlin/example_configurations/Cartesio/Configuration_adv.h
+++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h
@@ -32,7 +32,7 @@
*/
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H_VERSION 010109
+#define CONFIGURATION_ADV_H_VERSION 010107
// @section temperature
@@ -40,17 +40,6 @@
//=============================Thermal Settings ============================
//===========================================================================
-//
-// Hephestos 2 24V heated bed upgrade kit.
-// https://store.bq.com/en/heated-bed-kit-hephestos2
-//
-//#define HEPHESTOS2_HEATED_BED_KIT
-#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
- #undef TEMP_SENSOR_BED
- #define TEMP_SENSOR_BED 70
- #define HEATER_BED_INVERTING true
-#endif
-
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
@@ -182,12 +171,10 @@
// @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 3.0
#define TEMP_SENSOR_AD595_GAIN 2.0
-// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
-// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
-#define TEMP_SENSOR_AD8495_OFFSET 0.0
-#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -198,7 +185,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the 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
@@ -208,20 +195,10 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-/**
- * PWM Fan Scaling
- *
- * Define the min/max speeds for PWM fans (as set with M106).
- *
- * With these options the M106 0-255 value range is scaled to a subset
- * to ensure that the fan has enough power to spin, or to run lower
- * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
- * Value 0 always turns off the fan.
- *
- * Define one or both of these to override the default 0-255 range.
- */
+// 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
-//#define FAN_MAX_PWM 128
// @section extruder
@@ -242,7 +219,6 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
-#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 35
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
@@ -267,10 +243,6 @@
#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
- //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
- #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
- #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
- #endif
#endif
//===========================================================================
@@ -331,20 +303,15 @@
#endif
#endif
-/**
- * Dual X Carriage
- *
- * This setup has two X carriages that can move independently, each with its own hotend.
- * The carriages can be used to print an object with two colors or materials, or in
- * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
- * The inactive carriage is parked automatically to prevent oozing.
- * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
- * By default the X2 stepper is assigned to the first unused E plug on the board.
- */
+// 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)
- #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
- #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second 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
@@ -391,9 +358,6 @@
// When G28 is called, this option will make Y home before X
#define HOME_Y_BEFORE_X
-// Enable this if X or Y can't home without homing the other axis first.
-//#define CODEPENDENT_XY_HOMING
-
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -446,24 +410,8 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
-//
-// Use Junction Deviation instead of traditional Jerk Limiting
-//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
-#endif
-
-/**
- * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
- * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
- * lowest stepping frequencies.
- */
-//#define ADAPTIVE_STEP_SMOOTHING
-
// 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]
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -506,8 +454,7 @@
//#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. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
-// These correspond to the physical drivers, so be mindful if the order is changed.
+// 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
//===========================================================================
@@ -535,20 +482,6 @@
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
-// Add an 'M73' G-code to set the current percentage
-//#define LCD_SET_PROGRESS_MANUALLY
-
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
- //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
- #if ENABLED(LCD_PROGRESS_BAR)
- #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
- #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
- #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
- //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
- //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
- #endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
-
/**
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
@@ -585,20 +518,6 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
- /**
- * Continue after Power-Loss (Creality3D)
- *
- * Store the current state to the SD Card at the start of each layer
- * during SD printing. If the recovery file is found at boot time, present
- * an option on the LCD screen to continue the print from the last-known
- * point in the file.
- */
- //#define POWER_LOSS_RECOVERY
- #if ENABLED(POWER_LOSS_RECOVERY)
- //#define POWER_LOSS_PIN 44 // Pin to detect power loss
- //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
- #endif
-
/**
* Sort SD file listings in alphabetical order.
*
@@ -637,6 +556,25 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#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
+
+ // Add an 'M73' G-code to set the current percentage
+ //#define LCD_SET_PROGRESS_MANUALLY
+
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@@ -657,11 +595,6 @@
*/
//#define SD_REPRINT_LAST_SELECTED_FILE
- /**
- * Auto-report SdCard status with M27 S
- */
- //#define AUTO_REPORT_SD_STATUS
-
#endif // SDSUPPORT
/**
@@ -677,9 +610,6 @@
* printing performance versus fast display updates.
*/
#if ENABLED(DOGLCD)
- // Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
-
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -701,25 +631,6 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
- #if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
- //#define LIGHTWEIGHT_UI
- #if ENABLED(LIGHTWEIGHT_UI)
- #define STATUS_EXPIRE_SECONDS 20
- #endif
- #endif
-
#endif // DOGLCD
// @section safety
@@ -759,29 +670,53 @@
// @section extruder
/**
- * Linear Pressure Control v1.5
+ * Implementation of linear pressure control
*
- * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
- *
- * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
- *
- * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
- * Larger K values will be needed for flexible filament and greater distances.
- * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
- * print acceleration will be reduced during the affected moves to keep within the limit.
- *
- * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
- * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ * See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
+
#if ENABLED(LIN_ADVANCE)
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
- //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+ #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
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
+ #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
+ #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
+#endif
+
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
@@ -816,46 +751,9 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-/**
- * Minimum delay after setting the stepper DIR (in ns)
- * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
- * 20 : Minimum for TMC2xxx drivers
- * 200 : Minimum for A4988 drivers
- * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
- * 650 : Minimum for DRV8825 drivers
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
- * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_DIR_DELAY 650
-
-/**
- * Minimum stepper driver pulse width (in µs)
- * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
- * 1 : Minimum for A4988 stepper drivers
- * 1 : Minimum for LV8729 stepper drivers
- * 2 : Minimum for DRV8825 stepper drivers
- * 3 : Minimum for TB6600 stepper drivers
- * 30 : Minimum for TB6560 stepper drivers
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MINIMUM_STEPPER_PULSE 2
-
-/**
- * Maximum stepping rate (in Hz) the stepper driver allows
- * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
- * 500000 : Maximum for A4988 stepper driver
- * 400000 : Maximum for TMC2xxx stepper drivers
- * 250000 : Maximum for DRV8825 stepper driver
- * 150000 : Maximum for TB6600 stepper driver
- * 130000 : Maximum for LV8729 stepper driver
- * 15000 : Maximum for TB6560 stepper driver
- *
- * Override the default value based on the driver type set in Configuration.h.
- */
-//#define MAXIMUM_STEPPER_RATE 250000
+// 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
@@ -980,55 +878,53 @@
*/
//#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 1 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- //#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
- #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
- // 0 to disable start loading and skip to fast load only
- #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
- #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
- #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
+ #define PAUSE_PARK_RETRACT_LENGTH 1 // 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 100 // 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 6 // 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 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
+ #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // 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
/**
- * TMC26X Stepper Driver options
- *
- * The TMC26XStepper library is required for this stepper driver.
- * https://github.com/trinamic/TMC26XStepper
+ * 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)
*/
-#if HAS_DRIVER(TMC26X)
+//#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
@@ -1076,27 +972,62 @@
#endif
-// @section tmc_smart
+// @section TMC2130, TMC2208
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
- * You may also use software SPI if you wish to use general purpose IO pins.
+ * 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 TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * 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
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * to #_SERIAL_TX_PIN with a 1K resistor.
* The drivers can also be used with hardware serial.
*
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-#if HAS_TRINAMIC
+//#define HAVE_TMC2208
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ // 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
+
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+
+ /**
+ * 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
@@ -1135,16 +1066,6 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
- /**
- * Use software SPI for TMC2130.
- * The default SW SPI pins are defined the respective pins files,
- * but you can override or define them here.
- */
- //#define TMC_USE_SW_SPI
- //#define TMC_SW_MOSI -1
- //#define TMC_SW_MISO -1
- //#define TMC_SW_SCK -1
-
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.
@@ -1193,21 +1114,20 @@
/**
* 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.
- * X, Y, and Z homing will always be done in spreadCycle mode.
+ * X and Y homing will always be done in spreadCycle mode.
*
- * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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/Z_HOME_BUMP_MM to 0.
- * M914 X/Y/Z to live tune the setting
+ * It is advised to set X/Y_HOME_BUMP_MM to 0.
+ * M914 X/Y to live tune the setting
*/
//#define SENSORLESS_HOMING // TMC2130 only
#if ENABLED(SENSORLESS_HOMING)
#define X_HOMING_SENSITIVITY 8
#define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
#endif
/**
@@ -1216,22 +1136,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #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
@@ -1244,61 +1148,85 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * L6470 Stepper Driver options
- *
- * The Arduino-L6470 library is required for this stepper driver.
- * https://github.com/ameyer/Arduino-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)
*/
-#if HAS_DRIVER(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
@@ -1554,7 +1482,7 @@
//#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
// steps per full revolution (motor steps/rev * microstepping)
//#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
- #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_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
@@ -1566,7 +1494,7 @@
#define I2CPE_ENC_2_TICKS_UNIT 2048
//#define I2CPE_ENC_2_TICKS_REV (16 * 200)
//#define I2CPE_ENC_2_INVERT
- #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_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
@@ -1598,7 +1526,7 @@
* this setting determines the minimum update time between checks. A value of 100 works well with
* error rolling average when attempting to correct only for skips and not for vibration.
*/
- #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+ #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
@@ -1608,29 +1536,27 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
- * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * 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
- #define MAX7219_DIN_PIN 57
- #define MAX7219_LOAD_PIN 44
+ #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
- //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
- #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
- #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
- #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
- // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_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_PLANNER_QUEUE 0 // Show the current planner queue depth 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
@@ -1648,7 +1574,4 @@
// Default behaviour is limited to Z axis only.
#endif
-// Enable Marlin dev mode which adds some special commands
-//#define MARLIN_DEV_MODE
-
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/example_configurations/Cartesio/_Bootscreen.h b/Marlin/example_configurations/Cartesio/_Bootscreen.h
index e0efd83..b78b6e1 100644
--- a/Marlin/example_configurations/Cartesio/_Bootscreen.h
+++ b/Marlin/example_configurations/Cartesio/_Bootscreen.h
@@ -21,80 +21,83 @@
*/
/**
- * Custom Boot Screen bitmap
+ * Custom Bitmap for splashscreen
*
- * Place this file in the root with your configuration files
- * and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
+ * You may use one of the following tools to generate the C++ bitmap array from
+ * a black and white image:
*
- * Use the Marlin Bitmap Converter to make your own:
- * http://marlinfw.org/tools/u8glib/converter.html
+ * - http://www.marlinfw.org/tools/u8glib/converter.html
+ * - http://www.digole.com/tools/PicturetoC_Hex_converter.php
*/
+#include