Fix SERIAL_POS in use with DEBUG_OUT
This commit is contained in:
parent
cacec5764a
commit
72c7751768
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "enum.h"
|
||||||
|
|
||||||
uint8_t marlin_debug_flags = MARLIN_DEBUG_NONE;
|
uint8_t marlin_debug_flags = MARLIN_DEBUG_NONE;
|
||||||
|
|
||||||
|
@ -61,21 +62,15 @@ void print_bin(const uint16_t val) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z) {
|
||||||
|
serialprintPGM(prefix);
|
||||||
|
SERIAL_CHAR('(');
|
||||||
|
SERIAL_ECHO(x);
|
||||||
|
SERIAL_ECHOPAIR(", ", y, ", ", z);
|
||||||
|
SERIAL_CHAR(')');
|
||||||
|
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
|
||||||
|
}
|
||||||
|
|
||||||
#include "enum.h"
|
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]) {
|
||||||
|
print_xyz(prefix, suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
||||||
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z) {
|
}
|
||||||
serialprintPGM(prefix);
|
|
||||||
SERIAL_CHAR('(');
|
|
||||||
SERIAL_ECHO(x);
|
|
||||||
SERIAL_ECHOPAIR(", ", y, ", ", z);
|
|
||||||
SERIAL_CHAR(')');
|
|
||||||
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
|
|
||||||
}
|
|
||||||
|
|
||||||
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]) {
|
|
||||||
print_xyz(prefix, suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -180,12 +180,7 @@ void serial_spaces(uint8_t count);
|
||||||
|
|
||||||
void print_bin(const uint16_t val);
|
void print_bin(const uint16_t val);
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
|
||||||
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
|
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
|
||||||
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
|
#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
|
||||||
#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
|
#define SERIAL_XYZ(PREFIX,...) do { print_xyz(PSTR(PREFIX), NULL, __VA_ARGS__); } while(0)
|
||||||
#define SERIAL_XYZ(PREFIX,...) do { print_xyz(PSTR(PREFIX), NULL, __VA_ARGS__); } while(0)
|
|
||||||
#else
|
|
||||||
#define SERIAL_POS(...) NOOP
|
|
||||||
#define SERIAL_XYZ(...) NOOP
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in a new issue