Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEGA2560 on SMART RAMPS, manual probe crashing, MARLIN_DEV_MODE compile time bug fixes #21413

Merged
merged 11 commits into from
Mar 24, 2021
3 changes: 2 additions & 1 deletion Marlin/src/core/bug_on.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/bedlevel/mbl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down