Algorithmus

Dependencies:   mbed

Revision:
13:845e49f20426
Parent:
12:75d0291a9785
Child:
18:3309329d5f42
--- a/Motion.h	Wed May 02 14:58:48 2018 +0000
+++ b/Motion.h	Fri May 04 19:10:36 2018 +0000
@@ -30,7 +30,7 @@
         void    control();
         void    runTask(int path[], int task, bool reverse);
         int     finish();
-        void    accel();
+        void    accel(float targetSpeed);
 
     private:
     
@@ -40,8 +40,9 @@
         static const float  KD;
         static const int    MOVE_DIST;
         static const float  MOVE_SPEED;
+        static const float  SCAN_SPEED;
         static const float  ROTATE_SPEED;
-        static const float  ACCEL_SCALE;
+        static const float  ACCEL_CONST;
         
         Controller&         controller;
         EncoderCounter&     counterLeft;
@@ -51,6 +52,7 @@
         IRSensor&           irSensorR;
         AnalogIn&           lineSensor;
         DigitalOut&         enableMotorDriver;
+        Timer               t;
         
         float               distanceL;
         float               distanceC;
@@ -76,6 +78,7 @@
         float               avgSpeed;
         float               avgCounts;
         float               actSpeed;
+        float               targetSpeed;
     };
     
 #endif /* MOTION_H_ */
\ No newline at end of file