Index: branch/euphrasie_auguste/Emb_App.tws
===================================================================
--- branch/euphrasie_auguste/Emb_App.tws	(revision 412)
+++ branch/euphrasie_auguste/Emb_App.tws	(revision 413)
@@ -7,13 +7,19 @@
 [GENERAL_DATA]
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\kernel_id.h" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\kernel_id.h" 100 100 1430 348 0 4 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 125 125 1430 348 0 5 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 0 0 1596 536 0 1 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 50 50 1430 348 0 2 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 536 1 0 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 75 75 1430 348 0 3 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.ini	(revision 412)
+++ branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.ini	(revision 413)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0046
+RESET=ff0048
Index: branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf	(revision 412)
+++ branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf	(revision 413)
@@ -204,11 +204,11 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF391C" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF381C" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000010A8" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000000008AC" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "00000000000000FF" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000010AA" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000000008AE" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "000000000000004C" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" 
@@ -219,7 +219,7 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_27" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_28" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_29" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000003001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_30" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_31" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_32" "0000000000000000" 
@@ -226,9 +226,9 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_33" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_34" "000000000000036A" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "00000000002C0101" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000013001" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000010A8" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000200002" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000FF81A5" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000010AA" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000512" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
@@ -272,7 +272,9 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Global," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "deux_sec, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "6" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "Bp_G_prec, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "7" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -377,7 +379,10 @@
 [WINDOW_Z_ORDER]
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\kernel_id.h" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -424,5 +429,5 @@
 [FLASH_DETAILS]
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
 [BREAKPOINTS]
-"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 97135528 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 90778536 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/euphrasie_auguste/Emb_App/programme_principal_etud.c
===================================================================
--- branch/euphrasie_auguste/Emb_App/programme_principal_etud.c	(revision 412)
+++ branch/euphrasie_auguste/Emb_App/programme_principal_etud.c	(revision 413)
@@ -124,6 +124,8 @@
 void periph_command(char addr, short valeur);//**
 short periph_requete(char addr);
 
+FLGPTN flag;//***
+
 void initialisation(void);
 
 void terrain_vert(void);
@@ -173,11 +175,11 @@
 unsigned short deux_sec = 0;
 unsigned short R_cyc_LED_V = 0;
 unsigned short cyc_LED = 0;
+unsigned short Bp_G_prec = 0;
 
 
-
-FLGPTN flag;//***
 
+
 void main(VP_INT a)
 {
 	initialisation();//*
@@ -231,7 +233,7 @@
 			case 82 :
 			case 66 :
 			case 67 : //virage
-				 k_D = 1.30;
+				 k_D = 1.4;
 				 commande_V_max = 40;
 				 distance_centre = 825;
 				 break;
@@ -350,10 +352,10 @@
 				 switch(num_cap_touch)
      	   		 {
 					 case 1:
-					 consigne_T = 450;
+					 	consigne_T = 450;
 					 	k_D = 0.6;
 						distance_centre = 550;
-						commande_V_max = 60;
+						commande_V_max = 65;
 						break;
 					 case 2:
 					 	consigne_T = 800;
@@ -362,7 +364,7 @@
 						commande_V_max = 13;
 						break;
 					 case 3:
-					 	consigne_T = 700;
+					 	consigne_T = 750;
 					 	k_D = 1.1;
 						distance_centre = 500;
 						if(periph_requete('U') > 1000){
@@ -376,8 +378,14 @@
 					 	consigne_T = 450;
 					 	k_D = 1.3;
 						distance_centre = 500;
-						commande_V_max = 12;
+						commande_V_max = 11;
 						break;
+					default :
+				consigne_T = 450;
+				k_D = 0.6;
+				distance_centre = 550;
+				commande_V_max = 65;
+				break;
 				 }
 				 break;
 			case 74 :
@@ -399,10 +407,10 @@
 				 		commande_V_max = 20;
 						break;
 					 case 3:
-					 	consigne_T = 600;
-						k_D = 0.8;
+					 	consigne_T = 450;
+						k_D = 1.75;
 				 		distance_centre = 600;
-				 		commande_V_max = 20;
+				 		commande_V_max = 11;
 						break;
 					 case 4:
 					 	consigne_T = 450;
@@ -418,10 +426,11 @@
 				 	commande_V_max = 20;
 				 break;
 			 default :
-				 k_D = 1.3;
-				 commande_V_max = 50;
-				 distance_centre = 500;
-				 break;
+				consigne_T = 450;
+				k_D = 0.6;
+				distance_centre = 550;
+				commande_V_max = 65;
+				break;
 		   }
 			num_piste = (periph_requete('M') << 8) >> 8;
 			dly_tsk(50);
@@ -490,6 +499,9 @@
 		if(commande_D < -450)	commande_D = -450;
 		if(commande_D > 450)	commande_D = 450;
 		periph_command('D', commande_D);
+		if(nb_tour >= 4){
+			commande_V_max = 0;
+		}
 		periph_command('V', commande_V_max);
 		dly_tsk(25);
 	}
