Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of main by
Diff: StateMachine.cpp
- Revision:
- 1:619ca6edc4a9
- Parent:
- 0:e611a0b9f02a
- Child:
- 3:6e28589a732f
diff -r e611a0b9f02a -r 619ca6edc4a9 StateMachine.cpp --- a/StateMachine.cpp Mon Apr 16 13:29:27 2018 +0000 +++ b/StateMachine.cpp Mon Apr 16 13:43:06 2018 +0000 @@ -7,19 +7,19 @@ controller-> setTranslationVelocity(0.0f); state = LANGSAM_FAHREN; } - else if(((IRSensorF.read() < DISTANCE_THRESHOLD) - && (IRSensorR.read() < DISTANCE_THRESHOLD)) { + else if(((irSensorF.read() < DISTANCE_THRESHOLD) + && (irSensorR.read() < DISTANCE_THRESHOLD)) { controller.setTranslationVelocity(0.0f); controller.setRotationVelocity(ROTATION_VELOCITY); state = 270_GRAD_RECHTS; } - else if(IRSensorR.read() > DISTANCE_THRESHOLD){ + else if(irSensorR.read() > DISTANCE_THRESHOLD){ controller.setTranslationVelocity(0.0f); controller.setRotationVelocity(ROTATION_VELOCITY); state = 90_GRAD_RECHTS; } - else if((IRSensorF.read() < DISTANCE_THRESHOLD) - && (IRSensorR.read() < DISTANCE_THRESHOLD) (SensorL.read() < DISTANCE_THRESHOLD)) { + else if((irSensorF.read() < DISTANCE_THRESHOLD) + && (irSensorR.read() < DISTANCE_THRESHOLD) (SensorL.read() < DISTANCE_THRESHOLD)) { controller.setTranslationVelocity(0.0f); controller.setRotationVelocity(ROTATION_VELOCITY); state = 180_GRAD_RECHTS;