Index: branch/lepogam/Emb_App.tws
===================================================================
--- branch/lepogam/Emb_App.tws	(revision 307)
+++ branch/lepogam/Emb_App.tws	(revision 308)
@@ -7,13 +7,17 @@
 [GENERAL_DATA]
 [BREAKPOINTS]
 [OPEN_WORKSPACE_FILES]
+"E:\tp_info6_lepogam\bsp\periph.c" 
 "E:\tp_info6_lepogam\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_lepogam\Emb_App\crt0mr.a30" 
+"E:\tp_info6_lepogam\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_lepogam\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
+"E:\tp_info6_lepogam\Emb_App\Debug\mr308.inc" 125 125 1430 351 0 3 
 "E:\tp_info6_lepogam\Emb_App\conf_noyau.cfg" 0 0 1430 351 0 1 
 "E:\tp_info6_lepogam\Emb_App\crt0mr.a30" 100 100 1430 351 0 2 
-"E:\tp_info6_lepogam\Emb_App\programme_principal_etud.c" -8 -30 1596 539 1 0 
+"E:\tp_info6_lepogam\Emb_App\programme_principal_etud.c" 0 0 1596 539 0 0 
+"E:\tp_info6_lepogam\bsp\periph.c" -8 -30 1596 539 1 4 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/lepogam/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/lepogam/Emb_App/SessionM32C_E8a_system.ini	(revision 307)
+++ branch/lepogam/Emb_App/SessionM32C_E8a_system.ini	(revision 308)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0038
+RESET=ff0036
Index: branch/lepogam/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/lepogam/Emb_App/SessionM32C_E8a_system.hsf	(revision 307)
+++ branch/lepogam/Emb_App/SessionM32C_E8a_system.hsf	(revision 308)
@@ -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" "0000000000000001" 
+"{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" 
@@ -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" "0000000000FF3383" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF2FA8" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000A5A" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000085E" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000B34" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000860" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
@@ -164,7 +164,7 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_27" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_28" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_29" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000001" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_30" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_31" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_32" "0000000000000000" 
@@ -171,9 +171,9 @@
 "{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_35" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000004" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "00000000001200FE" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000A5A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000B4E" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000B54" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000B40" 
 "{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" 
@@ -215,7 +215,9 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "vitesse_min, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "5" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "distance, 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" "6" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -317,9 +319,11 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
-"E:\tp_info6_lepogam\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_lepogam\bsp\periph.c" 
 "E:\tp_info6_lepogam\Emb_App\crt0mr.a30" 
 "E:\tp_info6_lepogam\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_lepogam\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_lepogam\Emb_App\Debug\mr308.inc" 
 [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 101587000 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 103003056 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/lepogam/Emb_App/programme_principal_etud.c
===================================================================
--- branch/lepogam/Emb_App/programme_principal_etud.c	(revision 307)
+++ branch/lepogam/Emb_App/programme_principal_etud.c	(revision 308)
@@ -128,9 +128,8 @@
 unsigned int distance_ref=700;
 unsigned int distance_ref_init=700;
 unsigned int consigne=450;
-unsigned int consigne_init=450;
-unsigned int consigne_vitesse=34;
-unsigned int vitesse_min=24;
+unsigned int consigne_vitesse=50;
+unsigned int vitesse_min=30;
 unsigned int valeur_t=0;
 unsigned int valeur_r=0;
 int go=0;
@@ -158,9 +157,9 @@
 		switch(npiste){
 			
         	case(256) : //verte
-            consigne_vitesse =60; //60
-            vitesse_min =35; //35
-       		distance_ref_init = 820; // décalée à gauche 820
+            consigne_vitesse =70; //60
+            vitesse_min =25; //35
+       		distance_ref_init = 700; // décalée à gauche 820
 			go=1;
             break;
 			
@@ -240,10 +239,10 @@
 	
 		comm.data.id='D'; 
 		comm.data.rtr=0; 
-		if(valeur_r>-100) comm.data.val=valeur_r;
-		else comm.data.val=-100;
+		comm.data.val=valeur_r;
+
 		snd_dtq (CanTx,comm.msg);
-		dly_tsk(10);
+		dly_tsk(3);
 		}
 
 	}
