Index: branch/euphrasie_auguste/Emb_App.tws
===================================================================
--- branch/euphrasie_auguste/Emb_App.tws	(revision 188)
+++ branch/euphrasie_auguste/Emb_App.tws	(revision 189)
@@ -13,15 +13,17 @@
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 
 [WORKSPACE_FILE_STATES]
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 0 0 1430 351 0 2 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" -8 -30 1596 539 1 1 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 0 0 1426 347 0 0 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 100 100 1430 351 0 3 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 0 0 1430 351 0 6 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.h" 125 125 1430 351 0 4 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 150 150 1430 351 0 5 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 25 25 1430 351 0 6 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 0 0 1430 351 0 1 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 0 0 1430 351 0 5 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 539 1 0 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 100 100 1430 351 0 2 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 0 0 1430 351 0 4 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.h" 125 125 1430 351 0 3 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 50 50 1430 351 0 7 
 [LOADED_PROJECTS]
 "EmbM32C87App" 
 [END]
Index: branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf	(revision 188)
+++ branch/euphrasie_auguste/Emb_App/SessionM32C_E8a_system.hsf	(revision 189)
@@ -83,7 +83,7 @@
 "{4B022541-3E95-11D7-909C-00201898052D}ElfDwarf2Objects" "1" 
 "{4B022541-3E95-11D7-909C-00201898052D}LoadModule0OBJ_ELFDWARF2_ARRAY_EXPAND_LIMIT" "-1" 
 "{4B022541-3E95-11D7-909C-00201898052D}LoadModule0OBJ_STATUS_OF_EBD_CMD" "0" 
-"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRCtrlViews" "1" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRCtrlViews" "2" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0EnableRRam" "0" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0MrType" "2" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0MrType2ColumnSizeMode0Column0" "4" 
@@ -138,23 +138,78 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0MrType2StatusBarMode0" "1" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0MrType2StatusBarMode1" "1" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd0Sampling" "100" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1EnableRRam" "0" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType" "2" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column0" "4" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column1" "11" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column2" "5" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column3" "19" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column4" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column5" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column6" "7" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column7" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode0Column8" "9" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode1Column0" "5" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode1Column1" "130" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode2Column0" "7" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode2Column1" "35" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode3Column0" "4" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode3Column1" "29" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode3Column2" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode3Column3" "91" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode4Column0" "4" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode4Column1" "10" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode4Column2" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode4Column3" "113" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode5Column0" "4" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode5Column1" "21" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode5Column2" "55" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode5Column3" "55" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode6Column0" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode6Column1" "10" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode6Column2" "7" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode6Column3" "7" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode6Column4" "53" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode6Column5" "53" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode7Column0" "4" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode7Column1" "11" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode7Column2" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode7Column3" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode7Column4" "7" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode7Column5" "10" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode8Column0" "4" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode8Column1" "11" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode8Column2" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode8Column3" "10" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column0" "9" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column1" "10" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column2" "11" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column3" "7" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column4" "8" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column5" "9" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2ColumnSizeMode9Column6" "81" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2MrMode" "0" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2StatusBarMode0" "1" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1MrType2StatusBarMode1" "1" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWnd1Sampling" "100" 
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWndInstanceKey0" "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" 
+"{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWndInstanceKey1" "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system0" 
 "{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_1" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000004044" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000020" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" 
 "{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" "0000000000FF0028" 
-"{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" "0000000000FF059B" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000BE8" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000818" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000004044" 
 "{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 +224,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_4" "0000000000000008" 
 "{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_6" "0000000000000C14" 
+"{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,21 +254,25 @@
 "{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" "196" 
 "{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" "ang_T, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "commande_T, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "dist_mur_droit, 3, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "commande_D, 1, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "dist_mur_droit, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "commande_D, 1, 0, P, Col, Dec, MA" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "4" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "consigne_T, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "commande_V, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "commande_V_max, 1, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "num_piste, 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" 
@@ -283,12 +342,13 @@
 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.09" 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.08" 365 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.08" 365 0 0 350 200 2065 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 2 "0.70" 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 3 "0.01" 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.49" 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_system0" "WINDOW" 59422 0 3 "0.21" 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_PDMR}EmbM32C87AppSessionM32C_E8a_system" "WINDOW" 59422 0 4 "0.01" 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_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 0 "0.29" 365 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" 
@@ -315,13 +375,14 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\programme_principal_etud.c" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\uart0.c" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\Debug\mr308.inc" 
 "E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.h" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\clavier.c" 
-"E:\tp_info6_2018_euphrasie_auguste\tp_info6\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_2018_euphrasie_auguste\tp_info6\bsp\periph.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -368,5 +429,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 89516488 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 101051008 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/euphrasie_auguste/Emb_App/programme_principal_etud.c
===================================================================
--- branch/euphrasie_auguste/Emb_App/programme_principal_etud.c	(revision 188)
+++ branch/euphrasie_auguste/Emb_App/programme_principal_etud.c	(revision 189)
@@ -126,6 +126,11 @@
 
 void initialisation(void);
 
+void terrain_vert(void);
+void terrain_bleu(void);
+void terrain_rouge(void);
+void terrain_noir(void);
+
 void assser_tourelle(void);
 void asser_roue_vitesse(void);
 void decode_int(void);
@@ -140,44 +145,129 @@
 short ang_T;
 
 short distance_centre = 500;
