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
main.cpp
- Committer:
- Wael_H
- Date:
- 2019-06-04
- Revision:
- 16:05665faaa489
- Parent:
- 15:3d4543a6c100
- Child:
- 17:aae5361ddddf
File content as of revision 16:05665faaa489:
#include "mbed.h" #include "CAN_asser.h" #include "Robot.h" void automate_testDeplacement(Robot&); int main(void) { Robot robot; robot.setSpeed(50,300); while(1) automate_testDeplacement(robot); } void automate_testDeplacement(Robot& robot) { typedef enum{AVANCE,TOURNE,GOTO,SARRETE} type_etat; static type_etat etat = AVANCE; switch(etat) { case AVANCE: if(robot.avance(2000)) etat = TOURNE; break; case TOURNE: if(robot.tourne(450)) etat = GOTO; break; case GOTO: BendRadius(30,90,0,0); etat = SARRETE; break; case SARRETE: break; } }