Index: branch/Styves_POUOTONG/tp_info6/Emb_App.tws
===================================================================
--- branch/Styves_POUOTONG/tp_info6/Emb_App.tws	(revision 265)
+++ branch/Styves_POUOTONG/tp_info6/Emb_App.tws	(revision 266)
@@ -8,12 +8,20 @@
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\periph.c" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\periph.h" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\uart0.c" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\Debug\sys_rom.inc" 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\Debug\sys_rom.inc" 100 100 1430 351 0 4 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\conf_noyau.cfg" 75 75 1430 351 0 3 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 539 0 1 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 539 1 0 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\periph.c" 50 50 1430 351 0 2 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\periph.h" 125 125 1430 351 0 5 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\uart0.c" 150 150 1430 351 0 6 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/Styves_POUOTONG/tp_info6/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/Styves_POUOTONG/tp_info6/Emb_App/SessionM32C_E8a_system.ini	(revision 265)
+++ branch/Styves_POUOTONG/tp_info6/Emb_App/SessionM32C_E8a_system.ini	(revision 266)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0018
+RESET=ff0016
Index: branch/Styves_POUOTONG/tp_info6/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/Styves_POUOTONG/tp_info6/Emb_App/SessionM32C_E8a_system.hsf	(revision 265)
+++ branch/Styves_POUOTONG/tp_info6/Emb_App/SessionM32C_E8a_system.hsf	(revision 266)
@@ -205,11 +205,11 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth2" "148" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "238" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH" "c,buff,n,rx,flag," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "alpha, 1, 0, P, Col, Dec, MN" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "alpha, 10, 0, P, Col, Hex, N" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "cmd, 1, 0, P, Col, Dec, MN" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "cmd, 10, 0, P, Col, Hex, N" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "D, 1, 0, P, Col, Dec, MN" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "dist, 1, 0, P, Col, Dec, MN" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "3" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
@@ -315,6 +315,10 @@
 [WINDOW_Z_ORDER]
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\programme_principal_etud.c" 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\uart0.c" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\periph.h" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\Debug\sys_rom.inc" 
+"E:\tp_info6_2018_Styves_POUOTONG\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_Styves_POUOTONG\tp_info6\bsp\periph.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
@@ -362,5 +366,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 100275480 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 99796176 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/Styves_POUOTONG/tp_info6/Emb_App/programme_principal_etud.c
===================================================================
--- branch/Styves_POUOTONG/tp_info6/Emb_App/programme_principal_etud.c	(revision 265)
+++ branch/Styves_POUOTONG/tp_info6/Emb_App/programme_principal_etud.c	(revision 266)
@@ -120,11 +120,6 @@
 //'I'/73/Ox49 : Définition du nom du véhicule. Doit débuter par le caractère '#' et entraine le chargement de la configuration de piste
 //				correspondant au nom du véhicule si le nom se termine par '*'
 
-
-short angle_roue;
-short D;
-short k=1;
-
 void Asserv0()			//asservissemt de la tourelle
 {
 		CanFrame requete; 
@@ -132,7 +127,8 @@
 short alpha;
 short cmd;
 short erreur;
-short consigne=450;		
+short consigne=450;	
+short k=1;	
 	while(1){	
 		requete.data.id = 'R';
 		requete.data.rtr = 1;
@@ -149,9 +145,7 @@
 		dly_tsk(10);
 		}
 	}
-
-
-int dist;
+short dist;
 void Asserv1()			//asservissemt de la tourelle
 {
 		CanFrame requete; 
@@ -159,11 +153,12 @@
 
 short cmd;
 short erreur;
-short consigne=719;		
+short consigne=703;
+short k=-1;		
 		requete.data.id = 'V';
 		requete.data.rtr = 0;
-		requete.data.val=15;
-		snd_dtq(CanTx,requete.msg);		
+		requete.data.val=25;
+		snd_dtq(CanTx,requete.msg);
 	while(1){	
 		requete.data.id = 'U';
 		requete.data.rtr = 1;
@@ -171,7 +166,7 @@
 		dist = periph[ADDR('U')].val;
 		
 		erreur = consigne - dist;
-		cmd = -erreur*k;
+		cmd = erreur*k;
 		
 		comm.data.id = 'D';
 		comm.data.rtr = 0;		//Indique une ecriture
