Allow M206 offsets to apply to z safe home move

This commit is contained in:
InsanityAutomation
2020-08-20 21:53:14 -04:00
parent 562e6aaade
commit d28b66a672
6 changed files with 14 additions and 7 deletions
+3
View File
@@ -3327,6 +3327,9 @@
#define USER_DESC_3 "Standard"
#define USER_GCODE_3 "M92E814\nM907E750\nM500"
#define USER_DESC_4 "Mosquito BMG-M"
#define USER_GCODE_4 "M92E814\nM206X5Y15\nM907E750\nM500"
#endif
/**
@@ -1548,6 +1548,9 @@
* numbers for those locations should be 0.
*/
#ifdef VALIDATE_MESH_TILT
#if ENABLED(Z_SAFE_HOMING)
constexpr xy_float_t safe_homing_xy = { Z_SAFE_HOMING_X_POINT , Z_SAFE_HOMING_Y_POINT };
#endif
auto d_from = []{ DEBUG_ECHOPGM("D from "); };
auto normed = [&](const xy_pos_t &pos, const float &zadd) {
return normal.x * pos.x + normal.y * pos.y + zadd;
+2 -2
View File
@@ -119,14 +119,14 @@
// Disallow Z homing if X or Y homing is needed
if (axis_unhomed_error(_BV(X_AXIS) | _BV(Y_AXIS))) return;
sync_plan_position();
/**
* Move the Z probe (or just the nozzle) to the safe homing point
* (Z is already at the right height)
*/
destination.set(safe_homing_xy, current_position.z);
destination.set((xy_float_t){ Z_SAFE_HOMING_X_POINT + home_offset[X_AXIS], Z_SAFE_HOMING_Y_POINT + home_offset[Y_AXIS] }, current_position.z);
TERN_(HOMING_Z_WITH_PROBE, destination -= probe.offset_xy);
+6
View File
@@ -41,6 +41,12 @@ void GcodeSuite::M206() {
if (parser.seen(XYZ_CHAR(i)))
set_home_offset((AxisEnum)i, parser.value_linear_units());
if (!parser.seen_any()) {
SERIAL_ECHOLNPAIR("M206X : ", home_offset[X_AXIS]);
SERIAL_ECHOLNPAIR("M206Y : ", home_offset[Y_AXIS]);
SERIAL_ECHOLNPAIR("M206Z : ", home_offset[Z_AXIS]);
}
#if ENABLED(MORGAN_SCARA)
if (parser.seen('T')) set_home_offset(A_AXIS, parser.value_float()); // Theta
if (parser.seen('P')) set_home_offset(B_AXIS, parser.value_float()); // Psi
-4
View File
@@ -78,10 +78,6 @@ extern xyz_pos_t cartes;
#define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE()
#endif
#if ENABLED(Z_SAFE_HOMING)
constexpr xy_float_t safe_homing_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT };
#endif
/**
* Feed rates are often configured with mm/m
* but the planner and stepper like mm/s units.
-1
View File
@@ -2974,7 +2974,6 @@ void Stepper::report_positions() {
if (!initialized) return;
#if HAS_DIGIPOTSS
SERIAL_ECHOLNPAIR("Digipotss current ", current);
const uint8_t digipot_ch[] = DIGIPOT_CHANNELS;
digitalPotWrite(digipot_ch[driver], current);