Browse Source

Don't set non-existent SLED_PIN

Scott Lahteine 8 years ago
parent
commit
bdac2eb13a
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      Marlin/Marlin_main.cpp

+ 4
- 2
Marlin/Marlin_main.cpp View File

@@ -939,7 +939,7 @@ void setup() {
939 939
     dac_init();
940 940
   #endif
941 941
 
942
-  #if ENABLED(Z_PROBE_SLED)
942
+  #if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED)
943 943
     pinMode(SLED_PIN, OUTPUT);
944 944
     digitalWrite(SLED_PIN, LOW); // turn it off
945 945
   #endif // Z_PROBE_SLED
@@ -1856,8 +1856,10 @@ static void clean_up_after_endstop_or_probe_move() {
1856 1856
 
1857 1857
     // Dock sled a bit closer to ensure proper capturing
1858 1858
     do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0));
1859
-    digitalWrite(SLED_PIN, !stow); // switch solenoid
1860 1859
 
1860
+    #if PIN_EXISTS(SLED)
1861
+      digitalWrite(SLED_PIN, !stow); // switch solenoid
1862
+    #endif
1861 1863
   }
1862 1864
 
1863 1865
 #endif // Z_PROBE_SLED

Loading…
Cancel
Save