BeaconAvoid code for AHRC competition.
Dependencies: MODSERIAL PiSlingers m3pi mbed
Diff: IRBehaviorController.cpp
- Revision:
- 3:aa1a77b080eb
- Parent:
- 2:b789f31e6d94
- Child:
- 4:369caebdf5dc
diff -r b789f31e6d94 -r aa1a77b080eb IRBehaviorController.cpp --- a/IRBehaviorController.cpp Fri Nov 02 03:00:54 2012 +0000 +++ b/IRBehaviorController.cpp Sat Nov 03 01:03:33 2012 +0000 @@ -45,9 +45,9 @@ // Centeroid value needs to be split for avoidance mode. if (tmp < 0) - tmp += 3; + tmp += 3.0f; else - tmp -=3; + tmp -= 3.0f; if (brightness > activationThreshold) output = pid->run(tmp);