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.
Fork of Timer by
Map/Objectif/objectif.cpp
- Committer:
- IceTeam
- Date:
- 2016-05-05
- Revision:
- 70:d70a6db1f635
- Parent:
- 66:47353c8122de
- Child:
- 75:195dd2bb13a3
File content as of revision 70:d70a6db1f635:
#include "objectif.h"
/* Dernier Changement : Romain 0h20 */
objectif::objectif (int ntype, float nx_obj, float ny_obj, float nthet_obj, Odometry * nCodo, AX12 * np, ControlleurPince * npince, float arr) {
Parasol = np;
pince = npince;
type = ntype;
x_objectif = nx_obj;
y_objectif = ny_obj;
thet_objectif = nthet_obj;
Codo = nCodo;
marche_arriere = arr;
}
bool objectif::Action () {
switch(type) {
case OBJ_BLOC:
return obj_bloc_action();
break;
case OBJ_PARA:
return obj_para_action();
break;
default:
break;
}
if (marche_arriere != 0) {
Codo->GotoDist(-marche_arriere);
}
}
bool objectif::obj_bloc_action () {
/* Range : 0 -> 100 (mm). pince.home remet à 0 */
pince->home();
pince->setPos(30,0,0);
}
bool objectif::obj_para_action() {
return true;
}
