Parcourir la source

🔨 Suppressible CONFIGURATION_EMBEDDING warning (#23545)

Keith Bennett il y a 2 ans
Parent
révision
8c83ddd201
Aucun compte lié à l'adresse e-mail de l'auteur

+ 4
- 4
Marlin/src/inc/Warnings.cpp Voir le fichier

@@ -548,11 +548,11 @@
548 548
 //
549 549
 // Warn users of potential endstop/DIAG pin conflicts to prevent homing issues when not using sensorless homing
550 550
 //
551
-#if NONE(USE_SENSORLESS, DIAG_JUMPERS_REMOVED)
552
-  #if ENABLED(USES_DIAG_JUMPERS)
551
+#if !USE_SENSORLESS
552
+  #if ENABLED(USES_DIAG_JUMPERS) && DISABLED(DIAG_JUMPERS_REMOVED)
553 553
     #warning "Motherboard DIAG jumpers must be removed when SENSORLESS_HOMING is disabled. (Define DIAG_JUMPERS_REMOVED to suppress this warning.)"
554
-  #elif ENABLED(USES_DIAG_PINS)
555
-    #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.)"
554
+  #elif ENABLED(USES_DIAG_PINS) && DISABLED(DIAG_PINS_REMOVED)
555
+    #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.)"
556 556
   #endif
557 557
 #endif
558 558
 

+ 3
- 1
buildroot/share/PlatformIO/scripts/signature.py Voir le fichier

@@ -163,7 +163,9 @@ def compute_build_signature(env):
163 163
 
164 164
 	# Generate a C source file for storing this array
165 165
 	with open('Marlin/src/mczip.h','wb') as result_file:
166
-		result_file.write(b'#warning "Generated file \'mc.zip\' is embedded"\n')
166
+		result_file.write(b'#ifndef NO_CONFIGURATION_EMBEDDING_WARNING\n')
167
+		result_file.write(b'  #warning "Generated file \'mc.zip\' is embedded (Define NO_CONFIGURATION_EMBEDDING_WARNING to suppress this warning.)"\n')
168
+		result_file.write(b'#endif\n')
167 169
 		result_file.write(b'const unsigned char mc_zip[] PROGMEM = {\n ')
168 170
 		count = 0
169 171
 		for b in open(os.path.join(build_dir, 'mc.zip'), 'rb').read():

Chargement…
Annuler
Enregistrer