![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
code de la carte IHM avant les bugs et avant le travail effectué avec Melchior
Dependencies: mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait
Diff: IHM/ihm.cpp
- Revision:
- 37:f1a8734c193d
- Parent:
- 36:c37dbe2be916
--- a/IHM/ihm.cpp Mon May 31 13:36:03 2021 +0000 +++ b/IHM/ihm.cpp Sat Jul 17 16:07:29 2021 +0000 @@ -40,6 +40,10 @@ Button TEST_NEXT(0,575,400,100,"------>"); Button TEST_DIV(0,25,400,100,"Test Divers"); Button TEST_ASSERV(0, 135, 400, 100, "Test asserv"); +Button TEST_MANCHE(0,245,400,100,"Test manches a air"); +Button TEST_GIROU(0,355,400,100,"Test capteur girouette"); + + //menu demo/demo/ Button TEST_A(0,25,195,100,"A"); Button TEST_B(205,25,195,100,"B"); @@ -51,19 +55,19 @@ Button TEST_PLUS(205,355,195,100,"+"); Button TEST_MOINS(0,355,195,100,"-"); -Button TEST_SERVO_0(280,50,120,100,"Bras 0"); -Button TEST_SERVO_1(140,50,120,100,"Bras 1"); -Button TEST_SERVO_2(0,50,120,100,"Bras 2"); -Button TEST_SERVO_3(0,160,120,100,"Bras 3"); -Button TEST_SERVO_4(140,160,120,100,"Bras 4"); -Button TEST_SERVO_5(280,160,120,100,"Bras 5"); +Button TEST_SERVO_0(0,160,120,100,"Bras 0"); +Button TEST_SERVO_1(140,160,120,100,"Bras 1"); +Button TEST_SERVO_2(280,160,120,100,"Bras 2"); +Button TEST_SERVO_3(280,50,120,100,"Bras 3"); +Button TEST_SERVO_4(140,50,120,100,"Bras 4"); +Button TEST_SERVO_5(0,50,120,100,"Bras 5"); -Button TEST_VENT_0(280,50,120,100,"Vent 0"); -Button TEST_VENT_1(140,50,120,100,"Vent 1"); -Button TEST_VENT_2(0,50,120,100,"Vent 2"); -Button TEST_VENT_3(0,160,120,100,"Vent 3"); -Button TEST_VENT_4(140,160,120,100,"Vent 4"); -Button TEST_VENT_5(280,160,120,100,"Vent 5"); +Button TEST_VENT_0(0,160,120,100,"Vent 0"); +Button TEST_VENT_1(140,160,120,100,"Vent 1"); +Button TEST_VENT_2(280,160,120,100,"Vent 2"); +Button TEST_VENT_3(280,50,120,100,"Vent 3"); +Button TEST_VENT_4(140,50,120,100,"Vent 4"); +Button TEST_VENT_5(0,50,120,100,"Vent 5"); Button FORCE_LAUNCH(0, 600, 400, 100, "Force Launch"); Button SUIVANT(0,380,200,100,"Suivant"); @@ -81,7 +85,7 @@ /* DESCRIPTION : Automate de gestion de l'affichage */ /****************************************************************************************/ void automate_etat_ihm(void) -{ +{ char toto[12]; int j, old_time=0, actual_time=0, old_score=0, actual_score=0, unique=0; unsigned char maximilien=1, choix_groupe; @@ -167,25 +171,38 @@ maximilien=0; while (strat_etat_s == DEMO) { canProcessRx(); - if(TEST_VENT.Touched()) { + if(TEST_VENT.Touched()) + { while(TEST_VENT.Touched()); strat_etat_s = TEST_VENTOUSE; - } else if(TEST_MOT.Touched()) { + } + else if(TEST_MOT.Touched()) + { while(TEST_MOT.Touched()); strat_etat_s = TEST_MOTEUR; - } else if(TEST_NEXT.Touched()) { + } + else if(TEST_NEXT.Touched()) + { while(TEST_NEXT.Touched()); strat_etat_s = DEMO2; - } else if (TEST_COUL.Touched()) { + } + else if (TEST_COUL.Touched()) + { while(TEST_COUL.Touched()); strat_etat_s =TEST_COULEUR ; - } else if (TEST_BRAS.Touched()) { + } + else if (TEST_BRAS.Touched()) + { while(TEST_BRAS.Touched()); strat_etat_s =TEST_SERVO_BRAS ; - } else if(TEST_AUDIO.Touched()) { + } + else if(TEST_AUDIO.Touched()) + { while(TEST_AUDIO.Touched()); strat_etat_s=TEST_AUD; - } else if(RETOUR.Touched()) { + } + else if(RETOUR.Touched()) + { while(RETOUR.Touched()); strat_etat_s = CHOIX; } @@ -200,26 +217,119 @@ RETOUR.Draw(0xFFFF0000, 0); TEST_DIV.Draw(VERT, 0); TEST_ASSERV.Draw(VERT, 0); + TEST_MANCHE.Draw(VERT, 0); + TEST_GIROU.Draw(VERT, 0); TEST_NEXT.Draw(BLEU, 0); maximilien=0; while (strat_etat_s == DEMO2) { canProcessRx(); - if(TEST_NEXT.Touched()) { + if(TEST_NEXT.Touched()) + { while(TEST_NEXT.Touched()); strat_etat_s = DEMO; - } else if(TEST_DIV.Touched()) { + } + else if(TEST_DIV.Touched()) + { while(TEST_DIV.Touched()); strat_etat_s = TEST_DIVE; - } else if(TEST_ASSERV.Touched()) { + } + else if(TEST_ASSERV.Touched()) + { while(TEST_ASSERV.Touched()); strat_etat_s = TEST_ASSERVE; - } else if(RETOUR.Touched()) { + } + else if(TEST_MANCHE.Touched()) + { + while(TEST_MANCHE.Touched()); + strat_etat_s = TEST_MANCHES; + } + else if(TEST_GIROU.Touched()) + { + while(TEST_GIROU.Touched()); + strat_etat_s = TEST_GIROUS; + } + + else if(RETOUR.Touched()) + { while(RETOUR.Touched()); strat_etat_s = CHOIX; } } break; + case TEST_MANCHES: + lcd.SetBackColor(LCD_COLOR_WHITE); + lcd.SetTextColor(LCD_COLOR_BLACK); + lcd.Clear (LCD_COLOR_WHITE); + lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Manches a air", LEFT_MODE); + + RETOUR.Draw(0xFFFF0000,0); + TEST_A.Draw(BLEU, BLANC); + TEST_B.Draw(BLEU, BLANC); + TEST_C.Draw(BLEU, BLANC); + TEST_D.Draw(BLEU, BLANC) ; + + while(strat_etat_s==TEST_MANCHES) + { + if(RETOUR.Touched()) + { + while (RETOUR.Touched()); + strat_etat_s=DEMO2; + } + else if(TEST_A.Touched()) + { + while (TEST_A.Touched()); + TEST_A.Draw(BLEU, BLANC); + SendRawId(TEST_BRAS_1); + } + else if(TEST_B.Touched()) + { + while (TEST_B.Touched()); + TEST_B.Draw(BLEU, BLANC); + choix_groupe = 0; + SendMsgCan(AUTOMATE_MANCHE_MOY, &choix_groupe, sizeof(choix_groupe)) ; + wait_ms(500); + SendMsgCan(AUTOMATE_MANCHE_BAS, &choix_groupe, sizeof(choix_groupe)) ; + wait_ms(500); + SendMsgCan(AUTOMATE_MANCHE_HAUT, &choix_groupe, sizeof(choix_groupe)) ; + wait_ms(500); + choix_groupe = 1; + SendMsgCan(AUTOMATE_MANCHE_MOY, &choix_groupe, sizeof(choix_groupe)) ; + wait_ms(500); + SendMsgCan(AUTOMATE_MANCHE_BAS, &choix_groupe, sizeof(choix_groupe)) ; + wait_ms(500); + SendMsgCan(AUTOMATE_MANCHE_HAUT, &choix_groupe, sizeof(choix_groupe)) ; + wait_ms(500); + } + else if(TEST_C.Touched()) + { + while (TEST_A.Touched()); + TEST_C.Draw(BLEU, BLANC); + SendRawId(PAVILLON_DEPLOYE); + } + + } + break; + + case TEST_GIROUS : + SendRawId(LECTURE_GIROUETTE) ; + wait_ms(5); + canProcessRx(); + lcd.SetBackColor(LCD_COLOR_WHITE); + lcd.SetTextColor(LCD_COLOR_BLACK); + lcd.Clear (LCD_COLOR_WHITE); + lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Test Girouette", LEFT_MODE); + sprintf(toto,"%hd",val_girou); + lcd.DisplayStringAt(0, LINE(10), (unsigned char *)"Valeur Girou :", LEFT_MODE); + lcd.DisplayStringAt(0, LINE(11), (unsigned char *)toto, LEFT_MODE); + RETOUR.Draw(0xFFFF0000,0); + if(RETOUR.Touched()) { + while (RETOUR.Touched()); + strat_etat_s=DEMO2; + } + wait_ms(200); + break ; + case TEST_ASSERVE: lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); @@ -231,20 +341,26 @@ TEST_B.Draw(BLEU, BLANC); TEST_C.Draw(BLEU, BLANC) ; - while(strat_etat_s==TEST_ASSERVE) { - if(RETOUR.Touched()) { + while(strat_etat_s==TEST_ASSERVE) + { + if(RETOUR.Touched()) + { while (RETOUR.Touched()); strat_etat_s=DEMO2; - } else if(TEST_A.Touched()) { + } + else if(TEST_A.Touched()) + { while (TEST_A.Touched()); - GoToPosition(2000,0,0,0); + GoStraight(2000,0,0,0); TEST_A.Draw(BLEU, BLANC); - } else if(TEST_B.Touched()) { + } + else if(TEST_B.Touched()) + { while (TEST_B.Touched()); - Rotate(3599); + Rotate(3600*5); TEST_B.Draw(BLEU, BLANC); } - else if(TEST_C.Touched()) + else if(TEST_C.Touched()) { while (TEST_C.Touched()); BendRadius(1000,900,1,0); @@ -868,12 +984,14 @@ break ; case 217 : choix_bras = 21 ; + GoStraight(-40, 0, 0, 0); SendMsgCan(BRAS_AT, &choix_bras,sizeof(choix_bras)); waitingAckFrom = 0; waitingAckID =0; break ; case 200 : choix_bras = 20 ; + GoStraight(-50, 0, 0, 0); SendMsgCan(BRAS_AT, &choix_bras,sizeof(choix_bras)); waitingAckFrom = 0; waitingAckID =0; @@ -1249,23 +1367,216 @@ lcd.DisplayStringAt(100, LINE(8), (unsigned char *)"Score :", LEFT_MODE); lcd.SetTextColor(LCD_COLOR_RED); lcd.DrawRect(0,400,400,320); - lcd.DisplayStringAt(100, LINE(22), (unsigned char *)"Timer :", LEFT_MODE); + lcd.DisplayStringAt(100, LINE(28), (unsigned char *)"Timer :", LEFT_MODE); unique = 1; } - int x_offsetc = -145*cos(theta_robot*M_PI/1800) - 0*sin(theta_robot*M_PI*1800); - int y_offsetc = -145*sin(theta_robot*M_PI/1800) + 0*cos(theta_robot*M_PI*1800); + //Debug pos gobelet + int Ventouse_coord[6][2]={{150,-80},{150,0},{150,80},{-150,80},{-150,0},{-150,-80}}; + int Bras_coord[6][2]={{232,-75},{232,0},{232,75},{-232,75},{-232,0},{-232,-75}}; + + float x_offsetv[6]; + float y_offsetv[6]; + + float x_offsetb[6]; + float y_offsetb[6]; + + + + for(int i=0; i<6; i++) + { + x_offsetv[i] = Ventouse_coord[i][0]*cos(theta_robot*M_PI/1800) - Ventouse_coord[i][1]*sin(theta_robot*M_PI/1800); + y_offsetv[i] = Ventouse_coord[i][0]*sin(theta_robot*M_PI/1800) + Ventouse_coord[i][1]*cos(theta_robot*M_PI/1800); + + x_offsetb[i] = Bras_coord[i][0]*cos(theta_robot*M_PI/1800) - Bras_coord[i][1]*sin(theta_robot*M_PI/1800); + y_offsetb[i] = Bras_coord[i][0]*sin(theta_robot*M_PI/1800) + Bras_coord[i][1]*cos(theta_robot*M_PI/1800); + } + + /* + if(gobelet_vert != old_gobelet_vert || gobelet_rouge != old_gobelet_rouge || gobelet_port != old_gobelet_port) + { + lcd.SetTextColor(LCD_COLOR_BLACK); + lcd.DisplayStringAt(0, LINE(10), (unsigned char *)"vx 0:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetv[0])); + lcd.DisplayStringAt(100, LINE(10), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(10), (unsigned char *)"vy 0:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetv[0])); + lcd.DisplayStringAt(300, LINE(10), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(11), (unsigned char *)"vx 1:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetv[1])); + lcd.DisplayStringAt(100, LINE(11), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(11), (unsigned char *)"vy 1:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetv[1])); + lcd.DisplayStringAt(300, LINE(11), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(12), (unsigned char *)"vx 2:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetv[2])); + lcd.DisplayStringAt(100, LINE(12), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(12), (unsigned char *)"vy 2:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetv[2])); + lcd.DisplayStringAt(300, LINE(12), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(13), (unsigned char *)"vx 3:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetv[3])); + lcd.DisplayStringAt(100, LINE(13), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(13), (unsigned char *)"vy 3:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetv[3])); + lcd.DisplayStringAt(300, LINE(13), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(14), (unsigned char *)"vx 4:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetv[4])); + lcd.DisplayStringAt(100, LINE(14), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(14), (unsigned char *)"vy 4:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetv[4])); + lcd.DisplayStringAt(300, LINE(14), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(15), (unsigned char *)"vx 5:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetv[5])); + lcd.DisplayStringAt(100, LINE(15), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(15), (unsigned char *)"vy 5:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetv[5])); + lcd.DisplayStringAt(300, LINE(15), (unsigned char *)toto, LEFT_MODE); + + /////////////////////////////////////////////////////////////////////// + + lcd.DisplayStringAt(0, LINE(17), (unsigned char *)"bx 0:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetb[0])); + lcd.DisplayStringAt(100, LINE(17), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(17), (unsigned char *)"by 0:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetb[0])); + lcd.DisplayStringAt(300, LINE(17), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(18), (unsigned char *)"bx 1:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetb[1])); + lcd.DisplayStringAt(100, LINE(18), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(18), (unsigned char *)"by 1:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetb[1])); + lcd.DisplayStringAt(300, LINE(18), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(19), (unsigned char *)"bx 2:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetb[2])); + lcd.DisplayStringAt(100, LINE(19), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(19), (unsigned char *)"by 2:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetb[2])); + lcd.DisplayStringAt(300, LINE(19), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(20), (unsigned char *)"bx 3:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetb[3])); + lcd.DisplayStringAt(100, LINE(20), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(20), (unsigned char *)"by 3:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetb[3])); + lcd.DisplayStringAt(300, LINE(20), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(21), (unsigned char *)"bx 4:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetb[4])); + lcd.DisplayStringAt(100, LINE(21), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(21), (unsigned char *)"by 4:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetb[4])); + lcd.DisplayStringAt(300, LINE(21), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(22), (unsigned char *)"bx 5:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(x_robot+x_offsetb[5])); + lcd.DisplayStringAt(100, LINE(22), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(22), (unsigned char *)"by 5:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(y_robot+y_offsetb[5])); + lcd.DisplayStringAt(300, LINE(22), (unsigned char *)toto, LEFT_MODE); + + old_gobelet_vert = gobelet_vert; + old_gobelet_rouge = gobelet_rouge; + old_gobelet_port = gobelet_port; + } + */ + /* + lcd.SetTextColor(LCD_COLOR_BLACK); + lcd.DisplayStringAt(100, LINE(24), (unsigned char *)"g_vert :", LEFT_MODE); + sprintf(toto,"%04d",gobelet_vert); + lcd.DisplayStringAt(250, LINE(24), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(100, LINE(25), (unsigned char *)"g_rouge :", LEFT_MODE); + sprintf(toto,"%04d",gobelet_rouge); + lcd.DisplayStringAt(250, LINE(25), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(100, LINE(26), (unsigned char *)"g_port :", LEFT_MODE); + sprintf(toto,"%04d",gobelet_port); + lcd.DisplayStringAt(250, LINE(26), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(100, LINE(27), (unsigned char *)"girou :", LEFT_MODE); + sprintf(toto,"%02d",val_girou); + lcd.DisplayStringAt(250, LINE(27), (unsigned char *)toto, LEFT_MODE); lcd.SetTextColor(LCD_COLOR_BLACK); + lcd.DisplayStringAt(0, LINE(10), (unsigned char *)"vx 0:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[0][0])); + lcd.DisplayStringAt(100, LINE(10), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(10), (unsigned char *)"vy 0:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[0][1])); + lcd.DisplayStringAt(300, LINE(10), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(11), (unsigned char *)"vx 1:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[1][0])); + lcd.DisplayStringAt(100, LINE(11), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(11), (unsigned char *)"vy 1:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[1][1])); + lcd.DisplayStringAt(300, LINE(11), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(12), (unsigned char *)"vx 2:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[2][0])); + lcd.DisplayStringAt(100, LINE(12), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(12), (unsigned char *)"vy 2:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[2][1])); + lcd.DisplayStringAt(300, LINE(12), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(13), (unsigned char *)"vx 3:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[3][0])); + lcd.DisplayStringAt(100, LINE(13), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(13), (unsigned char *)"vy 3:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[3][1])); + lcd.DisplayStringAt(300, LINE(13), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(14), (unsigned char *)"vx 4:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[4][0])); + lcd.DisplayStringAt(100, LINE(14), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(14), (unsigned char *)"vy 4:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[4][1])); + lcd.DisplayStringAt(300, LINE(14), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(0, LINE(15), (unsigned char *)"vx 5:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[5][0])); + lcd.DisplayStringAt(100, LINE(15), (unsigned char *)toto, LEFT_MODE); + + lcd.DisplayStringAt(200, LINE(15), (unsigned char *)"vy 5:", LEFT_MODE); + sprintf(toto,"%04.f",(float)(Position_de_pose[5][1])); + lcd.DisplayStringAt(300, LINE(15), (unsigned char *)toto, LEFT_MODE); + */ + /* + lcd.SetTextColor(LCD_COLOR_BLACK); lcd.DisplayStringAt(100, LINE(14), (unsigned char *)"x_robot :", LEFT_MODE); - sprintf(toto,"%04d",(short)(x_robot+x_offsetc)); + sprintf(toto,"%05hd",(short)(x_robot)); lcd.DisplayStringAt(250, LINE(14), (unsigned char *)toto, LEFT_MODE); lcd.DisplayStringAt(100, LINE(15), (unsigned char *)"y_robot :", LEFT_MODE); - sprintf(toto,"%04d",(short)(y_robot+y_offsetc)); + sprintf(toto,"%05hd",(short)(y_robot)); lcd.DisplayStringAt(250, LINE(15), (unsigned char *)toto, LEFT_MODE); lcd.DisplayStringAt(100, LINE(16), (unsigned char *)"t_robot :", LEFT_MODE); - sprintf(toto,"%04d",theta_robot); + sprintf(toto,"%05hd",theta_robot); lcd.DisplayStringAt(250, LINE(16), (unsigned char *)toto, LEFT_MODE); lcd.DisplayStringAt(100, LINE(17), (unsigned char *)"g_vert :", LEFT_MODE); @@ -1280,18 +1591,22 @@ sprintf(toto,"%04d",gobelet_port); lcd.DisplayStringAt(250, LINE(19), (unsigned char *)toto, LEFT_MODE); + lcd.DisplayStringAt(100, LINE(20), (unsigned char *)"m_releve :", LEFT_MODE); + sprintf(toto,"%04d",manche_releve); + lcd.DisplayStringAt(250, LINE(20), (unsigned char *)toto, LEFT_MODE); + */ actual_time = gameTimer.read(); - if(actual_time != old_time) - { +// if(actual_time != old_time) +// { lcd.SetTextColor(LCD_COLOR_BLUE); sprintf(toto,"%hd",score_final); lcd.DisplayStringAt(250, LINE(8), (unsigned char *)toto, LEFT_MODE); lcd.SetTextColor(LCD_COLOR_RED); sprintf(toto,"%hd",actual_time); - lcd.DisplayStringAt(250, LINE(22), (unsigned char *)toto, LEFT_MODE); - old_time = actual_time; - } + lcd.DisplayStringAt(250, LINE(28), (unsigned char *)toto, LEFT_MODE); +// old_time = actual_time; +// } break;