Index: branch/fichot/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/fichot/Emb_App/SessionM32C_E8a_system.ini	(revision 480)
+++ branch/fichot/Emb_App/SessionM32C_E8a_system.ini	(revision 481)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0022
+RESET=ff0166
Index: branch/fichot/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/fichot/Emb_App/SessionM32C_E8a_system.hsf	(revision 480)
+++ branch/fichot/Emb_App/SessionM32C_E8a_system.hsf	(revision 481)
@@ -151,10 +151,10 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF0578" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000BE8" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000818" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000004" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000044" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000B02" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000083C" 
+"{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" 
@@ -173,7 +173,7 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "000000000000000A" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000C14" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000B38" 
 "{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" 
@@ -209,7 +209,11 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "angle, 10, 0, P, Col, Hex, N" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "2" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "capt, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "rpiste, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "4" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -313,13 +317,13 @@
 [WINDOW_Z_ORDER]
 "E:\tp_info6_2018_fichot\Emb_App\crt0mr.a30" 
 "E:\tp_info6_2018_fichot\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_2018_fichot\bsp\carte_io.h" 
+"E:\tp_info6_2018_fichot\bsp\carte_m32.h" 
+"E:\tp_info6_2018_fichot\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_2018_fichot\bsp\uart0.c" 
+"E:\tp_info6_2018_fichot\bsp\periph.c" 
 "E:\tp_info6_2018_fichot\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_fichot\bsp\clavier.c" 
-"E:\tp_info6_2018_fichot\bsp\uart0.c" 
-"E:\tp_info6_2018_fichot\Emb_App\conf_noyau.cfg" 
-"E:\tp_info6_2018_fichot\bsp\periph.c" 
-"E:\tp_info6_2018_fichot\bsp\carte_m32.h" 
-"E:\tp_info6_2018_fichot\bsp\carte_io.h" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -366,5 +370,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 95549384 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 94580960 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/fichot/Emb_App/programme_principal_etud.c
===================================================================
--- branch/fichot/Emb_App/programme_principal_etud.c	(revision 480)
+++ branch/fichot/Emb_App/programme_principal_etud.c	(revision 481)
@@ -121,22 +121,29 @@
 //				correspondant au nom du véhicule si le nom se termine par '*'
 
 
-int k1=4;
-int k2=2;
+int k1 = 4;
+int k2 = 2;
 int k3 = 1;
-unsigned short capt=0;
-unsigned short stop = 0;
+unsigned short retour;
 unsigned short vitesse;
+unsigned short stop;
 int num_piste;                                                
 int rpiste;
-int saut =0;
 int angle_roue;
 int distance_v;
+int top = 0;
+int zou = 0;  
+int zette = 0;
+int s_urgent = 0;
+int i_urgent = 0;
+char t[]="";
+int temps;
 
-  
 
 CanFrame vit_roue; 
 
+
+
 void demarrer(vitesse)
 {
 	vit_roue.data.id='V'; 
@@ -213,25 +220,6 @@
 
 
 
-
-/*void saut_rouge (){
-        
-        while(1){
-                if(num_piste1 == 3){                         
-                        if( capteur == 0x7620 ){        
-                                dly_tsk(1000);
-                                saut = 1;
-                        }        
-                        else {
-                                saut = 0;
-                        }
-                }
-                dly_tsk(10);
-        }
-}
-			
-			
-*/
 				
 void piste(){
         CanFrame requete;
@@ -243,11 +231,74 @@
         snd_dtq(CanTx, requete.msg);
         wai_flg(ev_periph, 0x04, TWF_ANDW, &flag); 
         num_piste = periph[ADDR('M')].val;      
-        rpiste = num_piste & 0x00ff;        
+        rpiste = num_piste & 0x00ff;
+		dly_tsk(1000);
+		switch (rpiste)
+		{
+			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;
+		}
+		
 }				
+
 			
 
+void feu_vert()
+{
+	CanFrame requete;
+	UINT flag;
+	unsigned short feu1,feu ;
+	
+	while(1)
+	{
+		requete.data.id = 'M';
+		requete.data.rtr = 1;
+		periph[ADDR('M')].ev = 0x05;
+		snd_dtq(CanTx, requete.msg);
+		wai_flg(ev_periph, 0x05, TWF_ANDW, &flag);
+		feu1 = periph[ADDR('M')].val;
+		feu = (feu1 & 0x8000);
+		if (feu == 0x8000)
+		{
+			top = 1;
+			//lcd_str("feu vert");
+		}
+	dly_tsk(5);
+	}
+}
 
+void afficheur(){
+	CanFrame req;
+    UINT flag;
+    while(1){
+    	req.data.id='H';
+        req.data.rtr=1;
+        periph[ADDR('H')].ev=0x01;
+        snd_dtq(CanTx,req.msg);
+        wai_flg(ev_periph,0x01,TWF_ANDW,&flag);
+        temps = periph[ADDR('H')].val;
+        sprintf(t,"%d",temps);
+        lcd_str(t);
+        dly_tsk(100);
+        lcd_init();
+	}
+}
+
+
+       
+                    
+
+
 void main()
 {        
     ports_mcu();
@@ -259,16 +310,21 @@
     capture_init();
 	sta_tsk(ID_periph_rx);
 	sta_tsk(ID_piste);
+	dly_tsk(2000);
 	sta_cyc(ID_acqui);
+	sta_tsk(ID_FEU_VERT);
 	sta_tsk(ID_asserv_tourelle);
 	dly_tsk(1000);
 	sta_tsk(ID_asserv2);
+	sta_tsk(ID_afficheur);
 	dly_tsk(2000);
 	demarrer(30);
 	
 	while(1){
 		
+		LED_V=1;
         dly_tsk(2000);	
+		LED_V=! LED_V;
     }
          
 }
Index: branch/fichot/Emb_App/conf_noyau.cfg
===================================================================
--- branch/fichot/Emb_App/conf_noyau.cfg	(revision 480)
+++ branch/fichot/Emb_App/conf_noyau.cfg	(revision 481)
@@ -2,7 +2,7 @@
 //
 //    kernel.cfg : building file for MR308 Ver.4.00
 //
-//    Generated by M3T-MR308 GUI Configurator at 2018/12/19 17:27:37
+//    Generated by M3T-MR308 GUI Configurator at 2019/01/14 15:44:19
 //
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -9,7 +9,7 @@
 // system definition
 system{
 	stack_size	= 256;
-	priority	= 10;
+	priority	= 20;
 	system_IPL	 = 4;
 	message_pri	 = 1;
 	timeout	 = YES;
@@ -20,7 +20,7 @@
 
 // max definition
 maxdefine{
-	max_task	= 6;
+	max_task	= 8;
 	max_flag	= 3;
 	max_dtq	= 2;
 	max_cyh	= 1;
@@ -88,6 +88,24 @@
 	initial_start	= OFF;
 	exinf	= 0x0;
 };
+task[]{
+	entry_address	= feu_vert();
+	name	= ID_FEU_VERT;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 5;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+task[]{
+	entry_address	= afficheur();
+	name	= ID_afficheur;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 20;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
 
 flag[]{
 	name	= ev_bus_fin_tr;
Index: branch/fichot/Emb_App/conf_noyau.hcf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
