From 31ec8f2449e28caaa064d0bf4885f26e45508c02 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 18 Jan 2022 00:30:52 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Suppressible=20CONFIGURATION=5FE?= =?UTF-8?q?MBEDDING=20warning=20(#23545)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 8 ++++---- buildroot/share/PlatformIO/scripts/signature.py | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 684ab82d00..0d6f9bb134 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -548,11 +548,11 @@ // // Warn users of potential endstop/DIAG pin conflicts to prevent homing issues when not using sensorless homing // -#if NONE(USE_SENSORLESS, DIAG_JUMPERS_REMOVED) - #if ENABLED(USES_DIAG_JUMPERS) +#if !USE_SENSORLESS + #if ENABLED(USES_DIAG_JUMPERS) && DISABLED(DIAG_JUMPERS_REMOVED) #warning "Motherboard DIAG jumpers must be removed when SENSORLESS_HOMING is disabled. (Define DIAG_JUMPERS_REMOVED to suppress this warning.)" - #elif ENABLED(USES_DIAG_PINS) - #warning "Driver DIAG pins must be physically removed unless SENSORLESS_HOMING is enabled. (See https://bit.ly/2ZPRlt0) (Define DIAG_JUMPERS_REMOVED to suppress this warning.)" + #elif ENABLED(USES_DIAG_PINS) && DISABLED(DIAG_PINS_REMOVED) + #warning "Driver DIAG pins must be physically removed unless SENSORLESS_HOMING is enabled. (See https://bit.ly/2ZPRlt0) (Define DIAG_PINS_REMOVED to suppress this warning.)" #endif #endif diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index 654e3ea677..593f9580b3 100644 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -163,7 +163,9 @@ def compute_build_signature(env): # Generate a C source file for storing this array with open('Marlin/src/mczip.h','wb') as result_file: - result_file.write(b'#warning "Generated file \'mc.zip\' is embedded"\n') + result_file.write(b'#ifndef NO_CONFIGURATION_EMBEDDING_WARNING\n') + result_file.write(b' #warning "Generated file \'mc.zip\' is embedded (Define NO_CONFIGURATION_EMBEDDING_WARNING to suppress this warning.)"\n') + result_file.write(b'#endif\n') result_file.write(b'const unsigned char mc_zip[] PROGMEM = {\n ') count = 0 for b in open(os.path.join(build_dir, 'mc.zip'), 'rb').read():