From 315a722b420226be0c07c05abf95a5b666caf1e6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 12 Jul 2021 22:52:17 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20TM3D=20fixes=20and=20improvement?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> --- Marlin/src/core/serial.h | 2 +- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 16 +++++++++------- .../cocoa_press/leveling_menu.cpp | 4 ++-- Marlin/src/lcd/extui/ui_api.cpp | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 4 +++- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 7 ++++++- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index a5afb9d895..ee6c0e6eae 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -67,7 +67,7 @@ extern uint8_t marlin_debug_flags; // Serial redirection // // Step 1: Find out what the first serial leaf is -#if BOTH(HAS_MULTI_SERIAL, SERIAL_CATCHALL) +#if HAS_MULTI_SERIAL && defined(SERIAL_CATCHALL) #define _SERIAL_LEAF_1 MYSERIAL #else #define _SERIAL_LEAF_1 MYSERIAL1 diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index 9aea68dfcb..114590a043 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -2417,13 +2417,15 @@ void Draw_HomeOff_Menu() { #include "../../../libs/buzzer.h" void HMI_AudioFeedback(const bool success=true) { - if (success) { - buzzer.tone(100, 659); - buzzer.tone(10, 0); - buzzer.tone(100, 698); - } - else - buzzer.tone(40, 440); + #if HAS_BUZZER + if (success) { + buzzer.tone(100, 659); + buzzer.tone(10, 0); + buzzer.tone(100, 698); + } + else + buzzer.tone(40, 440); + #endif } /* Prepare */ diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index 57c8a7505c..6718fe0a41 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -23,9 +23,9 @@ #include "../config.h" #include "../screens.h" -#ifdef COCOA_LEVELING_MENU +#if ENABLED(COCOA_LEVELING_MENU) -#if BOTH(HAS_BED_PROBE,BLTOUCH) +#if BOTH(HAS_BED_PROBE, BLTOUCH) #include "../../../../feature/bltouch.h" #endif diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 7173790262..4ef96251bc 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -1057,7 +1057,7 @@ namespace ExtUI { return isPrinting() && (isPrintingFromMediaPaused() || print_job_timer.isPaused()); } - bool isMediaInserted() { return TERN0(SDSUPPORT, IS_SD_INSERTED() && card.isMounted()); } + bool isMediaInserted() { return TERN0(SDSUPPORT, IS_SD_INSERTED()); } void pausePrint() { ui.pause_print(); } void resumePrint() { ui.resume_print(); } diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index fb143fa8bc..2c271408b0 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -655,7 +655,9 @@ #define BEEPER_PIN EXP1_10_PIN #define BTN_ENC EXP1_09_PIN - #define SD_DETECT_PIN EXP2_04_PIN + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_04_PIN + #endif #ifndef KILL_PIN #define KILL_PIN EXP2_03_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index a8be2cfc07..63ad06dc57 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -172,8 +172,13 @@ // // Misc. Functions // -#define LED_CONTROL_PIN PA13 +#define CASE_LIGHT_PIN PA13 #ifndef NEOPIXEL_PIN #define NEOPIXEL_PIN PA8 #endif + +#define SUICIDE_PIN PC13 +#ifndef SUICIDE_PIN_INVERTING + #define SUICIDE_PIN_INVERTING false +#endif