Index: branch/mbaye/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/mbaye/Emb_App/SessionM32C_E8a_system.ini	(revision 509)
+++ branch/mbaye/Emb_App/SessionM32C_E8a_system.ini	(revision 510)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0012
+RESET=ff0042
Index: branch/mbaye/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/mbaye/Emb_App/SessionM32C_E8a_system.hsf	(revision 509)
+++ branch/mbaye/Emb_App/SessionM32C_E8a_system.hsf	(revision 510)
@@ -141,7 +141,7 @@
 "{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" "0000000000000044" 
+"{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" 
@@ -149,10 +149,10 @@
 "{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" "0000000000FF0573" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF0570" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "000000000000163E" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000086E" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000001852" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000882" 
 "{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_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" "000000000000000B" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "000000000000166A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "000000000000187E" 
 "{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" 
@@ -371,5 +371,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 75247360 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 90910464 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/mbaye/Emb_App/programme_principal_etud.c
===================================================================
--- branch/mbaye/Emb_App/programme_principal_etud.c	(revision 509)
+++ branch/mbaye/Emb_App/programme_principal_etud.c	(revision 510)
@@ -129,6 +129,7 @@
 int info_piste;
 int numero_p;
 int feu;
+//int tour=1;
 
 void asserv_T()
 {
@@ -145,7 +146,7 @@
 	   comm.data.id='T'; comm.data.rtr=0; 
 	   comm.data.val=1.0*(450-pos);
 	   snd_dtq (CanTx,comm.msg);
-	   dly_tsk(100);
+	   dly_tsk(50);
 	}
 	
 }
@@ -218,19 +219,19 @@
 	           }
 	       }
 		   else if(capt==(0x5604))
-		   {
-			   comm.data.val=0;
-	           snd_dtq (CanTx,comm.msg);
-		       if (dis>1000) 
-	           {
+	       {
+		      comm.data.val=0;
+	          snd_dtq (CanTx,comm.msg);
+		      if (dis>1000) 
+	          {
 		         dis = 710;
-	           }
-		       else
-	           {
+	          }
+		      else
+	          {
 			     dis = periph[ADDR('U')].val;
 	             comm.data.val=-1.0*(710-dis);
 	             snd_dtq (CanTx,comm.msg);
-	           }
+	          }
 	       }
 		   else
 		   {
@@ -243,7 +244,7 @@
 		   comm.data.val=-1.0*(710-dis);
 	       snd_dtq (CanTx,comm.msg);
 	   }
-	   dly_tsk(100);
+	   dly_tsk(20);
 	}
 }
 void vitesse_roue()
