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 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Revision 45:4f93e99bac6e, committed 2019-05-09
- Comitter:
- Villanut
- Date:
- Thu May 09 08:38:45 2019 +0000
- Parent:
- 44:badcbe8766e9
- Child:
- 46:a9b6bcb30b1c
- Commit message:
- v2019
Changed in this revision
--- a/Globals/ident_crac.h Tue May 07 17:37:46 2019 +0000 +++ b/Globals/ident_crac.h Thu May 09 08:38:45 2019 +0000 @@ -112,10 +112,22 @@ /////////////////////////////////////////////////ACTIONS SIMPLES DU ROBOT///////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#define BAISSER_ATTRAPE_BLOC 0x220 +//#define BAISSER_ATTRAPE_BLOC 0x220 #define RELEVER_ATTRAPE_BLOC 0x221 -#define BAISSER_ATTRAPE_BLOC_AvG 0x222 +#define GABARIT_PETIT_ROBOT 0x090 +#define PRESENTOIR_AVANT 0x091 +#define PRESENTOIR_ARRIERE 0x092 +#define BALANCE_AVANT 0x093 +#define BALANCE_ARRIERE 0x094 +#define ACCELERATEUR_AVANT 0x095 +#define ACCELERATEUR_ARRIERE 0x096 +#define GOLDENIUM_AVANT 0x097 +#define GOLDENIUM_ARRIERE 0x098 +#define SOL_AVANT 0x099 +#define SOL_ARRIERE 0x100 + +//#define BAISSER_ATTRAPE_BLOC_AvG 0x222 #define RELEVER_ATTRAPE_BLOC_AvG 0x223 #define BAISSER_ATTRAPE_BLOC_AvD 0x224
--- a/Robots/Strategie_small.cpp Tue May 07 17:37:46 2019 +0000
+++ b/Robots/Strategie_small.cpp Thu May 09 08:38:45 2019 +0000
@@ -27,57 +27,38 @@
msgTx.format=CANStandard;
msgTx.type=CANData;
switch(id) {
- case 101: //baisser attrape bloc avant
- SendRawId(BAISSER_ATTRAPE_BLOC);
- break;
- case 102: //Relever attrape bloc avant
- SendRawId(RELEVER_ATTRAPE_BLOC);
+ case 101: //bras gabarit
+ SendRawId(GABARIT_PETIT_ROBOT);
break;
- case 115: //allumer panneau
- SendRawId(ALLUMER_PANNEAU_UP);
- break;
- case 116: //range le bras qui allume le panneau
- SendRawId(ALLUMER_PANNEAU_DOWN);
+ case 102: //attraper presentoir avant
+ SendRawId(PRESENTOIR_AVANT);
break;
- case 117: //lève le bras pour pousser l'abeille
- SendRawId(BRAS_ABEILLE_UP);
- break;
- case 118: //abaisse le bras qui pousse l'abeille
- SendRawId(BRAS_ABEILLE_DOWN);
+ case 103: //attraper presentoir arriere
+ SendRawId(PRESENTOIR_ARRIERE);
break;
- case 130: //Inclinaison pour viser le chateau d'eau
- SendRawId(INCLINAISON_CHATEAU);
+ case 104: //balance avant
+ SendRawId(BALANCE_AVANT);
break;
- case 131: //inclinaison pour deverser les balles sales
- SendRawId(INCLINAISON_EPURATION);
+ case 105: //balance arriere
+ SendRawId(BALANCE_ARRIERE);
break;
- case 132: //blocage des balles
- SendRawId(BLOCAGE_BALLE);
+ case 106: //accelerateur avant
+ SendRawId(ACCELERATEUR_AVANT);
break;
- case 133: //lance le pwm de tir
- msgTx.id=LANCEMENT_MOTEUR_TIR_ON;
-
- msgTx.len=1;
- msgTx.data[0]=arg1;
- can2.write(msgTx);
+ case 107: //accelerateur arriere
+ SendRawId(ACCELERATEUR_ARRIERE);
break;
- case 134: ///Arrete le pwm de tir
- SendRawId(LANCEMENT_MOTEUR_TIR_OFF);
+ case 108: //goldenium avant
+ SendRawId(GOLDENIUM_AVANT);
break;
- case 135://position aiguilleur au centre
- SendRawId(AIGUILLEUR_CENTRE);
- break;
- case 136://position aiguilleur à gauche
- SendRawId(AIGUILLEUR_GAUCHE);
+ case 109: //goldenium arriere
+ SendRawId(GOLDENIUM_ARRIERE);
break;
- case 137://position aiguilleur à droite
- SendRawId(AIGUILLEUR_DROITE);
+ case 110: //sol avant
+ SendRawId(SOL_AVANT);
break;
- case 138://position aiguilleur au centre
- SendRawId(TRI_BALLE);
- break;
- case 139:
- SendRawId(VIBRO);
+ case 111: //sol arriere
+ SendRawId(SOL_ARRIERE);
break;
case 150:
--- a/Strategie/Strategie.cpp Tue May 07 17:37:46 2019 +0000
+++ b/Strategie/Strategie.cpp Thu May 09 08:38:45 2019 +0000
@@ -121,8 +121,8 @@
E_Stratposdebut etat_pos=RECALAGE_1;
/////////////////DEFINITION DES BOUTONS////////////////////
-Button COTE_VERT(0, 25, 400, 300, "VERT");
-Button COTE_ORANGE(0, 350, 400, 300, "ORANGE");
+Button COTE_VERT(0, 25, 400, 300, "JAUNE");
+Button COTE_ORANGE(0, 350, 400, 300, "VIOLET");
Button RETOUR (0, 680, 400, 110, "--Precedent--");
Button LANCER (0, 200, 400, 200, "--LANCER--");
Button CHECK (0, 420, 400, 200, "Valider");
@@ -693,11 +693,11 @@
etat=DEMO;
} else if(ABAISSE_BLOC.Touched()) {
while (ABAISSE_BLOC.Touched());
- SendRawId(BAISSER_ATTRAPE_BLOC);
+ SendRawId(GABARIT_PETIT_ROBOT);
break;
} else if(RELEVE_BLOC.Touched()) {
while (RELEVE_BLOC.Touched());
- SendRawId(RELEVER_ATTRAPE_BLOC);
+ SendRawId(PRESENTOIR_AVANT);
break;
} else if(BRAS_ABEILLE_ON.Touched()) {
while (BRAS_ABEILLE_ON.Touched());
@@ -787,8 +787,8 @@
lcd.SetTextColor(LCD_COLOR_BLACK);
lcd.DisplayStringAt(70, LINE(0), (uint8_t *)"Choisir le cote", LEFT_MODE);
- COTE_VERT.Draw(VERT, 0);
- COTE_ORANGE.Draw(ORANGE, 0);
+ COTE_VERT.Draw(LCD_COLOR_YELLOW, 0);
+ COTE_ORANGE.Draw(LCD_COLOR_DARKMAGENTA, 0);
RETOUR.Draw(LCD_COLOR_RED, 0);
@@ -1118,7 +1118,7 @@
waitingAckID = ASSERVISSEMENT_RECALAGE;
waitingAckFrom = ACKNOWLEDGE_MOTEUR;
#ifdef ROBOT_SMALL
- GoStraight(-40, 0, 0, 0);//-450
+ GoStraight(-450, 0, 0, 0);//-450
#else
GoStraight(150, 0, 0, 0);
#endif
@@ -1174,7 +1174,7 @@
waitingAckID = ASSERVISSEMENT_RECALAGE;
waitingAckFrom = ACKNOWLEDGE_MOTEUR;
#ifdef ROBOT_SMALL
- GoStraight(-40, 0, 0, 0);
+ GoStraight(-450, 0, 0, 0);
#else
GoStraight(200, 0, 0, 0);
#endif