Index: branch/zemeta/Emb_App.tws
===================================================================
--- branch/zemeta/Emb_App.tws	(revision 498)
+++ branch/zemeta/Emb_App.tws	(revision 499)
@@ -19,8 +19,8 @@
 [WORKSPACE_FILE_STATES]
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\Debug\mr308.inc" 25 25 1430 351 0 8 
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 1 0 1426 347 0 1 
-"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 527 0 5 
-"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 527 1 4 
+"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" -8 -30 1596 527 1 5 
+"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" 0 0 1596 527 0 4 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\can.c" 50 50 1430 351 0 2 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 75 75 1430 351 0 3 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 50 50 1430 339 0 9 
Index: branch/zemeta/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/zemeta/Emb_App/SessionM32C_E8a_system.ini	(revision 498)
+++ branch/zemeta/Emb_App/SessionM32C_E8a_system.ini	(revision 499)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff002c
+RESET=ff0034
Index: branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf	(revision 498)
+++ branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf	(revision 499)
@@ -141,8 +141,8 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWndInstanceKey0" "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "0" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000258" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000004044" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000020" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" 
@@ -149,12 +149,12 @@
 "{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" "0000000000FF2D4A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF0584" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000013CE" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000090A" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C0" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000BEC" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000924" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000004044" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000" 
@@ -171,9 +171,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" "0000000000FF0008" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000120000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000013D4" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000008" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000C20" 
 "{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" 
@@ -229,7 +229,17 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011" "appui_Bp, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "12" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0012" "depart, 2, 0, P, Col, Bin, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0012_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0013" "verte, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0013_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014" "bleue, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0015" "rouge, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0015_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0016" "noire, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0016_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "17" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -331,11 +341,11 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 
-"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
-"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_zemeta\tp_info6\Disassembly" 
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\periph.c" 
@@ -387,5 +397,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 92799536 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 99340520 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/zemeta/Emb_App/programme_principal_etud.c
===================================================================
--- branch/zemeta/Emb_App/programme_principal_etud.c	(revision 498)
+++ branch/zemeta/Emb_App/programme_principal_etud.c	(revision 499)
@@ -119,8 +119,10 @@
 CanFrame comm,comm2,comm3;
 unsigned short k=1,k2=1, angle_reel, error,error2,d_reel,D/*=714*/, d_max = 2000, appui_Bp = 0 ; // D = 500 pour piste verte , D = 714 pour piste verte
 unsigned short consigne_tour/*=450*/, vitesse_roue/*=20*/, capt_detecte, comRoue, mode_course ,num_piste ,depart;  // V = 30 pour piste verte , V = 38 pour piste bleu  
-unsigned char verte,bleue,rouge,noire;
-CanFrame requete,requete3,requete4 ;  
+unsigned char couleur;
+CanFrame requete,requete3,requete4 ; 
+
+
 
 void main()
 {
@@ -141,7 +143,7 @@
 	sta_tsk(id_mode);
 	sta_tsk(id_piste);
 	sta_tsk(id_piste_verte_bleue); // à activer pour piste verte et bleue
-	
+
 	comRoue=-k2*error2 ;
 	sta_tsk(id_roue);
 	sta_tsk(id_detec); // à activer pour piste rouge 
@@ -150,7 +152,19 @@
 	sta_tsk(id_ass_t);	
 	dly_tsk(2000);
 	sta_tsk(id_avance);
-
+
+	switch(couleur)
+	{
+		case 1:	lcd_str("Verte");
+		break ;
+		case 2:	lcd_str("Bleue");
+		break ;
+		case 3:	lcd_str("Rouge");
+		break ;
+		case 4:	lcd_str("Noire");
+		break ;
+
+	}
     /*while(1) // Portion de code sans importance 
     {
 		LED_J=1;
@@ -291,8 +305,7 @@
 	while (1)
 	{
 		if (num_piste==768)
-		{
-			lcd_str("Rouge") ; 
+		{ 
 			LED_R=0;
 			if(capt_detecte!=22019) // course normale
 			{
@@ -308,8 +321,7 @@
 					vitesse_roue = 0;
 					comRoue = 0; 
 				}
-				//vitesse_roue = 20;
-				//comRoue = -k2*error2 ;
+			
 			}
 			else if (capt_detecte==22019) // detection de ligne droite de saut
 			{
@@ -337,12 +349,9 @@
 {
 	while (1)
 	{
-		//LED_R=0;
+		LED_R=0;
 		if(num_piste==256 || num_piste==512) // course normale
 		{
-			if (num_piste==256) lcd_str("Verte");
-			else if (num_piste==512) lcd_str("Bleu");
-		
 			D=705; 
 			consigne_tour=450;
 			if(appui_Bp!=1)
@@ -391,21 +400,24 @@
 	}
 }
 
+
+
 void piste()
 {
 	while (1)
 	{
-		dly_tsk(5) ;
+		dly_tsk(1) ;
 		switch(num_piste)
 		{
-			case 256: verte=1;
+			case 256: couleur=1;
 			break;
-			case 512: bleue=1;
+			case 512: couleur=2;
 			break;
-			case 768: rouge=1;
+			case 768: couleur=3;
 			break;
-			case 1024: noire=1;
+			case 1024: couleur=4;
 			break;
 		}
-	}dly_tsk(5);
-}
\ No newline at end of file
+		dly_tsk(5);
+	}
+}
