summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/modules/executor/navigator.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/Concept/Framework/modules/executor/navigator.c')
-rwxr-xr-xsource/Concept/Framework/modules/executor/navigator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/Concept/Framework/modules/executor/navigator.c b/source/Concept/Framework/modules/executor/navigator.c
index 7c4618a..8320eca 100755
--- a/source/Concept/Framework/modules/executor/navigator.c
+++ b/source/Concept/Framework/modules/executor/navigator.c
@@ -59,7 +59,7 @@ void Navigator::Drive(float newDirection, float newAngle, float newSpeed, float
//-----------------------------------------------------------------------------
void Navigator::DriveTo(float newX, float newY, float newAngle, float newSpeed, float rotationSpeed)
{
- if(newX < 0 || newY < 0) return;
+ if(newX == EMPTY_FLOAT || newY == EMPTY_FLOAT) return;
Position_Tracker* locationeer = parent->GetModule<Position_Tracker>(IO_POSITION_TRACKER_MAIN);
@@ -125,7 +125,7 @@ bool Navigator::TargetReached()
bool targetReached = false;
- if(!HasTarget() || (distance2d(targetX, targetY, locationeer->GetPositionX(), locationeer->GetPositionY()) < 1.0f))
+ if(!HasTarget() || (distance2d(targetX, targetY, locationeer->GetPositionX(), locationeer->GetPositionY()) < DISTANCE_TOLERANCE))
{
targetReached = true;
}
@@ -230,7 +230,7 @@ void Navigator::CalculateEngines()
vBack = ((float)vBack * (float)((float)this->robotSpeed / (float)speedCorrection)) + this->rotationSpeed;
vRight = ((float)vRight * (float)((float)this->robotSpeed / (float)speedCorrection)) + this->rotationSpeed;
- //(parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print(vLeft,10,2);
+ (parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print(vBack,10,2);
//(parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print(vBack,10,3);
//(parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print(vRight,10,4);