Browse Source

Don't set non-existent SLED_PIN

Scott Lahteine 9 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
     dac_init();
939
     dac_init();
940
   #endif
940
   #endif
941
 
941
 
942
-  #if ENABLED(Z_PROBE_SLED)
942
+  #if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED)
943
     pinMode(SLED_PIN, OUTPUT);
943
     pinMode(SLED_PIN, OUTPUT);
944
     digitalWrite(SLED_PIN, LOW); // turn it off
944
     digitalWrite(SLED_PIN, LOW); // turn it off
945
   #endif // Z_PROBE_SLED
945
   #endif // Z_PROBE_SLED
1856
 
1856
 
1857
     // Dock sled a bit closer to ensure proper capturing
1857
     // Dock sled a bit closer to ensure proper capturing
1858
     do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0));
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
 #endif // Z_PROBE_SLED
1865
 #endif // Z_PROBE_SLED

Loading…
Cancel
Save