Fixed StepperMotor direction being undefined
authorViproz <viproz12@gmail.fr>
Sat, 16 Jul 2016 15:23:10 +0000 (17:23 +0200)
committerViproz <viproz12@gmail.fr>
Sat, 16 Jul 2016 15:48:27 +0000 (17:48 +0200)
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);
 }