summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/modules/executor/navigator.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Concept/Framework/modules/executor/navigator.h')
-rwxr-xr-xsource/Concept/Framework/modules/executor/navigator.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/Concept/Framework/modules/executor/navigator.h b/source/Concept/Framework/modules/executor/navigator.h
index ed8b3c8..8da52f6 100755
--- a/source/Concept/Framework/modules/executor/navigator.h
+++ b/source/Concept/Framework/modules/executor/navigator.h
@@ -1,6 +1,7 @@
#ifndef _NAVIGATOR_H
#define _NAVIGATOR_H
+//#include <math.h>
#include "../../stdafx.h"
class Navigator : public IO_Module
@@ -14,7 +15,7 @@ public:
this->targetAngle = -1.0f;
this->targetX = -1.0f;
this->targetY = -1.0f;
- this->speed = 0;
+ this->robotSpeed = 0;
this->rotationSpeed = 0;
}
@@ -26,7 +27,7 @@ public:
this->targetAngle = -1.0f;
this->targetX = -1.0f;
this->targetY = -1.0f;
- this->speed = 0;
+ this->robotSpeed = 0;
this->rotationSpeed = 0;
}
@@ -35,7 +36,7 @@ protected:
float targetAngle;
float targetX;
float targetY;
- float speed;
+ float robotSpeed;
float rotationSpeed;
public:
@@ -45,9 +46,14 @@ public:
void Drive(float newDirection, float newAngle, float newSpeed, float rotationSpeed);
- void DriveTo(float newX, float newY, float newAngle);
+ void DriveTo(float newX, float newY, float newAngle, float newSpeed, float rotationSpeed);
void Rotate(float rotationSpeed);
+
+ void SetSpeed(float newSpeed)
+ {
+ this->robotSpeed = newSpeed;
+ }
};
#endif