@@ -555,21 +567,23 @@
 	}*/
 }
 void BP_G(){
-	if(Bp_G == 1){
-		//periph_command('V', 0);
-		//sus_tsk(ID_periph_rx);
-		//sus_tsk(ID_assser_tourelle);
-		//sus_tsk(ID_asser_roue_vitesse);
-		//isus_tsk(ID_capteur);
-		//sus_tsk(ID_LED_JAUNE);
+	/*if((Bp_G == 1) && (Bp_G_prec == 0)){
+		periph_command('V', 0);
+		isus_tsk(ID_assser_tourelle);
+		isus_tsk(ID_asser_roue_vitesse);
+		istp_cyc(ID_capteur);
+		isus_tsk(ID_LED_JAUNE);
+		LED_R = 1;
+		Bp_G_prec = 1;
 	}
-	else{
-		//sta_tsk(ID_periph_rx);
-		//sta_tsk(ID_assser_tourelle);
-		//sta_tsk(ID_asser_roue_vitesse);
-		//irsm_tsk(ID_capteur);
-		//sta_tsk(ID_LED_JAUNE);
-	}
+	if((Bp_G == 0) && (Bp_G_prec == 1)){
+		irsm_tsk(ID_assser_tourelle);
+		irsm_tsk(ID_asser_roue_vitesse);
+		ista_cyc(ID_capteur);
+		irsm_tsk(ID_LED_JAUNE);
+		LED_R = 0;
+		Bp_G_prec = 0;
+	}*/
 }
 void periph_command(char addr, short valeur){//*
 	CanFrame comm;	
Index: branch/euphrasie_auguste/Emb_App/conf_noyau.cfg
===================================================================
--- branch/euphrasie_auguste/Emb_App/conf_noyau.cfg	(revision 412)
+++ branch/euphrasie_auguste/Emb_App/conf_noyau.cfg	(revision 413)
@@ -109,7 +109,7 @@
 	exinf	= 0x0;
 	start	= ON;
 	phsatr	= OFF;
-	interval_counter	= 0x10;
+	interval_counter	= 0x100;
 	phs_counter	= 0x0;
 };
 
Index: branch/euphrasie_auguste/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/euphrasie_auguste/Emb_App/EmbM32C87App.tps	(revision 412)
+++ branch/euphrasie_auguste/Emb_App/EmbM32C87App.tps	(revision 413)
@@ -18,7 +18,7 @@
 "SessionM32C_E8a_system" 
 [GENERAL_DATA_PROJECT]
 [GENERAL_DATA_CONFIGURATION_Debug]
-"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE" 
+"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE" 
 [SESSIONS_Debug]
 "DefaultSession" 
 "SessionM32C_E8a_system" 
