Index: branch/schiano/Emb_App.tws
===================================================================
--- branch/schiano/Emb_App.tws	(revision 231)
+++ branch/schiano/Emb_App.tws	(revision 232)
@@ -11,15 +11,13 @@
 "E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\mr308.inc" 125 125 1430 351 0 5 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\conf_noyau.cfg" 25 25 1430 351 0 1 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 539 0 2 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 539 1 0 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 125 125 1430 351 0 3 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 25 25 1430 351 0 4 
+"E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 576 1 0 
+"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 175 175 1405 363 0 4 
+"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 150 150 1405 363 0 3 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/schiano/Emb_App/SessionM32C_E8a_system.ini
===================================================================
--- branch/schiano/Emb_App/SessionM32C_E8a_system.ini	(revision 231)
+++ branch/schiano/Emb_App/SessionM32C_E8a_system.ini	(revision 232)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=ff0030
+RESET=ff003e
Index: branch/schiano/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/schiano/Emb_App/SessionM32C_E8a_system.hsf	(revision 231)
+++ branch/schiano/Emb_App/SessionM32C_E8a_system.hsf	(revision 232)
@@ -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" 
@@ -148,13 +148,13 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" 
 "{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" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF002A" 
-"{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_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF31AF" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000A7A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000087E" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000012" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C1" 
 "{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" 
@@ -169,12 +169,12 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_31" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_32" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_33" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_34" "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" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000008" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000A50000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000A7A" 
+"{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" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "36" 
@@ -199,29 +199,43 @@
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_VIEW" "0,0,0,0,0,0" 
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ImageCtrlViews" "0" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "4" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "148" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "211" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth1" "186" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth12" "200" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth2" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH" "c,buff,n,rx,flag," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "reponse.data.val, 10, 0, P, Col, Hex, N" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "alpha, 2, 0, P, Col, Hex, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "teta, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "CouleurCapteur, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "consigneVitesse, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "consignealpha, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "distancemur, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "consignedistance, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "angleRoue, 2, 0, P, Col, Hex, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "CouleurCapteur, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "distancemur, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "vitesselignedroite, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "consigneVitesse, 1, 0, P, Col, Hex, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007" "pistebleue, 1, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "vitessevirage, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007" "Couleurperso, 1, 0, P, Col, Hex, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "8" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008" "etatfeu, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009" "a, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010" "b, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011" "c, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0012" "d, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0012_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0013" "e, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0013_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014" "numero, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0014_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "15" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -291,14 +305,14 @@
 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 0 "0.11" 365 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
+"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 328 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_EVENT}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 0 "0.11" 365 0 0 350 200 18 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "0.0" 
+"{WK_00000001_EVENT}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 0 "0.08" 328 0 0 350 200 18 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "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" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "1.00" 365 0 0 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
-"{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 4 "0.16" 365 0 0 350 200 18 0 "47300|47301|47302|47303|47304|47305|47314|47306|47307|47308|47311|47312|47313|42211|42509|42303" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.58" 328 0 0 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
+"{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 4 "0.11" 328 0 0 350 200 18 0 "47300|47301|47302|47303|47304|47305|47314|47306|47307|47308|47311|47312|47313|42211|42509|42303" "0.0" 
 "{WK_00000001_REGISTERS}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59421 0 0 "1.00" 236 0 0 350 200 2065 0 "" "0.0" 
-"{WK_00000001_WATCH}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 1 "0.18" 365 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32772|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0" 
+"{WK_00000001_WATCH}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 3 "0.23" 328 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32772|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0" 
 "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 308 0 0 350 200 18 0 "" "0.0" 
 "{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
 "{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
@@ -324,11 +338,10 @@
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\programme_principal_etud.c" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 
-"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\crt0mr.a30" 
 "E:\tp_info6_2018_schiano\tp_info6\Emb_App\conf_noyau.cfg" 
-"E:\tp_info6_2018_schiano\tp_info6\Emb_App\Debug\mr308.inc" 
+"E:\tp_info6_2018_schiano\tp_info6\bsp\periph.c" 
+"E:\tp_info6_2018_schiano\tp_info6\bsp\uart0.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -375,5 +388,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 0 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 94921448 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/schiano/Emb_App/programme_principal_etud.c
===================================================================
--- branch/schiano/Emb_App/programme_principal_etud.c	(revision 231)
+++ branch/schiano/Emb_App/programme_principal_etud.c	(revision 232)
@@ -119,17 +119,22 @@
 //				disponible. 0xab avec a-> nombre de couleurs bien placées et b -> couleurs présentes mais mal placées.
 //'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 '*'
+
+int a =0,b=0,c=0,d=0,e=0;
+
+
 
 unsigned int alpha =0;
 unsigned int teta =100;
-unsigned int consignealpha = 450; //450 >722
+unsigned int consignealpha = 450; 
 unsigned int angleRoue =0;
+unsigned int consignedistance = 725;
 unsigned int distancemur =725;
-unsigned int consignedistance = 725; //722 piste verte 710 piste bleue 761
 unsigned int vitesselignedroite =0;
 unsigned int vitessevirage =0;
 
-int h;
+int etatfeu=0;
+int feuvert=0;
 int go=0;
 int numero;
 int Couleurperso =0;
