🏗️ Axis name arrays
Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com>
This commit is contained in:
parent
ddb0168e29
commit
5ccdc9ced7
|
@ -126,7 +126,7 @@ void safe_delay(millis_t ms) {
|
||||||
#if ABL_PLANAR
|
#if ABL_PLANAR
|
||||||
SERIAL_ECHOPGM("ABL Adjustment");
|
SERIAL_ECHOPGM("ABL Adjustment");
|
||||||
LOOP_LINEAR_AXES(a) {
|
LOOP_LINEAR_AXES(a) {
|
||||||
SERIAL_CHAR(' ', AXIS_CHAR(a));
|
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]));
|
||||||
serial_offset(planner.get_axis_position_mm(AxisEnum(a)) - current_position[a]);
|
serial_offset(planner.get_axis_position_mm(AxisEnum(a)) - current_position[a]);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -83,9 +83,7 @@ void GcodeSuite::M425() {
|
||||||
SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
|
SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
|
||||||
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
|
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
|
||||||
LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a)) {
|
LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a)) {
|
||||||
SERIAL_CHAR(' ', AXIS_CHAR(a));
|
SERIAL_ECHOLNPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]), backlash.get_distance_mm((AxisEnum)a));
|
||||||
SERIAL_ECHO(backlash.get_distance_mm(AxisEnum(a)));
|
|
||||||
SERIAL_EOL();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BACKLASH_SMOOTHING_MM
|
#ifdef BACKLASH_SMOOTHING_MM
|
||||||
|
@ -96,8 +94,7 @@ void GcodeSuite::M425() {
|
||||||
SERIAL_ECHOPGM(" Average measured backlash (mm):");
|
SERIAL_ECHOPGM(" Average measured backlash (mm):");
|
||||||
if (backlash.has_any_measurement()) {
|
if (backlash.has_any_measurement()) {
|
||||||
LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a) && backlash.has_measurement(AxisEnum(a))) {
|
LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a) && backlash.has_measurement(AxisEnum(a))) {
|
||||||
SERIAL_CHAR(' ', AXIS_CHAR(a));
|
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]), backlash.get_measurement((AxisEnum)a));
|
||||||
SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -49,7 +49,7 @@ void GcodeSuite::M111() {
|
||||||
LOOP_L_N(i, COUNT(debug_strings)) {
|
LOOP_L_N(i, COUNT(debug_strings)) {
|
||||||
if (TEST(marlin_debug_flags, i)) {
|
if (TEST(marlin_debug_flags, i)) {
|
||||||
if (comma++) SERIAL_CHAR(',');
|
if (comma++) SERIAL_CHAR(',');
|
||||||
SERIAL_ECHOPGM_P((char*)pgm_read_ptr(&debug_strings[i]));
|
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&debug_strings[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ void try_to_disable(const stepper_flags_t to_disable) {
|
||||||
|
|
||||||
auto overlap_warning = [](const ena_mask_t axis_bits) {
|
auto overlap_warning = [](const ena_mask_t axis_bits) {
|
||||||
SERIAL_ECHOPGM(" not disabled. Shared with");
|
SERIAL_ECHOPGM(" not disabled. Shared with");
|
||||||
LOOP_LINEAR_AXES(a) if (TEST(axis_bits, a)) SERIAL_CHAR(' ', axis_codes[a]);
|
LOOP_LINEAR_AXES(a) if (TEST(axis_bits, a)) SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]));
|
||||||
#if HAS_EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
#define _EN_STILLON(N) if (TEST(axis_bits, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR(' ', 'E', '0' + N);
|
#define _EN_STILLON(N) if (TEST(axis_bits, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR(' ', 'E', '0' + N);
|
||||||
REPEAT(EXTRUDERS, _EN_STILLON)
|
REPEAT(EXTRUDERS, _EN_STILLON)
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=XYZE, const uint8_t precision=3) {
|
void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=XYZE, const uint8_t precision=3) {
|
||||||
char str[12];
|
char str[12];
|
||||||
LOOP_L_N(a, n) {
|
LOOP_L_N(a, n) {
|
||||||
SERIAL_CHAR(' ', axis_codes[a], ':');
|
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]));
|
||||||
if (pos[a] >= 0) SERIAL_CHAR(' ');
|
if (pos[a] >= 0) SERIAL_CHAR(' ');
|
||||||
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
|
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
|
||||||
}
|
}
|
||||||
|
@ -47,10 +47,7 @@
|
||||||
|
|
||||||
void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) {
|
void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) {
|
||||||
char str[12];
|
char str[12];
|
||||||
LOOP_LINEAR_AXES(a) {
|
LOOP_LINEAR_AXES(a) SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]), dtostrf(pos[a], 1, precision, str));
|
||||||
SERIAL_CHAR(' ', AXIS_CHAR(a), ':');
|
|
||||||
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
|
|
||||||
}
|
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,8 +160,7 @@
|
||||||
|
|
||||||
SERIAL_ECHOPGM("Stepper:");
|
SERIAL_ECHOPGM("Stepper:");
|
||||||
LOOP_LOGICAL_AXES(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
SERIAL_CHAR(' ', axis_codes[i], ':');
|
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[i]), stepper.position((AxisEnum)i));
|
||||||
SERIAL_ECHO(stepper.position((AxisEnum)i));
|
|
||||||
}
|
}
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue