Index: branch/belin/Emb_App.tws
===================================================================
--- branch/belin/Emb_App.tws	(revision 352)
+++ branch/belin/Emb_App.tws	(revision 353)
@@ -7,33 +7,19 @@
 [GENERAL_DATA]
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
-"E:\tp_info_2018_belin\bsp\can.c" 
-"E:\tp_info_2018_belin\bsp\clavier.c" 
-"E:\tp_info_2018_belin\bsp\dma0.c" 
-"E:\tp_info_2018_belin\bsp\mli.c" 
-"E:\tp_info_2018_belin\bsp\periph.c" 
-"E:\tp_info_2018_belin\bsp\radiocommande.c" 
+"E:\tp_info_2018_belin\bsp\lcd.c" 
+"E:\tp_info_2018_belin\bsp\lcd.h" 
+"E:\tp_info_2018_belin\bsp\mli.h" 
 "E:\tp_info_2018_belin\bsp\uart0.c" 
-"E:\tp_info_2018_belin\Emb_App\conf_noyau.cfg" 
 "E:\tp_info_2018_belin\Emb_App\crt0mr.a30" 
-"E:\tp_info_2018_belin\Emb_App\Debug\kernel_id.h" 
-"E:\tp_info_2018_belin\Emb_App\Debug\kernel_sysint.h" 
-"E:\tp_info_2018_belin\Emb_App\Debug\mr308.inc" 
 "E:\tp_info_2018_belin\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
-"E:\tp_info_2018_belin\Emb_App\Debug\kernel_id.h" 50 50 790 335 0 1 
-"E:\tp_info_2018_belin\Emb_App\Debug\kernel_sysint.h" 75 75 790 335 0 2 
-"E:\tp_info_2018_belin\Emb_App\Debug\mr308.inc" 100 100 765 416 0 12 
-"E:\tp_info_2018_belin\Emb_App\conf_noyau.cfg" 50 50 765 416 0 10 
-"E:\tp_info_2018_belin\Emb_App\crt0mr.a30" -8 -30 956 629 1 3 
-"E:\tp_info_2018_belin\Emb_App\programme_principal_etud.c" 0 0 956 629 0 0 
-"E:\tp_info_2018_belin\bsp\can.c" 100 100 765 416 0 4 
-"E:\tp_info_2018_belin\bsp\clavier.c" 125 125 765 416 0 5 
-"E:\tp_info_2018_belin\bsp\dma0.c" 150 150 765 416 0 6 
-"E:\tp_info_2018_belin\bsp\mli.c" 175 175 765 416 0 7 
-"E:\tp_info_2018_belin\bsp\periph.c" 25 25 765 416 0 9 
-"E:\tp_info_2018_belin\bsp\radiocommande.c" 0 0 765 416 0 8 
-"E:\tp_info_2018_belin\bsp\uart0.c" 75 75 765 416 0 11 
+"E:\tp_info_2018_belin\Emb_App\crt0mr.a30" 175 175 765 416 0 2 
+"E:\tp_info_2018_belin\Emb_App\programme_principal_etud.c" -8 -30 956 629 1 1 
+"E:\tp_info_2018_belin\bsp\lcd.c" 50 50 765 416 0 5 
+"E:\tp_info_2018_belin\bsp\lcd.h" 0 0 765 416 0 3 
+"E:\tp_info_2018_belin\bsp\mli.h" 25 25 765 416 0 4 
+"E:\tp_info_2018_belin\bsp\uart0.c" 75 75 765 416 0 6 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/belin/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/belin/Emb_App/SessionM32C_E8a_system.ini	(revision 352)
+++ branch/belin/Emb_App/SessionM32C_E8a_system.ini	(revision 353)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0022
+RESET=ff004a
Index: branch/belin/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/belin/Emb_App/SessionM32C_E8a_system.hsf	(revision 352)
+++ branch/belin/Emb_App/SessionM32C_E8a_system.hsf	(revision 353)
@@ -152,7 +152,7 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FFFFFF" 
 "{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_19" "000000000000C400" 
 "{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" 
@@ -207,9 +207,13 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH" "c,buff,n,rx,flag," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "capt, 2, 0, P, Col, Hex, N" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "correction, 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" "1" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "NomPiste, 2, 0, P, Col, Hex, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "GEL, 2, 0, P, Col, Hex, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "Distance, 2, 0, P, Col, Dec, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Global," 
+"{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" 
@@ -817,7 +821,7 @@
 [WINDOW_POSITION_STATE_DATA_VD1]
 "Help" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 259 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
-"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 -4 -30 948 486 9 0 "" "0.0" 
+"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 125 125 761 412 10 0 "" "0.0" 
 "{WK_00000001_EVENT}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 1 "0.11" 365 0 0 350 200 2065 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "0.0" 
 "{WK_00000001_IO}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 0 "0.21" 259 0 0 350 200 18 0 "32817|32826|32819|32820|32821|32829" "0.0" 
 "{WK_00000001_MEMORY}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 1 "0.23" 365 2 -1 350 200 2065 0 "42202|42203|42204|42233|<<separator>>|42206|42205|42230|42229|42207|<<separator>>|42208|42209|42210|49076|42228|42227|<<separator>>|42231|42232|42234|42235|<<separator>>|42211|<<separator>>|32796|32797" "0.0" 
@@ -851,17 +855,11 @@
 [WINDOW_Z_ORDER]
 "E:\tp_info_2018_belin\Emb_App\programme_principal_etud.c" 
 "E:\tp_info_2018_belin\Emb_App\crt0mr.a30" 
-"E:\tp_info_2018_belin\Emb_App\Debug\mr308.inc" 
-"E:\tp_info_2018_belin\Emb_App\conf_noyau.cfg" 
-"E:\tp_info_2018_belin\bsp\periph.c" 
-"E:\tp_info_2018_belin\Emb_App\Debug\kernel_id.h" 
 "E:\tp_info_2018_belin\bsp\uart0.c" 
-"E:\tp_info_2018_belin\bsp\dma0.c" 
-"E:\tp_info_2018_belin\bsp\radiocommande.c" 
-"E:\tp_info_2018_belin\bsp\mli.c" 
-"E:\tp_info_2018_belin\bsp\clavier.c" 
-"E:\tp_info_2018_belin\bsp\can.c" 
-"E:\tp_info_2018_belin\Emb_App\Debug\kernel_sysint.h" 
+"E:\tp_info_2018_belin\bsp\lcd.h" 
+"E:\tp_info_2018_belin\bsp\lcd.c" 
+"E:\tp_info_2018_belin\bsp\mli.h" 
+"E:\tp_info_2018_belin\Disassembly" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -908,5 +906,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 99166936 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 100016304 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/belin/Emb_App/programme_principal_etud.c
===================================================================
--- branch/belin/Emb_App/programme_principal_etud.c	(revision 352)
+++ branch/belin/Emb_App/programme_principal_etud.c	(revision 353)
@@ -126,6 +126,7 @@
 unsigned short NomPiste;
 unsigned short consigneP;
 unsigned short Distance;
+unsigned short consigneT;
 
 	
 
@@ -134,7 +135,7 @@
 
 	CanFrame req;
 	CanFrame comm;
-	unsigned short correction, retour, consigneT;
+	unsigned short correction, retour;
 	
 	consigneT=450; 
 	
@@ -146,7 +147,7 @@
 		retour=periph[ADDR('R')].val; 
 	
 		//Asservissement
-		correction=5*(consigneT-retour);
+		correction=8*(consigneT-retour);
 		comm.data.id='T';
 		comm.data.rtr = 0;
 		comm.data.val = correction;
@@ -177,6 +178,7 @@
 		req.data.rtr = 1;
 		snd_dtq(CanTx, req.msg);
 		Distance=periph[ADDR('U')].val; 
