Set to head

This commit is contained in:
InsanityAutomation
2019-09-19 21:06:06 -04:00
parent 7d6c4bfa5e
commit 16fd59f130
282 changed files with 2211 additions and 1840 deletions
+1 -1
View File
@@ -198,7 +198,7 @@
#define MSG_Z3_MAX "z3_max"
#define MSG_Z_PROBE "z_probe"
#define MSG_FILAMENT_RUNOUT_SENSOR "filament"
#define MSG_PROBE_OFFSET "Probe Offset"
#define MSG_PROBE_Z_OFFSET "Probe Z Offset"
#define MSG_SKEW_MIN "min_skew_factor: "
#define MSG_SKEW_MAX "max_skew_factor: "
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
+8 -8
View File
@@ -103,14 +103,14 @@
// C++11 solution that is standards compliant.
template <class V, class N> static inline constexpr void NOLESS(V& v, const N n) {
if (v < n) v = n;
if (n > v) v = n;
}
template <class V, class N> static inline constexpr void NOMORE(V& v, const N n) {
if (v > n) v = n;
if (n < v) v = n;
}
template <class V, class N1, class N2> static inline constexpr void LIMIT(V& v, const N1 n1, const N2 n2) {
if (v < n1) v = n1;
else if (v > n2) v = n2;
if (n1 > v) v = n1;
else if (n2 < v) v = n2;
}
#else
@@ -120,21 +120,21 @@
#define NOLESS(v, n) \
do{ \
__typeof__(n) _n = (n); \
if (v < _n) v = _n; \
if (_n > v) v = _n; \
}while(0)
#define NOMORE(v, n) \
do{ \
__typeof__(n) _n = (n); \
if (v > _n) v = _n; \
if (_n < v) v = _n; \
}while(0)
#define LIMIT(v, n1, n2) \
do{ \
__typeof__(n1) _n1 = (n1); \
__typeof__(n2) _n2 = (n2); \
if (v < _n1) v = _n1; \
else if (v > _n2) v = _n2; \
if (_n1 > v) v = _n1; \
else if (_n2 < v) v = _n2; \
}while(0)
#endif
+13 -9
View File
@@ -79,36 +79,40 @@ void safe_delay(millis_t ms) {
);
#if HAS_BED_PROBE
SERIAL_ECHOPAIR("Probe Offset X:", zprobe_offset[X_AXIS], " Y:", zprobe_offset[Y_AXIS], " Z:", zprobe_offset[Z_AXIS]);
if (zprobe_offset[X_AXIS] > 0)
SERIAL_ECHOPAIR(
"Probe Offset X:" STRINGIFY(X_PROBE_OFFSET_FROM_EXTRUDER)
" Y:" STRINGIFY(Y_PROBE_OFFSET_FROM_EXTRUDER)
" Z:", zprobe_zoffset
);
if ((X_PROBE_OFFSET_FROM_EXTRUDER) > 0)
SERIAL_ECHOPGM(" (Right");
else if (zprobe_offset[X_AXIS] < 0)
else if ((X_PROBE_OFFSET_FROM_EXTRUDER) < 0)
SERIAL_ECHOPGM(" (Left");
else if (zprobe_offset[Y_AXIS] != 0)
else if ((Y_PROBE_OFFSET_FROM_EXTRUDER) != 0)
SERIAL_ECHOPGM(" (Middle");
else
SERIAL_ECHOPGM(" (Aligned With");
if (zprobe_offset[Y_AXIS] > 0) {
if ((Y_PROBE_OFFSET_FROM_EXTRUDER) > 0) {
#if IS_SCARA
SERIAL_ECHOPGM("-Distal");
#else
SERIAL_ECHOPGM("-Back");
#endif
}
else if (zprobe_offset[Y_AXIS] < 0) {
else if ((Y_PROBE_OFFSET_FROM_EXTRUDER) < 0) {
#if IS_SCARA
SERIAL_ECHOPGM("-Proximal");
#else
SERIAL_ECHOPGM("-Front");
#endif
}
else if (zprobe_offset[X_AXIS] != 0)
else if ((X_PROBE_OFFSET_FROM_EXTRUDER) != 0)
SERIAL_ECHOPGM("-Center");
if (zprobe_offset[Z_AXIS] < 0)
if (zprobe_zoffset < 0)
SERIAL_ECHOPGM(" & Below");
else if (zprobe_offset[Z_AXIS] > 0)
else if (zprobe_zoffset > 0)
SERIAL_ECHOPGM(" & Above");
else
SERIAL_ECHOPGM(" & Same Z as");
+3 -9
View File
@@ -37,12 +37,6 @@
#include "../../../lcd/extensible_ui/ui_api.h"
#endif
#if HAS_BED_PROBE
#include "../../../module/probe.h"
#else
const float zprobe_offset[XYZ] = { 0 };
#endif
#include "math.h"
void unified_bed_leveling::echo_name() {
@@ -183,11 +177,11 @@
serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
}
// Add XY probe offset from extruder because probe_pt() subtracts them when
// Add XY_PROBE_OFFSET_FROM_EXTRUDER because probe_pt() subtracts these when
// moving to the xy position to be measured. This ensures better agreement between
// the current Z position after G28 and the mesh values.
const float current_xi = find_closest_x_index(current_position[X_AXIS] + zprobe_offset[X_AXIS]),
current_yi = find_closest_y_index(current_position[Y_AXIS] + zprobe_offset[Y_AXIS]);
const float current_xi = find_closest_x_index(current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER),
current_yi = find_closest_y_index(current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER);
if (!lcd) SERIAL_EOL();
for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {
+12 -19
View File
@@ -290,7 +290,7 @@
* especially better for Delta printers, since it populates the center of the mesh first, allowing for
* a quicker test print to verify settings. You don't need to populate the entire mesh to use it.
* After all, you don't want to spend a lot of time generating a mesh only to realize the resolution
* or probe offsets are incorrect. Mesh-generation gathers points starting closest to the nozzle unless
* or zprobe_zoffset are incorrect. Mesh-generation gathers points starting closest to the nozzle unless
* an (X,Y) coordinate pair is given.
*
* Unified Bed Leveling uses a lot of EEPROM storage to hold its data, and it takes some effort to get
@@ -453,7 +453,7 @@
SERIAL_ECHO(g29_y_pos);
SERIAL_ECHOLNPGM(").\n");
}
probe_entire_mesh(g29_x_pos + zprobe_offset[X_AXIS], g29_y_pos + zprobe_offset[Y_AXIS],
probe_entire_mesh(g29_x_pos + X_PROBE_OFFSET_FROM_EXTRUDER, g29_y_pos + Y_PROBE_OFFSET_FROM_EXTRUDER,
parser.seen('T'), parser.seen('E'), parser.seen('U'));
report_current_position();
@@ -482,8 +482,8 @@
g29_x_pos = X_HOME_POS;
g29_y_pos = Y_HOME_POS;
#else // cartesian
g29_x_pos = zprobe_offset[X_AXIS] > 0 ? X_BED_SIZE : 0;
g29_y_pos = zprobe_offset[Y_AXIS] < 0 ? Y_BED_SIZE : 0;
g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_BED_SIZE : 0;
g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_BED_SIZE : 0;
#endif
}
@@ -800,8 +800,8 @@
restore_ubl_active_state_and_leave();
do_blocking_move_to_xy(
constrain(rx - zprobe_offset[X_AXIS], MESH_MIN_X, MESH_MAX_X),
constrain(ry - zprobe_offset[Y_AXIS], MESH_MIN_Y, MESH_MAX_Y)
constrain(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), MESH_MIN_X, MESH_MAX_X),
constrain(ry - (Y_PROBE_OFFSET_FROM_EXTRUDER), MESH_MIN_Y, MESH_MAX_Y)
);
}
@@ -1281,8 +1281,8 @@
out_mesh.distance = -99999.9f;
// Get our reference position. Either the nozzle or probe location.
const float px = rx + (probe_as_reference == USE_PROBE_AS_REFERENCE ? zprobe_offset[X_AXIS] : 0),
py = ry + (probe_as_reference == USE_PROBE_AS_REFERENCE ? zprobe_offset[Y_AXIS] : 0);
const float px = rx + (probe_as_reference == USE_PROBE_AS_REFERENCE ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
py = ry + (probe_as_reference == USE_PROBE_AS_REFERENCE ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
float best_so_far = 99999.99f;
@@ -1384,17 +1384,10 @@
#include "../../../libs/vector_3.h"
void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) {
#if ENABLED(DELTA) || IS_SCARA
int16_t x_min = _MAX(MIN_PROBE_X, MESH_MIN_X),
constexpr int16_t x_min = _MAX(MIN_PROBE_X, MESH_MIN_X),
x_max = _MIN(MAX_PROBE_X, MESH_MAX_X),
y_min = _MAX(MIN_PROBE_Y, MESH_MIN_Y),
y_max = _MIN(MAX_PROBE_Y, MESH_MAX_Y);
#else
int16_t x_min = (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS])),
x_max = (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + zprobe_offset[X_AXIS])),
y_min = (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS])),
y_max = (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + zprobe_offset[Y_AXIS]));
#endif
bool abort_flag = false;
@@ -1512,7 +1505,7 @@
DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rx, ry), 7);
}
measured_z -= get_z_correction(rx, ry) /* + zprobe_offset[Z_AXIS] */ ;
measured_z -= get_z_correction(rx, ry) /* + zprobe_zoffset */ ;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_F(" final >>>---> ", measured_z, 7);
@@ -1718,13 +1711,13 @@
serial_delay(50);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHOLNPAIR_F("Fade Height M420 Z", planner.z_fade_height, 4);
SERIAL_ECHOLNPAIR_F("planner.z_fade_height : ", planner.z_fade_height, 4);
#endif
adjust_mesh_to_mean(g29_c_flag, g29_constant);
#if HAS_BED_PROBE
SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", zprobe_offset[Z_AXIS], 7);
SERIAL_ECHOLNPAIR_F("zprobe_zoffset: ", zprobe_zoffset, 7);
#endif
SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50);
+44 -28
View File
@@ -36,6 +36,10 @@
Joystick joystick;
#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extensible_ui/ui_api.h"
#endif
#if HAS_JOY_ADC_X
temp_info_t Joystick::x; // = { 0 }
#endif
@@ -65,35 +69,39 @@ Joystick joystick;
}
#endif
void Joystick::calculate(float norm_jog[XYZ]) {
// Do nothing if enable pin (active-low) is not LOW
#if HAS_JOY_ADC_EN
if (READ(JOY_EN_PIN)) return;
#endif
#if HAS_JOY_ADC_X || HAS_JOY_ADC_Y || HAS_JOY_ADC_Z
auto _normalize_joy = [](float &adc, const int16_t raw, const int16_t (&joy_limits)[4]) {
if (WITHIN(raw, joy_limits[0], joy_limits[3])) {
// within limits, check deadzone
if (raw > joy_limits[2])
adc = (raw - joy_limits[2]) / float(joy_limits[3] - joy_limits[2]);
else if (raw < joy_limits[1])
adc = (raw - joy_limits[1]) / float(joy_limits[1] - joy_limits[0]); // negative value
}
};
void Joystick::calculate(float (&norm_jog)[XYZ]) {
// Do nothing if enable pin (active-low) is not LOW
#if HAS_JOY_ADC_EN
if (READ(JOY_EN_PIN)) return;
#endif
#if HAS_JOY_ADC_X
static constexpr int16_t joy_x_limits[4] = JOY_X_LIMITS;
_normalize_joy(norm_jog[X_AXIS], x.raw, joy_x_limits);
#endif
#if HAS_JOY_ADC_Y
static constexpr int16_t joy_y_limits[4] = JOY_Y_LIMITS;
_normalize_joy(norm_jog[Y_AXIS], y.raw, joy_y_limits);
#endif
#if HAS_JOY_ADC_Z
static constexpr int16_t joy_z_limits[4] = JOY_Z_LIMITS;
_normalize_joy(norm_jog[Z_AXIS], z.raw, joy_z_limits);
#endif
}
auto _normalize_joy = [](float &adc, const int16_t raw, const int16_t (&joy_limits)[4]) {
if (WITHIN(raw, joy_limits[0], joy_limits[3])) {
// within limits, check deadzone
if (raw > joy_limits[2])
adc = (raw - joy_limits[2]) / float(joy_limits[3] - joy_limits[2]);
else if (raw < joy_limits[1])
adc = (raw - joy_limits[1]) / float(joy_limits[1] - joy_limits[0]); // negative value
}
};
#if HAS_JOY_ADC_X
static constexpr int16_t joy_x_limits[4] = JOY_X_LIMITS;
_normalize_joy(norm_jog[X_AXIS], x.raw, joy_x_limits);
#endif
#if HAS_JOY_ADC_Y
static constexpr int16_t joy_y_limits[4] = JOY_Y_LIMITS;
_normalize_joy(norm_jog[Y_AXIS], y.raw, joy_y_limits);
#endif
#if HAS_JOY_ADC_Z
static constexpr int16_t joy_z_limits[4] = JOY_Z_LIMITS;
_normalize_joy(norm_jog[Z_AXIS], z.raw, joy_z_limits);
#endif
}
#endif
#if ENABLED(POLL_JOG)
@@ -122,11 +130,19 @@ void Joystick::calculate(float norm_jog[XYZ]) {
float norm_jog[XYZ] = { 0 };
// Use ADC values and defined limits. The active zone is normalized: -1..0 (dead) 0..1
joystick.calculate(norm_jog);
#if HAS_JOY_ADC_X || HAS_JOY_ADC_Y || HAS_JOY_ADC_Z
joystick.calculate(norm_jog);
#endif
// Other non-joystick poll-based jogging could be implemented here
// with "jogging" encapsulated as a more general class.
#if ENABLED(EXTENSIBLE_UI)
norm_jog[X_AXIS] = ExtUI::norm_jog[X_AXIS];
norm_jog[Y_AXIS] = ExtUI::norm_jog[Y_AXIS];
norm_jog[Z_AXIS] = ExtUI::norm_jog[Z_AXIS];
#endif
// Jogging value maps continuously (quadratic relationship) to feedrate
float move_dist[XYZ] = { 0 }, hypot2 = 0;
LOOP_XYZ(i) if (norm_jog[i]) {
+1 -1
View File
@@ -46,7 +46,7 @@ class Joystick {
#if ENABLED(JOYSTICK_DEBUG)
static void report();
#endif
static void calculate(float norm_jog[XYZ]);
static void calculate(float (&norm_jog)[XYZ]);
static void inject_jog_moves();
};
-6
View File
@@ -486,12 +486,6 @@ inline bool prime_nozzle() {
return G26_OK;
}
float valid_trig_angle(float d) {
while (d > 360.0) d -= 360.0;
while (d < 0.0) d += 360.0;
return d;
}
/**
* G26: Mesh Validation Pattern generation.
*
+4 -6
View File
@@ -47,12 +47,10 @@ void GcodeSuite::G42() {
set_destination_from_current();
if (hasI) destination[X_AXIS] = _GET_MESH_X(ix);
if (hasJ) destination[Y_AXIS] = _GET_MESH_Y(iy);
#if HAS_BED_PROBE
if (parser.boolval('P')) {
if (hasI) destination[X_AXIS] -= zprobe_offset[X_AXIS];
if (hasJ) destination[Y_AXIS] -= zprobe_offset[Y_AXIS];
}
#endif
if (parser.boolval('P')) {
if (hasI) destination[X_AXIS] -= X_PROBE_OFFSET_FROM_EXTRUDER;
if (hasJ) destination[Y_AXIS] -= Y_PROBE_OFFSET_FROM_EXTRUDER;
}
const float fval = parser.linearval('F');
if (fval > 0.0) feedrate_mm_s = MMM_TO_MMS(fval);
+8 -8
View File
@@ -64,10 +64,10 @@ void GcodeSuite::M420() {
#if ENABLED(MARLIN_DEV_MODE)
if (parser.intval('S') == 2) {
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
bilinear_start[X_AXIS] = (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS]));
bilinear_start[Y_AXIS] = (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS]));
bilinear_grid_spacing[X_AXIS] = ((_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + zprobe_offset[X_AXIS])) - ((_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS])))) / (GRID_MAX_POINTS_X - 1);
bilinear_grid_spacing[Y_AXIS] = ((_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + zprobe_offset[Y_AXIS])) - ((_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS])))) / (GRID_MAX_POINTS_Y - 1);
bilinear_start[X_AXIS] = MIN_PROBE_X;
bilinear_start[Y_AXIS] = MIN_PROBE_Y;
bilinear_grid_spacing[X_AXIS] = (MAX_PROBE_X - (MIN_PROBE_X)) / (GRID_MAX_POINTS_X - 1);
bilinear_grid_spacing[Y_AXIS] = (MAX_PROBE_Y - (MIN_PROBE_Y)) / (GRID_MAX_POINTS_Y - 1);
#endif
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
@@ -77,10 +77,10 @@ void GcodeSuite::M420() {
#endif
}
SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_X) " mesh ");
SERIAL_ECHOPAIR(" (", (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS])));
SERIAL_CHAR(','); SERIAL_ECHO((_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS])));
SERIAL_ECHOPAIR(")-(", (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + zprobe_offset[X_AXIS])));
SERIAL_CHAR(','); SERIAL_ECHO((_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + zprobe_offset[Y_AXIS])));
SERIAL_ECHOPAIR(" (", MIN_PROBE_X);
SERIAL_CHAR(','); SERIAL_ECHO(MIN_PROBE_Y);
SERIAL_ECHOPAIR(")-(", MAX_PROBE_X);
SERIAL_CHAR(','); SERIAL_ECHO(MAX_PROBE_Y);
SERIAL_ECHOLNPGM(")");
}
#endif
+10 -10
View File
@@ -393,16 +393,16 @@ G29_TYPE GcodeSuite::G29() {
if (parser.seen('H')) {
const int16_t size = (int16_t)parser.value_linear_units();
left_probe_bed_position = _MAX(X_CENTER - size / 2, (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS])));
right_probe_bed_position = _MIN(left_probe_bed_position + size, (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + zprobe_offset[X_AXIS])));
front_probe_bed_position = _MAX(Y_CENTER - size / 2, (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS])));
back_probe_bed_position = _MIN(front_probe_bed_position + size, (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + zprobe_offset[Y_AXIS])));
left_probe_bed_position = _MAX(X_CENTER - size / 2, MIN_PROBE_X);
right_probe_bed_position = _MIN(left_probe_bed_position + size, MAX_PROBE_X);
front_probe_bed_position = _MAX(Y_CENTER - size / 2, MIN_PROBE_Y);
back_probe_bed_position = _MIN(front_probe_bed_position + size, MAX_PROBE_Y);
}
else {
left_probe_bed_position = parser.seenval('L') ? (int)RAW_X_POSITION(parser.value_linear_units()) : _MAX(X_CENTER - X_BED_SIZE / 2, (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS])));
right_probe_bed_position = parser.seenval('R') ? (int)RAW_X_POSITION(parser.value_linear_units()) : _MIN(left_probe_bed_position + X_BED_SIZE, (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + zprobe_offset[X_AXIS])));
front_probe_bed_position = parser.seenval('F') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : _MAX(Y_CENTER - Y_BED_SIZE / 2, (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS])));
back_probe_bed_position = parser.seenval('B') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : _MIN(front_probe_bed_position + Y_BED_SIZE, (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + zprobe_offset[Y_AXIS])));
left_probe_bed_position = parser.seenval('L') ? (int)RAW_X_POSITION(parser.value_linear_units()) : LEFT_PROBE_BED_POSITION;
right_probe_bed_position = parser.seenval('R') ? (int)RAW_X_POSITION(parser.value_linear_units()) : RIGHT_PROBE_BED_POSITION;
front_probe_bed_position = parser.seenval('F') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : FRONT_PROBE_BED_POSITION;
back_probe_bed_position = parser.seenval('B') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : BACK_PROBE_BED_POSITION;
}
if (
@@ -947,8 +947,8 @@ G29_TYPE GcodeSuite::G29() {
planner.leveling_active = false;
// Use the last measured distance to the bed, if possible
if ( NEAR(current_position[X_AXIS], xProbe - zprobe_offset[X_AXIS])
&& NEAR(current_position[Y_AXIS], yProbe - zprobe_offset[Y_AXIS])
if ( NEAR(current_position[X_AXIS], xProbe - (X_PROBE_OFFSET_FROM_EXTRUDER))
&& NEAR(current_position[Y_AXIS], yProbe - (Y_PROBE_OFFSET_FROM_EXTRUDER))
) {
const float simple_z = current_position[Z_AXIS] - measured_z;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted[Z_AXIS], " Discrepancy ", simple_z - converted[Z_AXIS]);
+2 -2
View File
@@ -136,8 +136,8 @@
destination[Z_AXIS] = current_position[Z_AXIS]; // Z is already at the right height
#if HOMING_Z_WITH_PROBE
destination[X_AXIS] -= zprobe_offset[X_AXIS];
destination[Y_AXIS] -= zprobe_offset[Y_AXIS];
destination[X_AXIS] -= X_PROBE_OFFSET_FROM_EXTRUDER;
destination[Y_AXIS] -= Y_PROBE_OFFSET_FROM_EXTRUDER;
#endif
if (position_is_reachable(destination[X_AXIS], destination[Y_AXIS])) {
+50 -50
View File
@@ -179,10 +179,10 @@ static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool
S2 += sq(z_pt[rad]);
N++;
}
return LROUND(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
return LROUND(SQRT(S2 / N) * 1000.0f) / 1000.0f + 0.00001f;
}
}
return 0.00001;
return 0.00001f;
}
/**
@@ -218,7 +218,7 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi
_7p_6_center = probe_points >= 5 && probe_points <= 7,
_7p_9_center = probe_points >= 8;
LOOP_CAL_ALL(rad) z_pt[rad] = 0.0;
LOOP_CAL_ALL(rad) z_pt[rad] = 0.0f;
if (!_0p_calibration) {
@@ -228,8 +228,8 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi
}
if (_7p_calibration) { // probe extra center points
const float start = _7p_9_center ? float(_CA) + _7P_STEP / 3.0 : _7p_6_center ? float(_CA) : float(__C),
steps = _7p_9_center ? _4P_STEP / 3.0 : _7p_6_center ? _7P_STEP : _4P_STEP;
const float start = _7p_9_center ? float(_CA) + _7P_STEP / 3.0f : _7p_6_center ? float(_CA) : float(__C),
steps = _7p_9_center ? _4P_STEP / 3.0f : _7p_6_center ? _7P_STEP : _4P_STEP;
I_LOOP_CAL_PT(rad, start, steps) {
const float a = RADIANS(210 + (360 / NPP) * (rad - 1)),
r = delta_calibration_radius * 0.1;
@@ -241,13 +241,13 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi
if (!_1p_calibration) { // probe the radius
const CalEnum start = _4p_opposite_points ? _AB : __A;
const float steps = _7p_14_intermediates ? _7P_STEP / 15.0 : // 15r * 6 + 10c = 100
_7p_11_intermediates ? _7P_STEP / 12.0 : // 12r * 6 + 9c = 81
_7p_8_intermediates ? _7P_STEP / 9.0 : // 9r * 6 + 10c = 64
_7p_6_intermediates ? _7P_STEP / 7.0 : // 7r * 6 + 7c = 49
_7p_4_intermediates ? _7P_STEP / 5.0 : // 5r * 6 + 6c = 36
_7p_2_intermediates ? _7P_STEP / 3.0 : // 3r * 6 + 7c = 25
_7p_1_intermediates ? _7P_STEP / 2.0 : // 2r * 6 + 4c = 16
const float steps = _7p_14_intermediates ? _7P_STEP / 15.0f : // 15r * 6 + 10c = 100
_7p_11_intermediates ? _7P_STEP / 12.0f : // 12r * 6 + 9c = 81
_7p_8_intermediates ? _7P_STEP / 9.0f : // 9r * 6 + 10c = 64
_7p_6_intermediates ? _7P_STEP / 7.0f : // 7r * 6 + 7c = 49
_7p_4_intermediates ? _7P_STEP / 5.0f : // 5r * 6 + 6c = 36
_7p_2_intermediates ? _7P_STEP / 3.0f : // 3r * 6 + 7c = 25
_7p_1_intermediates ? _7P_STEP / 2.0f : // 2r * 6 + 4c = 16
_7p_no_intermediates ? _7P_STEP : // 1r * 6 + 3c = 9
_4P_STEP; // .5r * 6 + 1c = 4
bool zig_zag = true;
@@ -269,7 +269,7 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi
LOOP_CAL_RAD(rad)
z_pt[rad] /= _7P_STEP / steps;
do_blocking_move_to_xy(0.0, 0.0);
do_blocking_move_to_xy(0.0f, 0.0f);
}
}
return true;
@@ -286,7 +286,7 @@ static void reverse_kinematics_probe_points(float z_pt[NPP + 1], float mm_at_pt_
LOOP_CAL_ALL(rad) {
const float a = RADIANS(210 + (360 / NPP) * (rad - 1)),
r = (rad == CEN ? 0.0 : delta_calibration_radius);
r = (rad == CEN ? 0.0f : delta_calibration_radius);
pos[X_AXIS] = cos(a) * r;
pos[Y_AXIS] = sin(a) * r;
pos[Z_AXIS] = z_pt[rad];
@@ -298,7 +298,7 @@ static void reverse_kinematics_probe_points(float z_pt[NPP + 1], float mm_at_pt_
static void forward_kinematics_probe_points(float mm_at_pt_axis[NPP + 1][ABC], float z_pt[NPP + 1]) {
const float r_quot = delta_calibration_radius / delta_radius;
#define ZPP(N,I,A) ((1 / 3.0 + r_quot * (N) / 3.0 ) * mm_at_pt_axis[I][A])
#define ZPP(N,I,A) ((1 / 3.0f + r_quot * (N) / 3.0f ) * mm_at_pt_axis[I][A])
#define Z00(I, A) ZPP( 0, I, A)
#define Zp1(I, A) ZPP(+1, I, A)
#define Zm1(I, A) ZPP(-1, I, A)
@@ -339,45 +339,45 @@ static void calc_kinematics_diff_probe_points(float z_pt[NPP + 1], float delta_e
static float auto_tune_h() {
const float r_quot = delta_calibration_radius / delta_radius;
float h_fac = 0.0;
float h_fac = 0.0f;
h_fac = r_quot / (2.0 / 3.0);
h_fac = r_quot / (2.0f / 3.0f);
h_fac = 1.0f / h_fac; // (2/3)/CR
return h_fac;
}
static float auto_tune_r() {
const float diff = 0.01;
float r_fac = 0.0,
z_pt[NPP + 1] = { 0.0 },
delta_e[ABC] = {0.0},
delta_r = {0.0},
delta_t[ABC] = {0.0};
const float diff = 0.01f;
float r_fac = 0.0f,
z_pt[NPP + 1] = { 0.0f },
delta_e[ABC] = { 0.0f },
delta_r = { 0.0f },
delta_t[ABC] = { 0.0f };
delta_r = diff;
calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
r_fac = -(z_pt[__A] + z_pt[__B] + z_pt[__C] + z_pt[_BC] + z_pt[_CA] + z_pt[_AB]) / 6.0;
r_fac = diff / r_fac / 3.0; // 1/(3*delta_Z)
r_fac = -(z_pt[__A] + z_pt[__B] + z_pt[__C] + z_pt[_BC] + z_pt[_CA] + z_pt[_AB]) / 6.0f;
r_fac = diff / r_fac / 3.0f; // 1/(3*delta_Z)
return r_fac;
}
static float auto_tune_a() {
const float diff = 0.01;
float a_fac = 0.0,
z_pt[NPP + 1] = { 0.0 },
delta_e[ABC] = {0.0},
delta_r = {0.0},
delta_t[ABC] = {0.0};
const float diff = 0.01f;
float a_fac = 0.0f,
z_pt[NPP + 1] = { 0.0f },
delta_e[ABC] = { 0.0f },
delta_r = { 0.0f },
delta_t[ABC] = { 0.0f };
ZERO(delta_t);
LOOP_XYZ(axis) {
delta_t[axis] = diff;
calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
delta_t[axis] = 0;
a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0;
a_fac -= z_pt[uint8_t((axis * _4P_STEP) + 1 + _7P_STEP)] / 6.0;
a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0f;
a_fac -= z_pt[uint8_t((axis * _4P_STEP) + 1 + _7P_STEP)] / 6.0f;
}
a_fac = diff / a_fac / 3.0; // 1/(3*delta_Z)
a_fac = diff / a_fac / 3.0f; // 1/(3*delta_Z)
return a_fac;
}
@@ -418,7 +418,7 @@ void GcodeSuite::G33() {
const bool towers_set = !parser.seen('T');
const float calibration_precision = parser.floatval('C', 0.0);
const float calibration_precision = parser.floatval('C', 0.0f);
if (calibration_precision < 0) {
SERIAL_ECHOLNPGM("?(C)alibration precision implausible (>=0).");
return;
@@ -450,7 +450,7 @@ void GcodeSuite::G33() {
static const char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
int8_t iterations = 0;
float test_precision,
zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
zero_std_dev = (verbose_level ? 999.0f : 0.0f), // 0.0 in dry-run mode : forced end
zero_std_dev_min = zero_std_dev,
zero_std_dev_old = zero_std_dev,
h_factor,
@@ -497,9 +497,9 @@ void GcodeSuite::G33() {
do { // start iterations
float z_at_pt[NPP + 1] = { 0.0 };
float z_at_pt[NPP + 1] = { 0.0f };
test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
test_precision = zero_std_dev_old != 999.0f ? (zero_std_dev + zero_std_dev_old) / 2.0f : zero_std_dev;
iterations++;
// Probe the points
@@ -515,7 +515,7 @@ void GcodeSuite::G33() {
if ((zero_std_dev < test_precision || iterations <= force_iterations) && zero_std_dev > calibration_precision) {
#if !HAS_BED_PROBE
test_precision = 0.00; // forced end
test_precision = 0.0f; // forced end
#endif
if (zero_std_dev < zero_std_dev_min) {
@@ -526,9 +526,9 @@ void GcodeSuite::G33() {
COPY(a_old, delta_tower_angle_trim);
}
float e_delta[ABC] = { 0.0 },
r_delta = 0.0,
t_delta[ABC] = { 0.0 };
float e_delta[ABC] = { 0.0f },
r_delta = 0.0f,
t_delta[ABC] = { 0.0f };
/**
* convergence matrices:
@@ -536,7 +536,7 @@ void GcodeSuite::G33() {
* - definition of the matrix scaling parameters
* - matrices for 4 and 7 point calibration
*/
#define ZP(N,I) ((N) * z_at_pt[I] / 4.0) // 4.0 = divider to normalize to integers
#define ZP(N,I) ((N) * z_at_pt[I] / 4.0f) // 4.0 = divider to normalize to integers
#define Z12(I) ZP(12, I)
#define Z4(I) ZP(4, I)
#define Z2(I) ZP(2, I)
@@ -545,7 +545,7 @@ void GcodeSuite::G33() {
// calculate factors
const float cr_old = delta_calibration_radius;
if (_7p_9_center) delta_calibration_radius *= 0.9;
if (_7p_9_center) delta_calibration_radius *= 0.9f;
h_factor = auto_tune_h();
r_factor = auto_tune_r();
a_factor = auto_tune_a();
@@ -553,11 +553,11 @@ void GcodeSuite::G33() {
switch (probe_points) {
case 0:
test_precision = 0.00; // forced end
test_precision = 0.0f; // forced end
break;
case 1:
test_precision = 0.00; // forced end
test_precision = 0.0f; // forced end
LOOP_XYZ(axis) e_delta[axis] = +Z4(CEN);
break;
@@ -605,9 +605,9 @@ void GcodeSuite::G33() {
// Normalize angles to least-squares
if (_angle_results) {
float a_sum = 0.0;
float a_sum = 0.0f;
LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis];
LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0;
LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0f;
}
// adjust delta_height and endstops by the max amount
@@ -639,7 +639,7 @@ void GcodeSuite::G33() {
char mess[21];
strcpy_P(mess, PSTR("Calibration sd:"));
if (zero_std_dev_min < 1)
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev_min * 1000.0));
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev_min * 1000.0f));
else
sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev_min));
ui.set_status(mess);
@@ -671,7 +671,7 @@ void GcodeSuite::G33() {
strcpy_P(mess, enddryrun);
strcpy_P(&mess[11], PSTR(" sd:"));
if (zero_std_dev < 1)
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev * 1000.0));
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev * 1000.0f));
else
sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev));
ui.set_status(mess);
+4 -4
View File
@@ -77,8 +77,8 @@ void GcodeSuite::M48() {
float X_current = current_position[X_AXIS],
Y_current = current_position[Y_AXIS];
const float X_probe_location = parser.linearval('X', X_current + zprobe_offset[X_AXIS]),
Y_probe_location = parser.linearval('Y', Y_current + zprobe_offset[Y_AXIS]);
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_ECHOLNPGM("? (X,Y) out of bounds.");
@@ -165,8 +165,8 @@ void GcodeSuite::M48() {
while (angle < 0.0) angle += 360.0; // outside of this range. It looks like they behave correctly with
// numbers outside of the range, but just to be safe we clamp them.
X_current = X_probe_location - zprobe_offset[X_AXIS] + cos(RADIANS(angle)) * radius;
Y_current = Y_probe_location - zprobe_offset[Y_AXIS] + sin(RADIANS(angle)) * radius;
X_current = X_probe_location - (X_PROBE_OFFSET_FROM_EXTRUDER) + cos(RADIANS(angle)) * radius;
Y_current = Y_probe_location - (Y_PROBE_OFFSET_FROM_EXTRUDER) + sin(RADIANS(angle)) * radius;
#if DISABLED(DELTA)
LIMIT(X_current, X_MIN_POS, X_MAX_POS);
+1 -1
View File
@@ -229,7 +229,7 @@
* M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
* M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
* M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS)
* M851 - Set Z probe's XYZ offsets in current units. (Negative values: X=left, Y=front, Z=down)
* M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
* M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
* M860 - Report the position of position encoder modules.
* M861 - Report the status of position encoder modules.
+2 -2
View File
@@ -42,9 +42,9 @@
&& active_extruder == 0
#endif
) {
zprobe_offset[Z_AXIS] += offs;
zprobe_zoffset += offs;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", zprobe_offset[Z_AXIS]);
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
}
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
else {
+2 -2
View File
@@ -39,8 +39,8 @@
* E Engage the probe for each probe (default 1)
*/
void GcodeSuite::G30() {
const float xpos = parser.linearval('X', current_position[X_AXIS] + zprobe_offset[X_AXIS]),
ypos = parser.linearval('Y', current_position[Y_AXIS] + zprobe_offset[Y_AXIS]);
const float xpos = parser.linearval('X', current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER),
ypos = parser.linearval('Y', current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER);
if (!position_is_reachable_by_probe(xpos, ypos)) return;
+8 -34
View File
@@ -28,43 +28,17 @@
#include "../../feature/bedlevel/bedlevel.h"
#include "../../module/probe.h"
/**
* M851: Set the nozzle-to-probe offsets in current units
*/
void GcodeSuite::M851() {
// Show usage with no parameters
if (!parser.seen("XYZ")) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " X", zprobe_offset[X_AXIS],
" Y", zprobe_offset[Y_AXIS],
" Z", zprobe_offset[Z_AXIS]);
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_MSG("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");
return;
}
// Get the modified offsets
const float offs[] = {
parser.floatval('X', zprobe_offset[X_AXIS]),
parser.floatval('Y', zprobe_offset[Y_AXIS]),
parser.floatval('Z', zprobe_offset[Z_AXIS])
};
// Error-check
if (!WITHIN(offs[X_AXIS], -(X_BED_SIZE), X_BED_SIZE)) {
SERIAL_ERROR_MSG("?X out of range (-" STRINGIFY(X_BED_SIZE) " to " STRINGIFY(X_BED_SIZE) ")");
return;
}
if (!WITHIN(offs[Y_AXIS], -(Y_BED_SIZE), Y_BED_SIZE)) {
SERIAL_ERROR_MSG("?Y out of range (-" STRINGIFY(Y_BED_SIZE) " to " STRINGIFY(Y_BED_SIZE) ")");
return;
}
if (!WITHIN(offs[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
SERIAL_ERROR_MSG("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");
return;
}
// Save the new offsets
LOOP_XYZ(a) zprobe_offset[a] = offs[a];
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
}
#endif // HAS_BED_PROBE
+55 -50
View File
@@ -547,26 +547,30 @@
#define TRINAMICS (HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC2209_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) || HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE) || HAS_DRIVER(TMC2160_STANDALONE))
#ifndef MINIMUM_STEPPER_DIR_DELAY
#ifndef MINIMUM_STEPPER_POST_DIR_DELAY
#if HAS_DRIVER(TB6560)
#define MINIMUM_STEPPER_DIR_DELAY 15000
#define MINIMUM_STEPPER_POST_DIR_DELAY 15000
#elif HAS_DRIVER(TB6600)
#define MINIMUM_STEPPER_DIR_DELAY 1500
#define MINIMUM_STEPPER_POST_DIR_DELAY 1500
#elif HAS_DRIVER(DRV8825)
#define MINIMUM_STEPPER_DIR_DELAY 650
#define MINIMUM_STEPPER_POST_DIR_DELAY 650
#elif HAS_DRIVER(LV8729)
#define MINIMUM_STEPPER_DIR_DELAY 500
#define MINIMUM_STEPPER_POST_DIR_DELAY 500
#elif HAS_DRIVER(A5984)
#define MINIMUM_STEPPER_DIR_DELAY 400
#define MINIMUM_STEPPER_POST_DIR_DELAY 400
#elif HAS_DRIVER(A4988)
#define MINIMUM_STEPPER_DIR_DELAY 200
#define MINIMUM_STEPPER_POST_DIR_DELAY 200
#elif TRINAMICS
#define MINIMUM_STEPPER_DIR_DELAY 20
#define MINIMUM_STEPPER_POST_DIR_DELAY 20
#else
#define MINIMUM_STEPPER_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
#define MINIMUM_STEPPER_POST_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
#endif
#endif
#ifndef MINIMUM_STEPPER_PRE_DIR_DELAY
#define MINIMUM_STEPPER_PRE_DIR_DELAY MINIMUM_STEPPER_POST_DIR_DELAY
#endif
#ifndef MINIMUM_STEPPER_PULSE
#if HAS_DRIVER(TB6560)
#define MINIMUM_STEPPER_PULSE 30
@@ -1344,7 +1348,12 @@
#endif
#endif
#else
#undef NOZZLE_TO_PROBE_OFFSET
#undef X_PROBE_OFFSET_FROM_EXTRUDER
#undef Y_PROBE_OFFSET_FROM_EXTRUDER
#undef Z_PROBE_OFFSET_FROM_EXTRUDER
#define X_PROBE_OFFSET_FROM_EXTRUDER 0
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0
#endif
/**
@@ -1438,27 +1447,9 @@
* These can be further constrained in code for Delta and SCARA
*/
#ifdef MIN_PROBE_X
#error "MIN_PROBE_X is now calculated at runtime and cannot be defined."
#endif
#ifdef MIN_PROBE_Y
#error "MIN_PROBE_Y is now calculated at runtime and cannot be defined."
#endif
#ifdef MAX_PROBE_X
#error "MAX_PROBE_X is now calculated at runtime and cannot be defined."
#endif
#ifdef MAX_PROBE_Y
#error "MAX_PROBE_Y is now calculated at runtime and cannot be defined."
#endif
#ifndef MIN_PROBE_EDGE
#define MIN_PROBE_EDGE 0
#endif
#if defined(NOZZLE_TO_PROBE_OFFSET)
constexpr float probe_offset_sanity_arr[] = NOZZLE_TO_PROBE_OFFSET;
#else
constexpr float probe_offset_sanity_arr[] = {0, 0, 0};
#endif
#if ENABLED(DELTA)
/**
@@ -1466,8 +1457,8 @@
*/
#define _PROBE_RADIUS (DELTA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#ifndef DELTA_CALIBRATION_RADIUS
#ifdef NOZZLE_TO_PROBE_OFFSET
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - _MAX(ABS(probe_offset_sanity_arr[0]), ABS(probe_offset_sanity_arr[1]), ABS(MIN_PROBE_EDGE)))
#ifdef X_PROBE_OFFSET_FROM_EXTRUDER
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - _MAX(ABS(X_PROBE_OFFSET_FROM_EXTRUDER), ABS(Y_PROBE_OFFSET_FROM_EXTRUDER), ABS(MIN_PROBE_EDGE)))
#else
#define DELTA_CALIBRATION_RADIUS _PROBE_RADIUS
#endif
@@ -1476,39 +1467,39 @@
#define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
#endif
#ifndef DELTA_TOWER_ANGLE_TRIM
#define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 }
#define DELTA_TOWER_ANGLE_TRIM {0, 0, 0}
#endif
#ifndef DELTA_RADIUS_TRIM_TOWER
#define DELTA_RADIUS_TRIM_TOWER { 0, 0, 0 }
#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0}
#endif
#ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER
#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0, 0, 0 }
#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0}
#endif
// Probing points may be verified at compile time within the radius
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
// so that may be added to SanityCheck.h in the future.
#define MIN_PROBE_X (X_CENTER - (_PROBE_RADIUS))
#define MIN_PROBE_Y (Y_CENTER - (_PROBE_RADIUS))
#define MAX_PROBE_X (X_CENTER + _PROBE_RADIUS)
#define MAX_PROBE_Y (Y_CENTER + _PROBE_RADIUS)
#define _MIN_PROBE_X (X_CENTER - (_PROBE_RADIUS))
#define _MIN_PROBE_Y (Y_CENTER - (_PROBE_RADIUS))
#define _MAX_PROBE_X (X_CENTER + _PROBE_RADIUS)
#define _MAX_PROBE_Y (Y_CENTER + _PROBE_RADIUS)
#elif IS_SCARA
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
#define _PROBE_RADIUS (SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
#define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
#define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#define _MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
#define _MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
#define _MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#define _MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#else
// Boundaries for Cartesian probing based on bed limits
#define MIN_PROBE_X (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + probe_offset_sanity_arr[0]))
#define MIN_PROBE_Y (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + probe_offset_sanity_arr[1]))
#define MAX_PROBE_X (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + probe_offset_sanity_arr[0]))
#define MAX_PROBE_Y (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + probe_offset_sanity_arr[1]))
#define _MIN_PROBE_X (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MIN_PROBE_Y (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#define _MAX_PROBE_X (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MAX_PROBE_Y (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#endif
@@ -1516,6 +1507,20 @@
#define LEVELED_SEGMENT_LENGTH 5
#endif
// These may be overridden in Configuration.h if a smaller area is desired
#ifndef MIN_PROBE_X
#define MIN_PROBE_X _MIN_PROBE_X
#endif
#ifndef MIN_PROBE_Y
#define MIN_PROBE_Y _MIN_PROBE_Y
#endif
#ifndef MAX_PROBE_X
#define MAX_PROBE_X _MAX_PROBE_X
#endif
#ifndef MAX_PROBE_Y
#define MAX_PROBE_Y _MAX_PROBE_Y
#endif
/**
* Default mesh area is an area with an inset margin on the print area.
*/
@@ -1532,14 +1537,14 @@
// Boundaries for Cartesian probing based on set limits
#if ENABLED(AUTO_BED_LEVELING_UBL)
#define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It does not
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need *_PROBE_OFFSET_FROM_EXTRUDER in the mesh dimensions
#define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS))
#define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS))
#else
#define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS + probe_offset_sanity_arr[0]))
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS + probe_offset_sanity_arr[1]))
#define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS + probe_offset_sanity_arr[0]))
#define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + probe_offset_sanity_arr[1]))
#define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#endif
#endif
+8 -3
View File
@@ -388,8 +388,6 @@
#error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
#elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
#error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them from Configuration.h."
#elif defined(X_PROBE_OFFSET_FROM_EXTRUDER) || defined(Y_PROBE_OFFSET_FROM_EXTRUDER) || defined(Z_PROBE_OFFSET_FROM_EXTRUDER)
#error "[XYZ]_PROBE_OFFSET_FROM_EXTRUDER is now NOZZLE_TO_PROBE_OFFSET. Please update your configuration."
#elif defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_X)
#error "Z_PROBE_ALLEN_KEY_(DEPLOY|STOW) coordinates are now a single setting. Please update your configuration."
#endif
@@ -565,6 +563,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Graphical LCD, or EXTENSIBLE_UI."
#endif
#if !HAS_LCD_MENU && ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
#error "SD_REPRINT_LAST_SELECTED_FILE currently requires a Marlin-native LCD menu."
#endif
/**
* Custom Boot and Status screens
*/
@@ -835,7 +837,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
*/
#if ENABLED(MIXING_EXTRUDER)
#if EXTRUDERS > 1
#error "MIXING_EXTRUDER currently only supports one extruder."
#error "For MIXING_EXTRUDER set MIXING_STEPPERS > 1 instead of EXTRUDERS > 1."
#elif MIXING_STEPPERS < 2
#error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
#elif ENABLED(FILAMENT_SENSOR)
@@ -1048,6 +1050,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if HAS_BED_PROBE
static_assert(FLOOR(float(X_PROBE_OFFSET_FROM_EXTRUDER)) == float(X_PROBE_OFFSET_FROM_EXTRUDER), "X_PROBE_OFFSET_FROM_EXTRUDER must be an integer!");
static_assert(FLOOR(float(Y_PROBE_OFFSET_FROM_EXTRUDER)) == float(Y_PROBE_OFFSET_FROM_EXTRUDER), "Y_PROBE_OFFSET_FROM_EXTRUDER must be an integer!");
/**
* Z_PROBE_SLED is incompatible with DELTA
*/
+1 -1
View File
@@ -51,7 +51,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2019-09-17"
#define STRING_DISTRIBUTION_DATE "2019-09-19"
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.
+38 -28
View File
@@ -1206,20 +1206,42 @@
#define STATUS_FAN_WIDTH 0
#endif
#define _EXTRA_WIDTH (STATUS_FAN_WIDTH + STATUS_CHAMBER_WIDTH + STATUS_BED_WIDTH)
//
// Heater Bitmap X Space Requirements
//
#if !defined(STATUS_HEATERS_XSPACE) && (STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH)
#if (HOTENDS == 3 || HOTENDS == 4) && ENABLED(STATUS_COMBINE_HEATERS)
// If more heaters or they're combined, 3 bytes
#define STATUS_HEATERS_XSPACE 24
#elif STATUS_LOGO_WIDTH > (LCD_PIXEL_WIDTH - (_EXTRA_WIDTH) - 26 * (HOTENDS)) // 128 - (20 + 24 + 26) == 58
// If the logo won't fit at 26 width
#define STATUS_HEATERS_XSPACE 24
#else
#define STATUS_HEATERS_XSPACE 26
#endif
#endif
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
#if STATUS_HOTEND1_WIDTH
#define HAS_SPACES ((LCD_PIXEL_WIDTH - (HOTENDS * STATUS_HOTEND1_WIDTH) - STATUS_BED_WIDTH - STATUS_CHAMBER_WIDTH - STATUS_FAN_WIDTH - 24) < STATUS_LOGO_WIDTH ? true : false)
//
// Disable the logo bitmap if insufficient space
//
#if STATUS_HEATERS_XSPACE
#define _HEATERS_WIDTH (HOTENDS * (STATUS_HEATERS_XSPACE)) // as many hotends as possible
#elif STATUS_HEATERS_WIDTH
#define HAS_SPACES (((LCD_PIXEL_WIDTH - STATUS_HEATERS_WIDTH - STATUS_BED_WIDTH - STATUS_CHAMBER_WIDTH - STATUS_FAN_WIDTH - 20) < STATUS_LOGO_WIDTH) ? true : false)
#define _HEATERS_WIDTH STATUS_HEATERS_WIDTH
#else
#error "Status screen heaters region was not specified."
#endif
#if HAS_SPACES
#if STATUS_LOGO_WIDTH > (LCD_PIXEL_WIDTH - (_EXTRA_WIDTH + _HEATERS_WIDTH))
#warning "Unable to fit custom Status Screen logo. Disabling."
#undef STATUS_LOGO_WIDTH
#endif
#if (HOTENDS > 1 && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN)
#define _STATUS_HEATERS_X(H,S,N) (((LCD_PIXEL_WIDTH - (H * (S + N)) - STATUS_LOGO_WIDTH - STATUS_BED_WIDTH - STATUS_CHAMBER_WIDTH - STATUS_FAN_WIDTH) / 2) + STATUS_LOGO_WIDTH)
#define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2)
#if STATUS_HOTEND1_WIDTH
#if HOTENDS > 2
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 6)
@@ -1259,33 +1281,21 @@
#endif
//
// Heater Bitmap Properties
// Hotend Heater Bitmap starting X position
//
#if STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH
#ifndef STATUS_HEATERS_XSPACE
#if (HOTENDS == 3 || HOTENDS == 4) && ENABLED(STATUS_COMBINE_HEATERS)
#define STATUS_HEATERS_XSPACE 24
#else
#define STATUS_HEATERS_XSPACE 26 // Like the included bitmaps
#endif
#endif
#ifndef STATUS_HEATERS_X
#if STATUS_LOGO_BYTEWIDTH
#define STATUS_HEATERS_X (STATUS_LOGO_BYTEWIDTH * 8)
#elif ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH) && (STATUS_BED_WIDTH && STATUS_HOTEND_BITMAPS == 3)) || \
((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
#if !defined(STATUS_HEATERS_X) && (STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH)
#if STATUS_LOGO_BYTEWIDTH
#define STATUS_HEATERS_X (STATUS_LOGO_BYTEWIDTH * 8)
#elif ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH) && (STATUS_BED_WIDTH && STATUS_HOTEND_BITMAPS == 3)) || \
((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
#define STATUS_HEATERS_X 5
#else
#if ENABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS <= 4
#define STATUS_HEATERS_X 5
#else
#if ENABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS <= 4
#define STATUS_HEATERS_X 5
#else
#define STATUS_HEATERS_X 8 // Like the included bitmaps
#endif
#define STATUS_HEATERS_X 8 // Like the included bitmaps
#endif
#endif
#endif
#if STATUS_HOTEND1_WIDTH
@@ -60,6 +60,7 @@
#if HAS_GRAPHICAL_LCD && PIN_EXISTS(FSMC_CS)
#include "HAL_LCD_com_defines.h"
#include "ultralcd_DOGM.h"
#include <string.h>
@@ -70,12 +71,12 @@
extern void LCD_IO_WriteMultiple(uint16_t color, uint32_t count);
#endif
#define WIDTH 128
#define HEIGHT 64
#define WIDTH LCD_PIXEL_WIDTH
#define HEIGHT LCD_PIXEL_HEIGHT
#define PAGE_HEIGHT 8
#define X_LO 32
#define Y_LO 32
#define X_LO LCD_PIXEL_OFFSET_X
#define Y_LO LCD_PIXEL_OFFSET_Y
#define X_HI (X_LO + 2 * WIDTH - 1)
#define Y_HI (Y_LO + 2 * HEIGHT - 1)
@@ -142,8 +143,8 @@ static const uint8_t page_first_sequence[] = {
};
static const uint8_t clear_screen_sequence[] = {
U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), 0x00, 0x00, 0x01, 0x3F,
U8G_ESC_ADR(0), LCD_ROW, U8G_ESC_ADR(1), 0x00, 0x00, 0x00, 0xEF,
U8G_ESC_ADR(0), LCD_COLUMN, U8G_ESC_ADR(1), 0x00, 0x00, U8G_ESC_DATA(LCD_FULL_PIXEL_WIDTH),
U8G_ESC_ADR(0), LCD_ROW, U8G_ESC_ADR(1), 0x00, 0x00, U8G_ESC_DATA(LCD_FULL_PIXEL_HEIGHT),
U8G_ESC_ADR(0), LCD_WRITE_RAM, U8G_ESC_ADR(1),
U8G_ESC_END
};
+9
View File
@@ -145,6 +145,15 @@
#define LCD_PIXEL_HEIGHT 64
#endif
// LCD_FULL_PIXEL_WIDTH =
// LCD_PIXEL_OFFSET_X + (LCD_PIXEL_WIDTH * 2) + LCD_PIXEL_OFFSET_X
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define LCD_FULL_PIXEL_WIDTH 320
#define LCD_PIXEL_OFFSET_X 32
#define LCD_FULL_PIXEL_HEIGHT 240
#define LCD_PIXEL_OFFSET_Y 32
#endif
// For selective rendering within a Y range
#define PAGE_OVER(ya) ((ya) <= u8g.getU8g()->current_page.y1) // Does the current page follow a region top?
#define PAGE_UNDER(yb) ((yb) >= u8g.getU8g()->current_page.y0) // Does the current page precede a region bottom?
@@ -156,9 +156,11 @@ namespace FTDI {
if (!UIData::flags.bits.touch_debouncing) {
if (tag == pressed_tag) {
// The user is holding down a button.
if (touch_timer.elapsed(1000 / TOUCH_REPEATS_PER_SECOND) && current_screen.onTouchHeld(tag)) {
current_screen.onRefresh();
if (UIData::flags.bits.touch_repeat_sound) sound.play(repeat_sound);
if (touch_timer.elapsed(1000 / TOUCH_REPEATS_PER_SECOND)) {
if (current_screen.onTouchHeld(tag)) {
current_screen.onRefresh();
if (UIData::flags.bits.touch_repeat_sound) sound.play(repeat_sound);
}
touch_timer.start();
}
}
@@ -36,13 +36,7 @@ void BioConfirmHomeE::onRedraw(draw_mode_t) {
bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
SpinnerDialogBox::enqueueAndWait_P(F(
"G112\n" /* Home extruder */
LULZBOT_AXIS_LEVELING_COMMANDS /* Level X axis */
"G0 X115 Z50 F6000\n" /* Goto loading position */
"M400\n" /* Wait for moves to finish */
"M18 X Y" /* Unlock motors */
));
SpinnerDialogBox::enqueueAndWait_P(F(LULZBOT_HOME_E_COMMANDS));
current_screen.forget();
break;
case 2:
@@ -36,10 +36,7 @@ void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
SpinnerDialogBox::enqueueAndWait_P(F(
"G28 X Y Z\n" /* Home all axis */
"G0 X115 Z50 F6000" /* Move to park position */
));
SpinnerDialogBox::enqueueAndWait_P(F(LULZBOT_HOME_XYZ_COMMANDS));
current_screen.forget();
break;
case 2:
@@ -141,6 +141,7 @@ void BioPrintingDialogBox::setStatusMessage(const char* message) {
}
void BioPrintingDialogBox::onIdle() {
reset_menu_timeout();
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
onRefresh();
refresh_timer.start();
@@ -37,6 +37,9 @@
#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0]))
const uint8_t shadow_depth = 5;
const float max_speed = 0.30;
const float min_speed = 0.05;
const uint8_t num_speeds = 10;
using namespace FTDI;
using namespace Theme;
@@ -91,12 +94,12 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
.cmd(COLOR_RGB(bg_text_enabled));
if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) {
sprintf_P(bed_str, PSTR("%3d%S"), ROUND(getTargetTemp_celsius(BED)), GET_TEXT(UNITS_C));
format_temp(bed_str, getTargetTemp_celsius(BED));
ui.bounds(POLY(target_temp), x, y, h, v);
cmd.text(x, y, h, v, bed_str);
}
sprintf_P(bed_str, PSTR("%3d%S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C));
format_temp(bed_str, getActualTemp_celsius(BED));
ui.bounds(POLY(actual_temp), x, y, h, v);
cmd.text(x, y, h, v, bed_str);
}
@@ -248,7 +251,7 @@ void StatusScreen::onRedraw(draw_mode_t what) {
}
bool StatusScreen::onTouchStart(uint8_t) {
increment = fine_motion ? 0.25 : 1;
increment = min_speed;
return true;
}
@@ -263,6 +266,11 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
jog_xy = true;
injectCommands_P(PSTR("M17"));
}
jog(0, 0, 0);
break;
case 5:
case 6:
jog(0, 0, 0);
break;
case 9: GOTO_SCREEN(FilesScreen); break;
case 10: GOTO_SCREEN(MainMenu); break;
@@ -280,25 +288,31 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
bool StatusScreen::onTouchHeld(uint8_t tag) {
if (tag >= 1 && tag <= 4 && !jog_xy) return false;
if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate
#define UI_INCREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis);
#define UI_DECREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis);
const float s = fine_motion ? min_speed : increment;
switch (tag) {
case 1: UI_DECREMENT_AXIS(X); break;
case 2: UI_INCREMENT_AXIS(X); break;
case 4: UI_DECREMENT_AXIS(Y); break; // NOTE: Y directions inverted because bed rather than needle moves
case 3: UI_INCREMENT_AXIS(Y); break;
case 5: UI_DECREMENT_AXIS(Z); break;
case 6: UI_INCREMENT_AXIS(Z); break;
case 7: UI_DECREMENT_AXIS(E0); break;
case 8: UI_INCREMENT_AXIS(E0); break;
default: return false;
case 1: jog(-s, 0, 0); break;
case 2: jog( s, 0, 0); break;
case 4: jog( 0, -s, 0); break; // NOTE: Y directions inverted because bed rather than needle moves
case 3: jog( 0, s, 0); break;
case 5: jog( 0, 0, -s); break;
case 6: jog( 0, 0, s); break;
case 7:
if (ExtUI::isMoving()) return false;
MoveAxisScreen::setManualFeedrate(E0, 1);
UI_INCREMENT(AxisPosition_mm, E0);
current_screen.onRefresh();
break;
case 8:
if (ExtUI::isMoving()) return false;
MoveAxisScreen::setManualFeedrate(E0, 1);
UI_DECREMENT(AxisPosition_mm, E0);
current_screen.onRefresh();
break;
default:
return false;
}
#undef UI_DECREMENT_AXIS
#undef UI_INCREMENT_AXIS
if (increment < 10 && !fine_motion)
increment += 0.5;
current_screen.onRefresh();
if (increment < max_speed)
increment += (max_speed - min_speed) / num_speeds;
return false;
}
@@ -126,14 +126,15 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
}
if (what & FOREGROUND) {
const extruder_t e = getExtruder();
char e_str[15];
if (isHeaterIdle(getExtruder()))
sprintf_P(e_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(getExtruder())), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
if (isHeaterIdle(e))
format_temp_and_idle(e_str, getActualTemp_celsius(e));
else
sprintf_P(e_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(getExtruder())), ROUND(getTargetTemp_celsius(getExtruder())), GET_TEXT(UNITS_C));
format_temp_and_temp(e_str, getActualTemp_celsius(e), getTargetTemp_celsius(e));
const rgb_t tcol = getWarmColor(getActualTemp_celsius(getExtruder()), COOL_TEMP, LOW_TEMP, MED_TEMP, HIGH_TEMP);
const rgb_t tcol = getWarmColor(getActualTemp_celsius(e), COOL_TEMP, LOW_TEMP, MED_TEMP, HIGH_TEMP);
cmd.cmd(COLOR_RGB(tcol))
.tag(15)
#ifdef TOUCH_UI_PORTRAIT
@@ -150,11 +151,11 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
#endif
.colors(normal_btn);
const bool t_ok = getActualTemp_celsius(getExtruder()) > getSoftenTemp() - 10;
const bool t_ok = getActualTemp_celsius(e) > getSoftenTemp() - 10;
if (screen_data.ChangeFilamentScreen.t_tag && !t_ok) {
cmd.text(BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXTF(HEATING));
} else if (getActualTemp_celsius(getExtruder()) > 100) {
} else if (getActualTemp_celsius(e) > 100) {
cmd.cmd(COLOR_RGB(0xFF0000))
.text(BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(CAUTION))
.colors(normal_btn)
@@ -198,17 +199,14 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
#endif
{
char str[30];
sprintf_P(str, PSTR("%3d%S (%S)"), LOW_TEMP, GET_TEXT(UNITS_C), GET_TEXT(MATERIAL_PLA));
format_temp_and_material(str, LOW_TEMP, GET_TEXT(MATERIAL_PLA));
cmd.tag(2) .TOG_STYLE(tog2) .button (BTN_POS(2,6), BTN_SIZE(1,1), str);
}
{
char str[30];
sprintf_P(str, PSTR("%3d%S (%S)"), MED_TEMP, GET_TEXT(UNITS_C), GET_TEXT(MATERIAL_ABS));
format_temp_and_material(str, MED_TEMP, GET_TEXT(MATERIAL_ABS));
cmd.tag(3) .TOG_STYLE(tog3) .button (BTN_POS(2,5), BTN_SIZE(1,1), str);
}
{
char str[30];
sprintf_P(str, PSTR("%3d%S (%S)"), HIGH_TEMP, GET_TEXT(UNITS_C), GET_TEXT(MATERIAL_HIGH_TEMP));
format_temp_and_material(str, HIGH_TEMP, GET_TEXT(MATERIAL_HIGH_TEMP));
cmd.tag(4) .TOG_STYLE(tog4) .button (BTN_POS(2,4), BTN_SIZE(1,1), str);
}
cmd.colors(normal_btn)
@@ -69,7 +69,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
#else
#define GRID_ROWS 5
#define GRID_COLS 2
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT(AUTO_HOME))
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXTF(AUTO_HOME))
#if ENABLED(NOZZLE_CLEAN_FEATURE)
.enabled(1)
#else
@@ -74,11 +74,7 @@ void NudgeNozzleScreen::onRedraw(draw_mode_t what) {
#endif
#if EXTRUDERS > 1
char num1[7], num2[7], num3[7];
dtostrf(getNozzleOffset_mm(X, E1), 4, 2, num1);
dtostrf(getNozzleOffset_mm(Y, E1), 4, 2, num2);
dtostrf(getNozzleOffset_mm(Z, E1), 4, 2, num3);
sprintf_P(str, PSTR("%s; %s; %s %S"), num1, num2, num3, GET_TEXT(UNITS_MM));
format_position(str, getNozzleOffset_mm(X, E1), getNozzleOffset_mm(Y, E1), getNozzleOffset_mm(Z, E1));
w.text_field (0, GET_TEXTF(TOOL_OFFSETS), str);
#endif
}
@@ -25,8 +25,7 @@
#include "../ftdi_eve_lib/ftdi_eve_lib.h"
#include "../language/languages.h"
#include "../theme/theme.h"
#define ROUND(val) uint16_t((val)+0.5)
#include "string_format.h"
extern tiny_timer_t refresh_timer;
@@ -86,29 +86,20 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
char y_str[15];
char z_str[15];
if (isAxisPositionKnown(X)) {
dtostrf(getAxisPosition_mm(X), 5, 1, x_str);
strcat_P(x_str, " ");
strcat_P(x_str, GET_TEXT(UNITS_MM));
} else {
if (isAxisPositionKnown(X))
format_position(x_str, getAxisPosition_mm(X));
else
strcpy_P(x_str, PSTR("?"));
}
if (isAxisPositionKnown(Y)) {
dtostrf(getAxisPosition_mm(Y), 5, 1, y_str);
strcat_P(y_str, " ");
strcat_P(y_str, GET_TEXT(UNITS_MM));
} else {
if (isAxisPositionKnown(Y))
format_position(y_str, getAxisPosition_mm(Y));
else
strcpy_P(y_str, PSTR("?"));
}
if (isAxisPositionKnown(Z)) {
dtostrf(getAxisPosition_mm(Z), 5, 1, z_str);
strcat_P(z_str, " ");
strcat_P(z_str, GET_TEXT(UNITS_MM));
} else {
if (isAxisPositionKnown(Z))
format_position(z_str, getAxisPosition_mm(Z));
else
strcpy_P(z_str, PSTR("?"));
}
cmd.tag(6).font(Theme::font_medium)
#ifdef TOUCH_UI_PORTRAIT
@@ -197,20 +188,21 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
);
if (isHeaterIdle(BED))
sprintf_P(bed_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
format_temp_and_idle(bed_str, getActualTemp_celsius(BED));
else
sprintf_P(bed_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(BED)), ROUND(getTargetTemp_celsius(BED)), GET_TEXT(UNITS_C));
format_temp_and_temp(bed_str, getActualTemp_celsius(BED), getTargetTemp_celsius(BED));
if (isHeaterIdle(H0))
sprintf_P(e0_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(H0)), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
format_temp_and_idle(e0_str, getActualTemp_celsius(H0));
else
sprintf_P(e0_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(H0)), ROUND(getTargetTemp_celsius(H0)), GET_TEXT(UNITS_C));
format_temp_and_temp(e0_str, getActualTemp_celsius(H0), getTargetTemp_celsius(H0));
#if EXTRUDERS == 2
if (isHeaterIdle(H1))
sprintf_P(e1_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(H1)), PSTR(GET_TEXT(UNITS_C)), GET_TEXT(TEMP_IDLE));
format_temp_and_idle(e1_str, getActualTemp_celsius(H1));
else
sprintf_P(e1_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(H1)), ROUND(getTargetTemp_celsius(H1)), GET_TEXT(UNITS_C));
format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1));
#else
strcpy_P(
e1_str,
@@ -0,0 +1,89 @@
/*********************
* string_format.cpp *
*********************/
/****************************************************************************
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI)
#include "screens.h"
#define ROUND(val) uint16_t((val)+0.5)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wno-format"
#ifdef __AVR__
#define S_FMT "%S"
#else
#define S_FMT "%s"
#endif
/**
* Formats a temperature string (e.g. "100°C")
*/
void format_temp(char *str, float t1) {
sprintf_P(str, PSTR("%3d" S_FMT), ROUND(t1), GET_TEXT(UNITS_C));
}
/**
* Formats a temperature string for an idle heater (e.g. "100 °C / idle")
*/
void format_temp_and_idle(char *str, float t1) {
sprintf_P(str, PSTR("%3d" S_FMT " / " S_FMT), ROUND(t1), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
}
/**
* Formats a temperature string for an active heater (e.g. "100 / 200°C")
*/
void format_temp_and_temp(char *str, float t1, float t2) {
sprintf_P(str, PSTR("%3d / %3d" S_FMT), ROUND(t1), ROUND(t2), GET_TEXT(UNITS_C));
}
/**
* Formats a temperature string for a material (e.g. "100°C (PLA)")
*/
void format_temp_and_material(char *str, float t1, const char *material) {
sprintf_P(str, PSTR("%3d" S_FMT " (" S_FMT ")"), ROUND(t1), GET_TEXT(UNITS_C), material);
}
/**
* Formats a position value (e.g. "10 mm")
*/
void format_position(char *str, float p) {
dtostrf(p, 5, 1, str);
strcat_P(str, PSTR(" "));
strcat_P(str, GET_TEXT(UNITS_MM));
}
/**
* Formats a position vector (e.g. "10; 20; 30 mm")
*/
void format_position(char *str, float x, float y, float z) {
char num1[7], num2[7], num3[7];
dtostrf(x, 4, 2, num1);
dtostrf(y, 4, 2, num2);
dtostrf(z, 4, 2, num3);
sprintf_P(str, PSTR("%s; %s; %s " S_FMT), num1, num2, num3, GET_TEXT(UNITS_MM));
}
#pragma GCC diagnostic pop
#endif // LULZBOT_TOUCH_UI
@@ -0,0 +1,29 @@
/*******************
* string_format.h *
*******************/
/****************************************************************************
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
void format_temp(char *str, float t1);
void format_temp_and_idle(char *str, float t1);
void format_temp_and_temp(char *str, float t1, float t2);
void format_temp_and_material(char *str, float t1, const char *material);
void format_position(char *str, float p);
void format_position(char *str, float x, float y, float z);
+51 -39
View File
@@ -102,16 +102,16 @@
#include "../../feature/host_actions.h"
#endif
inline float clamp(const float value, const float minimum, const float maximum) {
return _MAX(_MIN(value, maximum), minimum);
}
static struct {
uint8_t printer_killed : 1;
uint8_t manual_motion : 1;
} flags;
namespace ExtUI {
static struct {
uint8_t printer_killed : 1;
uint8_t manual_motion : 1;
} flags;
#if ENABLED(JOYSTICK)
float norm_jog[XYZ];
#endif
#ifdef __SAM3X8E__
/**
* Implement a special millis() to allow time measurement
@@ -197,6 +197,14 @@ namespace ExtUI {
#endif
}
void jog(float dx, float dy, float dz) {
#if ENABLED(JOYSTICK)
norm_jog[X] = dx;
norm_jog[Y] = dy;
norm_jog[Z] = dz;
#endif
}
bool isHeaterIdle(const extruder_t extruder) {
return false
#if HOTENDS && HEATER_IDLE_HANDLER
@@ -339,7 +347,7 @@ namespace ExtUI {
setFeedrate_mm_s(MMM_TO_MMS(max_manual_feedrate[axis]));
if (!flags.manual_motion) set_destination_from_current();
destination[axis] = clamp(position, min, max);
destination[axis] = constrain(position, min, max);
flags.manual_motion = true;
}
@@ -474,13 +482,13 @@ namespace ExtUI {
void setAxisCurrent_mA(const float mA, const axis_t axis) {
switch (axis) {
#if AXIS_IS_TMC(X)
case X: stepperX.rms_current(clamp(mA, 500, 1500)); break;
case X: stepperX.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(Y)
case Y: stepperY.rms_current(clamp(mA, 500, 1500)); break;
case Y: stepperY.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(Z)
case Z: stepperZ.rms_current(clamp(mA, 500, 1500)); break;
case Z: stepperZ.rms_current(constrain(mA, 500, 1500)); break;
#endif
default: break;
};
@@ -489,22 +497,22 @@ namespace ExtUI {
void setAxisCurrent_mA(const float mA, const extruder_t extruder) {
switch (extruder) {
#if AXIS_IS_TMC(E0)
case E0: stepperE0.rms_current(clamp(mA, 500, 1500)); break;
case E0: stepperE0.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(E1)
case E1: stepperE1.rms_current(clamp(mA, 500, 1500)); break;
case E1: stepperE1.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(E2)
case E2: stepperE2.rms_current(clamp(mA, 500, 1500)); break;
case E2: stepperE2.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(E3)
case E3: stepperE3.rms_current(clamp(mA, 500, 1500)); break;
case E3: stepperE3.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(E4)
case E4: stepperE4.rms_current(clamp(mA, 500, 1500)); break;
case E4: stepperE4.rms_current(constrain(mA, 500, 1500)); break;
#endif
#if AXIS_IS_TMC(E5)
case E5: stepperE5.rms_current(clamp(mA, 500, 1500)); break;
case E5: stepperE5.rms_current(constrain(mA, 500, 1500)); break;
#endif
default: break;
};
@@ -607,7 +615,7 @@ namespace ExtUI {
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
float getFilamentRunoutDistance_mm() { return runout.runout_distance(); }
void setFilamentRunoutDistance_mm(const float value) { runout.set_runout_distance(clamp(value, 0, 999)); }
void setFilamentRunoutDistance_mm(const float value) { runout.set_runout_distance(constrain(value, 0, 999)); }
#endif
#endif
@@ -618,7 +626,7 @@ namespace ExtUI {
void setLinearAdvance_mm_mm_s(const float value, const extruder_t extruder) {
if (extruder < EXTRUDERS)
planner.extruder_advance_K[extruder - E0] = clamp(value, 0, 999);
planner.extruder_advance_K[extruder - E0] = constrain(value, 0, 999);
}
#endif
@@ -629,7 +637,7 @@ namespace ExtUI {
}
void setJunctionDeviation_mm(const float value) {
planner.junction_deviation_mm = clamp(value, 0.01, 0.3);
planner.junction_deviation_mm = constrain(value, 0.01, 0.3);
#if ENABLED(LIN_ADVANCE)
planner.recalculate_max_e_jerk();
#endif
@@ -700,7 +708,7 @@ namespace ExtUI {
#if EXTRUDERS > 1
&& (linked_nozzles || active_extruder == 0)
#endif
) zprobe_offset[Z_AXIS] += mm;
) zprobe_zoffset += mm;
#else
UNUSED(mm);
#endif
@@ -738,7 +746,7 @@ namespace ExtUI {
float getZOffset_mm() {
#if HAS_BED_PROBE
return zprobe_offset[Z_AXIS];
return zprobe_zoffset;
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
return babystep.axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1];
#else
@@ -749,7 +757,7 @@ namespace ExtUI {
void setZOffset_mm(const float value) {
#if HAS_BED_PROBE
if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
zprobe_offset[Z_AXIS] = value;
zprobe_zoffset = value;
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
babystep.add_mm(Z_AXIS, (value - babystep.axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1]));
#else
@@ -784,14 +792,14 @@ namespace ExtUI {
#if ENABLED(BACKLASH_GCODE)
float getAxisBacklash_mm(const axis_t axis) { return backlash.distance_mm[axis]; }
void setAxisBacklash_mm(const float value, const axis_t axis)
{ backlash.distance_mm[axis] = clamp(value,0,5); }
{ backlash.distance_mm[axis] = constrain(value,0,5); }
float getBacklashCorrection_percent() { return ui8_to_percent(backlash.correction); }
void setBacklashCorrection_percent(const float value) { backlash.correction = map(clamp(value, 0, 100), 0, 100, 0, 255); }
void setBacklashCorrection_percent(const float value) { backlash.correction = map(constrain(value, 0, 100), 0, 100, 0, 255); }
#ifdef BACKLASH_SMOOTHING_MM
float getBacklashSmoothing_mm() { return backlash.smoothing_mm; }
void setBacklashSmoothing_mm(const float value) { backlash.smoothing_mm = clamp(value, 0, 999); }
void setBacklashSmoothing_mm(const float value) { backlash.smoothing_mm = constrain(value, 0, 999); }
#endif
#endif
@@ -819,6 +827,9 @@ namespace ExtUI {
#endif
}
}
void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval) {
UNUSED(xpos); UNUSED(ypos); UNUSED(zval);
}
#endif
#endif
@@ -866,14 +877,14 @@ namespace ExtUI {
enableHeater(heater);
#if HAS_HEATED_BED
if (heater == BED)
thermalManager.setTargetBed(clamp(value, 0, BED_MAXTEMP - 10));
thermalManager.setTargetBed(constrain(value, 0, BED_MAXTEMP - 10));
else
#endif
{
#if HOTENDS
static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
const int16_t e = heater - H0;
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
thermalManager.setTargetHotend(constrain(value, 0, heater_maxtemp[e] - 15), e);
#endif
}
}
@@ -883,14 +894,14 @@ namespace ExtUI {
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
const int16_t e = extruder - E0;
enableHeater(extruder);
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
thermalManager.setTargetHotend(constrain(value, 0, heater_maxtemp[e] - 15), e);
#endif
}
void setTargetFan_percent(const float value, const fan_t fan) {
#if FAN_COUNT > 0
if (fan < FAN_COUNT)
thermalManager.set_fan_speed(fan - FAN0, map(clamp(value, 0, 100), 0, 100, 0, 255));
thermalManager.set_fan_speed(fan - FAN0, map(constrain(value, 0, 100), 0, 100, 0, 255));
#else
UNUSED(value);
UNUSED(fan);
@@ -898,7 +909,7 @@ namespace ExtUI {
}
void setFeedrate_percent(const float value) {
feedrate_percentage = clamp(value, 10, 500);
feedrate_percentage = constrain(value, 10, 500);
}
void setUserConfirmed() {
@@ -980,11 +991,11 @@ namespace ExtUI {
}
bool FileList::isAtRootDir() {
#if ENABLED(SDSUPPORT)
card.flag.workDirIsRoot;
#else
return true;
#endif
return (true
#if ENABLED(SDSUPPORT)
&& card.flag.workDirIsRoot
#endif
);
}
void FileList::upDir() {
@@ -1038,9 +1049,10 @@ void MarlinUI::update() {
}
void MarlinUI::kill_screen(PGM_P const msg) {
using namespace ExtUI;
if (!flags.printer_killed) {
flags.printer_killed = true;
ExtUI::onPrinterKilled(msg);
onPrinterKilled(msg);
}
}
+9 -2
View File
@@ -45,6 +45,11 @@
#include "../../inc/MarlinConfig.h"
namespace ExtUI {
#if ENABLED(JOYSTICK)
extern float norm_jog[];
#endif
// The ExtUI implementation can store up to this many bytes
// in the EEPROM when the methods onStoreSettings and
// onLoadSettings are called.
@@ -79,6 +84,8 @@ namespace ExtUI {
void enableHeater(const heater_t);
void enableHeater(const extruder_t);
void jog(float dx, float dy, float dz);
/**
* Getters and setters
* Should be used by the EXTENSIBLE_UI to query or change Marlin's state.
@@ -96,7 +103,7 @@ namespace ExtUI {
void setAxisCurrent_mA(const float, const axis_t);
void setAxisCurrent_mA(const float, const extruder_t);
int getTMCBumpSensitivity(const axis_t);
int getTMCBumpSensitivity(const axis_t);
void setTMCBumpSensitivity(const float, const axis_t);
#endif
@@ -272,7 +279,7 @@ namespace ExtUI {
void changeDir(const char * const dirname);
void upDir();
bool isAtRootDir();
uint16_t count();
uint16_t count();
};
/**
+1 -1
View File
@@ -57,7 +57,7 @@ namespace ExtUI {
void onPrintTimerStarted() {}
void onPrintTimerPaused() {}
void onPrintTimerStopped() {}
void onFilamentRunout() {}
void onFilamentRunout(const extruder_t extruder) {}
void onUserConfirmRequired(const char *msg) {
if (msg) {
+1 -1
View File
@@ -447,7 +447,7 @@ namespace ExtUI {
void onPrintTimerStarted() {}
void onPrintTimerPaused() {}
void onPrintTimerStopped() {}
void onFilamentRunout() {}
void onFilamentRunout(const extruder_t extruder) {}
void onUserConfirmRequired(const char * const msg) { UNUSED(msg); }
void onFactoryReset() {}
void onStoreSettings(char *buff) { UNUSED(buff); }
+4 -4
View File
@@ -402,7 +402,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
ui.encoderPosition = 0;
const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment,
new_probe_offset = zprobe_offset[Z_AXIS] + diff,
new_probe_offset = zprobe_zoffset + diff,
new_offs =
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
do_probe ? new_probe_offset : hotend_offset[Z_AXIS][active_extruder] - diff
@@ -414,7 +414,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
babystep.add_steps(Z_AXIS, babystep_increment);
if (do_probe) zprobe_offset[Z_AXIS] = new_offs;
if (do_probe) zprobe_zoffset = new_offs;
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
else hotend_offset[Z_AXIS][active_extruder] = new_offs;
#endif
@@ -428,10 +428,10 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
draw_edit_screen(PSTR(MSG_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
else
#endif
draw_edit_screen(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_offset[Z_AXIS]));
draw_edit_screen(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
if (do_probe) _lcd_zoffset_overlay_gfx(zprobe_offset[Z_AXIS]);
if (do_probe) _lcd_zoffset_overlay_gfx(zprobe_zoffset);
#endif
}
}
+1 -1
View File
@@ -279,7 +279,7 @@ void menu_bed_leveling() {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE
MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_offset[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif
#if ENABLED(LEVEL_BED_CORNERS)
+1 -1
View File
@@ -347,7 +347,7 @@ void menu_configuration() {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE
MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_offset[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif
const bool busy = printer_busy();
+18 -21
View File
@@ -37,7 +37,7 @@
*/
// Change EEPROM version if the structure changes
#define EEPROM_VERSION "V70"
#define EEPROM_VERSION "V69"
#define EEPROM_OFFSET 100
// Check the integrity of data offsets.
@@ -60,8 +60,6 @@
#include "../HAL/shared/persistent_store_api.h"
#endif
#include "probe.h"
#if HAS_LEVELING
#include "../feature/bedlevel/bedlevel.h"
#endif
@@ -80,6 +78,10 @@
#define EEPROM_NUM_SERVOS NUM_SERVO_PLUGS
#endif
#if HAS_BED_PROBE
#include "probe.h"
#endif
#include "../feature/fwretract.h"
#if ENABLED(POWER_LOSS_RECOVERY)
@@ -176,7 +178,7 @@ typedef struct SettingsDataStruct {
// HAS_BED_PROBE
//
float zprobe_offset[XYZ];
float zprobe_zoffset;
//
// ABL_PLANAR
@@ -613,8 +615,12 @@ void MarlinSettings::postprocess() {
// Probe Z Offset
//
{
_FIELD_TEST(zprobe_offset[Z_AXIS]);
EEPROM_WRITE(zprobe_offset);
_FIELD_TEST(zprobe_zoffset);
#if !HAS_BED_PROBE
const float zprobe_zoffset = 0;
#endif
EEPROM_WRITE(zprobe_zoffset);
}
//
@@ -1418,14 +1424,12 @@ void MarlinSettings::postprocess() {
// Probe Z Offset
//
{
_FIELD_TEST(zprobe_offset[Z_AXIS]);
_FIELD_TEST(zprobe_zoffset);
#if HAS_BED_PROBE
float (&zpo)[XYZ] = zprobe_offset;
#else
float zpo[XYZ];
#if !HAS_BED_PROBE
float zprobe_zoffset;
#endif
EEPROM_READ(zpo);
EEPROM_READ(zprobe_zoffset);
}
//
@@ -2325,12 +2329,7 @@ void MarlinSettings::reset() {
#endif
#if HAS_BED_PROBE
#ifndef NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
#endif
constexpr float dpo[XYZ] = NOZZLE_TO_PROBE_OFFSET;
static_assert(COUNT(dpo) == 3, "NOZZLE_TO_PROBE_OFFSET must contain offsets for X, Y, and Z.");
LOOP_XYZ(a) zprobe_offset[a] = dpo[a];
zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
#endif
//
@@ -3079,9 +3078,7 @@ void MarlinSettings::reset() {
say_units(true);
}
CONFIG_ECHO_START();
SERIAL_ECHOLNPAIR(" M851 X", LINEAR_UNIT(zprobe_offset[X_AXIS]),
" Y", LINEAR_UNIT(zprobe_offset[Y_AXIS]),
" Z", LINEAR_UNIT(zprobe_offset[Z_AXIS]));
SERIAL_ECHOLNPAIR(" M851 Z", LINEAR_UNIT(zprobe_zoffset));
#endif
/**
+1 -1
View File
@@ -233,7 +233,7 @@ void home_delta() {
// Move all carriages together linearly until an endstop is hit.
destination[Z_AXIS] = (delta_height
#if HAS_BED_PROBE
- zprobe_offset[Z_AXIS]
- zprobe_zoffset
#endif
+ 10);
buffer_line_to_destination(homing_feedrate(X_AXIS));
+10 -5
View File
@@ -502,7 +502,7 @@ void clean_up_after_endstop_or_probe_move() {
soft_endstop[axis].min = base_min_pos(axis);
soft_endstop[axis].max = (axis == Z_AXIS ? delta_height
#if HAS_BED_PROBE
- zprobe_offset[Z_AXIS]
- zprobe_zoffset
#endif
: base_max_pos(axis));
@@ -1337,7 +1337,7 @@ void set_axis_is_at_home(const AxisEnum axis) {
#elif ENABLED(DELTA)
current_position[axis] = (axis == Z_AXIS ? delta_height
#if HAS_BED_PROBE
- zprobe_offset[Z_AXIS]
- zprobe_zoffset
#endif
: base_home_pos(axis));
#else
@@ -1351,9 +1351,9 @@ void set_axis_is_at_home(const AxisEnum axis) {
if (axis == Z_AXIS) {
#if HOMING_Z_WITH_PROBE
current_position[Z_AXIS] -= zprobe_offset[Z_AXIS];
current_position[Z_AXIS] -= zprobe_zoffset;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> zprobe_offset[Z_AXIS] = ", zprobe_offset[Z_AXIS]);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> zprobe_zoffset = ", zprobe_zoffset);
#else
@@ -1658,7 +1658,12 @@ void homeaxis(const AxisEnum axis) {
];
if (backoff_mm) {
current_position[axis] -= ABS(backoff_mm) * axis_home_dir;
line_to_current_position(Z_PROBE_SPEED_FAST);
line_to_current_position(
#if HOMING_Z_WITH_PROBE
(axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) :
#endif
homing_feedrate(axis)
);
}
#endif
+4 -8
View File
@@ -30,10 +30,6 @@
#include "../inc/MarlinConfig.h"
#if HAS_BED_PROBE
#include "probe.h"
#endif
#if IS_SCARA
#include "scara.h"
#endif
@@ -292,7 +288,7 @@ void homeaxis(const AxisEnum axis);
// Return true if the both nozzle and the probe can reach the given point.
// Note: This won't work on SCARA since the probe offset rotates with the arm.
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
return position_is_reachable(rx - zprobe_offset[X_AXIS], ry - zprobe_offset[Y_AXIS])
return position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER))
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
}
#endif
@@ -321,9 +317,9 @@ void homeaxis(const AxisEnum axis);
* nozzle must be be able to reach +10,-10.
*/
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
return position_is_reachable(rx - zprobe_offset[X_AXIS], ry - zprobe_offset[Y_AXIS])
&& WITHIN(rx, (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + zprobe_offset[X_AXIS])) - slop, (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + zprobe_offset[X_AXIS])) + slop)
&& WITHIN(ry, (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + zprobe_offset[Y_AXIS])) - slop, (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + zprobe_offset[Y_AXIS])) + slop);
return position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER))
&& WITHIN(rx, MIN_PROBE_X - slop, MAX_PROBE_X + slop)
&& WITHIN(ry, MIN_PROBE_Y - slop, MAX_PROBE_Y + slop);
}
#endif
+7 -7
View File
@@ -56,7 +56,7 @@
#include "../feature/backlash.h"
#endif
float zprobe_offset[XYZ]; // Initialized by settings.load()
float zprobe_zoffset; // Initialized by settings.load()
#if ENABLED(BLTOUCH)
#include "../feature/bltouch.h"
@@ -263,7 +263,7 @@ inline void do_probe_raise(const float z_raise) {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("do_probe_raise(", z_raise, ")");
float z_dest = z_raise;
if (zprobe_offset[Z_AXIS] < 0) z_dest -= zprobe_offset[Z_AXIS];
if (zprobe_zoffset < 0) z_dest -= zprobe_zoffset;
NOMORE(z_dest, Z_MAX_POS);
@@ -543,7 +543,7 @@ static float run_z_probe() {
// Stop the probe before it goes too low to prevent damage.
// If Z isn't known then probe to -10mm.
const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -zprobe_offset[Z_AXIS] + Z_PROBE_LOW_POINT : -10.0;
const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -zprobe_zoffset + Z_PROBE_LOW_POINT : -10.0;
// Double-probing does a fast probe followed by a slow probe
#if TOTAL_PROBING == 2
@@ -568,7 +568,7 @@ static float run_z_probe() {
// If the nozzle is well over the travel height then
// move down quickly before doing the slow probe
const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (zprobe_offset[Z_AXIS] < 0 ? -zprobe_offset[Z_AXIS] : 0);
const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (zprobe_zoffset < 0 ? -zprobe_zoffset : 0);
if (current_position[Z_AXIS] > z) {
// Probe down fast. If the probe never triggered, raise for probe clearance
if (!do_probe_move(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST)))
@@ -698,8 +698,8 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
float nx = rx, ny = ry;
if (probe_relative) {
if (!position_is_reachable_by_probe(rx, ry)) return NAN; // The given position is in terms of the probe
nx -= zprobe_offset[X_AXIS]; // Get the nozzle position
ny -= zprobe_offset[Y_AXIS];
nx -= (X_PROBE_OFFSET_FROM_EXTRUDER); // Get the nozzle position
ny -= (Y_PROBE_OFFSET_FROM_EXTRUDER);
}
else if (!position_is_reachable(nx, ny)) return NAN; // The given position is in terms of the nozzle
@@ -720,7 +720,7 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
float measured_z = NAN;
if (!DEPLOY_PROBE()) {
measured_z = run_z_probe() + zprobe_offset[Z_AXIS];
measured_z = run_z_probe() + zprobe_zoffset;
const bool big_raise = raise_after == PROBE_PT_BIG_RAISE;
if (big_raise || raise_after == PROBE_PT_RAISE)
+1 -2
View File
@@ -28,7 +28,7 @@
#include "../inc/MarlinConfig.h"
#if HAS_BED_PROBE
extern float zprobe_offset[XYZ];
extern float zprobe_zoffset;
bool set_probe_deployed(const bool deploy);
#ifdef Z_AFTER_PROBING
void move_z_after_probing();
@@ -46,7 +46,6 @@
extern const char msg_wait_for_bed_heating[25];
#endif
#else
constexpr float zprobe_offset[XYZ] = { 0 };
#define DEPLOY_PROBE()
#define STOW_PROBE()
#endif
+20 -12
View File
@@ -354,15 +354,14 @@ void Stepper::wake_up() {
*/
void Stepper::set_directions() {
// A small delay may be needed after changing direction
#if MINIMUM_STEPPER_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_DIR_DELAY);
#endif
#if HAS_DRIVER(L6470)
uint8_t L6470_buf[MAX_L6470 + 1]; // chip command sequence - element 0 not used
#endif
#if MINIMUM_STEPPER_PRE_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_PRE_DIR_DELAY);
#endif
#define SET_STEP_DIR(A) \
if (motor_direction(_AXIS(A))) { \
A##_APPLY_DIR(INVERT_## A##_DIR, false); \
@@ -431,8 +430,8 @@ void Stepper::set_directions() {
#endif
// A small delay may be needed after changing direction
#if MINIMUM_STEPPER_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_DIR_DELAY);
#if MINIMUM_STEPPER_POST_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_POST_DIR_DELAY);
#endif
}
@@ -1892,6 +1891,10 @@ uint32_t Stepper::stepper_block_phase_isr() {
else
interval = LA_ADV_NEVER;
#if MINIMUM_STEPPER_PRE_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_PRE_DIR_DELAY);
#endif
#if ENABLED(MIXING_EXTRUDER)
// We don't know which steppers will be stepped because LA loop follows,
// with potentially multiple steps. Set all.
@@ -1907,8 +1910,8 @@ uint32_t Stepper::stepper_block_phase_isr() {
#endif
// A small delay may be needed after changing direction
#if MINIMUM_STEPPER_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_DIR_DELAY);
#if MINIMUM_STEPPER_POST_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_POST_DIR_DELAY);
#endif
// Get the timer count and estimate the end of the pulse
@@ -2358,8 +2361,9 @@ void Stepper::report_positions() {
#define BABYSTEP_AXIS(AXIS, INVERT, DIR) { \
const uint8_t old_dir = _READ_DIR(AXIS); \
_ENABLE(AXIS); \
DELAY_NS(MINIMUM_STEPPER_PRE_DIR_DELAY); \
_APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^DIR^INVERT); \
DELAY_NS(MINIMUM_STEPPER_DIR_DELAY); \
DELAY_NS(MINIMUM_STEPPER_POST_DIR_DELAY); \
_SAVE_START; \
_APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \
_PULSE_WAIT; \
@@ -2423,6 +2427,10 @@ void Stepper::report_positions() {
enable_Y();
enable_Z();
#if MINIMUM_STEPPER_PRE_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_PRE_DIR_DELAY);
#endif
const uint8_t old_x_dir_pin = X_DIR_READ(),
old_y_dir_pin = Y_DIR_READ(),
old_z_dir_pin = Z_DIR_READ();
@@ -2431,8 +2439,8 @@ void Stepper::report_positions() {
Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction);
Z_DIR_WRITE(INVERT_Z_DIR ^ z_direction);
#if MINIMUM_STEPPER_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_DIR_DELAY);
#if MINIMUM_STEPPER_POST_DIR_DELAY > 0
DELAY_NS(MINIMUM_STEPPER_POST_DIR_DELAY);
#endif
_SAVE_START;
+241
View File
@@ -26,6 +26,247 @@
#line 28 // set __LINE__ to a known value for both passes
// Undefine pins to suppress warnings
#if !PIN_EXISTS(X_MS1)
#undef X_MS1_PIN
#endif
#if !PIN_EXISTS(X_MS2)
#undef X_MS2_PIN
#endif
#if !PIN_EXISTS(X_MS3)
#undef X_MS3_PIN
#endif
#if !PIN_EXISTS(Y_MS1)
#undef Y_MS1_PIN
#endif
#if !PIN_EXISTS(Y_MS2)
#undef Y_MS2_PIN
#endif
#if !PIN_EXISTS(Y_MS3)
#undef Y_MS3_PIN
#endif
#if !PIN_EXISTS(Z_MS1)
#undef Z_MS1_PIN
#endif
#if !PIN_EXISTS(Z_MS2)
#undef Z_MS2_PIN
#endif
#if !PIN_EXISTS(Z_MS3)
#undef Z_MS3_PIN
#endif
#if !PIN_EXISTS(E0_MS1)
#undef E0_MS1_PIN
#endif
#if !PIN_EXISTS(E0_MS2)
#undef E0_MS2_PIN
#endif
#if !PIN_EXISTS(E0_MS3)
#undef E0_MS3_PIN
#endif
#if !PIN_EXISTS(E1_MS1)
#undef E1_MS1_PIN
#endif
#if !PIN_EXISTS(E1_MS2)
#undef E1_MS2_PIN
#endif
#if !PIN_EXISTS(E1_MS3)
#undef E1_MS3_PIN
#endif
#if !PIN_EXISTS(E2_MS1)
#undef E2_MS1_PIN
#endif
#if !PIN_EXISTS(E2_MS2)
#undef E2_MS2_PIN
#endif
#if !PIN_EXISTS(E2_MS3)
#undef E2_MS3_PIN
#endif
#if !PIN_EXISTS(E3_MS1)
#undef E3_MS1_PIN
#endif
#if !PIN_EXISTS(E3_MS2)
#undef E3_MS2_PIN
#endif
#if !PIN_EXISTS(E3_MS3)
#undef E3_MS3_PIN
#endif
#if !PIN_EXISTS(E4_MS1)
#undef E4_MS1_PIN
#endif
#if !PIN_EXISTS(E4_MS2)
#undef E4_MS2_PIN
#endif
#if !PIN_EXISTS(E4_MS3)
#undef E4_MS3_PIN
#endif
#if !PIN_EXISTS(E5_MS1)
#undef E5_MS1_PIN
#endif
#if !PIN_EXISTS(E5_MS2)
#undef E5_MS2_PIN
#endif
#if !PIN_EXISTS(E5_MS3)
#undef E5_MS3_PIN
#endif
#if !PIN_EXISTS(E0_STEP)
#undef E0_STEP_PIN
#endif
#if !PIN_EXISTS(E0_DIR)
#undef E0_DIR_PIN
#endif
#if !PIN_EXISTS(E0_ENABLE)
#undef E0_ENABLE_PIN
#endif
#if !PIN_EXISTS(E1_STEP)
#undef E1_STEP_PIN
#endif
#if !PIN_EXISTS(E1_DIR)
#undef E1_DIR_PIN
#endif
#if !PIN_EXISTS(E1_ENABLE)
#undef E1_ENABLE_PIN
#endif
#if !PIN_EXISTS(E2_STEP)
#undef E2_STEP_PIN
#endif
#if !PIN_EXISTS(E2_DIR)
#undef E2_DIR_PIN
#endif
#if !PIN_EXISTS(E2_ENABLE)
#undef E2_ENABLE_PIN
#endif
#if !PIN_EXISTS(E3_STEP)
#undef E3_STEP_PIN
#endif
#if !PIN_EXISTS(E3_DIR)
#undef E3_DIR_PIN
#endif
#if !PIN_EXISTS(E3_ENABLE)
#undef E3_ENABLE_PIN
#endif
#if !PIN_EXISTS(E4_STEP)
#undef E4_STEP_PIN
#endif
#if !PIN_EXISTS(E4_DIR)
#undef E4_DIR_PIN
#endif
#if !PIN_EXISTS(E4_ENABLE)
#undef E4_ENABLE_PIN
#endif
#if !PIN_EXISTS(E5_STEP)
#undef E5_STEP_PIN
#endif
#if !PIN_EXISTS(E5_DIR)
#undef E5_DIR_PIN
#endif
#if !PIN_EXISTS(E5_ENABLE)
#undef E5_ENABLE_PIN
#endif
#if !PIN_EXISTS(X_CS)
#undef X_CS_PIN
#endif
#if !PIN_EXISTS(Y_CS)
#undef Y_CS_PIN
#endif
#if !PIN_EXISTS(Z_CS)
#undef Z_CS_PIN
#endif
#if !PIN_EXISTS(E0_CS)
#undef E0_CS_PIN
#endif
#if !PIN_EXISTS(E1_CS)
#undef E1_CS_PIN
#endif
#if !PIN_EXISTS(E2_CS)
#undef E2_CS_PIN
#endif
#if !PIN_EXISTS(E3_CS)
#undef E3_CS_PIN
#endif
#if !PIN_EXISTS(E4_CS)
#undef E4_CS_PIN
#endif
#if !PIN_EXISTS(E5_CS)
#undef E5_CS_PIN
#endif
#if !PIN_EXISTS(FAN)
#undef FAN_PIN
#endif
#define FAN0_PIN FAN_PIN
#if !PIN_EXISTS(FAN1)
#undef FAN1_PIN
#endif
#if !PIN_EXISTS(FAN2)
#undef FAN2_PIN
#endif
#if !PIN_EXISTS(CONTROLLER_FAN)
#undef CONTROLLER_FAN_PIN
#endif
#if !PIN_EXISTS(FANMUX0)
#undef FANMUX0_PIN
#endif
#if !PIN_EXISTS(FANMUX1)
#undef FANMUX1_PIN
#endif
#if !PIN_EXISTS(FANMUX2)
#undef FANMUX2_PIN
#endif
#if !PIN_EXISTS(HEATER_0)
#undef HEATER_0_PIN
#endif
#if !PIN_EXISTS(HEATER_1)
#undef HEATER_1_PIN
#endif
#if !PIN_EXISTS(HEATER_2)
#undef HEATER_2_PIN
#endif
#if !PIN_EXISTS(HEATER_3)
#undef HEATER_3_PIN
#endif
#if !PIN_EXISTS(HEATER_4)
#undef HEATER_4_PIN
#endif
#if !PIN_EXISTS(HEATER_5)
#undef HEATER_5_PIN
#endif
#if !PIN_EXISTS(HEATER_BED)
#undef HEATER_BED_PIN
#endif
#if !PIN_EXISTS(TEMP_0)
#undef TEMP_0_PIN
#endif
#if !PIN_EXISTS(TEMP_1)
#undef TEMP_1_PIN
#endif
#if !PIN_EXISTS(TEMP_2)
#undef TEMP_2_PIN
#endif
#if !PIN_EXISTS(TEMP_3)
#undef TEMP_3_PIN
#endif
#if !PIN_EXISTS(TEMP_4)
#undef TEMP_4_PIN
#endif
#if !PIN_EXISTS(TEMP_5)
#undef TEMP_5_PIN
#endif
#if !PIN_EXISTS(TEMP_BED)
#undef TEMP_BED_PIN
#endif
#if !PIN_EXISTS(SD_DETECT)
#undef SD_DETECT_PIN
#endif
#if !PIN_EXISTS(SDPOWER)
#undef SDPOWER_PIN
#endif
//
// Analog Pin Assignments
//
@@ -2,7 +2,7 @@
"build": {
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F407xx",
"extra_flags": "-DSTM32F4 -DSTM32F407xx -DSTM32F40_41xxx",
"f_cpu": "168000000L",
"hwids": [
[
@@ -21,34 +21,17 @@
"debug": {
"jlink_device": "STM32F407VE",
"openocd_target": "stm32f4x",
"svd_path": "STM32F40x.svd",
"tools": {
"stlink": {
"server": {
"arguments": [
"-f",
"scripts/interface/stlink.cfg",
"-c",
"transport select hla_swd",
"-f",
"scripts/target/stm32f4x.cfg",
"-c",
"reset_config none"
],
"executable": "bin/openocd",
"package": "tool-openocd"
}
}
}
"svd_path": "STM32F40x.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube"
],
"name": "STM32F407VE (64k RAM. 512k Flash)",
"name": "STM32F407VE (192k RAM. 512k Flash)",
"upload": {
"disable_flushing": false,
"maximum_ram_size": 65536,
"maximum_ram_size": 131072,
"maximum_size": 524288,
"protocol": "stlink",
"protocols": [
@@ -60,6 +43,6 @@
"use_1200bps_touch": false,
"wait_for_upload_port": false
},
"url": "http://www.st.com/en/microcontrollers/stm32f407zg.html",
"url": "http://www.st.com/en/microcontrollers/stm32f407ve.html",
"vendor": "Generic"
}
@@ -208,10 +208,6 @@ extern "C" {
#define PI7 (115+STM32F4X_ADC_NUM) //1:TIM8_CH3
#endif
#ifdef HAL_GPIO_MODULE_ENABLED
#error foo
#endif
// This must be a literal
#define NUM_DIGITAL_PINS (STM32F4X_GPIO_NUM)
+1
View File
@@ -149,6 +149,7 @@ def get_answer(board_name, cpu_label_txt, cpu_a_txt, cpu_b_txt):
kill_session_()
root_get_answer = tk.Tk()
root_get_answer.attributes("-topmost", True)
root_get_answer.chk_state_1 = 1 # declare variables used by TK and enable
+24 -4
View File
@@ -6,14 +6,34 @@
# exit on first failure
set -e
backup_ramps
backup_ramps # pins_set is used below...
restore_configs
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB EXTENSIBLE_UI EXTUI_EXAMPLE
opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB
opt_set TEMP_SENSOR_0 -2
opt_set TEMP_SENSOR_BED 2
opt_set GRID_MAX_POINTS_X 16
opt_set FANMUX0_PIN 53
opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \
PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \
EEPROM_SETTINGS SDSUPPORT BINARY_FILE_TRANSFER \
BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \
AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE CALIBRATION_GCODE \
BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
PSU_CONTROL AUTO_POWER_CONTROL \
SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER \
PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL \
EXTENSIBLE_UI
opt_add EXTUI_EXAMPLE
opt_set E0_AUTO_FAN_PIN 8
opt_set EXTRUDER_AUTO_FAN_SPEED 100
exec_test $1 $2 "RAMPS4DUE_EFB with S_CURVE_ACCELERATION, EEPROM_SETTINGS, GCODE_MACROS"
opt_set TEMP_SENSOR_CHAMBER 3
opt_set HEATER_CHAMBER_PIN 45
exec_test $1 $2 "RAMPS4DUE_EFB with EXTENSIBLE_UI, S-Curve, many options."
restore_configs
opt_set MOTHERBOARD BOARD_RADDS
+1 -1
View File
@@ -31,7 +31,7 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TE
BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \
AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
+8 -9
View File
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+3 -2
View File
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+11 -12
View File
@@ -894,12 +894,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -911,10 +910,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 21, 61, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 21 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 61 // 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
@@ -948,7 +947,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1207,9 +1206,9 @@
#define GRID_MAX_POINTS_Y 4
// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION probe_offset[X_AXIS]
#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - probe_offset[X_AXIS] + MIN_PROBE_EDGE)
#define FRONT_PROBE_BED_POSITION probe_offset[Y_AXIS]
#define LEFT_PROBE_BED_POSITION X_PROBE_OFFSET_FROM_EXTRUDER
#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (X_PROBE_OFFSET_FROM_EXTRUDER) + MIN_PROBE_EDGE)
#define FRONT_PROBE_BED_POSITION Y_PROBE_OFFSET_FROM_EXTRUDER
#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE))
// Probe along the Y axis, advancing X after each column
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -908,12 +908,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -925,10 +924,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { -25, -29, -12.35 }
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle]
#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
@@ -962,7 +961,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -953,12 +953,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -970,10 +969,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { -35, -6, -0.5 }
#define X_PROBE_OFFSET_FROM_EXTRUDER -35 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -6 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.5 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -1007,7 +1006,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1405,7 +1404,7 @@
#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
//#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT 4
#define Z_SAFE_HOMING_Y_POINT MIN_PROBE_Y
#endif
// Homing speeds (mm/m)
@@ -1378,7 +1378,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1390,7 +1390,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -953,12 +953,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -970,10 +969,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -1007,7 +1006,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1377,7 +1377,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1389,7 +1389,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -899,12 +899,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -916,10 +915,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -953,7 +952,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
//#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
//#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
//#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
//#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
//#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+3 -2
View File
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
//#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
//#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
//#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
//#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
//#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+20 -13
View File
@@ -935,12 +935,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -952,23 +951,31 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
//#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
//#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
//#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
//#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// ANET A8: FRONT-MOUNTED SENSOR WITH 3D PRINTED MOUNT
//#define NOZZLE_TO_PROBE_OFFSET { -28, -45, 0 }
//#define X_PROBE_OFFSET_FROM_EXTRUDER -28 // X offset: -left +right [of the nozzle]
//#define Y_PROBE_OFFSET_FROM_EXTRUDER -45 // Y offset: -front +behind [the nozzle]
//#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// THESE ARE FOR THE OFFICIAL ANET REAR-MOUNTED SENSOR
//#define NOZZLE_TO_PROBE_OFFSET { -1, 3, 0 }
//#define X_PROBE_OFFSET_FROM_EXTRUDER -1 // X offset: -left +right [of the nozzle]
//#define Y_PROBE_OFFSET_FROM_EXTRUDER 3 // Y offset: -front +behind [the nozzle]
//#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// ANET A6 with BLTouch/3D-Touch mounted right to the nozzle
#define NOZZLE_TO_PROBE_OFFSET { 39, 0, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 39 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
//ANET A6 with BLTouch/3D-Touch betwen Fan and Belt
// (mount: https://github.com/ralf-e/ANET_A6_modifications/tree/master/A6_X-Axis)
//#define NOZZLE_TO_PROBE_OFFSET { -30, 15, 0.75 }
//#define X_PROBE_OFFSET_FROM_EXTRUDER -30 // X offset: -left +right [of the nozzle]
//#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
@@ -1003,7 +1010,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+3 -2
View File
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -901,12 +901,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -918,10 +917,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -955,7 +954,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+3 -2
View File
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -899,12 +899,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -916,10 +915,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -953,7 +952,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -900,12 +900,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -917,10 +916,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -954,7 +953,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+3 -2
View File
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -898,12 +898,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -915,10 +914,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 75, 5, -2 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 75 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -2 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -952,7 +951,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -889,12 +889,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -906,10 +905,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -943,7 +942,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+3 -2
View File
@@ -1377,7 +1377,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1389,7 +1389,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -888,12 +888,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -905,10 +904,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -942,7 +941,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -876,12 +876,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -893,10 +892,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { -25, -29, -12.35 }
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle]
#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
@@ -930,7 +929,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+12 -13
View File
@@ -889,12 +889,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -906,10 +905,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 34, 15, 0 }
#define X_PROBE_OFFSET_FROM_EXTRUDER 34 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 15 // 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
@@ -943,7 +942,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1201,10 +1200,10 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
//#define LEFT_PROBE_BED_POSITION X_MIN_POS + probe_offset[X_AXIS]
//#define RIGHT_PROBE_BED_POSITION X_MAX_POS - probe_offset[X_AXIS]
//#define FRONT_PROBE_BED_POSITION Y_MIN_POS + probe_offset[Y_AXIS]
//#define BACK_PROBE_BED_POSITION Y_MAX_POS - probe_offset[Y_AXIS]
//#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)
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1381,7 +1381,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1393,7 +1393,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
+8 -9
View File
@@ -876,12 +876,11 @@
/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* Default X and Y offsets must be integers.
* Floats may be set with M851 if required.
*
* In the following example the X and Y offsets are both positive:
* X and Y offsets must be integers.
*
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
* #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
*
* +-- BACK ---+
* | |
@@ -893,10 +892,10 @@
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { -25, -29, -12.35 }
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle]
#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
@@ -930,7 +929,7 @@
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
@@ -1373,7 +1373,7 @@
#define MIN_STEPS_PER_SEGMENT 6
/**
* Minimum delay after setting the stepper DIR (in ns)
* Minimum delay before and 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
@@ -1385,7 +1385,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)

Some files were not shown because too many files have changed in this diff Show More