Browse Source

Set initial endstops state

Addressing #8662
Scott Lahteine 7 years ago
parent
commit
47f6fc1e07
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      Marlin/endstops.h

+ 10
- 1
Marlin/endstops.h View File

@@ -28,6 +28,7 @@
28 28
 #define ENDSTOPS_H
29 29
 
30 30
 #include "enum.h"
31
+#include "MarlinConfig.h"
31 32
 
32 33
 class Endstops {
33 34
 
@@ -43,7 +44,15 @@ class Endstops {
43 44
     #endif
44 45
         current_endstop_bits, old_endstop_bits;
45 46
 
46
-    Endstops() {};
47
+    Endstops() {
48
+      enable_globally(
49
+        #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
50
+          true
51
+        #else
52
+          false
53
+        #endif
54
+      );
55
+    };
47 56
 
48 57
     /**
49 58
      * Initialize the endstop pins

Loading…
Cancel
Save