Index: branch/euphrasie_auguste/Emb_App.tws
===================================================================
--- branch/euphrasie_auguste/Emb_App.tws	(revision 393)
+++ branch/euphrasie_auguste/Emb_App.tws	(revision 394)
@@ -7,25 +7,13 @@
 [GENERAL_DATA]
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.h" 
-"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" 25 25 1430 350 0 8 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 25 25 1430 351 0 6 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" -8 -30 1596 536 1 1 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 538 0 5 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 0 0 1596 539 0 0 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 100 100 1430 351 0 2 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 0 0 1430 351 0 4 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.h" 125 125 1430 351 0 3 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 50 50 1430 351 0 7 
+"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 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.ini	(revision 393)
+++ branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.ini	(revision 394)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0036
+RESET=ff0046
Index: branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf	(revision 393)
+++ branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf	(revision 394)
@@ -196,20 +196,20 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWndInstanceKey1" "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system0" 
 "{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" "0000000000000044" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000020" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" 
 "{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" 
 "{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" "0000000000FF0595" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000F0E" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000848" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000001" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000044" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF0046" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000700" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000000" 
 "{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" 
@@ -224,12 +224,12 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_31" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_32" "0000000000000000" 
 "{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_34" "0000000000000000" 
 "{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_4" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000F44" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000512" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "36" 
@@ -266,13 +266,13 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "nb_tour, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "commande_V, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "commande_V_max, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "CPU_charge, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "zone_diff, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "num_piste, 2, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "3" 
+"{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}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -375,15 +375,9 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
 "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\Debug\kernel_id.h" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.h" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -430,5 +424,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 115301856 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 83700648 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 393)
+++ branch/euphrasie_auguste/Emb_App/programme_principal_etud.c	(revision 394)
@@ -134,8 +134,11 @@
 void assser_tourelle(VP_INT b);
 void asser_roue_vitesse(VP_INT c);
 void idle(VP_INT d);
+void capteur(VP_INT e);
+void LED_JAUNE(VP_INT f);
+
+
 void decode_int(void);
-void capteur(void);
 
 //short i;//** **
 short touche;
@@ -157,12 +160,22 @@
 
 unsigned short num_piste;
 unsigned short coul_cap_touch;
+unsigned short coul_cap_touch_prec;
 unsigned short num_cap_touch;
 unsigned short num_cap_touch_prec;
 unsigned short nb_tour;
-unsigned short idle_ctr = 0;
-unsigned short idle_max = 65535;
+unsigned long idle_ctr = 0;
+unsigned long idle_max;
+unsigned short CPU_charge;
+unsigned short Led_jaune_event = 0;
+unsigned short Led_verte = 0;
+unsigned short zone_diff = 0;
+unsigned short deux_sec = 0;
+unsigned short R_cyc_LED_V = 0;
+unsigned short cyc_LED = 0;
 
+
+
 FLGPTN flag;//***
 
 void main(VP_INT a)
