Browse Source

Fix sanity checks for dual axes (#10633)

Giuliano 7 years ago
parent
commit
4e16e699c1
2 changed files with 39 additions and 38 deletions
  1. 3
    2
      .travis.yml
  2. 36
    36
      Marlin/src/inc/SanityCheck.h

+ 3
- 2
.travis.yml View File

114
   #      PROBE_MANUALLY feature, with LCD support,
114
   #      PROBE_MANUALLY feature, with LCD support,
115
   #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
115
   #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
116
   #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
116
   #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
117
-  #      Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
117
+  #      Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
118
   #      ADVANCED_PAUSE_FEATURE, ADVANCED_PAUSE_CONTINUOUS_PURGE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
118
   #      ADVANCED_PAUSE_FEATURE, ADVANCED_PAUSE_CONTINUOUS_PURGE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
119
   #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
119
   #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
120
   #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
120
   #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
124
   - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
124
   - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
125
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
125
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
126
   - opt_enable ULTIMAKERCONTROLLER SDSUPPORT
126
   - opt_enable ULTIMAKERCONTROLLER SDSUPPORT
127
-  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632 USE_XMAX_PLUG
127
+  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632
128
   - opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
128
   - opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
129
   - opt_enable_adv ADVANCED_PAUSE_FEATURE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
129
   - opt_enable_adv ADVANCED_PAUSE_FEATURE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
130
   - opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
130
   - opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
437
   - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
437
   - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
438
   - pins_set RAMPS X_MAX_PIN -1
438
   - pins_set RAMPS X_MAX_PIN -1
439
   - opt_add_adv Z2_MAX_PIN 2
439
   - opt_add_adv Z2_MAX_PIN 2
440
+  - opt_enable USE_XMAX_PLUG
440
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
441
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
441
 
442
 
442
   #############################
443
   #############################

+ 36
- 36
Marlin/src/inc/SanityCheck.h View File

1237
 #if ENABLED(X_DUAL_ENDSTOPS)
1237
 #if ENABLED(X_DUAL_ENDSTOPS)
1238
   #if !X2_USE_ENDSTOP
1238
   #if !X2_USE_ENDSTOP
1239
     #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
1239
     #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
1240
-  #elif X2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
1241
-    #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _X_MIN_."
1242
-  #elif X2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
1243
-    #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _X_MAX_."
1244
-  #elif X2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
1245
-    #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _Y_MIN_."
1246
-  #elif X2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
1247
-    #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _Y_MAX_."
1248
-  #elif X2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
1249
-    #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _Z_MIN_."
1250
-  #elif X2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
1251
-    #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _Z_MAX_."
1240
+  #elif X2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1241
+    #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _XMIN_."
1242
+  #elif X2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1243
+    #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."
1244
+  #elif X2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1245
+    #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _YMIN_."
1246
+  #elif X2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1247
+    #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _YMAX_."
1248
+  #elif X2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1249
+    #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _ZMIN_."
1250
+  #elif X2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1251
+    #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _ZMAX_."
1252
   #elif !HAS_X2_MIN && !HAS_X2_MAX
1252
   #elif !HAS_X2_MIN && !HAS_X2_MAX
1253
     #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1253
     #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1254
   #elif ENABLED(DELTA)
1254
   #elif ENABLED(DELTA)
1258
 #if ENABLED(Y_DUAL_ENDSTOPS)
1258
 #if ENABLED(Y_DUAL_ENDSTOPS)
1259
   #if !Y2_USE_ENDSTOP
1259
   #if !Y2_USE_ENDSTOP
1260
     #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
1260
     #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
1261
-  #elif Y2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
1262
-    #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _X_MIN_."
1263
-  #elif Y2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
1264
-    #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _X_MAX_."
1265
-  #elif Y2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
1266
-    #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _Y_MIN_."
1267
-  #elif Y2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
1268
-    #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _Y_MAX_."
1269
-  #elif Y2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
1270
-    #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _Z_MIN_."
1271
-  #elif Y2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
1272
-    #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _Z_MAX_."
1261
+  #elif Y2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1262
+    #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _XMIN_."
1263
+  #elif Y2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1264
+    #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _XMAX_."
1265
+  #elif Y2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1266
+    #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _YMIN_."
1267
+  #elif Y2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1268
+    #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."
1269
+  #elif Y2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1270
+    #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _ZMIN_."
1271
+  #elif Y2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1272
+    #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _ZMAX_."
1273
   #elif !HAS_Y2_MIN && !HAS_Y2_MAX
1273
   #elif !HAS_Y2_MIN && !HAS_Y2_MAX
1274
     #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1274
     #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1275
   #elif ENABLED(DELTA)
1275
   #elif ENABLED(DELTA)
1279
 #if ENABLED(Z_DUAL_ENDSTOPS)
1279
 #if ENABLED(Z_DUAL_ENDSTOPS)
1280
   #if !Z2_USE_ENDSTOP
1280
   #if !Z2_USE_ENDSTOP
1281
     #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
1281
     #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
1282
-  #elif Z2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
1283
-    #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _X_MIN_."
1284
-  #elif Z2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
1285
-    #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _X_MAX_."
1286
-  #elif Z2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
1287
-    #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _Y_MIN_."
1288
-  #elif Z2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
1289
-    #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _Y_MAX_."
1290
-  #elif Z2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
1291
-    #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _Z_MIN_."
1292
-  #elif Z2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
1293
-    #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _Z_MAX_."
1282
+  #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1283
+    #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_."
1284
+  #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1285
+    #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_."
1286
+  #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1287
+    #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_."
1288
+  #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1289
+    #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_."
1290
+  #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1291
+    #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_."
1292
+  #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1293
+    #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_."
1294
   #elif !HAS_Z2_MIN && !HAS_Z2_MAX
1294
   #elif !HAS_Z2_MIN && !HAS_Z2_MAX
1295
     #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1295
     #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1296
   #elif ENABLED(DELTA)
1296
   #elif ENABLED(DELTA)

Loading…
Cancel
Save