G34 Auto-align multi-stepper Z axis (#11302)

This commit is contained in:
TheLongAndOnly
2018-10-29 20:01:36 +01:00
committed by Scott Lahteine
parent f9b80e7217
commit 5536228359
72 changed files with 1434 additions and 29 deletions

View File

@ -232,6 +232,16 @@ void I2CPositionEncoder::set_homed() {
}
}
void I2CPositionEncoder::set_unhomed() {
zeroOffset = 0;
homed = trusted = false;
#ifdef I2CPE_DEBUG
SERIAL_ECHO(axis_codes[encoderAxis]);
SERIAL_ECHOLNPGM(" axis encoder unhomed.");
#endif
}
bool I2CPositionEncoder::passes_test(const bool report) {
if (report) {
if (H != I2CPE_MAG_SIG_GOOD) SERIAL_ECHOPGM("Warning. ");

View File

@ -146,6 +146,7 @@ class I2CPositionEncoder {
void update();
void set_homed();
void set_unhomed();
int32_t get_raw_count();
@ -230,6 +231,11 @@ class I2CPositionEncodersMgr {
if (encoders[i].get_axis() == axis) encoders[i].set_homed();
}
static void unhomed(const AxisEnum axis) {
LOOP_PE(i)
if (encoders[i].get_axis() == axis) encoders[i].set_unhomed();
}
static void report_position(const int8_t idx, const bool units, const bool noOffset);
static void report_status(const int8_t idx) {