diff options
author | masterm <devnull@localhost> | 2007-02-23 00:04:02 +0100 |
---|---|---|
committer | masterm <devnull@localhost> | 2007-02-23 00:04:02 +0100 |
commit | e51f1c203897019ee5669e44d35cf1241514d442 (patch) | |
tree | 22cf71cf0c443e09c60aaa9adc318fea3d8d4505 /source/Concept/Framework/modules/logic/logic.c | |
parent | d8e83400c8780fdd04018cd2f59313a3e4533d71 (diff) | |
download | rc2007-soccer-e51f1c203897019ee5669e44d35cf1241514d442.tar rc2007-soccer-e51f1c203897019ee5669e44d35cf1241514d442.zip |
++++ fixed navigator logics
Diffstat (limited to 'source/Concept/Framework/modules/logic/logic.c')
-rwxr-xr-x | source/Concept/Framework/modules/logic/logic.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/Concept/Framework/modules/logic/logic.c b/source/Concept/Framework/modules/logic/logic.c index 00599d8..f698495 100755 --- a/source/Concept/Framework/modules/logic/logic.c +++ b/source/Concept/Framework/modules/logic/logic.c @@ -3,10 +3,7 @@ //-----------------------------------------------------------------------------
void Logic::OnBallOwned()
{
- Wireless* ourWireless = parent->GetModule<Wireless>(IO_WIRELESS_MAIN);
-
- //ourWireless->Send(WIRELESS_CODE);
- //ourWireless->Send();
+ this->SetKeeper(false);
}
//-----------------------------------------------------------------------------
@@ -27,12 +24,12 @@ void Logic::Update() // is Keeper?
if(isKeeper) {
// turn around al little bit...
- if((status == STATUS_KEEPER_TURN_LEFT && ourNavigator->AngleReached()) ||
+ if((status == STATUS_KEEPER_TURN_LEFT && !ourNavigator->IsMoving()) ||
(status != STATUS_KEEPER_TURN_LEFT && status != STATUS_KEEPER_TURN_RIGHT)) {
status = STATUS_KEEPER_TURN_RIGHT;
ourNavigator->RotateTo(315,200);
}
- else if(status == STATUS_KEEPER_TURN_RIGHT && ourNavigator->AngleReached()) {
+ else if(status == STATUS_KEEPER_TURN_RIGHT && !ourNavigator->IsMoving()) {
status = STATUS_KEEPER_TURN_LEFT;
ourNavigator->RotateTo(45, 200);
}
|