Eurobot2012_Primary
Dependencies: mbed Eurobot_2012_Primary
Diff: Eurobot_shared/ai/ai.cpp
- Revision:
- 13:57ea4e520dbd
- Parent:
- 9:377560539b74
- Child:
- 14:24f994dc2770
--- a/Eurobot_shared/ai/ai.cpp Sat Apr 28 18:26:26 2012 +0000 +++ b/Eurobot_shared/ai/ai.cpp Sat Apr 28 19:39:08 2012 +0000 @@ -5,6 +5,7 @@ AI::AI() : thr_AI(aithreadwrapper,this,osPriorityNormal,1024) { + targetnumber = 0; flag_terminate = false; //printf("aistart\r\n"); } @@ -15,12 +16,14 @@ target.y = targetY; target.theta = targetTheta; target.facing = targetfacing; + targetnumber++; targetlock.unlock(); } void AI::settarget(Target targetin) { targetlock.lock(); target = targetin; + targetnumber++; targetlock.unlock(); }