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: RoboClaw mbed StepperMotor
Fork of RoboClaw by
Revision 63:176d04975f06, committed 2016-05-04
- Comitter:
- IceTeam
- Date:
- Wed May 04 21:51:00 2016 +0000
- Parent:
- 62:80a81e4ad9f8
- Child:
- 64:24e1057a97f7
- Child:
- 71:5590dbe8393a
- Commit message:
- Correction des TREEEEEEES nombreux bugs;
Changed in this revision
--- a/Map/Objectif/objectif.cpp Wed May 04 23:38:38 2016 +0200
+++ b/Map/Objectif/objectif.cpp Wed May 04 21:51:00 2016 +0000
@@ -28,6 +28,6 @@
return true;
}
-bool objectif::obj_para_action(); () {
+bool objectif::obj_para_action() {
return true;
}
\ No newline at end of file
--- a/Map/Objectif/objectif.h Wed May 04 23:38:38 2016 +0200
+++ b/Map/Objectif/objectif.h Wed May 04 21:51:00 2016 +0000
@@ -4,12 +4,13 @@
/* Dernier Changement : Romain 20h20
Inclu dans : map.h */
+#include "objectif_type.h"
#include "../../AX12/AX12.h"
#include "../../ControlleurPince/ControlleurPince.h"
class objectif {
public:
- objectif (int ntype, float nx_obj, float ny_obj, float nthet_obj, AX12 * np, ControlleurPince npince);
+ objectif (int ntype, float nx_obj, float ny_obj, float nthet_obj, AX12 * np, ControlleurPince * npince);
bool Action ();
float getX() { return x_objectif; }
float getY() { return y_objectif; }
@@ -22,6 +23,7 @@
int type;
float x_objectif, y_objectif, thet_objectif;
AX12 * Parasol;
- ControlleurPince pince;
+ ControlleurPince * pince;
+};
#endif
\ No newline at end of file
--- a/Map/map.cpp Wed May 04 23:38:38 2016 +0200
+++ b/Map/map.cpp Wed May 04 21:51:00 2016 +0000
@@ -2,7 +2,7 @@
/* Dernier Changement : Romain 20h30 */
-map::map (Odometry* nodo) : Codo(nodo) {
+map::map (Odometry* nodo, AX12 * np, ControlleurPince * npince) : Codo(nodo) {
}
void map::addObs (obsCarr nobs) {
@@ -174,7 +174,7 @@
void map::Execute(int obj) {
// logger.printf("Findway %f-%f -> %f-%f\n\r", Codo->getX(), Codo->getY(), XObjectif, YObjectif);
- Objectif o = objectifs[obj];
+ objectif o = objectifs[obj];
FindWay (Codo->getX(), Codo->getY(), o.getX(), o.getY());
if (endedParc) {
@@ -185,7 +185,7 @@
Codo->GotoXY((double)path[i].getX(), (double)path[i].getY());
// logger.printf("Goto Fini\n\r");
}
- Codo->gotoThet(o.getThet());
+ Codo->GotoThet(o.getThet());
o.Action();
//logger.printf("Chemin fini !\n\r");
}
@@ -209,7 +209,7 @@
min_y_table = 0;
}
- if (couleur == VERT)
+ if (couleur == VERT) {
addObs(obsCarr (0, 2000, 250, 150)); // Coté haut droite
addObs(obsCarr (200, 2000, 200, 50));
addObs(obsCarr (800, 100, 100, 15));
--- a/Map/map.h Wed May 04 23:38:38 2016 +0200
+++ b/Map/map.h Wed May 04 21:51:00 2016 +0000
@@ -11,6 +11,7 @@
#include "controle.h"
#include "Objectif/objectif.h"
#include "../Odometry/Odometry.h"
+#include "../Functions/defines.h"
#include "../AX12/AX12.h"
#include "../../StepperMotor/Stepper.h"
@@ -19,7 +20,7 @@
class map {
public:
- map (Odometry* nodo, AX12 * nA1, AX12 * nA2, AX12 * nA3, Stepper * nS1, Stepper * nS2);
+ map (Odometry* nodo, AX12 * np, ControlleurPince * npince);
void addObs (obsCarr nobs);
void addObj (objectif nobj);
void FindWay (point dep, point arr);
@@ -33,7 +34,7 @@
protected:
nVector<obsCarr> obs;
nVector<pointParcours> path;
- nVector<Objectif> objectifs;
+ nVector<objectif> objectifs;
bool endedParc; // Definit s'il existe un chemin parcourable dans le dernier FindWay
Odometry* Codo;
@@ -43,6 +44,7 @@
float min_x_table, min_y_table, max_x_table, max_y_table;
void Build_formation_1 (int couleur);
+ void Build_formation_2 (int couleur);
};
#endif
\ No newline at end of file
