Index: branch/lepogam/Emb_App.tws
===================================================================
--- branch/lepogam/Emb_App.tws	(revision 370)
+++ branch/lepogam/Emb_App.tws	(revision 371)
@@ -7,17 +7,13 @@
 [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" 0 0 1596 539 0 0 
-"E:\tp_info6_lepogam\bsp\periph.c" -8 -30 1596 539 1 4 
+"E:\tp_info6_lepogam\Emb_App\conf_noyau.cfg" 25 25 1405 357 0 2 
+"E:\tp_info6_lepogam\Emb_App\crt0mr.a30" 0 0 1596 570 0 0 
+"E:\tp_info6_lepogam\Emb_App\programme_principal_etud.c" -8 -30 1596 539 1 1 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/lepogam/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/lepogam/Emb_App/SessionM32C_E8a_system.ini	(revision 370)
+++ branch/lepogam/Emb_App/SessionM32C_E8a_system.ini	(revision 371)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0036
+RESET=ff0038
Index: branch/lepogam/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/lepogam/Emb_App/SessionM32C_E8a_system.hsf	(revision 370)
+++ branch/lepogam/Emb_App/SessionM32C_E8a_system.hsf	(revision 371)
@@ -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" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000001" 
 "{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,11 +149,11 @@
 "{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" "0000000000FF2FA8" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF33F1" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000B34" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000A5C" 
 "{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_2" "00000000000000F4" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "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" "0000000000000001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" 
 "{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" "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_4" "0000000000000004" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000FE00F2" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000A5C" 
 "{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" 
@@ -319,11 +319,9 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
-"E:\tp_info6_lepogam\bsp\periph.c" 
+"E:\tp_info6_lepogam\Emb_App\programme_principal_etud.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]
@@ -370,5 +368,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 103003056 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 102881960 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 370)
+++ branch/lepogam/Emb_App/programme_principal_etud.c	(revision 371)
@@ -130,6 +130,7 @@
 unsigned int consigne=450;
 unsigned int consigne_vitesse=50;
 unsigned int vitesse_min=30;
+unsigned int vitesse_saut=45;
 unsigned int valeur_t=0;
 unsigned int valeur_r=0;
 int go=0;
@@ -158,14 +159,14 @@
 			
         	case(256) : //verte
             consigne_vitesse =70; //60
-            vitesse_min =25; //35
-       		distance_ref_init = 700; // décalée à gauche 820
+            vitesse_min =34; //35
+       		distance_ref_init = 800; // décalée à gauche 820
 			go=1;
             break;
 			
             case(512) : //bleue
-            consigne_vitesse =50; //48 ok 21'19, max 50
-            vitesse_min =30;//26 ok 21,19, max 30
+            consigne_vitesse =58; //58 ok 21'19, max 58
+            vitesse_min =30;//30 ok 21,19, max 30
             distance_ref_init = 700; // centrée 700
 			go=1;
             break;
@@ -174,6 +175,7 @@
             consigne_vitesse =46; //40 ok 26,19
             vitesse_min =20; // 20 ok 26'19
             distance_ref_init = 700;
+			vitesse_saut=45;
 			go=1;
             break;
 
@@ -182,6 +184,7 @@
             consigne_vitesse =22;
             vitesse_min =22;
             distance_ref_init = 700;
+			vitesse_saut=42;
 			go=1;
             break;
             }
@@ -217,7 +220,12 @@
 	}
 
 void asserv1(){ //asservissement tourelle
-	if(alpha!=consigne) valeur_t=k1*(consigne-alpha);	
+	if(couleur==0x18e0){ //pente piste noire petit bloc cyan 64
+		if(alpha!=610) valeur_t=k1*(610-alpha);
+		}
+	else {
+		if(alpha!=consigne) valeur_t=k1*(consigne-alpha);
+		}		
 	}
 
 void asserv_roue(){
@@ -248,10 +256,14 @@
 	}
 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=925;
+	else if(couleur==0x18d0 || couleur==0x18c1){ // barille: petit bloc cyan 64 et piste caillou: petit bloc cyan 6
+		distance_ref=350;
 		if(distance!=distance_ref) valeur_r=-k2*(distance_ref-distance);
 		}
+	else if(couleur==0x18e0){
+		distance_ref=570;
+		if(distance!=distance_ref) valeur_r=-k2*(distance_ref-distance);
+		}
 	else {
 		distance_ref=distance_ref_init;
 		if(distance!=distance_ref) valeur_r=-k2*(distance_ref-distance);
@@ -282,11 +294,13 @@
 	}
 void asserv3(){ //asservisement vitesse
 	if(couleur==0x1580 || couleur==0x1581 ) vitesse=consigne_vitesse; // vert=ligne droite
-	else if(couleur==0x1c80) vitesse=45; // vitesse saut: bloc rouge grand valeur 2
+	else if(couleur==0x1c80) vitesse=vitesse_saut; // vitesse saut: bloc rouge grand valeur 2
 	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) 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
+	else if(couleur==0x18e0) vitesse=8; //pente piste: petit bloc cyan 128
+	else if(couleur==0x18c1) vitesse=15; //piste caillou: petit bloc cyan 6
 	else{
 		vitesse=vitesse_min; //virage
 		}
Index: branch/lepogam/Emb_App/DefaultSession.hsf
===================================================================
--- branch/lepogam/Emb_App/DefaultSession.hsf	(revision 370)
+++ branch/lepogam/Emb_App/DefaultSession.hsf	(revision 371)
@@ -33,6 +33,7 @@
 [CONFIG_INFO_VD4]
 0 
 [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.03" 195 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
 "{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 195 0 0 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
 "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 284 0 0 350 200 18 0 "" "0.0" 
@@ -54,12 +55,7 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
-"D:\laffont\Tp_Info14\Emb_App\programme_principal_etud.c" 
-"D:\laffont\Tp_Info14\Emb_App\uart0.c" 
-"D:\laffont\Tp_Info14\Emb_App\crt0mr.a30" 
-"D:\laffont\Tp_Info14\Emb_App\conf_noyau.cfg" 
-"D:\laffont\Tp_Info14\Emb_App\periph.c" 
-"D:\laffont\Tp_Info14\Emb_App\c_sec.inc" 
+"E:\tp_info6_lepogam\Emb_App\crt0mr.a30" 
 [TARGET_NAME]
 "" "" 0 
 [STATUSBAR_STATEINFO_VD1]
Index: branch/lepogam/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/lepogam/Emb_App/EmbM32C87App.tps	(revision 370)
+++ branch/lepogam/Emb_App/EmbM32C87App.tps	(revision 371)
@@ -18,7 +18,7 @@
 "SessionM32C_E8a_system" 
 [GENERAL_DATA_PROJECT]
 [GENERAL_DATA_CONFIGURATION_Debug]
-"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE" 
+"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE" 
 [SESSIONS_Debug]
 "DefaultSession" 
 "SessionM32C_E8a_system" 
