Index: branch/schiano/Emb_App.tws
===================================================================
--- branch/schiano/Emb_App.tws	(revision 440)
+++ branch/schiano/Emb_App.tws	(revision 441)
@@ -7,23 +7,13 @@
 [GENERAL_DATA]
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
-"E:\tp_info6_2018_schiano\tp_info6\bsp\lcd.c" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\kernel_id.h" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\kernel_id.h" 25 25 1405 419 0 7 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\mr308.inc" 125 125 1405 363 0 5 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\conf_noyau.cfg" 25 25 1430 351 0 1 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 539 0 2 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 632 1 0 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\lcd.c" 0 0 1405 419 0 6 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 175 175 1405 363 0 4 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 150 150 1405 363 0 3 
+"E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" -8 -30 1596 632 1 2 
+"E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" 0 0 1596 632 0 0 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/schiano/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/schiano/Emb_App/SessionM32C_E8a_system.ini	(revision 440)
+++ branch/schiano/Emb_App/SessionM32C_E8a_system.ini	(revision 441)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff007a
+RESET=ff007e
Index: branch/schiano/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/schiano/Emb_App/SessionM32C_E8a_system.hsf	(revision 440)
+++ branch/schiano/Emb_App/SessionM32C_E8a_system.hsf	(revision 441)
@@ -233,9 +233,9 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0012_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0013" "infCapt, 1, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0013_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014" "numero, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014" "numero, 1, 0, P, Col, Dec, MN" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "14" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "15" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -337,14 +337,9 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\lcd.c" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\conf_noyau.cfg" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\mr308.inc" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\kernel_id.h" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -391,5 +386,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 103162224 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 95183592 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/schiano/Emb_App/programme_principal_etud.c
===================================================================
--- branch/schiano/Emb_App/programme_principal_etud.c	(revision 440)
+++ branch/schiano/Emb_App/programme_principal_etud.c	(revision 441)
@@ -133,6 +133,8 @@
 unsigned int erreurprec=0;
 unsigned int tempstours=0;
 unsigned int cpt=0;
+unsigned int cptprec=0;
+unsigned int charge=0;
 
 int jeton=0;
 int tours=0;
@@ -171,6 +173,9 @@
 
 	sta_cyc(ID_acqui);
 	sta_tsk(ID_periph_rx);
+	
+	//sta_cyc(ID_chargeproc);
+	
 	sta_cyc(ID_asservtourellecyc); //asservissement telemetre
 	sta_tsk(ID_asservtourelle);
 	
@@ -224,7 +229,7 @@
 		
 		switch(numero){
 			case(256) : //verte
-			vitesselignedroite =80;
+			vitesselignedroite =65;
 			vitessevirage =35;
 			consignealpha = 400;
 			consignedistance = 785;
@@ -396,7 +401,8 @@
 				consigneVitesse = vitesselignedroite;	
 		}
 		else {
-				consigneVitesse = vitessevirage;
+			if(Couleurperso==0x6af8)consigneVitesse = 100;
+				else consigneVitesse = vitessevirage;
 		}
 		
 		vitesse.data.id='V';
@@ -476,7 +482,7 @@
 			case(0x62f0) : consigneVitesse = vitesselignedroite; break; //2e montee
 			case(0x4203) : consigneVitesse = 20; break;
 			case(0x5604) : //ligne droite dans la terre
-				consigneVitesse =15;
+				consigneVitesse =13;
 				consignedistance = 500;
 			break;
 			case(0x4304) ://dernier virage
@@ -531,6 +537,11 @@
 	}
 }
 
+void chargeproc(){
+	charge = cpt-cptprec;
+	cptprec =cpt; 
+}
+
 void ArretUrgence(){
 	CanFrame vitesse;
 	
@@ -539,12 +550,14 @@
 		else urgence =0;
 			
 		if(urgence==1){
-			vitesse.data.id='V';
-			vitesse.data.rtr=0;
-			vitesse.data.val=0;
+			if(AUR!=1){ // pour ne pas envoyer de message sinon in !=0
+				vitesse.data.id='V';
+				vitesse.data.rtr=0;
+				vitesse.data.val=0;
 
-			snd_dtq (CanTx,vitesse.msg);
-		
+				snd_dtq (CanTx,vitesse.msg);
+			}
+			LED_R=!LED_R;
 			sus_tsk(ID_asservtourelle);
 			sus_tsk(ID_asservRoue);
 			sus_tsk(ID_AsservVitesse);
@@ -553,11 +566,13 @@
 			AUR=1;
 		}
 		if((urgence==0)&&(AUR!=0)){
+			AUR=0;
 			rsm_tsk(ID_asservtourelle);
 			rsm_tsk(ID_asservRoue);
 			rsm_tsk(ID_AsservVitesse);
 			rsm_tsk(ID_AsservVitesseR);
 			rsm_tsk(ID_AsservVitesseN);
+			LED_R=!LED_R;
 
 		}
 		dly_tsk(10);
Index: branch/schiano/Emb_App/conf_noyau.cfg
===================================================================
--- branch/schiano/Emb_App/conf_noyau.cfg	(revision 440)
+++ branch/schiano/Emb_App/conf_noyau.cfg	(revision 441)
@@ -262,6 +262,16 @@
 	phs_counter	= 0x0;
 };
 
+cyclic_hand[]{
+	entry_address	= chargeproc();
+	name	= ID_chargeproc;
+	exinf	= 0x0;
+	start	= OFF;
+	phsatr	= OFF;
+	interval_counter	= 100;
+	phs_counter	= 0x0;
+};
+
 vdataqueue[]{
 	name	= QdmTouche;
 	wait_queue	= TA_TFIFO;
Index: branch/schiano/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/schiano/Emb_App/EmbM32C87App.tps	(revision 440)
+++ branch/schiano/Emb_App/EmbM32C87App.tps	(revision 441)
@@ -18,7 +18,7 @@
 "SessionM32C_E8a_system" 
 [GENERAL_DATA_PROJECT]
 [GENERAL_DATA_CONFIGURATION_Debug]
-"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE" 
+"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE" 
 [SESSIONS_Debug]
 "DefaultSession" 
 "SessionM32C_E8a_system" 