@@ -252,35 +253,45 @@
 	{
 	  CanFrame commv;
 	  commv.data.id='V'; commv.data.rtr=0; 
-      dly_tsk(2000);
+      dly_tsk(3000);
+	  //if(capt==0x5602) tour=tour+1;
 	  if(Bp_G==1)
 	  {
 		  commv.data.val=0;
 	      snd_dtq (CanTx,commv.msg);
 	  }
-	    else if(numero_p==0x0001)
-		{
+	  /*if(tour==4)
+	  {
+		  commv.data.val=0;
+	      snd_dtq (CanTx,commv.msg);
+	  }*/
+	  switch (numero_p)
+	  {
+	    //else if(numero_p==0x0001)
+		case 0x0001:
+		//{
+			
 		  if(capt==0x5602)
 		  {
-	        commv.data.val=30;
+	        commv.data.val=40;
 	        snd_dtq (CanTx,commv.msg);
 		  }
 		  
 		  else if(capt==0x5603)
 		  {
-	        commv.data.val=30;
+	        commv.data.val=40;
 	        snd_dtq (CanTx,commv.msg);
 		  }
 		  
 		   else if(capt==0x5604)
 		  {
-	        commv.data.val=30;
+	        commv.data.val=40;
 	        snd_dtq (CanTx,commv.msg);
 		  }
 		  
 		  else if(capt==0x5601)
 		  {
-	        commv.data.val=30;
+	        commv.data.val=40;
 	        snd_dtq (CanTx,commv.msg);
 		  }
 		  else
@@ -288,41 +299,64 @@
 		    commv.data.val=15;
 	        snd_dtq (CanTx,commv.msg);	
 		  }
-		}
-	    else if(numero_p==0x0002)
-		{
-		  if(capt==0x5603)
+		  break;
+		//}
+	    //else if(numero_p==0x0002)
+		case 0x0002:
+		//{
+			 if(capt==0x5602)
 		  {
-	        commv.data.val=15;
+	        commv.data.val=35;
 	        snd_dtq (CanTx,commv.msg);
 		  }
+		  else if(capt==0x4a01)
+		  {
+	        commv.data.val=10;
+	        snd_dtq (CanTx,commv.msg);
+		  }
+			
+		  else if(capt==0x5603)
+		  {
+	        commv.data.val=20;
+	        snd_dtq (CanTx,commv.msg);
+		  }
+		  
 		  else
 		  {
 		    commv.data.val=15;
 	        snd_dtq (CanTx,commv.msg);	
 		  }
-		}
-		else if(numero_p==0x0003)
-		{
+		  break;
+		//}
+		//else if(numero_p==0x0003)
+		case 0x0003:
+		//{
+			
 		  if(capt==0x5603)
 		  {
-	        commv.data.val=48;
+	        commv.data.val=58;
 	        snd_dtq (CanTx,commv.msg);
+			/*dly_tsk(4000);
+			commv.data.val=10;
+	        snd_dtq (CanTx,commv.msg);*/
 	 	  }
-		 else if(capt==0x7602)
+		 /*else if(capt==0x7602)
 		  {
 	        commv.data.val=12;
 	        snd_dtq (CanTx,commv.msg);
-		  }
+		  }*/
 		  else
 		  {
-		    commv.data.val=12;
+		    commv.data.val=30;
 	        snd_dtq (CanTx,commv.msg);	
 		  }
-	     }
-	 dly_tsk(100);
+		  break;
+	     //}
+	  }
+	 dly_tsk(30);
 	}
 }
+ 
 void info_capt()
 {
 	while(1)
@@ -333,7 +367,7 @@
 	   snd_dtq (CanTx,req.msg);
 	   wai_flg(ev_periph, 0x01, TWF_ANDW, &flag);
        capt = periph[ADDR('C')].val;
-	   dly_tsk(100);
+	   dly_tsk(50);
 	}
 }
 void mode_course()
@@ -348,7 +382,7 @@
        info_piste = periph[ADDR('M')].val;
 	   numero_p= info_piste & 0x00FF;
 	   feu= info_piste & 0x8000;
-	   dly_tsk(100);
+	   dly_tsk(50);
 	}
 }
 void demarrage_feu()
@@ -411,35 +445,51 @@
  char sequence[10]={0};
  short code_touche;
  int index = 1;
-        while(1) 
-        {
+ while(1) 
+ {
           vrcv_dtq(QdmTouche, &code_touche);
             lcd_putc(code_touche);
                 while(code_touche != '*')
-             {                
+                {                
                    if(code_touche == '#')
                     {
                       sequence[0] = code_touche; 
                     } 
                     else
-     {
+                    {
                      sequence[index] = code_touche;
                         index++;
                      }
                      vrcv_dtq(QdmTouche, &code_touche);
                      lcd_putc(code_touche);
-                }
+                 }
         sequence[index] = '*';
         //consigne_tour = decode_int(sequence);
         index=1;
-        dly_tsk(200);
-        }
+ }
+		switch (numero_p){
+			case 0x0001:
+			lcd_str("Piste Verte");
+			break;
+			case 0x0002:
+			lcd_str("Piste Bleue");
+			break;
+			case 0x0003:
+			lcd_str("Piste Rouge");
+			break;
+			case 0x0004:
+			lcd_str("Piste Noire");
+			break;
+		}
+		 dly_tsk(50);
+		
 }
 
 void main()
 {
 	ports_mcu();
-    lcd_init();
+    lcd_init();
+	
 	periph_init();
 	periph_nom("#km07*");
 
Index: branch/mbaye/Emb_App/conf_noyau.cfg
===================================================================
--- branch/mbaye/Emb_App/conf_noyau.cfg	(revision 509)
+++ branch/mbaye/Emb_App/conf_noyau.cfg	(revision 510)
@@ -93,7 +93,7 @@
 	name	= ID_clavier;
 	stack_size	= 512;
 	stack_section	= stack;
-	priority	= 10;
+	priority	= 9;
 	initial_start	= ON;
 	exinf	= 0x0;
 };