-float k_D = 1.10;
+float k_D = 1.25;
 short commande_D;
 float dist_mur_droit;
 
-float k_V = 0.15;
+float k_V = 1.0;
 short commande_V_max = 40;
 short commande_V;
 
-unsigned short etat_feux;
+unsigned short num_piste;
 
 void main()
 {
-	initialisation();
-	for(i=0;i<25;i++){
-		assser_tourelle();
-		dly_tsk(10);
-	}
-	
-	
-	
-	
-	while((periph_requete('M') >> 15) == 0 ); // attente feux vert
+	initialisation();
     while(1)
-    {	
-		assser_tourelle();	 
-		
-		
-		
-		asser_roue_vitesse();
-		
-		
-		
-		dly_tsk(50);
+    {
+		num_piste = (periph_requete('M') << 8) >> 8;
+		switch(num_piste)
+     	   {
+     	   	case 1: 
+				 terrain_vert();
+     	   	     break;	
+			case 2: 
+     	   	     terrain_bleu();
+                 break;
+			case 3: 
+     	   	     terrain_rouge();
+                 break;
+			case 4: 
+     	   	     terrain_noir();
+                 break;
+			case 5: 
+				 terrain_vert();
+     	   	     break;
+			case 6: 
+     	   	     terrain_bleu();
+                 break;
+			case 7: 
+     	   	     terrain_rouge();
+                 break;
+			case 8: 
+     	   	     terrain_noir();
+                 break;
+		   }
     }
 }
 
 
 
+
+void terrain_vert(void){
+	while((num_piste == 1) || (num_piste == 5)){
+		for(i=0;i<50;i++){	assser_tourelle();	dly_tsk(10);}
+		periph_command('T', 0);
+		while((periph_requete('M') >> 15) == 0 )	dly_tsk(50); 				// attente feux vert
+		while((num_piste == 1) || (num_piste == 5)){
+			
+			assser_tourelle();
+			asser_roue_vitesse();
+			
+			
+			num_piste = (periph_requete('M') << 8) >> 8;
+			dly_tsk(50);
+		}
+	}
+}
+
+void terrain_bleu(void){
+	while((num_piste == 2) || (num_piste == 6)){
+		for(i=0;i<50;i++){	assser_tourelle();	dly_tsk(10);}
+		periph_command('T', 0);
+		while((periph_requete('M') >> 15) == 0 )	dly_tsk(50); 				// attente feux vert
+		while((num_piste == 2) || (num_piste == 6)){
+			
+			
+			
+			
+			
+			num_piste = (periph_requete('M') << 8) >> 8;
+			dly_tsk(50);
+		}
+	}
+}
+
+void terrain_rouge(void){
+	while((num_piste == 3) || (num_piste == 7)){
+		for(i=0;i<50;i++){	assser_tourelle();	dly_tsk(10);}
+		periph_command('T', 0);
+		while((periph_requete('M') >> 15) == 0 )	dly_tsk(50); 				// attente feux vert
+		while((num_piste == 3) || (num_piste == 7)){
+			
+			
+			
+			
+			
+			num_piste = (periph_requete('M') << 8) >> 8;
+			dly_tsk(50);
+		}
+	}
+}
+
+void terrain_noir(void){
+	while((num_piste == 4) || (num_piste == 8)){
+		for(i=0;i<50;i++){	assser_tourelle();	dly_tsk(10);}
+		periph_command('T', 0);
+		while((periph_requete('M') >> 15) == 0 )	dly_tsk(50); 				// attente feux vert
+		while((num_piste == 4) || (num_piste == 8)){
+			
+			
+			
+			
+			
+			num_piste = (periph_requete('M') << 8) >> 8;
+			dly_tsk(50);
+		}
+	}
+}
+
+
+
+
+
+
+
 void decode_int(void){
 	//short i = 0;
 	//while(touche != '#'){
@@ -191,16 +281,23 @@
 
 
 void asser_roue_vitesse(void){
-	
 	dist_mur_droit = periph_requete('U')*sin((3.1415f*(periph_requete('R')))/1800.0f);
 	
-	if((dist_mur_droit > 1500) || (dist_mur_droit < -1500)){	dist_mur_droit = distance_centre;}
+	if((dist_mur_droit > 1500) || (dist_mur_droit < -1500)){	dist_mur_droit = distance_centre;} //filtre valeurs aberantes pour trous
+	
+	
 	commande_D = k_D * (dist_mur_droit - distance_centre);
+	if(commande_D < -450)	commande_D = -450;
+	if(commande_D > 450)	commande_D = 450;
+	 
 	periph_command('D', commande_D);
 	
 	if(commande_D < 0)	commande_D = commande_D * (-1);
 	
-	commande_V = commande_V_max - (k_V * commande_D);
+	commande_V = commande_V_max - (k_V * (commande_D/10));
+	
+	if(commande_V < 0)	commande_V = commande_V * (-1);
+	
 	periph_command('V', commande_V);
 }
 
@@ -228,7 +325,7 @@
 void acqui()
 {
 	LED_V=!LED_V;
-	consigne_T = ad00;
+	//consigne_T = ad00;
 	commande_V_max = ad01/10;
 }
 
Index: branch/euphrasie_auguste/Emb_App/EmbM32C87App.tps
===================================================================
--- branch/euphrasie_auguste/Emb_App/EmbM32C87App.tps	(revision 188)
+++ branch/euphrasie_auguste/Emb_App/EmbM32C87App.tps	(revision 189)
@@ -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" 
