From da9860f9a414d8ab403496ac74a51afc5ad3e48b Mon Sep 17 00:00:00 2001 From: sicarius Date: Sun, 18 Feb 2007 17:57:03 +0000 Subject: +++ Additional Codework --- source/Concept/Framework/modules/executor/navigator.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source/Concept/Framework/modules/executor/navigator.h') 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 #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 -- cgit v1.2.3