Index: branch/zemeta/Emb_App.tws
===================================================================
--- branch/zemeta/Emb_App.tws	(revision 542)
+++ branch/zemeta/Emb_App.tws	(revision 543)
@@ -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.hsf
===================================================================
--- branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf	(revision 542)
+++ branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf	(revision 543)
@@ -151,8 +151,8 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF058C" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000C24" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000095E" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000C3A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000974" 
 "{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" 
@@ -173,7 +173,7 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
 "{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" "0000000000000C5A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000C70" 
 "{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" 
@@ -239,7 +239,9 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0015_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0016" "noire, 10, 0, P, Col, Hex, N" 
 "{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}WatchWnd0ECX_WATCH_ITEM0017" "temps, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0017_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "18" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -341,11 +343,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\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\uart0.c" 
 "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\bsp\periph.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\Disassembly" 
@@ -397,5 +399,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 92721520 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 92796424 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 542)
+++ branch/zemeta/Emb_App/programme_principal_etud.c	(revision 543)
@@ -118,7 +118,7 @@
 //				correspondant au nom du véhicule si le nom se termine par '*'
 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 short consigne_tour/*=450*/, vitesse_roue/*=20*/, capt_detecte, comRoue, mode_course ,num_piste ,depart,temps;  // V = 30 pour piste verte , V = 38 pour piste bleu  
 unsigned char couleur;
 CanFrame requete,requete3,requete4 ; 
 
@@ -144,7 +144,8 @@
 	sta_tsk(id_piste);
 	sta_tsk(id_piste_verte_bleue); // à activer pour piste verte et bleue
 	sta_tsk(id_noire);
-	
+	sta_tsk(id_temps);
+
 //	sta_tsk(id_comm_v); ralentit asservissement
 //	sta_tsk(id_arret);  ralentit asservissement
 	comRoue=-k2*error2 ;
@@ -155,7 +156,7 @@
 	sta_tsk(id_ass_t);	
 	dly_tsk(2000);
 	sta_tsk(id_avance);
-
+	
 	switch(couleur)
 	{
 		case 1:	lcd_str("Verte");
@@ -317,7 +318,7 @@
 				consigne_tour=450;
 				if(appui_Bp!=1)
 				{
-					vitesse_roue = 20;
+					vitesse_roue = 25;
 					comRoue = -k2*error2;
 				}
 				else if (appui_Bp)
@@ -326,7 +327,7 @@
 					 comRoue = 0;
 				}
 			}
-		/*	else */if (capt_detecte==30212) // detection de ligne droite de saut
+			if (capt_detecte==30212) // detection de ligne droite de saut
 			{
 				D=705; 
 				consigne_tour=450;
@@ -349,7 +350,7 @@
 				consigne_tour=450;
 				if(appui_Bp!=1)
 				{
-					vitesse_roue = 35;
+					vitesse_roue = 43;
 					comRoue = -k2*error2;
 				}
 				else if (appui_Bp)
@@ -697,3 +698,19 @@
 		dly_tsk(5);
 	}
 }
+
+
+void temps_course() // Temps reel de course 
+
+{
+	while (1)
+	{
+		requete.data.id = 'H' ; 
+		requete.data.rtr = 1 ;
+		snd_dtq(CanTx, requete.msg);
+		dly_tsk(5) ;
+		temps = periph[ADDR('H')].val;
+		
+		dly_tsk(10) ;
+	}
+}
\ No newline at end of file
Index: branch/zemeta/Emb_App/conf_noyau.cfg
===================================================================
--- branch/zemeta/Emb_App/conf_noyau.cfg	(revision 542)
+++ branch/zemeta/Emb_App/conf_noyau.cfg	(revision 543)
@@ -84,6 +84,17 @@
 };
 
 task[]{
+	entry_address	=temps_course();
+	name	= id_temps;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 2;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+
+
+task[]{
 	entry_address	= p_noire();
 	name	= id_noire;
 	stack_size	= 256;
