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
Diff: Map/map.cpp
- Revision:
- 68:d19988565dfd
- Parent:
- 66:47353c8122de
- Child:
- 69:1b257fb65281
diff -r 244bc1cc6678 -r d19988565dfd Map/map.cpp
--- a/Map/map.cpp Thu May 05 02:11:25 2016 +0200
+++ b/Map/map.cpp Thu May 05 00:41:18 2016 +0000
@@ -3,6 +3,7 @@
/* Dernier Changement : Romain 20h30 */
void map::Build_Objectives() {
+ logger.printf("map::Build_Objectives Creation des Objectifs ...\n\r");
if (couleur == VERT) {
addObj (objectif (OBJ_BLOC, 120, 1000, 0, Codo, Parasol, pince));
addObj (objectif (OBJ_BLOC, 120, 1000, 0, Codo, Parasol, pince, 10));
@@ -53,7 +54,6 @@
pointParcours depP (dep, NULL, arr);
int indTMP1=0; // Le point actuel
- int PointEnding = 0;
open.push_back (depP);
while (!ended && !open.empty ()) {
@@ -193,8 +193,10 @@
}
void map::Execute(int obj) {
+ objectif o = objectifs[obj];
+ logger.printf("map::Execute(int obj) Realisation de l'objectif %d\n\r", obj);
+ logger.printf("Depart [%f, %f] Objectif [%f, %f]", Codo->getX(), Codo->getY(), o.getX(), o.getY());
// logger.printf("Findway %f-%f -> %f-%f\n\r", Codo->getX(), Codo->getY(), XObjectif, YObjectif);
- objectif o = objectifs[obj];
FindWay (Codo->getX(), Codo->getY(), o.getX(), o.getY());
if (endedParc) {
@@ -218,11 +220,13 @@
void map::Execute() {
for (int i = 0; i < objectifs.size();++i) {
+ logger.printf("map::Execute() Realisation de l'objectif %d", i);
Execute(i);
}
}
void map::Build () {
+ logger.printf("map::Build Creation des obstacles ...\n\r");
if (couleur == VERT) {
max_x_table = 1400;
max_y_table = 1900;
@@ -270,6 +274,7 @@
}
void map::Build_formation_1 (int couleur) {
+ logger.printf("map::Build_formation1 Ajout des coquillages de la formation 1 ...\n\r");
if (couleur == VERT) {
addObs(obsCarr (200, 2000-450, 40, 40)); // Coquillage du haut - droite
addObs(obsCarr (200, 2000-750, 40, 40)); // Coquillage sur le même axe horizontal
