Actuator needed virtual change_last_milestone method and moving flag, moved from...
authorMichael Moon <triffid.hunter@gmail.com>
Fri, 7 Feb 2014 00:42:00 +0000 (11:42 +1100)
committerMichael Moon <triffid.hunter@gmail.com>
Fri, 7 Feb 2014 00:42:00 +0000 (11:42 +1100)
src/libs/StepperMotor.h
src/modules/robot/Actuator.h
src/modules/robot/CartesianAxis.h

index c9fe05e..bf57162 100644 (file)
@@ -73,7 +73,6 @@ class StepperMotor : public Actuator {
 
         float steps_per_second;
 
-        volatile bool moving;
         bool paused;
 
         float steps_per_mm;
index 2df714b..94936e8 100644 (file)
@@ -33,6 +33,9 @@ public:
     float soft_min;
     float soft_max;
 
+    volatile bool moving;
+
+    virtual void change_last_milestone(float) = 0;
     float last_milestone;
 };
 
index b05bf52..a0ae68b 100644 (file)
@@ -12,6 +12,11 @@ public:
     };
 
     bool named_in_gcode;
+
+    void change_last_milestone(float milestone)
+    {
+        last_milestone = milestone;
+    };
 };
 
 #endif /* _CARTESIANAXIS_H */