XYZ_CHAR macro

This commit is contained in:
Scott Lahteine
2020-03-01 10:36:15 -06:00
parent 3473b21710
commit c4db8e49a7
12 changed files with 30 additions and 29 deletions

View File

@ -56,10 +56,10 @@ void GcodeSuite::G61(void) {
SERIAL_ECHOPAIR(STR_RESTORING_POS " S", int(slot));
LOOP_XYZ(i) {
destination[i] = parser.seen(axis_codes[i])
destination[i] = parser.seen(XYZ_CHAR(i))
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
: current_position[i];
SERIAL_CHAR(' ', axis_codes[i]);
SERIAL_CHAR(' ', XYZ_CHAR(i));
SERIAL_ECHO_F(destination[i]);
}
SERIAL_EOL();

View File

@ -348,7 +348,7 @@
bool report = true;
const uint8_t index = parser.byteval('I');
LOOP_XYZ(i) if (parser.seen(axis_codes[i])) {
LOOP_XYZ(i) if (parser.seen(XYZ_CHAR(i))) {
const int16_t value = parser.value_int();
report = false;
switch (i) {