@@ -250,7 +249,7 @@
 void asserv2(){ //asservissement roue
 	if(couleur==0x1c80 || couleur==0x18c8 ) ; // avant saut: bloc rouge grand valeur 2 et pré-barille: petit bloc cyan 32 , bloc les roues
 	else if(couleur==0x18d0){
-		distance_ref=400;
+		distance_ref=925;
 		if(distance!=distance_ref) valeur_r=-k2*(distance_ref-distance);
 		}
 	else {
@@ -278,7 +277,7 @@
 		snd_dtq (CanTx,demande.msg); // Interrogation du peripherique
 		couleur=periph[ADDR('C')].val>>2; // contient la valeur de retour du simulateur.
 		
-		dly_tsk(100);
+		dly_tsk(60);
 		}
 	}
 void asserv3(){ //asservisement vitesse
@@ -287,7 +286,7 @@
 	else if(couleur==0x1c88) vitesse=vitesse_min; //vitesse après saut:  bloc rouge grand valeur 32 
 	else if(couleur==0x1a90 || couleur==0x1890) vitesse=consigne_vitesse-8; //mise en place rail: grand bloc jaune 64 et piste courbe: petit bloc bleu(cyan) 64
 	else if(couleur==0x1a88) vitesse=consigne_vitesse+4; //rail apres mise en place: gand bloc jaune 32 
-	else if(couleur==0x18d0 || couleur==0x18c8) vitesse=vitesse_min; //barille: petit bloc cyan 64 et pré-barille: petit bloc cyan 32
+	else if(couleur==0x18d0) vitesse=vitesse_min; //barille: petit bloc cyan 64 et prébarille: petit bloc cyan 32
 	else{
 		vitesse=vitesse_min; //virage
 		}
Index: branch/lepogam/Emb_App/conf_noyau.cfg
===================================================================
--- branch/lepogam/Emb_App/conf_noyau.cfg	(revision 307)
+++ branch/lepogam/Emb_App/conf_noyau.cfg	(revision 308)
@@ -140,7 +140,7 @@
 	exinf	= 0x0;
 	start	= OFF;
 	phsatr	= OFF;
-	interval_counter	= 0x64;
+	interval_counter	= 10;
 	phs_counter	= 0x0;
 };
 cyclic_hand[]{
@@ -149,7 +149,7 @@
 	exinf	= 0x0;
 	start	= OFF;
 	phsatr	= OFF;
-	interval_counter	= 0x64;
+	interval_counter	= 10;
 	phs_counter	= 0x0;
 };
 cyclic_hand[]{
@@ -158,7 +158,7 @@
 	exinf	= 0x0;
 	start	= OFF;
 	phsatr	= OFF;
-	interval_counter	= 0x64;
+	interval_counter	= 10;
 	phs_counter	= 0x0;
 };
 cyclic_hand[]{
@@ -167,7 +167,7 @@
 	exinf	= 0x0;
 	start	= OFF;
 	phsatr	= OFF;
-	interval_counter	= 0x64;
+	interval_counter	= 10;
 	phs_counter	= 0x0;
 };
 
Index: branch/lepogam/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/lepogam/Emb_App/EmbM32C87App.tps	(revision 307)
+++ branch/lepogam/Emb_App/EmbM32C87App.tps	(revision 308)
@@ -18,7 +18,7 @@
 "SessionM32C_E8a_system" 
 [GENERAL_DATA_PROJECT]
 [GENERAL_DATA_CONFIGURATION_Debug]
-"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE" 
+"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE" 
 [SESSIONS_Debug]
 "DefaultSession" 
 "SessionM32C_E8a_system" 