+		
 		if(Distance>1500 || GEL==1 || Distance<350){
 				comm.data.id='D';
 				comm.data.rtr = 0;
@@ -185,14 +187,8 @@
 				dly_tsk(10);
 		}
 		else{
-				//Lecture de distance
-				LED_V=1;;	
-				req.data.id = 'U';
-				req.data.rtr = 1;
-				snd_dtq(CanTx, req.msg);
-				Distance=periph[ADDR('U')].val; 
 				//Asservissement
-				correction=15/10*(Distance-consigneP);
+				correction=1*(Distance-consigneP);
 				comm.data.id='D';
 				comm.data.rtr = 0;
 				comm.data.val = correction;
@@ -220,12 +216,7 @@
 
 		if(capt==0x7610 && GEL==0){
 			GEL=1;
-			LED_R=1;
 			commMoteur(44);
-			req.data.id = 'C';
-			req.data.rtr = 1;
-			snd_dtq(CanTx, req.msg);
-			capt=periph[ADDR('C')].val;
 		}
 		
 		//Circuit noir
@@ -233,24 +224,34 @@
 		if(capt==0x7600){
 			consigneP=950;
 		}
-		if(capt==0x4A01){
-			consigneP=700;
-	 
-		}
-		if(capt==0x7204)GEL=1;
+		if(capt==0x4A01)consigneP=700;
+		if(capt==0x6201) GEL=1;
+
 		dly_tsk(30);
 	}
 }
 		
-/*char* nomPiste(){
+void nomPiste(){
+	while(1){
 		CanFrame req;
 		req.data.id = 'M';
 		req.data.rtr = 1;
 		snd_dtq(CanTx, req.msg);
 		NomPiste=periph[ADDR('M')].val;
-		NomPiste=periph
+		NomPiste=NomPiste<<8;
+		switch(NomPiste){
+			case 0x0400: lcd_str("Piste Noire");
+			break;
+			case 0x0300: lcd_str("Piste Rouge");
+			break;
+			case 0x0200: lcd_str("Piste Bleue");
+			break;
+			case 0x0100: lcd_str("Piste Verte");
+			break;
+		}
+		dly_tsk(20);
+	}
 }
-	*/
 			
 void main()
 {
@@ -261,18 +262,17 @@
 	can_init();
     clavier_init(1);
 	capture_init();
-	
-	lcd_str("antoine");
+
 	sta_tsk(ID_periph_rx);
 	sta_tsk(ID_tourelle);
 	sta_tsk(ID_position);
 	sta_tsk(ID_capteur);
+	sta_tsk(ID_nomPiste);
 	dly_tsk(500);
-	commMoteur(30);
+	commMoteur(25);
 	
     while(1)
-    {
-		//nomPiste();
+    {
 		LED_J=1;
 		dly_tsk(100);
 		LED_J=0;
Index: branch/belin/Emb_App/conf_noyau.cfg
===================================================================
--- branch/belin/Emb_App/conf_noyau.cfg	(revision 352)
+++ branch/belin/Emb_App/conf_noyau.cfg	(revision 353)
@@ -2,7 +2,7 @@
 //
 //    kernel.cfg : building file for MR308 Ver.4.00
 //
-//    Generated by M3T-MR308 GUI Configurator at 2018/12/14 15:56:26
+//    Generated by M3T-MR308 GUI Configurator at 2018/12/19 17:18:43
 //
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -9,7 +9,7 @@
 // system definition
 system{
 	stack_size	= 256;
-	priority	= 8;
+	priority	= 9;
 	system_IPL	 = 4;
 	message_pri	 = 1;
 	timeout	 = YES;
@@ -20,7 +20,7 @@
 
 // max definition
 maxdefine{
-	max_task	= 6;
+	max_task	= 7;
 	max_flag	= 3;
 	max_dtq	= 2;
 	max_cyh	= 1;
@@ -88,6 +88,15 @@
 	initial_start	= OFF;
 	exinf	= 0x0;
 };
+task[]{
+	entry_address	= nomPiste();
+	name	= ID_nomPiste;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 9;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
 
 flag[]{
 	name	= ev_bus_fin_tr;
Index: branch/belin/Emb_App/conf_noyau.hcf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
