From 938e6d15c4b26cea751d78e12c2c86da7ebd540d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 5 Aug 2016 08:17:06 -0700 Subject: [PATCH] Patch up some flaws, here and there --- Marlin/Conditionals_post.h | 6 +----- Marlin/Marlin.h | 1 + Marlin/Marlin_main.cpp | 1 + Marlin/SanityCheck.h | 9 +++++++++ Marlin/ultralcd.cpp | 2 ++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index aa6b28a50..80c9caac7 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -633,17 +633,13 @@ #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 #endif - #elif PIN_EXISTS(BEEPER) + #else #ifndef LCD_FEEDBACK_FREQUENCY_HZ #define LCD_FEEDBACK_FREQUENCY_HZ 5000 #endif #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 #endif - #else - #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS - #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 - #endif #endif /** diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 9f289f208..d8dac96eb 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -89,6 +89,7 @@ extern const char echomagic[] PROGMEM; #define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value))) +void serial_echopair_P(const char* s_P, const char *v); void serial_echopair_P(const char* s_P, char v); void serial_echopair_P(const char* s_P, int v); void serial_echopair_P(const char* s_P, long v); diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d1c4876f1..fc0945029 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -572,6 +572,7 @@ void set_current_from_steppers_for_axis(AxisEnum axis); void plan_cubic_move(const float offset[4]); #endif +void serial_echopair_P(const char* s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); } void serial_echopair_P(const char* s_P, char v) { serialprintPGM(s_P); SERIAL_CHAR(v); } void serial_echopair_P(const char* s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); } void serial_echopair_P(const char* s_P, long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index bec3d462b..59bcfb021 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -97,6 +97,15 @@ #endif #endif +/** + * Delta requirements + */ +#if ENABLED(DELTA) + #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG) + #error "You probably want to use Max Endstops for DELTA!" + #endif +#endif + /** * Babystepping */ diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index da214aa83..bc70611d9 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2327,6 +2327,8 @@ void kill_screen(const char* lcd_msg) { lcd.buzz(duration, freq); #elif PIN_EXISTS(BEEPER) buzzer.tone(duration, freq); + #else + UNUSED(duration); UNUSED(freq); #endif }