From fd8207dd9a1368c6bb75acd5fead76e6fbc0830f Mon Sep 17 00:00:00 2001 From: kpishere Date: Wed, 24 Mar 2021 10:14:11 -0400 Subject: [PATCH] Misc build fixes (#21413) Co-authored-by: Scott Lahteine --- Marlin/src/core/bug_on.h | 3 ++- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Marlin/src/core/bug_on.h b/Marlin/src/core/bug_on.h index 8869be8d28..dc32f0385a 100644 --- a/Marlin/src/core/bug_on.h +++ b/Marlin/src/core/bug_on.h @@ -30,7 +30,8 @@ #define BUG_ON(V...) do { SERIAL_ECHOPAIR(ONLY_FILENAME, __LINE__, ": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0) #elif ENABLED(MARLIN_DEV_MODE) // Don't stop the CPU here, but at least dump the bug on the serial port - #define BUG_ON(V...) do { SERIAL_ECHOPAIR(ONLY_FILENAME, __LINE__, ": BUG!\n"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0) + //#define BUG_ON(V...) do { SERIAL_ECHOPAIR(ONLY_FILENAME, __LINE__, ": BUG!\n"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0) + #define BUG_ON(V...) NOOP #else // Release mode, let's ignore the bug #define BUG_ON(V...) NOOP diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index c16338a692..c4c6eb1423 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -98,7 +98,7 @@ void GcodeSuite::G29() { // For each G29 S2... if (mbl_probe_index == 0) { // Move close to the bed before the first point - do_blocking_move_to_z(0); + do_blocking_move_to_z(MANUAL_PROBE_START_Z); } else { // Save Z for the previous mesh position diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 805c92d71a..f30a235626 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -45,6 +45,10 @@ * 7 | 11 */ +#if ENABLED(AZSMZ_12864) && DISABLED(ALLOW_SAM3X8E) + #error "No pins defined for RAMPS with AZSMZ_12864." +#endif + #include "env_validate.h" // Custom flags and defines for the build @@ -720,9 +724,6 @@ #elif ENABLED(AZSMZ_12864) // Pins only defined for RAMPS_SMART currently - #if DISABLED(IS_RAMPS_SMART) - #error "No pins defined for RAMPS with AZSMZ_12864." - #endif #elif IS_TFTGLCD_PANEL