瀏覽代碼

Merge Stepper reset for RigidBot (PR#2417)

Richard Wackerbarth 10 年之前
父節點
當前提交
85b7cca4d0
共有 3 個文件被更改,包括 21 次插入2 次删除
  1. 1
    0
      Marlin/Conditionals.h
  2. 20
    0
      Marlin/Marlin_main.cpp
  3. 0
    2
      Marlin/example_configurations/RigidBot/Configuration.h

+ 1
- 0
Marlin/Conditionals.h 查看文件

@@ -442,6 +442,7 @@
442 442
   #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
443 443
   #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
444 444
   #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
445
+  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
445 446
   #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
446 447
   #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
447 448
   #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))

+ 20
- 0
Marlin/Marlin_main.cpp 查看文件

@@ -580,6 +580,17 @@ void servo_init() {
580 580
 }
581 581
 
582 582
 /**
583
+ * Stepper Reset (RigidBoard, et.al.)
584
+ */
585
+#if HAS_STEPPER_RESET
586
+  void disableStepperDrivers() {
587
+    pinMode(STEPPER_RESET_PIN, OUTPUT);
588
+    digitalWrite(STEPPER_RESET_PIN, LOW);  // drive it down to hold in reset motor driver chips
589
+  }
590
+  void enableStepperDrivers() { pinMode(STEPPER_RESET_PIN, INPUT); }  // set to input, which allows it to be pulled high by pullups
591
+#endif
592
+
593
+/**
583 594
  * Marlin entry-point: Set up before the program loop
584 595
  *  - Set up the kill pin, filament runout, power hold
585 596
  *  - Start the serial port
@@ -601,6 +612,11 @@ void setup() {
601 612
   setup_killpin();
602 613
   setup_filrunoutpin();
603 614
   setup_powerhold();
615
+
616
+  #if HAS_STEPPER_RESET
617
+    disableStepperDrivers();
618
+  #endif
619
+
604 620
   MYSERIAL.begin(BAUDRATE);
605 621
   SERIAL_PROTOCOLLNPGM("start");
606 622
   SERIAL_ECHO_START;
@@ -656,6 +672,10 @@ void setup() {
656 672
     SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan
657 673
   #endif
658 674
 
675
+  #if HAS_STEPPER_RESET
676
+    enableStepperDrivers();
677
+  #endif
678
+
659 679
   #ifdef DIGIPOT_I2C
660 680
     digipot_i2c_init();
661 681
   #endif

+ 0
- 2
Marlin/example_configurations/RigidBot/Configuration.h 查看文件

@@ -588,8 +588,6 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
588 588
 //=============================================================================
589 589
 
590 590
 // @section more
591
-// RigidBot - Disable stepper drivers until voltage has stabilized
592
-#define STEPPER_RESET_FIX
593 591
 
594 592
 // Custom M code points
595 593
 #define CUSTOM_M_CODES

Loading…
取消
儲存