@@ -141,7 +146,7 @@
 void main()
 {
 	CanFrame start;
-	CanFrame Numpiste;
+	
 	
 	ports_mcu();
     lcd_init();
@@ -160,23 +165,18 @@
 	sta_cyc(ID_asservangleroue); //assservissement angle roue
 	sta_tsk(ID_asservRoue);
 	
-	Numpiste.data.id='M';
-	Numpiste.data.rtr=1;
-	snd_dtq (CanTx,Numpiste.msg);
-	dly_tsk(500);	
-	numero=periph[ADDR('M')].val<<8;
+
 	sta_tsk(ID_numpiste);
 	while(go!=1); //attente detection de la piste
-	dly_tsk(500);
-	start.data.id='V';
-	start.data.rtr=0;
-	start.data.val=vitesselignedroite; //consigne de vitesse de la voiture
-	
-	snd_dtq (CanTx,start.msg);
-	sta_tsk(ID_AsservVitesse); //gestion des couleurs
+	
+	dly_tsk(1000);
+	
+	sta_tsk(ID_depart); //consigne de vitesse de la voiture
+	while(feuvert!=1);
+	sta_tsk(ID_AsservVitesse);//gestion des couleurs
 	//sta_cyc(ID_asservVitesseCyc);
 	
-    while(1)
+   while(1)
     {
 		
 
@@ -195,13 +195,23 @@
 
 void numpiste()
 {
+	CanFrame Numpiste;
+	
 	while(1){
+	a++;	
+	Numpiste.data.id='M';
+	Numpiste.data.rtr=1;
+	snd_dtq (CanTx,Numpiste.msg);
+	dly_tsk(500);	
+	numero=periph[ADDR('M')].val<<8;
+		
 		switch(numero){
 			case(256) : //verte
 			vitesselignedroite =80;
 			vitessevirage =35;
 			consignealpha = 400;
-			consignedistance = 880;
+			consignedistance = 785;
+			distancemur = consignedistance;
 			go =1;
 			break;
 		
@@ -210,6 +220,7 @@
 			vitessevirage =25;
 			consignealpha = 400;
 			consignedistance = 775;
+			distancemur = consignedistance;
 			go =1;
 			break;
 		
@@ -218,6 +229,7 @@
 			vitessevirage =25;
 			consignealpha = 450;
 			consignedistance = 700;
+			distancemur = consignedistance;
 			go=1;
 			break;
 		
@@ -225,7 +237,8 @@
 			vitesselignedroite =25;
 			vitessevirage =25;
 			consignealpha = 450;
-			consignedistance = 760;
+			consignedistance = 700;
+			distancemur = consignedistance;
 			go=1;
 			break;
 		}
@@ -235,6 +248,30 @@
 
 }
 
+void depart()
+{
+	CanFrame start;
+	CanFrame feu;
+	
+	while(1){
+		b++;
+		feu.data.id='M';
+		feu.data.rtr=1;
+		snd_dtq (CanTx,feu.msg);
+		dly_tsk(50);
+		etatfeu=periph[ADDR('M')].val>>15;
+		if(etatfeu==1){
+			start.data.id='V';
+			start.data.rtr=0;
+			start.data.val=vitesselignedroite;
+	
+			snd_dtq (CanTx,start.msg);
+			feuvert=1;
+			ext_tsk();
+		}
+	}
+}
+
 void asserv0()
 {	
 	CanFrame comm;
@@ -243,7 +280,7 @@
 	CanFrame reponse;
 	
 	while(1){
-
+		c++;
 		comm.data.id='T';
 		comm.data.rtr=0;
 		comm.data.val=teta; //consigne de vitesse de rotation de la tourelle
@@ -273,6 +310,7 @@
 	CanFrame reponseU;
 	
 	while(1){
+		d++;
 		angleroues.data.id='D';
 		angleroues.data.rtr=0;
 		angleroues.data.val=angleRoue; //consigne d'angle des roues de la voiture
@@ -303,6 +341,7 @@
 	CanFrame demandeCapteur;
 	
 	while(1){
+		e++;
 		demandeCapteur.data.id='C';
 		demandeCapteur.data.rtr=1;
 		
Index: branch/schiano/Emb_App/conf_noyau.cfg
===================================================================
--- branch/schiano/Emb_App/conf_noyau.cfg	(revision 231)
+++ branch/schiano/Emb_App/conf_noyau.cfg	(revision 232)
@@ -63,6 +63,16 @@
 };
 
 task[]{
+	entry_address	= depart();
+	name	= ID_depart;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 2;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+
+task[]{
 	entry_address	= numpiste();
 	name	= ID_numpiste;
 	stack_size	= 256;
@@ -166,7 +176,7 @@
 	exinf	= 0x0;
 	start	= OFF;
 	phsatr	= OFF;
-	interval_counter	= 15;
+	interval_counter	= 10;
 	phs_counter	= 0x0;
 };
 
Index: branch/schiano/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/schiano/Emb_App/EmbM32C87App.tps	(revision 231)
+++ branch/schiano/Emb_App/EmbM32C87App.tps	(revision 232)
@@ -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" 