@@ -204,14 +217,13 @@
 		periph_command('V', 60);
 		dly_tsk(250);//***************************************
 		while((num_piste == 1) || (num_piste == 5)){
-			capteur();//** **
 			
 			//***** ****** ***** ***** ***** 
 			switch(coul_cap_touch)//*
      	   {
      	   	case 86: //ligne droite 'V'
-				 k_D = 1.0;
-				 commande_V_max = 60;
+				 k_D = 1.1;
+				 commande_V_max = 75;
 				 distance_centre = 700;
 				 break;
 			case 74 :
@@ -218,9 +230,9 @@
 			case 82 :
 			case 66 :
 			case 67 : //virage
-				 k_D = 1.25;
+				 k_D = 1.3;
 				 commande_V_max = 40;
-				 distance_centre = 800;
+				 distance_centre = 825;
 				 break;
 			default :
 				 k_D = 1.25;
@@ -246,7 +258,6 @@
 		periph_command('V', 60);
 		dly_tsk(250);
 		while((num_piste == 2) || (num_piste == 6)){
-			capteur();
 			switch(coul_cap_touch)
      	   {
      	   	case 86: //ligne droite
@@ -259,7 +270,7 @@
 			case 66 :
 			case 67 : //virage
 				 k_D = 1.75;
-				 commande_V_max = 25;
+				 commande_V_max = 30;
 				 distance_centre = 500;	break;
 			default :
 				 k_D = 1.25;
@@ -278,7 +289,6 @@
 		while((periph_requete('M') >> 15) == 0 ){commande_V_max = 0;	dly_tsk(50);}				// attente feux vert
 		nb_tour = 1;
 		while((num_piste == 3) || (num_piste == 7)){
-			capteur();
 			switch(coul_cap_touch)
      	   {
      	   	case 86: //ligne droite
@@ -318,7 +328,6 @@
 		while((periph_requete('M') >> 15) == 0 ){commande_V_max = 0;	dly_tsk(50);} 				// attente feux vert
 		nb_tour = 1;
 		while((num_piste == 4) || (num_piste == 8)){
-			capteur();
 			switch(coul_cap_touch)
      	   {
      	   	case 86:
@@ -340,7 +349,12 @@
 					 	consigne_T = 700;
 					 	k_D = 1.1;
 						distance_centre = 500;
-						commande_V_max = 43.75;
+						if(periph_requete('U') > 1000){
+							commande_V_max = 0;
+						}
+						else{
+							commande_V_max = 43.75;
+						}
 						break;
 					 case 4:
 					 	consigne_T = 450;
@@ -370,9 +384,9 @@
 						break;
 					 case 3:
 					 	consigne_T = 600;
-						k_D = 1.75;
+						k_D = 0.8;
 				 		distance_centre = 600;
-				 		commande_V_max = 15;
+				 		commande_V_max = 20;
 						break;
 					 case 4:
 					 	consigne_T = 450;
@@ -399,13 +413,8 @@
 	}
 }
 
-void capteur(void){
-	coul_cap_touch = (periph_requete('C') >> 8);
-	num_cap_touch_prec = num_cap_touch;
-	num_cap_touch = (periph_requete('C') & 0x00FF);
-	if((num_cap_touch == 5) && (num_cap_touch != num_cap_touch_prec)){	nb_tour++;	} //*
-}
 
+
 void decode_int(void){
 	//short i = 0;
 	//while(touche != '#'){
@@ -417,8 +426,22 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
 void initialisation(void){
-	ports_mcu();
+	ports_mcu();
+	dly_tsk(3000);
     lcd_init();
 	periph_init();
 	periph_nom("#Auguste*");
@@ -425,43 +448,35 @@
     can_init();
     clavier_init(1);
 	capture_init();
-	sta_cyc(ID_acqui);
 	sta_tsk(ID_periph_rx);
 	sta_tsk(ID_assser_tourelle);
 	sta_tsk(ID_asser_roue_vitesse);
+	sta_tsk(ID_capteur);
+	sta_tsk(ID_LED_JAUNE);
+	//sta_cyc(ID_LED_VERTE);
 }
-
-
-void acqui()
-{
-	LED_V=!LED_V;
-}
-
-
-
-
-
-
-
 void assser_tourelle(VP_INT b){
 	while(1){
-	ang_T = periph_requete('R');
-	commande_T = k_T * (consigne_T - ang_T);
-	periph_command('T', commande_T);//**
-	dly_tsk(25);
+		ang_T = periph_requete('R');
+		commande_T = k_T * (consigne_T - ang_T);
+		periph_command('T', commande_T);//**
+		dly_tsk(25);
 	}
 }
 void asser_roue_vitesse(VP_INT c){
 	while(1){
-	dist_mur_droit = periph_requete('U')*sin((3.1415f*(periph_requete('R')))/1800.0f);//*** ***
-	if(abs(dist_mur_droit) > 1500){	dist_mur_droit = distance_centre;} //filtre valeurs aberantes pour trous //*** TODO  //***
-	commande_D = k_D * (dist_mur_droit - distance_centre);
-	if(commande_D < -450)	commande_D = -450; //*** clip minmax
-	if(commande_D > 450)	commande_D = 450;
-	periph_command('D', commande_D);
-	if((Bp_D == 1) || (Bp_M == 1)){commande_V_max = 0;}//***
-	periph_command('V', commande_V_max);//***
-	dly_tsk(25);
+		dist_mur_droit = periph_requete('U')*sin((3.1415f*(periph_requete('R')))/1800.0f);//*** ***
+		
+		if(((abs(dist_mur_droit) > 1500)) || ((abs(dist_mur_droit) == 0))){
+			dist_mur_droit = distance_centre;
+			Led_jaune_event = 1;
+		}
+		commande_D = k_D * (dist_mur_droit - distance_centre);
+		if(commande_D < -450)	commande_D = -450; //*** clip minmax
+		if(commande_D > 450)	commande_D = 450;
+		periph_command('D', commande_D);
+		periph_command('V', commande_V_max);//***
+		dly_tsk(25);
 	}
 }
 void idle(VP_INT d){
@@ -468,7 +483,79 @@
 	while(1){
 		idle_ctr++;
 	}
-}
+}
+void CPU(){
+	idle_max=(idle_max>idle_ctr)?idle_max:idle_ctr;
+	CPU_charge = ((idle_max - idle_ctr)*10000)/idle_max;
+	idle_ctr = 0;
+}
+void capteur(VP_INT e){
+	while(1){
+		coul_cap_touch = (periph_requete('C') >> 8);
+		num_cap_touch_prec = num_cap_touch;
+		num_cap_touch = (periph_requete('C') & 0x00FF);
+		if((coul_cap_touch != coul_cap_touch_prec) && (num_cap_touch != num_cap_touch_prec)){	zone_diff = 1;	}
+		if((num_cap_touch == 5) && (num_cap_touch != num_cap_touch_prec)){	nb_tour++;	} //*
+		dly_tsk(25);
+	}
+}
+void LED_JAUNE(VP_INT f){
+	while(1){
+		if(Led_jaune_event == 1){
+			Led_jaune_event = 0;
+			LED_J = 1;
+		}
+		else{LED_J = 0;}
+		dly_tsk(1000);
+	}
+}
+void LED_VERTE(){
+/*	if(zone_diff == 1){
+		R_cyc_LED_V = 90;
+		deux_sec = 400;
+		zone_diff = 0;
+	}
+	else{
+		R_cyc_LED_V = 10;
+	}
+	if((R_cyc_LED_V == 90) && (deux_sec != 0) && (cyc_LED <= 90)){
+		LED_V = 1;
+		deux_sec--;
+		cyc_LED++;
+	}
+	if((R_cyc_LED_V == 90) && (deux_sec != 0) && (cyc_LED > 90)){
+		LED_V = 0;
+		deux_sec--;
+		cyc_LED++;
+		if(cyc_LED == 100) cyc_LED = 0;
+	}
+	if((R_cyc_LED_V == 10) && (cyc_LED <= 10) && (zone_diff == 0) && (deux_sec == 0)){
+		LED_V = 1;
+		cyc_LED++;
+	}
+	if((R_cyc_LED_V == 10) && (cyc_LED > 10) && (zone_diff == 0) && (deux_sec == 0)){
+		LED_V = 0;
+		cyc_LED++;
+		if(cyc_LED == 100) cyc_LED = 0;
+	}*/
+}
+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);
+	}
+	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);
+	}
+}
 void periph_command(char addr, short valeur){//*
 	CanFrame comm;	
 	comm.data.id = addr;
Index: branch/euphrasie_auguste/Emb_App/conf_noyau.cfg
===================================================================
--- branch/euphrasie_auguste/Emb_App/conf_noyau.cfg	(revision 393)
+++ branch/euphrasie_auguste/Emb_App/conf_noyau.cfg	(revision 394)
@@ -8,7 +8,7 @@
 // system definition
 system{
 	stack_size	= 256;
-	priority	= 8;
+	priority	= 14;
 	system_IPL	 = 4;
 	message_pri	 = 1;
 	timeout	 = YES;
@@ -58,7 +58,6 @@
 	initial_start	= OFF;
 	exinf	= 0x0;
 };
-
 task[]{
 	entry_address	= idle();
 	name	= ID_idle;
@@ -68,11 +67,62 @@
 	initial_start	= ON;
 	exinf	= 0x0;
 };
+cyclic_hand[]{
+	entry_address	= CPU();
+	name	= ID_CPU;
+	exinf	= 0x0;
+	start	= ON;
+	phsatr	= OFF;
+	interval_counter	= 1000;
+	phs_counter	= 0x0;
+};
+task[]{
+	entry_address	= capteur();
+	name	= ID_capteur;
+	stack_size	= 512;
+	stack_section	= stack;
+	priority	= 8;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+task[]{
+	entry_address	= LED_JAUNE();
+	name	= ID_LED_JAUNE;
+	stack_size	= 512;
+	stack_section	= stack;
+	priority	= 8;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+cyclic_hand[]{
+	entry_address	= LED_VERTE();
+	name	= ID_LED_VERTE;
+	exinf	= 0x0;
+	start	= OFF;
+	phsatr	= OFF;
+	interval_counter	= 0x5;
+	phs_counter	= 0x0;
+};
+cyclic_hand[]{
+	entry_address	= BP_G();
+	name	= ID_BP_G;
+	exinf	= 0x0;
+	start	= ON;
+	phsatr	= OFF;
+	interval_counter	= 0x10;
+	phs_counter	= 0x0;
+};
 
 
 
 
 
+
+
+
+
+
+
 task[]{
 	entry_address	= periph_tx();
 	name	= ID_periph_tx;
@@ -125,21 +175,6 @@
 	wait_queue	= TA_TFIFO;
 	buffer_size	= 4;
 };
-
-
-
-
-cyclic_hand[]{
-	entry_address	= acqui();
-	name	= ID_acqui;
-	exinf	= 0x0;
-	start	= OFF;
-	phsatr	= OFF;
-	interval_counter	= 0x64;
-	phs_counter	= 0x0;
-};
-
-
 vdataqueue[]{
 	name	= QdmTouche;
 	wait_queue	= TA_TFIFO;
