diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml
index b30513f7cc..93a110f270 100644
--- a/.github/workflows/check-pr.yml
+++ b/.github/workflows/check-pr.yml
@@ -6,7 +6,8 @@
name: PR Bad Target
on:
- pull_request:
+ pull_request_target:
+ types: [opened]
branches:
- 1.0.x
- 1.1.x
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 52161b3077..15a5e90278 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -2313,6 +2313,7 @@
*/
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
+ //#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution!
/**
* Tool Sensors detect when tools have been picked up or dropped.
diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h
index 94332c9268..775f6a04f0 100644
--- a/Marlin/src/inc/Conditionals_adv.h
+++ b/Marlin/src/inc/Conditionals_adv.h
@@ -132,17 +132,15 @@
#define HID_E6 6
#define HID_E7 7
-#define ANY_TEMP_SENSOR_IS(n) (n == TEMP_SENSOR_0 || n == TEMP_SENSOR_1 || n == TEMP_SENSOR_2 || n == TEMP_SENSOR_3 \
- || n == TEMP_SENSOR_4 || n == TEMP_SENSOR_5 || n == TEMP_SENSOR_6 || n == TEMP_SENSOR_7 \
- || n == TEMP_SENSOR_BED \
- || n == TEMP_SENSOR_PROBE \
- || n == TEMP_SENSOR_CHAMBER \
- || n == TEMP_SENSOR_COOLER \
- || n == TEMP_SENSOR_REDUNDANT )
-#if ANY_TEMP_SENSOR_IS(1000)
+#define _SENSOR_IS(I,N) || (TEMP_SENSOR_##N == I)
+#define _E_SENSOR_IS(I,N) _SENSOR_IS(N,I)
+#define ANY_THERMISTOR_IS(N) (0 REPEAT2(HOTENDS, _E_SENSOR_IS, N) \
+ _SENSOR_IS(N,BED) _SENSOR_IS(N,PROBE) _SENSOR_IS(N,CHAMBER) \
+ _SENSOR_IS(N,COOLER) _SENSOR_IS(N,BOARD) _SENSOR_IS(N,REDUNDANT) )
+
+#if ANY_THERMISTOR_IS(1000)
#define HAS_USER_THERMISTORS 1
#endif
-#undef ANY_TEMP_SENSOR_IS
#if TEMP_SENSOR_REDUNDANT
#define _HEATER_ID(M) HID_##M
diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h
index cb3314b25f..abc38c0a5a 100644
--- a/Marlin/src/inc/SanityCheck.h
+++ b/Marlin/src/inc/SanityCheck.h
@@ -2193,68 +2193,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif !PIN_EXISTS(TEMP_7) && !TEMP_SENSOR_7_IS_DUMMY
#error "TEMP_7_PIN not defined for this board."
#endif
- #elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 7 HOTENDS."
- #endif
- #elif TEMP_SENSOR_6 != 0
- #error "TEMP_SENSOR_6 shouldn't be set with only 6 HOTENDS."
- #elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 6 HOTENDS."
- #endif
- #elif TEMP_SENSOR_5 != 0
- #error "TEMP_SENSOR_5 shouldn't be set with only 5 HOTENDS."
- #elif TEMP_SENSOR_6 != 0
- #error "TEMP_SENSOR_6 shouldn't be set with only 5 HOTENDS."
- #elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 5 HOTENDS."
- #endif
- #elif TEMP_SENSOR_4 != 0
- #error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS."
- #elif TEMP_SENSOR_5 != 0
- #error "TEMP_SENSOR_5 shouldn't be set with only 4 HOTENDS."
- #elif TEMP_SENSOR_6 != 0
- #error "TEMP_SENSOR_6 shouldn't be set with only 4 HOTENDS."
- #elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 4 HOTENDS."
- #endif
- #elif TEMP_SENSOR_3 != 0
- #error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS."
- #elif TEMP_SENSOR_4 != 0
- #error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS."
- #elif TEMP_SENSOR_5 != 0
- #error "TEMP_SENSOR_5 shouldn't be set with only 3 HOTENDS."
- #elif TEMP_SENSOR_6 != 0
- #error "TEMP_SENSOR_6 shouldn't be set with only 3 HOTENDS."
- #elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 3 HOTENDS."
- #endif
- #elif TEMP_SENSOR_2 != 0
- #error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS."
- #elif TEMP_SENSOR_3 != 0
- #error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS."
- #elif TEMP_SENSOR_4 != 0
- #error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS."
- #elif TEMP_SENSOR_5 != 0
- #error "TEMP_SENSOR_5 shouldn't be set with only 2 HOTENDS."
- #elif TEMP_SENSOR_6 != 0
- #error "TEMP_SENSOR_6 shouldn't be set with only 2 HOTENDS."
- #elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 2 HOTENDS."
- #endif
-#elif TEMP_SENSOR_1 != 0
- #error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND."
-#elif TEMP_SENSOR_2 != 0
- #error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND."
-#elif TEMP_SENSOR_3 != 0
- #error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND."
-#elif TEMP_SENSOR_4 != 0
- #error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND."
-#elif TEMP_SENSOR_5 != 0
- #error "TEMP_SENSOR_5 shouldn't be set with only 1 HOTEND."
-#elif TEMP_SENSOR_6 != 0
- #error "TEMP_SENSOR_6 shouldn't be set with only 1 HOTEND."
-#elif TEMP_SENSOR_7 != 0
- #error "TEMP_SENSOR_7 shouldn't be set with only 1 HOTEND."
+ #endif // HOTENDS > 7
+ #endif // HOTENDS > 6
+ #endif // HOTENDS > 5
+ #endif // HOTENDS > 4
+ #endif // HOTENDS > 3
+ #endif // HOTENDS > 2
#endif // HAS_MULTI_HOTEND
/**
@@ -3288,7 +3232,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if HAS_MOTOR_CURRENT_I2C
#if BOTH(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#error "Enable only one of DIGIPOT_MCP4018 or DIGIPOT_MCP4451."
-#elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \
+ #elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \
&& (!defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1))
#error "DIGIPOT_MCP4018/4451 requires DIGIPOTS_I2C_SDA_* pins to be defined."
#endif
diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp
index aba3d94366..5e7aba3421 100644
--- a/Marlin/src/inc/Warnings.cpp
+++ b/Marlin/src/inc/Warnings.cpp
@@ -35,6 +35,26 @@
#warning "WARNING! Disable MARLIN_DEV_MODE for the final build!"
#endif
+// Safety Features
+#if DISABLED(USE_WATCHDOG)
+ #warning "Safety Alert! Enable USE_WATCHDOG for the final build!"
+#endif
+#if HAS_HOTEND && DISABLED(THERMAL_PROTECTION_HOTENDS)
+ #warning "Safety Alert! Enable THERMAL_PROTECTION_HOTENDS for the final build!"
+#endif
+#if HAS_HEATED_BED && DISABLED(THERMAL_PROTECTION_BED)
+ #warning "Safety Alert! Enable THERMAL_PROTECTION_BED for the final build!"
+#endif
+#if HAS_HEATED_CHAMBER && DISABLED(THERMAL_PROTECTION_CHAMBER)
+ #warning "Safety Alert! Enable THERMAL_PROTECTION_CHAMBER for the final build!"
+#endif
+#if HAS_COOLER && DISABLED(THERMAL_PROTECTION_COOLER)
+ #warning "Safety Alert! Enable THERMAL_PROTECTION_COOLER for the final build!"
+#endif
+#if ANY_THERMISTOR_IS(998) || ANY_THERMISTOR_IS(999)
+ #warning "Warning! Don't use dummy thermistors (998/999) for final build!"
+#endif
+
#if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT)
#warning "Your Configuration provides no method to acquire user feedback!"
#endif
diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp
index 6d4f8b0a3a..e53ca4f3ff 100644
--- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp
+++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp
@@ -419,7 +419,7 @@ void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=fal
if (isnan(value))
DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F(" NaN"));
else {
- DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value) * minunit);
+ DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value));
DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), value < 0 ? F("-") : F(" "));
}
}
@@ -855,7 +855,7 @@ void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) {
}
if (zoffsetvalue != offset) {
offset = zoffsetvalue;
- DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue) * 100);
+ DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue));
DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 205, 419, zoffsetvalue < 0 ? F("-") : F(" "));
}
#endif
diff --git a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp
index 069272f6c1..8892f1a004 100644
--- a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp
+++ b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h b/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h
index de87c30b6b..a91cd19f6e 100644
--- a/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h
+++ b/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
index 9ad258b3ac..ca8e6c177f 100644
--- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
+++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
index 0e2f3a3d4c..703db2ee45 100644
--- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
+++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp
index 4fce364f81..1d97902c71 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h
index 2a679648d1..1869f79404 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
index 8567e5c0e7..baae2538a0 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h
index 593b2e3bb8..c2e6e4308e 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp
index 6316f1194b..02cc3d6836 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h
index 402d8d3d38..0c5e066212 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp
index 0d94751fc2..48bea1cdc0 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h
index 20cd48c986..9e3866467f 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp
index 6c14745904..3fc48d2ebb 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h
index a034b92ece..94632fe385 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h
index 00cdecb689..4207119c87 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h
index 4047a6d6dc..9b275fb2f5 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h
index 92d2f5ece2..650e1e3a1d 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h
index 886109054c..e1c1bf557f 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h
index b3d2ad6d3c..0a738223ce 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp
index 95e6444956..1627d44c84 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h
index af05c46d28..1e481ef3cc 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp
index 213e430334..13319edd05 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h
index 3b9208e5ec..93df5ad90a 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h
index b1b6792224..30b3f9ddba 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp
index 486f00f6ed..27b6d9036c 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h
index d481fbab5c..1a4f36882c 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h
+++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp
index 4d57fbd7e2..26f2dcbde9 100644
--- a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp
+++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp
index d59ebe5695..0f6395b127 100644
--- a/Marlin/src/module/temperature.cpp
+++ b/Marlin/src/module/temperature.cpp
@@ -2207,22 +2207,22 @@ void Temperature::init() {
// Thermistor activation by MCU pin
#if PIN_EXISTS(TEMP_0_TR_ENABLE)
- OUT_WRITE(TEMP_0_TR_ENABLE_PIN,
+ OUT_WRITE(TEMP_0_TR_ENABLE_PIN, (
#if TEMP_SENSOR_IS_ANY_MAX_TC(0)
- 1
+ HIGH
#else
- 0
+ LOW
#endif
- );
+ ));
#endif
#if PIN_EXISTS(TEMP_1_TR_ENABLE)
- OUT_WRITE(TEMP_1_TR_ENABLE_PIN,
+ OUT_WRITE(TEMP_1_TR_ENABLE_PIN, (
#if TEMP_SENSOR_IS_ANY_MAX_TC(1)
- 1
+ HIGH
#else
- 0
+ LOW
#endif
- );
+ ));
#endif
#if HAS_HEATER_0
diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h
index 28a1e2f90f..85f4449636 100644
--- a/Marlin/src/module/thermistor/thermistors.h
+++ b/Marlin/src/module/thermistor/thermistors.h
@@ -42,18 +42,6 @@
#define OV_SCALE(N) (N)
#define OV(N) int16_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE))
-#define TEMP_SENSOR_IS(n,H) (n == TEMP_SENSOR_##H)
-#define ANY_THERMISTOR_IS(n) ( TEMP_SENSOR_IS(n, 0) || TEMP_SENSOR_IS(n, 1) \
- || TEMP_SENSOR_IS(n, 2) || TEMP_SENSOR_IS(n, 3) \
- || TEMP_SENSOR_IS(n, 4) || TEMP_SENSOR_IS(n, 5) \
- || TEMP_SENSOR_IS(n, 6) || TEMP_SENSOR_IS(n, 7) \
- || TEMP_SENSOR_IS(n, BED) \
- || TEMP_SENSOR_IS(n, CHAMBER) \
- || TEMP_SENSOR_IS(n, COOLER) \
- || TEMP_SENSOR_IS(n, PROBE) \
- || TEMP_SENSOR_IS(n, BOARD) \
- || TEMP_SENSOR_IS(n, REDUNDANT) )
-
typedef struct { int16_t value; celsius_t celsius; } temp_entry_t;
// Pt1000 and Pt100 handling
diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp
index cb551647d7..8f419205f3 100644
--- a/Marlin/src/module/tool_change.cpp
+++ b/Marlin/src/module/tool_change.cpp
@@ -954,7 +954,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
#if ENABLED(TOOLCHANGE_NO_RETURN)
const float temp = destination.z;
destination = current_position;
- destination.z = temp.z;
+ destination.z = temp;
#endif
prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)));
}
@@ -1307,7 +1307,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
TERN_(HAS_FANMUX, fanmux_switch(active_extruder));
- if (!no_move) {
+ if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
#ifdef EVENT_GCODE_TOOLCHANGE_T0
if (new_tool == 0)
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_TOOLCHANGE_T0));
diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
index 2b847d339f..7f428fc918 100644
--- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
+++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
@@ -31,4 +31,4 @@
// Include SKR 1.4 pins
//
#define REQUIRE_LPC1769
-#include "../lpc1768/pins_BTT_SKR_V1_4.h"
+#include "../lpc1768/pins_BTT_SKR_V1_4.h" // ... BTT_SKR_common
diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h
index fe670cca29..8a4350d90e 100644
--- a/Marlin/src/pins/pinsDebug_list.h
+++ b/Marlin/src/pins/pinsDebug_list.h
@@ -26,9 +26,9 @@
// If the new pin name is over 28 characters long then pinsDebug.h will need to be modified.
#if TARGET_LPC1768
- #define ANALOG_OK(PN) ((PN) == P0_02 || (PN) == P0_03 || (PN) == P0_23 || (PN) == P0_24 || (PN) == P0_25 || (PN) == P0_26 || (PN) == P1_30 || (PN) == P1_31)
+ #define ANALOG_OK(PN) (WITHIN(PN, P0_02, P0_03) || WITHIN(PN, P0_23, P0_26) || WITHIN(PN, P1_30, P1_31))
#else
- #define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_INPUTS)
+ #define ANALOG_OK(PN) WITHIN(PN, 0, NUM_ANALOG_INPUTS - 1)
#endif
#line 35 // set __LINE__ to a known value for both passes
@@ -37,86 +37,130 @@
// Analog Pin Assignments
//
-#if defined(EXT_AUX_A0) && ANALOG_OK(EXT_AUX_A0)
+#define _EXISTS(PN,V...) (defined(PN##V) && PN##V >= 0)
+
+#if _EXISTS(EXT_AUX_A0)
+ #if ANALOG_OK(EXT_AUX_A0)
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
#endif
-#if defined(EXT_AUX_A1) && ANALOG_OK(EXT_AUX_A0)
- REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A1)
#endif
-#if defined(EXT_AUX_A2) && ANALOG_OK(EXT_AUX_A0)
- REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A2)
+#if _EXISTS(EXT_AUX_A1)
+ #if ANALOG_OK(EXT_AUX_A0)
+ REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
+ #endif
#endif
-#if defined(EXT_AUX_A3) && ANALOG_OK(EXT_AUX_A0)
- REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A3)
+#if _EXISTS(EXT_AUX_A2)
+ #if ANALOG_OK(EXT_AUX_A0)
+ REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
+ #endif
+#endif
+#if _EXISTS(EXT_AUX_A3)
+ #if ANALOG_OK(EXT_AUX_A0)
+ REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
+ #endif
#endif
-#if defined(EXT_AUX_A4) && ANALOG_OK(EXT_AUX_A0)
- REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A4)
+#if _EXISTS(EXT_AUX_A4)
+ #if ANALOG_OK(EXT_AUX_A0)
+ REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
+ #endif
#endif
-#if PIN_EXISTS(FILWIDTH) && ANALOG_OK(FILWIDTH_PIN)
- REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN)
+#if PIN_EXISTS(FILWIDTH)
+ #if ANALOG_OK(FILWIDTH_PIN)
+ REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN)
+ #endif
#endif
-#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) && ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN)
- REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN)
+#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE)
+ #if ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN)
+ REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN)
+ #endif
#endif
#if !defined(ARDUINO_ARCH_SAM) && !defined(ARDUINO_ARCH_SAMD) // TC1 & TC2 are macros in the SAM/SAMD tool chain
- #if defined(TC1) && ANALOG_OK(TC1)
+ #if _EXISTS(TC1)
+ #if ANALOG_OK(TC1)
REPORT_NAME_ANALOG(__LINE__, TC1)
#endif
- #if defined(TC2) && ANALOG_OK(TC1)
- REPORT_NAME_ANALOG(__LINE__, TC2)
+ #endif
+ #if _EXISTS(TC2)
+ #if ANALOG_OK(TC1)
+ REPORT_NAME_ANALOG(__LINE__, TC1)
+ #endif
#endif
#endif
-#if PIN_EXISTS(TEMP_0) && ANALOG_OK(TEMP_0_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN)
+#if PIN_EXISTS(TEMP_0)
+ #if ANALOG_OK(TEMP_0_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_1) && ANALOG_OK(TEMP_1_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN)
+#if PIN_EXISTS(TEMP_1)
+ #if ANALOG_OK(TEMP_1_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_2) && ANALOG_OK(TEMP_2_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN)
+#if PIN_EXISTS(TEMP_2)
+ #if ANALOG_OK(TEMP_2_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_3) && ANALOG_OK(TEMP_3_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN)
+#if PIN_EXISTS(TEMP_3)
+ #if ANALOG_OK(TEMP_3_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_4) && ANALOG_OK(TEMP_4_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN)
+#if PIN_EXISTS(TEMP_4)
+ #if ANALOG_OK(TEMP_4_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_5) && ANALOG_OK(TEMP_5_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN)
+#if PIN_EXISTS(TEMP_5)
+ #if ANALOG_OK(TEMP_5_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_6) && ANALOG_OK(TEMP_6_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN)
+#if PIN_EXISTS(TEMP_6)
+ #if ANALOG_OK(TEMP_6_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_7) && ANALOG_OK(TEMP_7_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN)
+#if PIN_EXISTS(TEMP_7)
+ #if ANALOG_OK(TEMP_7_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_BED) && ANALOG_OK(TEMP_BED_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN)
+#if PIN_EXISTS(TEMP_BED)
+ #if ANALOG_OK(TEMP_BED_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_CHAMBER) && ANALOG_OK(TEMP_CHAMBER_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN)
+#if PIN_EXISTS(TEMP_CHAMBER)
+ #if ANALOG_OK(TEMP_CHAMBER_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN)
+ #endif
#endif
-#if PIN_EXISTS(TEMP_COOLER) && ANALOG_OK(TEMP_COOLER_PIN)
- REPORT_NAME_ANALOG(__LINE__, TEMP_COOLER_PIN)
+#if PIN_EXISTS(TEMP_COOLER)
+ #if ANALOG_OK(TEMP_COOLER_PIN)
+ REPORT_NAME_ANALOG(__LINE__, TEMP_COOLER_PIN)
+ #endif
#endif
-#if PIN_EXISTS(ADC_KEYPAD) && ANALOG_OK(ADC_KEYPAD_PIN)
- REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN)
+#if PIN_EXISTS(ADC_KEYPAD)
+ #if ANALOG_OK(ADC_KEYPAD_PIN)
+ REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN)
+ #endif
#endif
//
// Digital Pin Assignments
//
-#if defined(__FD) && __FD >= 0
+#if _EXISTS(__FD)
REPORT_NAME_DIGITAL(__LINE__, __FD)
#endif
-#if defined(__FS) && __FS >= 0
+#if _EXISTS(__FS)
REPORT_NAME_DIGITAL(__LINE__, __FS)
#endif
-#if defined(__GD) && __GD >= 0
+#if _EXISTS(__GD)
REPORT_NAME_DIGITAL(__LINE__, __GD)
#endif
-#if defined(__GS) && __GS >= 0
+#if _EXISTS(__GS)
REPORT_NAME_DIGITAL(__LINE__, __GS)
#endif
#if PIN_EXISTS(AVR_MISO)
@@ -137,46 +181,46 @@
#if PIN_EXISTS(BEEPER)
REPORT_NAME_DIGITAL(__LINE__, BEEPER_PIN)
#endif
-#if defined(BTN_BACK) && BTN_BACK >= 0
+#if _EXISTS(BTN_BACK)
REPORT_NAME_DIGITAL(__LINE__, BTN_BACK)
#endif
-#if defined(BTN_CENTER) && BTN_CENTER >= 0
+#if _EXISTS(BTN_CENTER)
REPORT_NAME_DIGITAL(__LINE__, BTN_CENTER)
#endif
-#if defined(BTN_DOWN) && BTN_DOWN >= 0
+#if _EXISTS(BTN_DOWN)
REPORT_NAME_DIGITAL(__LINE__, BTN_DOWN)
#endif
-#if defined(BTN_DWN) && BTN_DWN >= 0
+#if _EXISTS(BTN_DWN)
REPORT_NAME_DIGITAL(__LINE__, BTN_DWN)
#endif
-#if defined(BTN_EN1) && BTN_EN1 >= 0
+#if _EXISTS(BTN_EN1)
REPORT_NAME_DIGITAL(__LINE__, BTN_EN1)
#endif
-#if defined(BTN_EN2) && BTN_EN2 >= 0
+#if _EXISTS(BTN_EN2)
REPORT_NAME_DIGITAL(__LINE__, BTN_EN2)
#endif
-#if defined(BTN_ENC_EN) && BTN_ENC_EN >= 0
+#if _EXISTS(BTN_ENC_EN)
REPORT_NAME_DIGITAL(__LINE__, BTN_ENC_EN)
#endif
-#if defined(BTN_ENC) && BTN_ENC >= 0
+#if _EXISTS(BTN_ENC)
REPORT_NAME_DIGITAL(__LINE__, BTN_ENC)
#endif
-#if defined(BTN_HOME) && BTN_HOME >= 0
+#if _EXISTS(BTN_HOME)
REPORT_NAME_DIGITAL(__LINE__, BTN_HOME)
#endif
-#if defined(BTN_LEFT) && BTN_LEFT >= 0
+#if _EXISTS(BTN_LEFT)
REPORT_NAME_DIGITAL(__LINE__, BTN_LEFT)
#endif
-#if defined(BTN_LFT) && BTN_LFT >= 0
+#if _EXISTS(BTN_LFT)
REPORT_NAME_DIGITAL(__LINE__, BTN_LFT)
#endif
-#if defined(BTN_RIGHT) && BTN_RIGHT >= 0
+#if _EXISTS(BTN_RIGHT)
REPORT_NAME_DIGITAL(__LINE__, BTN_RIGHT)
#endif
-#if defined(BTN_RT) && BTN_RT >= 0
+#if _EXISTS(BTN_RT)
REPORT_NAME_DIGITAL(__LINE__, BTN_RT)
#endif
-#if defined(BTN_UP) && BTN_UP >= 0
+#if _EXISTS(BTN_UP)
REPORT_NAME_DIGITAL(__LINE__, BTN_UP)
#endif
#if PIN_EXISTS(JOY_X)
@@ -287,10 +331,10 @@
#if PIN_EXISTS(CUTOFF_TEST)
REPORT_NAME_DIGITAL(__LINE__, CUTOFF_TEST_PIN)
#endif
-#if defined(D57) && D57 >= 0
+#if _EXISTS(D57)
REPORT_NAME_DIGITAL(__LINE__, D57)
#endif
-#if defined(D58) && D58 >= 0
+#if _EXISTS(D58)
REPORT_NAME_DIGITAL(__LINE__, D58)
#endif
#if PIN_EXISTS(DAC_DISABLE)
@@ -305,49 +349,49 @@
#if PIN_EXISTS(DEBUG)
REPORT_NAME_DIGITAL(__LINE__, DEBUG_PIN)
#endif
-#if defined(DIGIPOTS_I2C_SCL) && DIGIPOTS_I2C_SCL >= 0
+#if _EXISTS(DIGIPOTS_I2C_SCL)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SCL)
#endif
-#if defined(DIGIPOTS_I2C_SDA_E0) && DIGIPOTS_I2C_SDA_E0 >= 0
+#if _EXISTS(DIGIPOTS_I2C_SDA_E0)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E0)
#endif
-#if defined(DIGIPOTS_I2C_SDA_E1) && DIGIPOTS_I2C_SDA_E1 >= 0
+#if _EXISTS(DIGIPOTS_I2C_SDA_E1)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E1)
#endif
-#if defined(DIGIPOTS_I2C_SDA_X) && DIGIPOTS_I2C_SDA_X >= 0
+#if _EXISTS(DIGIPOTS_I2C_SDA_X)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_X)
#endif
-#if defined(DIGIPOTS_I2C_SDA_Y) && DIGIPOTS_I2C_SDA_Y >= 0
+#if _EXISTS(DIGIPOTS_I2C_SDA_Y)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Y)
#endif
-#if defined(DIGIPOTS_I2C_SDA_Z) && DIGIPOTS_I2C_SDA_Z >= 0
+#if _EXISTS(DIGIPOTS_I2C_SDA_Z)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Z)
#endif
#if PIN_EXISTS(DIGIPOTSS)
REPORT_NAME_DIGITAL(__LINE__, DIGIPOTSS_PIN)
#endif
-#if defined(DOGLCD_A0) && DOGLCD_A0 >= 0
+#if _EXISTS(DOGLCD_A0)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_A0)
#endif
-#if defined(DOGLCD_CS) && DOGLCD_CS >= 0
+#if _EXISTS(DOGLCD_CS)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_CS)
#endif
-#if defined(DOGLCD_MOSI) && DOGLCD_MOSI >= 0
+#if _EXISTS(DOGLCD_MOSI)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_MOSI)
#endif
-#if defined(DOGLCD_SCK) && DOGLCD_SCK >= 0
+#if _EXISTS(DOGLCD_SCK)
REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SCK)
#endif
-#if defined(TMC_SW_MISO) && TMC_SW_MISO >= 0
+#if _EXISTS(TMC_SW_MISO)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO)
#endif
-#if defined(TMC_SW_MOSI) && TMC_SW_MOSI >= 0
+#if _EXISTS(TMC_SW_MOSI)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI)
#endif
-#if defined(TMC_SW_SCK) && TMC_SW_SCK >= 0
+#if _EXISTS(TMC_SW_SCK)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK)
#endif
-#if defined(TFTGLCD_CS) && TFTGLCD_CS >= 0
+#if _EXISTS(TFTGLCD_CS)
REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS)
#endif
#if PIN_EXISTS(E_MUX0)
@@ -557,71 +601,71 @@
#if PIN_EXISTS(E7_STEP)
REPORT_NAME_DIGITAL(__LINE__, E7_STEP_PIN)
#endif
-#if defined(ENET_CRS) && ENET_CRS >= 0
+#if _EXISTS(ENET_CRS)
REPORT_NAME_DIGITAL(__LINE__, ENET_CRS)
#endif
-#if defined(ENET_MDIO) && ENET_MDIO >= 0
+#if _EXISTS(ENET_MDIO)
REPORT_NAME_DIGITAL(__LINE__, ENET_MDIO)
#endif
-#if defined(ENET_MOC) && ENET_MOC >= 0
+#if _EXISTS(ENET_MOC)
REPORT_NAME_DIGITAL(__LINE__, ENET_MOC)
#endif
-#if defined(ENET_RX_ER) && ENET_RX_ER >= 0
+#if _EXISTS(ENET_RX_ER)
REPORT_NAME_DIGITAL(__LINE__, ENET_RX_ER)
#endif
-#if defined(ENET_RXD0) && ENET_RXD0 >= 0
+#if _EXISTS(ENET_RXD0)
REPORT_NAME_DIGITAL(__LINE__, ENET_RXD0)
#endif
-#if defined(ENET_RXD1) && ENET_RXD1 >= 0
+#if _EXISTS(ENET_RXD1)
REPORT_NAME_DIGITAL(__LINE__, ENET_RXD1)
#endif
-#if defined(ENET_TX_EN) && ENET_TX_EN >= 0
+#if _EXISTS(ENET_TX_EN)
REPORT_NAME_DIGITAL(__LINE__, ENET_TX_EN)
#endif
-#if defined(ENET_TXD0) && ENET_TXD0 >= 0
+#if _EXISTS(ENET_TXD0)
REPORT_NAME_DIGITAL(__LINE__, ENET_TXD0)
#endif
-#if defined(ENET_TXD1) && ENET_TXD1 >= 0
+#if _EXISTS(ENET_TXD1)
REPORT_NAME_DIGITAL(__LINE__, ENET_TXD1)
#endif
#if PIN_EXISTS(EXP_VOLTAGE_LEVEL)
REPORT_NAME_DIGITAL(__LINE__, EXP_VOLTAGE_LEVEL_PIN)
#endif
-#if defined(EXT_AUX_A0_IO) && EXT_AUX_A0_IO >= 0
+#if _EXISTS(EXT_AUX_A0_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A0_IO)
#endif
-#if defined(EXT_AUX_A1_IO) && EXT_AUX_A1_IO >= 0
+#if _EXISTS(EXT_AUX_A1_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A1_IO)
#endif
-#if defined(EXT_AUX_A2_IO) && EXT_AUX_A2_IO >= 0
+#if _EXISTS(EXT_AUX_A2_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A2_IO)
#endif
-#if defined(EXT_AUX_A3_IO) && EXT_AUX_A3_IO >= 0
+#if _EXISTS(EXT_AUX_A3_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A3_IO)
#endif
-#if defined(EXT_AUX_A4_IO) && EXT_AUX_A4_IO >= 0
+#if _EXISTS(EXT_AUX_A4_IO)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A4_IO)
#endif
-#if defined(EXT_AUX_PWM_D24) && EXT_AUX_PWM_D24 >= 0
+#if _EXISTS(EXT_AUX_PWM_D24)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_PWM_D24)
#endif
-#if defined(EXT_AUX_RX1_D2) && EXT_AUX_RX1_D2 >= 0
+#if _EXISTS(EXT_AUX_RX1_D2)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_RX1_D2)
#endif
-#if defined(EXT_AUX_SCL_D0) && EXT_AUX_SCL_D0 >= 0
+#if _EXISTS(EXT_AUX_SCL_D0)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SCL_D0)
#endif
-#if defined(EXT_AUX_SDA_D1) && EXT_AUX_SDA_D1 >= 0
+#if _EXISTS(EXT_AUX_SDA_D1)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SDA_D1)
#endif
-#if defined(EXT_AUX_TX1_D3) && EXT_AUX_TX1_D3 >= 0
+#if _EXISTS(EXT_AUX_TX1_D3)
REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_TX1_D3)
#endif
-#if defined(EXTRUDER_0_AUTO_FAN) && EXTRUDER_0_AUTO_FAN >= 0
+#if _EXISTS(EXTRUDER_0_AUTO_FAN)
REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_0_AUTO_FAN)
#endif
-#if defined(EXTRUDER_1_AUTO_FAN) && EXTRUDER_1_AUTO_FAN >= 0
+#if _EXISTS(EXTRUDER_1_AUTO_FAN)
REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_1_AUTO_FAN)
#endif
#if PIN_EXISTS(FAN)
@@ -735,25 +779,25 @@
#if PIN_EXISTS(LCD_BACKLIGHT)
REPORT_NAME_DIGITAL(__LINE__, LCD_BACKLIGHT_PIN)
#endif
-#if defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0
+#if _EXISTS(LCD_PINS_D4)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D4)
#endif
-#if defined(LCD_PINS_D5) && LCD_PINS_D5 >= 0
+#if _EXISTS(LCD_PINS_D5)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D5)
#endif
-#if defined(LCD_PINS_D6) && LCD_PINS_D6 >= 0
+#if _EXISTS(LCD_PINS_D6)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D6)
#endif
-#if defined(LCD_PINS_D7) && LCD_PINS_D7 >= 0
+#if _EXISTS(LCD_PINS_D7)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D7)
#endif
-#if defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0
+#if _EXISTS(LCD_PINS_ENABLE)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_ENABLE)
#endif
-#if defined(LCD_PINS_RS) && LCD_PINS_RS >= 0
+#if _EXISTS(LCD_PINS_RS)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_RS)
#endif
-#if defined(LCD_SDSS) && LCD_SDSS >= 0
+#if _EXISTS(LCD_SDSS)
REPORT_NAME_DIGITAL(__LINE__, LCD_SDSS)
#endif
#if PIN_EXISTS(LED_GREEN)
@@ -799,9 +843,9 @@
REPORT_NAME_DIGITAL(__LINE__, MAX7219_LOAD_PIN)
#endif
-// #if defined(MISO) && MISO >= 0
-// REPORT_NAME_DIGITAL(__LINE__, MISO)
-// #endif
+//#if _EXISTS(MISO)
+// REPORT_NAME_DIGITAL(__LINE__, MISO)
+//#endif
#if PIN_EXISTS(MISO)
REPORT_NAME_DIGITAL(__LINE__, SD_MISO_PIN)
#endif
@@ -817,9 +861,9 @@
#if PIN_EXISTS(MOSFET_D)
REPORT_NAME_DIGITAL(__LINE__, MOSFET_D_PIN)
#endif
-// #if defined(MOSI) && MOSI >= 0
-// REPORT_NAME_DIGITAL(__LINE__, MOSI)
-// #endif
+//#if _EXISTS(MOSI)
+// REPORT_NAME_DIGITAL(__LINE__, MOSI)
+//#endif
#if PIN_EXISTS(MOSI)
REPORT_NAME_DIGITAL(__LINE__, SD_MOSI_PIN)
#endif
@@ -862,7 +906,7 @@
#if PIN_EXISTS(PWM_2)
REPORT_NAME_DIGITAL(__LINE__, PWM_2_PIN)
#endif
-#if defined(REF_CLK) && REF_CLK >= 0
+#if _EXISTS(REF_CLK)
REPORT_NAME_DIGITAL(__LINE__, REF_CLK)
#endif
#if PIN_EXISTS(RAMPS_D10)
@@ -898,28 +942,28 @@
#if PIN_EXISTS(SAFETY_TRIGGERED)
REPORT_NAME_DIGITAL(__LINE__, SAFETY_TRIGGERED_PIN)
#endif
-// #if defined(SCK) && SCK >= 0
-// REPORT_NAME_DIGITAL(__LINE__, SCK)
-// #endif
+//#if _EXISTS(SCK)
+// REPORT_NAME_DIGITAL(__LINE__, SCK)
+//#endif
#if PIN_EXISTS(SCK)
REPORT_NAME_DIGITAL(__LINE__, SD_SCK_PIN)
#endif
-// #if defined(SCL) && SCL >= 0
-// REPORT_NAME_DIGITAL(__LINE__, SCL)
-// #endif
+//#if _EXISTS(SCL)
+// REPORT_NAME_DIGITAL(__LINE__, SCL)
+//#endif
#if PIN_EXISTS(SD_DETECT)
REPORT_NAME_DIGITAL(__LINE__, SD_DETECT_PIN)
#endif
-// #if defined(SDA) && SDA >= 0
-// REPORT_NAME_DIGITAL(__LINE__, SDA)
-// #endif
+//#if _EXISTS(SDA)
+// REPORT_NAME_DIGITAL(__LINE__, SDA)
+//#endif
#if PIN_EXISTS(SDPOWER)
REPORT_NAME_DIGITAL(__LINE__, SDPOWER_PIN)
#endif
-#if defined(SDSS) && SDSS >= 0
+#if _EXISTS(SDSS)
REPORT_NAME_DIGITAL(__LINE__, SDSS)
#endif
-#if defined(SERVO0) && SERVO0 >= 0
+#if _EXISTS(SERVO0)
REPORT_NAME_DIGITAL(__LINE__, SERVO0)
#endif
#if PIN_EXISTS(SERVO0)
@@ -976,7 +1020,7 @@
#if PIN_EXISTS(SOL7)
REPORT_NAME_DIGITAL(__LINE__, SOL7_PIN)
#endif
-#if defined(SPARE_IO) && SPARE_IO >= 0
+#if _EXISTS(SPARE_IO)
REPORT_NAME_DIGITAL(__LINE__, SPARE_IO)
#endif
#if PIN_EXISTS(SPI_EEPROM1_CS)
@@ -1015,7 +1059,7 @@
#if PIN_EXISTS(STAT_LED_BLUE)
REPORT_NAME_DIGITAL(__LINE__, STAT_LED_BLUE_PIN)
#endif
-#if defined(STAT_LED_RED_LED) && STAT_LED_RED_LED >= 0
+#if _EXISTS(STAT_LED_RED_LED)
REPORT_NAME_DIGITAL(__LINE__, STAT_LED_RED_LED)
#endif
#if PIN_EXISTS(STAT_LED_RED)
@@ -1069,13 +1113,13 @@
#if PIN_EXISTS(TX_ENABLE)
REPORT_NAME_DIGITAL(__LINE__, TX_ENABLE_PIN)
#endif
-#if defined(UI1) && UI1 >= 0
+#if _EXISTS(UI1)
REPORT_NAME_DIGITAL(__LINE__, UI1)
#endif
-#if defined(UI2) && UI2 >= 0
+#if _EXISTS(UI2)
REPORT_NAME_DIGITAL(__LINE__, UI2)
#endif
-#if defined(UNUSED_PWM) && UNUSED_PWM >= 0
+#if _EXISTS(UNUSED_PWM)
REPORT_NAME_DIGITAL(__LINE__, UNUSED_PWM)
#endif
#if PIN_EXISTS(X_ATT)
diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h
index 07af61e693..ee8cafa897 100644
--- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h
+++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h
@@ -43,7 +43,7 @@
#define SERVO0_PIN 44 // SERVO1 port
#define SERVO1_PIN 55 // SERVO2 port
-#include "pins_RAMPS_13.h"
+#include "pins_RAMPS_13.h" // ... RAMPS
//
// LCD / Controller
diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
index 7715eca7eb..4d7c67fc39 100644
--- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
+++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
@@ -115,7 +115,7 @@
//
// Import RAMPS 1.3 pins
//
-#include "pins_RAMPS_13.h"
+#include "pins_RAMPS_13.h" // ... RAMPS
//
// Used by the Hephestos 2 heated bed upgrade kit
diff --git a/Marlin/src/pins/ramps/pins_K8200.h b/Marlin/src/pins/ramps/pins_K8200.h
index df685e0f0c..395e1ccca5 100644
--- a/Marlin/src/pins/ramps/pins_K8200.h
+++ b/Marlin/src/pins/ramps/pins_K8200.h
@@ -30,4 +30,4 @@
#define DEFAULT_MACHINE_NAME "K8200"
#define DEFAULT_SOURCE_CODE_URL "github.com/CONSULitAS/Marlin-K8200"
-#include "pins_3DRAG.h"
+#include "pins_3DRAG.h" // ... RAMPS
diff --git a/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h
index bed2238162..36c438aca2 100644
--- a/Marlin/src/pins/ramps/pins_K8400.h
+++ b/Marlin/src/pins/ramps/pins_K8400.h
@@ -50,7 +50,7 @@
#define X_STOP_PIN 3
#define Y_STOP_PIN 14
-#include "pins_3DRAG.h"
+#include "pins_3DRAG.h" // ... RAMPS
//
// Heaters / Fans
diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
index ccf7ab6793..6b48e3cbd6 100644
--- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
+++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
@@ -117,4 +117,4 @@
// Other RAMPS 1.3 pins
//
#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined.
-#include "pins_RAMPS_13.h"
+#include "pins_RAMPS_13.h" // ... RAMPS
diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_10.h b/Marlin/src/pins/ramps/pins_MKS_BASE_10.h
index 0be58653aa..c40cabe325 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_10.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_10.h
@@ -34,4 +34,4 @@
#define BOARD_INFO_NAME "MKS BASE 1.0"
#define MKS_BASE_VERSION 10
-#include "pins_MKS_BASE_common.h"
+#include "pins_MKS_BASE_common.h" // ... RAMPS
diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
index 3612f9b894..992ab92ee9 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
@@ -58,7 +58,7 @@
#define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11
#endif
-#include "pins_MKS_BASE_common.h"
+#include "pins_MKS_BASE_common.h" // ... RAMPS
/*
Available connectors on MKS BASE v1.4
diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_15.h b/Marlin/src/pins/ramps/pins_MKS_BASE_15.h
index 9e670d1bbd..2b0c2bb883 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_15.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_15.h
@@ -32,4 +32,4 @@
#define BOARD_INFO_NAME "MKS BASE 1.5"
#define MKS_BASE_VERSION 15
-#include "pins_MKS_BASE_common.h"
+#include "pins_MKS_BASE_common.h" // ... RAMPS
diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_16.h b/Marlin/src/pins/ramps/pins_MKS_BASE_16.h
index a4dfca21b4..31a8fdab8d 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_16.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_16.h
@@ -56,4 +56,4 @@
#define PS_ON_PIN -1
#endif
-#include "pins_MKS_BASE_common.h"
+#include "pins_MKS_BASE_common.h" // ... RAMPS
diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h b/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
index 3ce138b975..973f924e7c 100644
--- a/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
+++ b/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
@@ -25,7 +25,7 @@
* MKS BASE with Heroic HR4982 stepper drivers
*/
-#include "pins_MKS_BASE_15.h"
+#include "pins_MKS_BASE_15.h" // ... MKS_BASE_common ... RAMPS
/**
* Some new boards use HR4982 (Heroic) instead of the A4982 (Allegro) stepper drivers.
diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
index 5a6bba3c08..8242f1a772 100644
--- a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
+++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
@@ -27,7 +27,7 @@
#define BOARD_INFO_NAME "RigidBoard V2"
-#include "pins_RIGIDBOARD.h"
+#include "pins_RIGIDBOARD.h" // ... RAMPS
//
// Steppers
diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
index ce9e4e5466..eee0dcd3d2 100644
--- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
+++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
@@ -41,4 +41,4 @@
#define E0_AUTO_FAN_PIN 9
#endif
-#include "pins_RAMPS_13.h"
+#include "pins_RAMPS_13.h" // ... RAMPS
diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V20.h b/Marlin/src/pins/ramps/pins_ZRIB_V20.h
index 6c4b28d0b8..e9328ca7ba 100644
--- a/Marlin/src/pins/ramps/pins_ZRIB_V20.h
+++ b/Marlin/src/pins/ramps/pins_ZRIB_V20.h
@@ -26,7 +26,7 @@
* V2 and V3 Boards only differ in USB controller, nothing affecting the pins.
*/
-#include "pins_MKS_GEN_13.h"
+#include "pins_MKS_GEN_13.h" // ... RAMPS
#define ZRIB_V20_D6_PIN 6 // Fan
#define ZRIB_V20_D9_PIN 9 // Fan2
diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h
index f4db07ef8d..a6e9175b62 100644
--- a/Marlin/src/pins/ramps/pins_ZRIB_V52.h
+++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h
@@ -48,7 +48,7 @@
#define E2_ENABLE_PIN 22
#define HEATER_1_PIN 7
-#include "pins_MKS_BASE_common.h"
+#include "pins_MKS_BASE_common.h" // ... RAMPS
/*
Available connectors on MKS BASE v1.4 (Basically same as ZRIB V5.2)
diff --git a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
index c3c38eb6f3..3edb14ec41 100644
--- a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
+++ b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
@@ -27,4 +27,4 @@
#define BOARD_INFO_NAME "Azteeg X1"
-#include "pins_SANGUINOLOLU_12.h"
+#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11
diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h
index 31583fd109..37b28c0089 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI.h
@@ -44,4 +44,4 @@
#endif
#endif
-#include "pins_SANGUINOLOLU_12.h"
+#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
index 3c6dd901c0..cb7ecdbe1f 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
@@ -42,7 +42,7 @@
#define BOARD_ST7920_DELAY_3 125
#endif
-#include "pins_MELZI.h"
+#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
//
// For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h b/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h
index 0e09c1f005..447eca7e3c 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h
@@ -26,4 +26,4 @@
*/
#define BOARD_INFO_NAME "Melzi (ATmega1284)"
-#include "pins_MELZI.h"
+#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
index 3bf8f80457..a0421dcf5c 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
@@ -27,7 +27,7 @@
#define BOARD_INFO_NAME "Melzi (Malyan)"
-#include "pins_MELZI.h"
+#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
#undef LCD_SDSS
#undef LCD_PINS_RS
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
index 8abed5c30c..19a75c2b32 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
@@ -34,7 +34,7 @@
#define BOARD_ST7920_DELAY_3 0
#endif
-#include "pins_MELZI.h"
+#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
#undef Z_ENABLE_PIN
#undef LCD_PINS_RS
diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h
index c3133432e0..48b3c5f913 100644
--- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h
+++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h
@@ -34,4 +34,4 @@
#define BOARD_ST7920_DELAY_3 0
#endif
-#include "pins_MELZI.h"
+#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
diff --git a/Marlin/src/pins/sanguino/pins_STB_11.h b/Marlin/src/pins/sanguino/pins_STB_11.h
index b10a09840a..ea36211f3b 100644
--- a/Marlin/src/pins/sanguino/pins_STB_11.h
+++ b/Marlin/src/pins/sanguino/pins_STB_11.h
@@ -27,4 +27,4 @@
#define BOARD_INFO_NAME "STB V1.1"
-#include "pins_SANGUINOLOLU_12.h"
+#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11
diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h
index 96420cf322..8133955224 100644
--- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h
+++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h
@@ -23,4 +23,4 @@
#define BOARD_INFO_NAME "BTT SKR Mini MZ V1.0"
-#include "pins_BTT_SKR_MINI_E3_V2_0.h"
+#include "pins_BTT_SKR_MINI_E3_V2_0.h" // ... BTT_SKR_MINI_E3_common
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
index 0d927cf7cb..718f9dc27a 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h
@@ -64,4 +64,4 @@
#endif
#endif
-#include "pins_MKS_ROBIN_E3_V1_1_common.h"
+#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common
diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h
index 002c35fe54..30720e0c7f 100644
--- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h
+++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h
@@ -33,4 +33,4 @@
#define BOARD_INFO_NAME "MKS Robin E3 V1.1"
#endif
-#include "pins_MKS_ROBIN_E3_V1_1_common.h"
+#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common
diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h
index d4f77d5f84..ba948bc479 100644
--- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h
+++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
index daacd0c124..093821bbd2 100644
--- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
+++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
index e0b2f6adfc..e19413aa5e 100644
--- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
+++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*/
#pragma once
diff --git a/buildroot/bin/mftest b/buildroot/bin/mftest
index 4ed1b9d951..9a58ba9cfc 100755
--- a/buildroot/bin/mftest
+++ b/buildroot/bin/mftest
@@ -155,7 +155,7 @@ if ((AUTO_BUILD)); then
BLINE=$( grep -E "define\s+BOARD_$MB\b" Marlin/src/core/boards.h )
BNUM=$( $SED -E 's/^.+BOARD_[^ ]+ +([0-9]+).+$/\1/' <<<"$BLINE" )
BDESC=$( $SED -E 's/^.+\/\/ *(.+)$/\1/' <<<"$BLINE" )
- [[ -z $BNUM ]] && { echo "Error - Can't find $MB in boards list." ; exit 1 ; }
+ [[ -z $BNUM ]] && { echo "Error - Can't find BOARD_$MB in core/boards.h." ; exit 1 ; }
ENVS=( $( grep -EA1 "MB\(.*\b$MB\b.*\)" Marlin/src/pins/pins.h | grep -E "#include.+//.+(env|$SYS):[^ ]+" | grep -oE "(env|$SYS):[^ ]+" | $SED -E "s/(env|$SYS)://" ) )
[[ -z $ENVS ]] && { errout "Error - Can't find target(s) for $MB ($BNUM)." ; exit 1 ; }
ECOUNT=${#ENVS[*]}
diff --git a/buildroot/share/PlatformIO/scripts/common-cxxflags.py b/buildroot/share/PlatformIO/scripts/common-cxxflags.py
index 856a246fba..26bff515a6 100644
--- a/buildroot/share/PlatformIO/scripts/common-cxxflags.py
+++ b/buildroot/share/PlatformIO/scripts/common-cxxflags.py
@@ -3,13 +3,16 @@
# Convenience script to apply customizations to CPP flags
#
Import("env")
-env.Append(CXXFLAGS=[
- "-Wno-register"
+
+cxxflags = [
#"-Wno-incompatible-pointer-types",
#"-Wno-unused-const-variable",
#"-Wno-maybe-uninitialized",
#"-Wno-sign-compare"
-])
+]
+if "teensy" not in env['PIOENV']:
+ cxxflags += ["-Wno-register"]
+env.Append(CXXFLAGS=cxxflags)
#
# Add CPU frequency as a compile time constant instead of a runtime variable
diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py
index 83dfeca879..f523b12069 100644
--- a/buildroot/share/PlatformIO/scripts/common-dependencies.py
+++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py
@@ -2,7 +2,12 @@
# common-dependencies.py
# Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
#
-import subprocess,os,re
+import subprocess,os,re,pioutil
+Import("env")
+
+# Detect that 'vscode init' is running
+if pioutil.is_vscode_init():
+ env.Exit(0)
PIO_VERSION_MIN = (5, 0, 3)
try:
@@ -31,8 +36,6 @@ except:
from platformio.package.meta import PackageSpec
from platformio.project.config import ProjectConfig
-Import("env")
-
#print(env.Dump())
try:
diff --git a/buildroot/share/PlatformIO/scripts/download_mks_assets.py b/buildroot/share/PlatformIO/scripts/download_mks_assets.py
index e922fed2be..251a74a4cc 100644
--- a/buildroot/share/PlatformIO/scripts/download_mks_assets.py
+++ b/buildroot/share/PlatformIO/scripts/download_mks_assets.py
@@ -3,10 +3,15 @@
# Added by HAS_TFT_LVGL_UI to download assets from Makerbase repo
#
Import("env")
-import os,requests,zipfile,tempfile,shutil
+import os,requests,zipfile,tempfile,shutil,pioutil
-url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/master.zip"
-zip_path = os.path.join(env.Dictionary("PROJECT_LIBDEPS_DIR"), "mks-assets.zip")
+# Detect that 'vscode init' is running
+if pioutil.is_vscode_init():
+ env.Exit(0)
+
+url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/0263cdaccf.zip"
+deps_path = env.Dictionary("PROJECT_LIBDEPS_DIR")
+zip_path = os.path.join(deps_path, "mks-assets.zip")
assets_path = os.path.join(env.Dictionary("PROJECT_BUILD_DIR"), env.Dictionary("PIOENV"), "assets")
def download_mks_assets():
@@ -14,8 +19,8 @@ def download_mks_assets():
r = requests.get(url, stream=True)
# the user may have a very clean workspace,
# so create the PROJECT_LIBDEPS_DIR directory if not exits
- if os.path.exists(env.Dictionary("PROJECT_LIBDEPS_DIR")) == False:
- os.mkdir(env.Dictionary("PROJECT_LIBDEPS_DIR"))
+ if os.path.exists(deps_path) == False:
+ os.mkdir(deps_path)
with open(zip_path, 'wb') as fd:
for chunk in r.iter_content(chunk_size=128):
fd.write(chunk)
diff --git a/buildroot/share/PlatformIO/scripts/lerdge.py b/buildroot/share/PlatformIO/scripts/lerdge.py
index 654f0ad4df..144ab64a9a 100644
--- a/buildroot/share/PlatformIO/scripts/lerdge.py
+++ b/buildroot/share/PlatformIO/scripts/lerdge.py
@@ -12,37 +12,36 @@ from SCons.Script import DefaultEnvironment
board = DefaultEnvironment().BoardConfig()
def encryptByte(byte):
- byte = 0xFF & ((byte << 6) | (byte >> 2))
- i = 0x58 + byte
- j = 0x05 + byte + (i >> 8)
- byte = (0xF8 & i) | (0x07 & j)
- return byte
+ byte = 0xFF & ((byte << 6) | (byte >> 2))
+ i = 0x58 + byte
+ j = 0x05 + byte + (i >> 8)
+ byte = (0xF8 & i) | (0x07 & j)
+ return byte
def encrypt_file(input, output_file, file_length):
- input_file = bytearray(input.read())
- for i in range(len(input_file)):
- result = encryptByte(input_file[i])
- input_file[i] = result
-
- output_file.write(input_file)
- return
+ input_file = bytearray(input.read())
+ for i in range(len(input_file)):
+ input_file[i] = encryptByte(input_file[i])
+ output_file.write(input_file)
# Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt
def encrypt(source, target, env):
- fwname = board.get("build.encrypt")
- print("Encrypting %s to %s" % (target[0].path, fwname))
- firmware = open(target[0].path, "rb")
- renamed = open(target[0].dir.path + "/" + fwname, "wb")
- length = os.path.getsize(target[0].path)
+ fwpath = target[0].path
+ enname = board.get("build.encrypt")
+ print("Encrypting %s to %s" % (fwpath, enname))
+ fwfile = open(fwpath, "rb")
+ enfile = open(target[0].dir.path + "/" + enname, "wb")
+ length = os.path.getsize(fwpath)
- encrypt_file(firmware, renamed, length)
+ encrypt_file(fwfile, enfile, length)
- firmware.close()
- renamed.close()
+ fwfile.close()
+ enfile.close()
+ os.remove(fwpath)
if 'encrypt' in board.get("build").keys():
- if board.get("build.encrypt") != "":
- marlin.add_post_action(encrypt)
+ if board.get("build.encrypt") != "":
+ marlin.add_post_action(encrypt)
else:
- print("LERDGE builds require output file via board_build.encrypt = 'filename' parameter")
- exit(1)
+ print("LERDGE builds require output file via board_build.encrypt = 'filename' parameter")
+ exit(1)
diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py
index 3949037904..caa0c89749 100644
--- a/buildroot/share/PlatformIO/scripts/marlin.py
+++ b/buildroot/share/PlatformIO/scripts/marlin.py
@@ -48,22 +48,24 @@ def encrypt_mks(source, target, env, new_name):
key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E]
- firmware = open(target[0].path, "rb")
- renamed = open(target[0].dir.path + "/" + new_name, "wb")
- length = os.path.getsize(target[0].path)
+ fwpath = target[0].path
+ fwfile = open(fwpath, "rb")
+ enfile = open(target[0].dir.path + "/" + new_name, "wb")
+ length = os.path.getsize(fwpath)
position = 0
try:
while position < length:
- byte = firmware.read(1)
+ byte = fwfile.read(1)
if position >= 320 and position < 31040:
byte = chr(ord(byte) ^ key[position & 31])
if sys.version_info[0] > 2:
byte = bytes(byte, 'latin1')
- renamed.write(byte)
+ enfile.write(byte)
position += 1
finally:
- firmware.close()
- renamed.close()
+ fwfile.close()
+ enfile.close()
+ os.remove(fwpath)
def add_post_action(action):
env.AddPostAction(join("$BUILD_DIR", "${PROGNAME}.bin"), action);
diff --git a/buildroot/share/PlatformIO/scripts/pioutil.py b/buildroot/share/PlatformIO/scripts/pioutil.py
new file mode 100644
index 0000000000..f0c021fca7
--- /dev/null
+++ b/buildroot/share/PlatformIO/scripts/pioutil.py
@@ -0,0 +1,8 @@
+#
+# buildroot/share/PlatformIO/scripts/pioutil.py
+#
+
+# Detect that 'vscode init' is running
+def is_vscode_init():
+ from SCons.Script import COMMAND_LINE_TARGETS
+ return "idedata" in COMMAND_LINE_TARGETS or "_idedata" in COMMAND_LINE_TARGETS
diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py
index b949df97c8..0dab3e4b1f 100644
--- a/buildroot/share/PlatformIO/scripts/preflight-checks.py
+++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py
@@ -2,9 +2,13 @@
# preflight-checks.py
# Check for common issues prior to compiling
#
-import os,re,sys
+import os,re,sys,pioutil
Import("env")
+# Detect that 'vscode init' is running
+if pioutil.is_vscode_init():
+ env.Exit(0)
+
def get_envs_for_board(board):
with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file:
@@ -94,7 +98,4 @@ def sanity_check_target():
err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin)
raise SystemExit(err)
-# Detect that 'vscode init' is running
-from SCons.Script import COMMAND_LINE_TARGETS
-if "idedata" not in COMMAND_LINE_TARGETS:
- sanity_check_target()
+sanity_check_target()
diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini
index 4544bf56a0..6d55ac37b9 100644
--- a/ini/stm32f4.ini
+++ b/ini/stm32f4.ini
@@ -263,13 +263,13 @@ platform = ${common_stm32.platform}
extends = stm32_variant
board = marlin_STM32F407ZGT6
board_build.variant = MARLIN_LERDGE
-board_build.encrypt = firmware.bin
board_build.offset = 0x10000
build_flags = ${stm32_variant.build_flags}
-DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
-DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35
build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
-extra_scripts = ${stm32_variant.extra_scripts}
+extra_scripts = ${common_stm32.extra_scripts}
+ pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
buildroot/share/PlatformIO/scripts/lerdge.py
#