Fix SERIAL_POS in use with DEBUG_OUT

This commit is contained in:
Scott Lahteine 2019-04-03 20:41:11 -05:00
parent cacec5764a
commit 72c7751768
2 changed files with 16 additions and 26 deletions

View file

@ -22,6 +22,7 @@
#include "serial.h"
#include "language.h"
#include "enum.h"
uint8_t marlin_debug_flags = MARLIN_DEBUG_NONE;
@ -61,10 +62,6 @@ void print_bin(const uint16_t val) {
}
}
#if ENABLED(DEBUG_LEVELING_FEATURE)
#include "enum.h"
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z) {
serialprintPGM(prefix);
SERIAL_CHAR('(');
@ -77,5 +74,3 @@ void print_bin(const uint16_t val) {
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

View file

@ -180,12 +180,7 @@ void serial_spaces(uint8_t count);
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 xyz[]);
#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)
#else
#define SERIAL_POS(...) NOOP
#define SERIAL_XYZ(...) NOOP
#endif