Merge pull request #983 from Viproz/edge-stepperfix
authorJim Morris <morris@wolfman.com>
Sat, 16 Jul 2016 16:54:10 +0000 (09:54 -0700)
committerGitHub <noreply@github.com>
Sat, 16 Jul 2016 16:54:10 +0000 (09:54 -0700)
Fixed StepperMotor direction being undefined

src/libs/StepperMotor.cpp

index 9e562e4..74bfa9b 100644 (file)
@@ -28,6 +28,8 @@ StepperMotor::StepperMotor(Pin &step, Pin &dir, Pin &en) : step_pin(step), dir_p
     acceleration= NAN;
     selected= true;
 
+    this->set_direction(false);
+
     this->register_for_event(ON_HALT);
     this->register_for_event(ON_ENABLE);
 }